/* JIYA — shared base: tokens, primitives, chrome (nav/footer), product card.
   Linked by every page. Accent is overridable per-page via --accent. */

:root {
  --cream: #F6F3EC;
  --paper: #EFEBE0;
  --gold: #C6A65B;
  --ink: #0C0C0D;
  --void: #0C0C0D;
  --void-2: #131011;
  --garnet: #8E1F2B;
  --liver: #5A1E22;
  --blood: #3A1416;
  --silver: #8C8A8E;
  --silver-dim: #6c6a6e;

  /* per-page accent (defaults to house garnet) */
  --accent: #8E1F2B;
  --accent-2: #5A1E22;

  --display: "Bodoni Moda", Georgia, serif;
  --sans: "Josefin Sans", system-ui, sans-serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1340px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body); font-weight: 300;
  background: var(--void); color: var(--silver);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--cream); }
a { color: inherit; text-decoration: none; }
section { position: relative; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 48px; }

.scale-tex {
  background-image:
    radial-gradient(circle at 50% 0, rgba(140,138,142,0.05) 0 1px, transparent 1px),
    radial-gradient(circle at 0 50%, rgba(140,138,142,0.035) 0 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 11px 11px;
}

/* ---- type primitives ---- */
.eyebrow { font-family: var(--sans); font-weight: 400; font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold); }
.eyebrow--dim { color: var(--silver-dim); }
.eyebrow--accent { color: var(--accent); }
.display { font-family: var(--display); font-weight: 400; line-height: 0.94; letter-spacing: -0.01em; }
.body-lg { font-size: 18px; line-height: 1.78; font-weight: 300; color: #b7b5b9; }
.body { font-size: 15.5px; line-height: 1.8; font-weight: 300; color: #a4a2a6; }
.rule { height: 1px; background: var(--gold); opacity: 0.5; border: 0; }
.rule--silver { background: var(--silver); opacity: 0.22; }

/* ---- reveal ---- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: opacity 0.5s ease; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---- placeholder (style 3) ---- */
.ph { position: relative; width: 100%; overflow: hidden; background: var(--void-2); }
.ph--liver { background: #15100f; }
.ph--lapis { background: #0c1018; }
.ph__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ph__label { position: absolute; left: 14px; bottom: 12px; right: 14px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10px; letter-spacing: 0.04em; line-height: 1.5; color: rgba(198,166,91,0.72); }
.ph__tag { position: absolute; left: 14px; top: 12px; font-family: ui-monospace, Menlo, monospace; font-size: 9px; letter-spacing: 0.18em; color: rgba(140,138,142,0.6); text-transform: uppercase; }

/* ---- buttons ---- */
.btn { font-family: var(--sans); font-weight: 400; font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: var(--cream); padding: 19px 30px; width: 100%; transition: all 0.5s var(--ease); position: relative; overflow: hidden; }
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost { background: transparent; color: var(--silver); border-color: rgba(140,138,142,0.35); }
.btn--ghost:hover { color: var(--cream); border-color: var(--silver); background: transparent; }
.btn:disabled { cursor: default; opacity: 0.55; }

.glint::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(198,166,91,0.5), transparent); transform: skewX(-18deg); opacity: 0; }
.glint:hover::after { animation: glint 0.9s var(--ease) forwards; opacity: 1; }
@keyframes glint { to { left: 120%; } }

/* gem-dot helper used inline by GemDot component */

/* ---- loader ---- */
#loader { position: fixed; inset: 0; z-index: 200; background: var(--void); display: flex; align-items: center; justify-content: center; transition: opacity 1.1s var(--ease), visibility 1.1s var(--ease); }
#loader.done { opacity: 0; visibility: hidden; }
.loader__mark { text-align: center; }
.loader__ring { transform-origin: 60px 60px; animation: loaderSpin 3.2s linear infinite; }
.loader__j { font-family: var(--display); font-size: 58px; fill: var(--cream); font-weight: 500; }
.loader__word { font-family: var(--sans); font-size: 12px; letter-spacing: 0.55em; color: var(--gold); margin-top: 22px; padding-left: 0.55em; animation: loaderFade 2.4s var(--ease) infinite; }
@keyframes loaderSpin { to { transform: rotate(360deg); } }
@keyframes loaderFade { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ---- NAV ---- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 90; padding: 26px 0; transition: padding 0.5s var(--ease), background 0.5s var(--ease), border-color 0.5s var(--ease); border-bottom: 1px solid transparent; }
.nav.is-solid { padding: 14px 0; background: rgba(12,12,13,0.82); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(140,138,142,0.16); }
.nav__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.nav__left, .nav__right { display: flex; gap: 30px; align-items: center; }
.nav__right { justify-content: flex-end; }
.nav__left a, .nav__right a { font-family: var(--sans); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--silver); transition: color 0.4s var(--ease); }
.nav__left a:hover, .nav__right a:hover, .nav__left a.is-here { color: var(--cream); }
.nav__brand { font-size: 26px; color: var(--cream); text-align: center; letter-spacing: 0.12em; font-weight: 500; }
.nav__count { display: inline-block; min-width: 17px; height: 17px; line-height: 17px; text-align: center; font-size: 10px; color: var(--cream); background: var(--accent); border-radius: 50%; margin-left: 3px; }

/* ---- PRODUCT CARD (reused) ---- */
.pcard { display: block; }
.pcard__img { position: relative; overflow: hidden; }
.pcard__front, .pcard__back { transition: opacity 0.7s var(--ease); }
.pcard__back { position: absolute; inset: 0; opacity: 0; }
.pcard:hover .pcard__front { opacity: 0; }
.pcard:hover .pcard__back { opacity: 1; }
.pcard__meta { padding-top: 22px; text-align: center; }
.pcard__name { font-size: 34px; color: var(--cream); display: flex; align-items: center; justify-content: center; gap: 10px; }
.pcard__epi { font-family: var(--body); font-size: 14px; font-style: italic; color: var(--silver); margin: 8px 0 12px; }
.pcard__price { font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; color: #b7b5b9; }

/* ---- FOOTER ---- */
.foot { background: var(--void-2); padding: 96px 0 44px; border-top: 1px solid rgba(140,138,142,0.14); }
.foot__news { display: flex; justify-content: space-between; align-items: flex-end; gap: 50px; flex-wrap: wrap; }
.foot__news-t { font-size: clamp(34px, 4vw, 58px); color: var(--cream); margin-top: 14px; }
.foot__form { display: flex; align-items: stretch; border-bottom: 1px solid var(--silver); min-width: 320px; flex: 1; max-width: 440px; }
.foot__form input { flex: 1; background: none; border: none; color: var(--cream); font-family: var(--body); font-size: 16px; padding: 12px 4px; outline: none; }
.foot__form input::placeholder { color: var(--silver-dim); }
.foot__form button { background: none; border: none; cursor: pointer; color: var(--gold); position: relative; overflow: hidden; font-family: var(--sans); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; padding: 0 8px; }
.foot__cols { display: grid; grid-template-columns: 0.9fr 2.6fr; gap: 50px; }
.foot__mono { font-size: 60px; color: var(--gold); line-height: 1; }
.foot__tag { font-family: var(--sans); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--silver); margin-top: 16px; }
.foot__nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.foot__nav > div { display: flex; flex-direction: column; gap: 14px; }
.foot__nav > div .eyebrow { margin-bottom: 6px; }
.foot__nav a { font-family: var(--body); font-size: 14px; color: var(--silver); transition: color 0.4s var(--ease); }
.foot__nav a:hover { color: var(--cream); }
.foot__base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 72px; font-family: var(--sans); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silver-dim); }
.foot__base a { transition: color 0.4s var(--ease); }
.foot__base a:hover { color: var(--cream); }
.foot__legal { display: inline-flex; gap: 18px; }

@media (max-width: 1040px) {
  .foot__cols { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 900px) {
  .wrap { padding: 0 22px; }
}
@media (max-width: 700px) {
  .nav__left, .nav__right a:not(.nav__cart) { display: none; }
  .foot__nav { grid-template-columns: 1fr 1fr; }
  .foot__news { flex-direction: column; align-items: stretch; }
}

/* ---- LOCALE SWITCHER (header popover) ---- */
.locsw { position: relative; display: inline-flex; align-items: center; }
.locsw__btn { font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; background: none; border: none; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 6px; transition: color 0.3s var(--ease); }
.locsw__div { opacity: 0.5; }
.locsw--dark .locsw__btn { color: var(--silver); }
.locsw--dark .locsw__btn:hover { color: var(--cream); }
.locsw--paper .locsw__btn { color: #4a463f; }
.locsw--paper .locsw__btn:hover { color: var(--ink); }
.locsw__pop { position: absolute; top: calc(100% + 16px); right: 0; min-width: 184px; padding: 20px 22px 22px; z-index: 130; border: 1px solid; display: flex; flex-direction: column; gap: 20px; animation: locpop 0.4s var(--ease); }
@keyframes locpop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.locsw--dark .locsw__pop { background: var(--void-2); border-color: rgba(140,138,142,0.25); }
.locsw--paper .locsw__pop { background: var(--cream); border-color: rgba(12,12,13,0.16); }
.locsw__h { font-family: var(--sans); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 12px; }
.locsw--dark .locsw__h { color: var(--silver-dim); }
.locsw--paper .locsw__h { color: #8a857c; }
.locsw__opt { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: none; cursor: pointer; font-family: var(--body); font-size: 14px; padding: 7px 0; transition: color 0.25s var(--ease); }
.locsw__sym { display: inline-block; width: 16px; }
.locsw--dark .locsw__opt { color: #a4a2a6; }
.locsw--dark .locsw__opt:hover, .locsw--dark .locsw__opt.is-on { color: var(--cream); }
.locsw--paper .locsw__opt { color: #4a463f; }
.locsw--paper .locsw__opt:hover, .locsw--paper .locsw__opt.is-on { color: var(--ink); }
.locsw__opt.is-on { position: relative; }
.locsw__opt.is-on::after { content: ""; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); margin-left: auto; }

/* ---- LOCALE PICKER (footer selects) ---- */
.locpick { display: flex; gap: 30px; margin-top: 30px; flex-wrap: wrap; }
.locpick__field { display: flex; flex-direction: column; gap: 8px; }
.locpick__field > span { font-family: var(--sans); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--silver-dim); }
.locpick__field select { font-family: var(--body); font-size: 14px; color: var(--cream); background: transparent; border: none; border-bottom: 1px solid rgba(140,138,142,0.4); padding: 6px 26px 7px 2px; cursor: pointer; outline: none; appearance: none; min-width: 150px; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238C8A8E' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 2px center; transition: border-color 0.3s var(--ease); }
.locpick__field select:hover { border-color: var(--silver); }
.locpick__field option { background: var(--void-2); color: var(--cream); }

@media (max-width: 700px) {
  .locsw { display: none; }
}
