/* self-hosted fonts (Fontsource builds of the Google Fonts files) */
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geologica-latin.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geologica-cyrillic.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geologica-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "Forum"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/forum-latin.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Forum"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/forum-cyrillic.woff2") format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Forum"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/forum-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }

/* =========================================================
   MongolZ Chess — "Их Мастер" landing page
   Layout: 1440px container on a black stage; editorial rows on a
   3-column grid (1 + 2 span); sticky scroll-story hero.
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;

  /* color — from the Figma variables */
  --black: #000;
  --white: #fff;
  --gold-300: #edbb58;          /* color/primary/300* */
  --gold-400: #e9a536;          /* color/primary/400  */
  --gray-950: #171717;          /* color/gray/950 */
  --gray-900: #252525;          /* color/gray/900 */
  --silver-1: #deeffc;
  --silver-2: #bee1fb;
  --gold-a12: rgba(237, 187, 88, .12);
  --gold-a20: rgba(237, 187, 88, .2);
  --gold-a40: rgba(237, 187, 88, .4);
  --glow: rgba(237, 187, 88, .3);
  --veil: rgba(0, 0, 0, .7);
  --pattern: url("assets/pattern.svg") 0 0 / 80px 80px repeat;   /* Figma "Pattern" */

  /* type — scales with the window: Figma sizes at 1920px, ~75% at 1440px; body never below 14px */
  --font-display: "Forum", "Cormorant Garamond", Georgia, serif;
  --font-body: "Geologica", "Inter", system-ui, -apple-system, sans-serif;
  --fs-xs: .75rem;
  --fs-base: clamp(.875rem, .8333vw, 1rem);          /* 16 @1920 */
  --fs-lg: clamp(1.0625rem, 1.0417vw, 1.25rem);      /* 20 @1920 */
  --fs-eyebrow: clamp(1rem, 1.25vw, 1.5rem);         /* 24 @1920 */
  --fs-display-sm: clamp(1.5rem, 1.6667vw, 2rem);    /* 32 @1920 */
  --fs-display-md: clamp(1.75rem, 2.0833vw, 2.5rem); /* 40 @1920 */
  --fs-statement: clamp(1.25rem, 1.875vw, 2.25rem);  /* 36 @1920 */
  --fs-display-xl: clamp(3.5rem, 5vw, 6rem);         /* 96 @1920 */

  /* space & shape */
  --gutter: 24px;
  --radius: 24px;
  --pill: 20px;
  --section-pad: clamp(80px, 6rem + 4vw, 160px);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; overflow-x: hidden; } /* stop sideways panning on phones (older Safari ignores overflow: clip) */
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--fs-base);
  line-height: 1.4;
  letter-spacing: -.02em;
  font-variation-settings: "CRSV" 0, "SHRP" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
p, h1, h2, h3, dl, dd, ol, ul, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; border-radius: var(--pill); }

/* ---------- layout primitives ---------- */
.container { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.stack-xl { display: flex; flex-direction: column; gap: var(--section-pad); }
.stack-lg { display: flex; flex-direction: column; gap: 48px; }
.row { display: grid; gap: 24px; width: 100%; }
.row > * { min-width: 0; }
.row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; width: 100%; }
.split > * { min-width: 0; }

/* ---------- type ---------- */
.gold { color: var(--gold-300); }
.eyebrow { font-weight: 400; font-size: var(--fs-eyebrow); line-height: 1; text-transform: uppercase; text-align: center; opacity: .9; }
.lead { font-size: var(--fs-lg); }
.lead--justify { text-align: justify; }
.display-xl, .display-md, .display-sm { font-family: var(--font-display); font-weight: 400; line-height: .9; letter-spacing: 0; }
.display-md { font-size: var(--fs-display-md); }
.display-sm { font-size: var(--fs-display-sm); }
.display-xl {
  font-size: var(--fs-display-xl);
  text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(180deg, var(--gold-400) 0%, var(--gold-300) 50%, var(--black) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons (Figma "Button" component) ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; min-width: 60px; padding-inline: 16px;
  border-radius: var(--pill); border: 1px solid transparent;
  font-weight: 400; font-size: var(--fs-base); line-height: 1; white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s, opacity .25s;
}
.pill--outline { border-color: var(--gold-300); }
.pill--outline:hover { background: var(--gold-a12); }
.pill--blur { min-width: 120px; background: rgba(0,0,0,.2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.pill--solid { height: 36px; background: var(--gold-300); color: var(--black); opacity: .8; }
.pill--solid:hover { opacity: 1; }
.pill--ghost.is-active { border-color: var(--gold-300); }
.pill--light { border-color: var(--white); }
.pill--light:hover:not([aria-pressed="true"]) { background: rgba(255,255,255,.12); }
.pill--light[aria-pressed="true"] { background: var(--white); color: var(--black); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 46px; height: 40px; border-radius: var(--pill); border: 1px solid var(--gold-300);
  transition: background-color .25s;
}
.icon-btn:hover { background: var(--gold-a12); }

/* gold quote marks around the wordmark */
.ornament { width: 28px; height: 20px; flex: none; color: var(--gold-300); }
.ornament--flip { transform: rotate(180deg); align-self: flex-end; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: center;
  padding-top: env(safe-area-inset-top, 0px);
  pointer-events: none; /* only the controls catch clicks */
}
.site-header__inner {
  position: relative; pointer-events: auto;
  /* equal side columns keep the logo dead-centre even though MN/EN is wider than Захиалах */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; /* Figma: 12 */
  /* fixed width (2 × 136px sides + logo + gaps) so the menu never shifts when a label changes (page / MN·EN) */
  width: min(100% - 2 * var(--gutter), 359px); padding: 24px 0 8px;
}
.site-header__inner > :first-child,
.site-header__inner > :last-child { justify-self: stretch; } /* both sides exactly as wide → outer edges mirror too */
.site-header__inner::after { /* Figma: 1px gold stroke, transparent at both ends → solid gold in the middle */
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg,
    rgba(237,187,88,0) 0%, rgba(237,187,88,.09) 8.3%, rgba(237,187,88,.175) 16.7%, rgba(237,187,88,.335) 25%,
    rgba(237,187,88,.555) 33.3%, rgba(237,187,88,.775) 41.7%, #edbb58 50%,
    rgba(237,187,88,.775) 58.3%, rgba(237,187,88,.555) 66.7%, rgba(237,187,88,.335) 75%,
    rgba(237,187,88,.175) 83.3%, rgba(237,187,88,.09) 91.7%, rgba(237,187,88,0) 100%);
}
.site-header__logo { padding-bottom: 16px; }
.site-header__logo img { width: 63px; height: 80px; object-fit: cover; }
.lang {
  position: relative; display: flex; height: 40px;
  border-radius: var(--pill);
  background: rgba(0,0,0,.2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.lang .pill { flex: 1 1 0; height: 100%; min-width: 65.5px; }
/* Figma: the header pills' 1px strokes are gradients — bright gold on the outer side, fading toward the logo */
.lang::before, .site-header__inner > a.pill::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, var(--gold-300) 0%, rgba(237,187,88,.2) 88%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.site-header__inner > a.pill { position: relative; border-color: transparent; }
.site-header__inner > a.pill::before { inset: -1px; background: linear-gradient(90deg, rgba(237,187,88,.2) 12%, var(--gold-300) 100%); }
.site-header .pill { font-size: 14px; } /* Figma header buttons: 14px */

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; }
.hero__stage { position: absolute; inset: 0; z-index: -2; overflow: hidden; overflow: clip; container-type: size; }
.hero__bg {
  position: sticky; top: 0; height: 100svh;
  background:
    linear-gradient(180deg, #000 0%, rgba(0,0,0,.3) 50%, rgba(0,0,0,.8) 100%),
    url("assets/hero-bg.png") center / cover no-repeat;
  transform: scaleX(-1);
}
.hero__frame { /* Figma's 1920×1920 "Image" layer, scaled to cover the hero like object-fit: cover */
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: max(100cqw, 100cqh); aspect-ratio: 1;
}
.hero__piece { /* Figma "Image" layer 13231:312: the gold piece, placed exactly as in the 1920×1920 frame */
  position: absolute; left: 41.51%; top: 29.167%; width: 16.979%; height: 41.667%;
}
.hero__shade { /* Figma's overlay on the Image layer — it darkens everything beneath it, warriors included */
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #000 10%, rgba(0,0,0,0) 40%, rgba(0,0,0,.7) 70%);
}
.hero__glow {
  position: absolute; inset: 50% 0 0 0; z-index: -1;
  background:
    linear-gradient(42.66deg, var(--glow) 0%, transparent 20.3%),
    linear-gradient(-42.66deg, var(--glow) 0%, transparent 20.3%);
}
.hero__title-panel { /* bottom padding lifts the title block so "WORLDWIDE LIMITED EDITION 199" stays clear of the gold piece */
  min-height: 100svh; padding-bottom: max(80px, 260px - 16svh);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
}
.hero__title { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero__wordmark { display: flex; align-items: stretch; gap: 24px; }
/* "WORLDWIDE LIMITED EDITION 199" — gold spaced caps between two fine gold rules (same wording in MN and EN) */
.hero__wordmark .ornament:first-child { align-self: flex-start; }
.hero__lead-panel { scroll-margin-top: -96px; /* cancel html scroll-padding: land with the panel filling the screen */ min-height: 100svh; display: flex; align-items: flex-end; padding-block: var(--section-pad); }
.hero__lead-panel h2 { max-width: 560px; }

.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px;
  color: var(--gold-300); font-weight: 400; font-size: 14px; line-height: 1; text-transform: uppercase;
}
.scroll-cue svg { width: 14px; height: 14px; }
.scroll-cue span, .scroll-cue svg { opacity: .85; }
/* "WORLDWIDE / LIMITED EDITION / 199" in place of the old "scroll down" label.
   display:block so ONE gold shimmer sweeps across the whole block, not a separate gradient per line */
.scroll-cue:has(.scroll-cue__edition) { padding-top: 0; }
.scroll-cue__edition { display: block; text-align: center; font-size: 14px; font-weight: 500; line-height: 1.15; letter-spacing: .02em; }
@media (max-width: 760px) { .scroll-cue__edition { font-size: 13px; } }
/* gold shimmer: a bright band glides across the letters and loops seamlessly — the gradient starts and ends on the
   same gold and repeats, and each cycle moves it exactly one tile, so there is no jump when it restarts */
.scroll-cue span {
  background: linear-gradient(90deg, #b8893f 0%, #cb9b51 25%, #f6e27a 42%, #fbf3cf 50%, #f6e27a 58%, #cb9b51 75%, #b8893f 100%) 0 0 / 200% 100% repeat-x;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gold-shimmer 4s linear infinite;
}
.scroll-cue svg { animation: nudge 2s ease-in-out infinite; }
@keyframes gold-shimmer { from { background-position: 0% 0; } to { background-position: -200% 0; } }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* ---------- statement (sticky, words light up as you scroll) ---------- */
.statement { position: relative; height: 200svh; isolation: isolate; }
/* Figma: sticky photo at 60% opacity under a black → 60% → black fade */
.statement__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.statement__bg-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.statement__img {
  position: absolute; left: 0; right: 0; top: -17.27%; height: 112.42%;
  background: url("assets/statement-bg.jpg") center / cover no-repeat; opacity: .6;
}
.statement__bg-sticky::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #000 0%, rgba(0,0,0,.6) 70%, #000 95.19%);
}
.statement__sticky { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; }
.statement__text {
  max-width: 1080px; text-align: justify; text-align-last: left;
  font-weight: 400; font-size: var(--fs-statement); line-height: 1; letter-spacing: -0.02em;
}
.statement__text .w { color: rgba(255,255,255,.2); transition: color .3s; }
.statement__text .w.is-lit, .statement__text .gold .w { color: var(--gold-300); }

/* ---------- product information ---------- */
.info { padding-top: var(--section-pad); }
.info .stack-xl { gap: 80px; }
.copy { display: flex; flex-direction: column; justify-content: center; gap: 48px; padding: 24px; border-radius: var(--radius); background: var(--pattern); }
.copy__body { display: flex; flex-direction: column; gap: 24px; }
/* Figma: the cards' 1px stroke is gold at the top-left corner and fades along the edges.
   Here that bright spot travels slowly around the border (animated conic gradient, bram.us/2021/01/29). */
@property --mz-angle { syntax: "<angle>"; inherits: false; initial-value: 265deg; }
.copy, .panel { position: relative; isolation: isolate; }
.copy::before, .panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; padding: 1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--mz-angle),
    rgba(237,187,88,.1) 0deg, rgba(237,187,88,.4) 25deg, var(--gold-300) 50deg, rgba(237,187,88,.4) 75deg,
    rgba(237,187,88,.1) 100deg, rgba(237,187,88,.1) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: mz-border 10s linear infinite;
}
@keyframes mz-border { to { --mz-angle: 625deg; } }
.specs { display: flex; flex-direction: column; gap: 24px; }
.specs dt { opacity: .6; }
.specs dd { font-family: var(--font-display); font-size: var(--fs-display-md); line-height: .9; letter-spacing: 0; }
.metal { width: fit-content; -webkit-background-clip: text; background-clip: text; color: transparent; }
.metal--gold { background-image: linear-gradient(180deg, var(--gold-400) 0%, var(--gold-300) 50%, var(--black) 100%); }
.metal--silver { background-image: linear-gradient(180deg, var(--silver-1) 0%, var(--silver-2) 50%, var(--black) 100%); }

.media { width: 100%; max-width: 100%; border: 1px solid var(--gray-950); border-radius: var(--radius); object-fit: cover; background: var(--gray-950); }
.media--5x3 { aspect-ratio: 5 / 3; }
.media--2x1 { aspect-ratio: 2 / 1; }
.media--1x1 { aspect-ratio: 1; }
.media--wide { aspect-ratio: 2987 / 1072; }
.media--soft { border-color: var(--gray-900); }
.media-stack { display: flex; flex-direction: column; gap: 24px; align-self: start; }

/* Нарны / Сарны дайчид card */
.warriors { position: relative; overflow: hidden; display: flex; justify-content: center; padding: 24px; }
.warriors__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04);
  transition: opacity .7s ease, transform 1.2s ease;
}
.warriors__img.is-active { opacity: 1; transform: none; }
.warriors__toggle { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-self: flex-start; }
/* each photo is framed differently; Figma's crops keep the pieces at about the same size.
   The card keeps Figma's 2:1 shape on every screen, so these crops work on phones too */
.warriors__img[data-side="default"] { inset: auto; left: -5.42%; top: -26.3%; width: 113.99%; height: 128.13%; max-width: none; }
.warriors__img[data-side="sun"] { inset: auto; left: -22.36%; top: -36.64%; width: 143.74%; height: 161.58%; max-width: none; }

/* ---------- 3D pieces (shared by the carousel and the certificate duo) ---------- */
.piece3d { position: relative; }
.piece3d img { transition: opacity .6s ease; }
.piece3d.is-3d img { opacity: 0; }
.piece3d__canvas {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important;
  cursor: grab; opacity: 0; transition: opacity .6s ease;
}
.piece3d.is-3d .piece3d__canvas { opacity: 1; }
.piece3d.is-dragging .piece3d__canvas { cursor: grabbing; }

/* ---------- warriors carousel ---------- */
.models { position: relative; padding-top: var(--section-pad); }
.models__glow {
  position: absolute; inset: 0 0 112px 0; pointer-events: none; opacity: .5;
  background: radial-gradient(400px 280px at 50% 35%, var(--glow), transparent);
}
.models__wrap { display: flex; flex-direction: column; align-items: center; gap: 48px; }
/* coverflow — Figma: 150 · 225 · 300 · 225 · 150 wide cards, 24px apart, outer ones dimmed */
.models__stage { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; gap: 24px; }
.models__slide { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.models__figure { width: 300px; max-width: 100%; aspect-ratio: 3 / 4; border-radius: var(--radius); } /* no blend: "lighten" washed the dark tarnish and shadows out of the 3D pieces */
.models__figure img {
  width: 100%; height: 100%; object-fit: cover; border-radius: inherit;
  transition: opacity .35s ease;
}
.models__name { display: flex; flex-direction: column; align-items: center; }
.models__figure { position: relative; }
.models__ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; z-index: 2; }
.models__side, .models__slide { will-change: transform; }
.models__side {
  --w: 225px; flex: none; width: var(--w); display: flex; flex-direction: column; align-items: center; gap: calc(var(--w) * .08);
  opacity: .8; transition: opacity .3s, translate .3s; cursor: pointer;
}
.models__side--far { --w: 150px; opacity: .6; }
.models__side:hover { opacity: 1; translate: 0 -4px; }
.models__side img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; } /* transparent stills rendered from the 3D models */
.models__side-name { display: flex; flex-direction: column; align-items: center; white-space: nowrap; }
.models__side-name span { font-size: calc(var(--w) * .0533); line-height: 1.4; }
.models__side-name b { font-family: var(--font-display); font-weight: 400; font-size: calc(var(--w) * .1333); line-height: .9; color: var(--gold-300); }
.models__arrow { position: absolute; top: 50%; translate: 0 -50%; }
.models__arrow--prev { left: 0; }
.models__arrow--next { right: 0; }

/* story: one glowing gold card — photo on the left, story + fact on the right (Figma "Card" 880 wide) */
.models__detail {
  width: 100%; max-width: 880px; display: flex; gap: 24px; align-items: center; padding: 24px;
  border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--gold-300),
    0 0 8px rgba(237,187,88,.5), 0 12px 40px rgba(237,187,88,.3), 0 24px 80px rgba(237,187,88,.1);
  position: relative; isolation: isolate;
  background: radial-gradient(440px 205px at 50% 0, rgba(237,187,88,.5), rgba(178,140,66,.425) 12.5%, rgba(119,94,44,.35) 25%, rgba(59,47,22,.275) 37.5%, rgba(0,0,0,.2) 50%);
}
.models__detail::before { /* Figma: the pattern shows only under the gold glow at the top and fades out below */
  content: ""; position: absolute; inset: 1px; z-index: -1; border-radius: calc(var(--radius) - 1px); pointer-events: none;
  background: var(--pattern); /* inset 1px: stays inside the gold border line */
  -webkit-mask: radial-gradient(560px 260px at 50% 0, #000 0%, rgba(0,0,0,.5) 45%, transparent 100%);
  mask: radial-gradient(560px 260px at 50% 0, #000 0%, rgba(0,0,0,.5) 45%, transparent 100%);
}
.models__thumb { width: 240px; aspect-ratio: 2 / 3; flex: none; border-radius: 12px; object-fit: cover; }
.models__card { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 48px; }
.models__story { text-align: justify; }

.fact { display: flex; flex-direction: column; gap: 24px; }
.fact hr { width: 100%; height: 1px; margin: 0; border: 0; background: linear-gradient(90deg, rgba(237,187,88,0), var(--gold-300) 49%, rgba(237,187,88,0)); }
.fact__text { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1; letter-spacing: 0; opacity: .8; text-align: justify; }

/* ---------- creators ---------- */
.creators { padding-top: var(--section-pad); }
.creators .stack-xl { gap: 80px; }
.portrait {
  position: relative; aspect-ratio: 5 / 4; overflow: hidden;
  display: flex; align-items: flex-end; padding: 8px;
  border-radius: var(--radius); background: var(--gray-950);
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }
.portrait:hover img { transform: scale(1.03); }
.portrait figcaption {
  position: relative; width: 100%;
  display: flex; flex-direction: column;
  padding: 16px 24px 20px; border-radius: 16px;
  background: var(--veil); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.panel {
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 24px; border-radius: var(--radius); background: var(--pattern);
}
.portrait--left img { object-position: 0% 50%; }   /* Figma crops */
.portrait--high img { object-position: 50% 16%; }
.panel h3 { max-width: 640px; }
.panel__foot { display: flex; flex-direction: column; align-items: flex-end; gap: 24px; }
.panel__foot p { align-self: stretch; }
/* Уран бүтээлүүд modal */
.has-modal { overflow: hidden; }
.bio-modal {
  width: min(760px, calc(100% - 2 * var(--gutter))); max-height: calc(100svh - 48px);
  margin: auto; padding: 0; border: 0; border-radius: var(--radius);
  background: var(--gray-950); color: var(--white);
  box-shadow: inset 0 0 0 1px var(--gray-900), 0 40px 120px rgba(0,0,0,.6);
  overflow: auto; overscroll-behavior: contain;
}
.bio-modal::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bio-modal[open] { animation: modal-in .35s var(--ease-out); }
.bio-modal[open]::backdrop { animation: fade-in .35s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
.bio-modal__inner { display: flex; flex-direction: column; gap: 24px; padding: 32px; background: var(--pattern); }
.bio-modal__head { position: relative; display: flex; align-items: center; gap: 20px; padding-right: 48px; }
.bio-modal__photo { width: 88px; height: 88px; flex: none; border-radius: 16px; object-fit: cover; }
.bio-modal__head h4 { margin: 4px 0; }
.bio-modal__eyebrow { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; opacity: .6; }
.bio-modal__role { opacity: .7; }
.bio-modal__close {
  position: absolute; top: 0; right: 0;
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; box-shadow: inset 0 0 0 1px var(--gold-a40);
  transition: background-color .25s;
}
.bio-modal__close:hover { background: var(--gold-a12); }
/* owner registration modal (registry.js) */
.reg-modal { width: min(560px, calc(100% - 2 * var(--gutter))); }
.reg { display: flex; flex-direction: column; gap: 24px; }
.reg__lead { opacity: .85; }
.reg__form { display: flex; flex-direction: column; gap: 20px; }
.reg__field { display: flex; flex-direction: column; gap: 8px; }
.reg__label { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-300); }
.reg__hint { font-size: var(--fs-xs); opacity: .55; }
.reg__or { text-align: center; margin: -4px 0; }
.reg__input {
  width: 100%; height: 48px; padding: 0 16px; border: 0; border-radius: 12px;
  background: rgba(0,0,0,.55); color: var(--white); font: inherit;
  box-shadow: inset 0 0 0 1px var(--gray-900); transition: box-shadow .2s;
}
.reg__input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--gold-300); }
.reg__input--num { height: 72px; font-family: var(--font-display); font-size: 48px; letter-spacing: .12em; text-align: center; font-variant-numeric: tabular-nums; }
.reg__input--num::placeholder { color: rgba(255,255,255,.18); }
select.reg__input { appearance: none; padding-right: 40px; cursor: pointer;
  background: rgba(0,0,0,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23edbb58' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center no-repeat; }
select.reg__input option { background: var(--gray-950); }
.reg__warning { padding: 12px 16px; border-radius: 12px; background: var(--gold-a12); color: var(--gold-300); font-size: var(--fs-sm, 14px); }
.reg__error { color: #ff8a7a; font-size: 14px; }
.reg__submit { align-self: stretch; height: 48px; opacity: 1; }
.reg__submit[disabled] { opacity: .5; cursor: progress; }
.reg__card { margin: 0; padding: 8px 24px; border-radius: 16px; background: rgba(0,0,0,.55); box-shadow: inset 0 0 0 1px var(--gold-a40); }
.reg__card > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: baseline; padding-block: 14px; }
.reg__card > div + div { border-top: 1px solid var(--gray-900); }
.reg__card dt { opacity: .6; font-size: 14px; }
.reg__card dd { margin: 0; }
.reg__num { font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--gold-300); }
.reg__num small { font-size: 16px; opacity: .6; margin-left: 4px; }

.bio {
  list-style: none; margin: 0; padding: 8px 0 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px;
  border-top: 1px solid var(--gold-a40);
}
.bio li { display: flex; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--gray-900); }
.bio em { font-style: normal; }
.bio span { flex: none; color: var(--gold-300); font-variant-numeric: tabular-nums; }

/* ---------- certification ---------- */
.cert { position: relative; isolation: isolate; background: var(--pattern); }
.cert__fade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #000 0%, rgba(0,0,0,0) 75%, #000 100%); } /* Figma overlay: dims the pattern */
.cert__glow {
  position: absolute; inset: auto 0 0 0; height: 960px; z-index: -1;
  background:
    linear-gradient(42.66deg, var(--glow) 0%, transparent 20.3%),
    linear-gradient(-42.66deg, var(--glow) 0%, transparent 20.3%);
}
.cert__top { display: flex; flex-direction: column; align-items: center; gap: var(--section-pad); padding-top: var(--section-pad); }
.cert__intro { display: flex; flex-direction: column; align-items: center; gap: 80px; max-width: 720px; text-align: center; }
.cert__heading { display: flex; flex-direction: column; align-items: center; max-width: 480px; }
.cert__duo { /* Figma: the pair sits closer under the button, and the guide card follows right after it */
  width: min(400px, 100%); aspect-ratio: 1;
  margin-top: calc(min(400px, 100%) * -.13); margin-bottom: calc(min(400px, 100%) * -.24);
}
.cert__duo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: lighten; }
.cert__bottom {
  display: flex; flex-direction: column; align-items: center; gap: var(--section-pad);
  padding-top: calc(var(--section-pad) / 2); padding-bottom: 24px;
}

/* registration guide */
.guide {
  position: relative; width: 100%; max-width: 640px;
  display: flex; flex-direction: column; align-items: center; gap: 48px;
  padding: 48px; border-radius: var(--radius); background: var(--veil);
}
.guide::before { /* 1px border fading from gold (top) to grey (bottom) */
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, var(--gold-300), var(--gray-950));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.guide hr { width: 100%; height: 1px; margin: 0; border: 0; background: linear-gradient(90deg, rgba(237,187,88,0), var(--gold-300) 49%, rgba(237,187,88,0)); }
.guide__head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.guide__head .display-md { color: var(--white); }
.steps { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 400px; display: flex; flex-direction: column; }
.steps li { position: relative; display: flex; flex-direction: column; gap: 24px; padding: 0 0 48px 52px; }
.steps li::before { /* 12px gold dot in a 28px slot */
  content: ""; position: absolute; left: 8px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--gold-300);
}
.steps li:not(:last-child)::after { /* connector */
  content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 4px; width: 1px; background: rgba(255,255,255,.2);
}
.steps__title { display: flex; align-items: center; gap: 8px; min-height: 28px; color: var(--gold-300); font-size: var(--fs-lg); } /* same 28px row as the dot */
.steps__title b { font-weight: inherit; }
.steps__title span { opacity: .8; font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.site-footer { width: 100%; margin-top: calc(80px - var(--section-pad)); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: var(--fs-xs); }
.site-footer p { display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,.4); }
.site-footer a { display: inline-flex; transition: opacity .2s; }
.site-footer a:hover { opacity: .7; }

/* ---------- section menu ----------
   Works like the UNESCO Virtual Museum menu: the pill of the section you are reading fills with gold,
   finished sections fall back to plain, a tap scrolls to the section. Hidden over the hero and statement,
   as in the Figma prototype. On phones it collapses to one pill that opens a list. */
.section-nav {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 16px calc(clamp(24px, 8.33svh, 80px) + env(safe-area-inset-bottom, 0px)); /* 80px up on a 960px-tall screen */
  pointer-events: none;
  opacity: 0; transform: translateY(16px); visibility: hidden;
  transition: opacity .4s, transform .4s, visibility 0s .4s;
}
.section-nav.is-visible { opacity: 1; transform: none; visibility: visible; transition: opacity .4s, transform .4s; }
.section-nav.is-visible :is(.section-nav__track, .section-nav__toggle) { pointer-events: auto; }
.section-nav__track {
  position: relative; display: flex; max-width: 100%; padding: 2px; border-radius: var(--pill);
  background: rgba(23,23,23,.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: background-color .4s;
}
.section-nav.is-raised .section-nav__track { background: var(--gray-950); }
.section-nav__track a {
  position: relative; z-index: 1;
  display: grid; place-items: center; height: 36px; padding-inline: 16px; border-radius: var(--pill);
  font-weight: 400; font-size: 14px; line-height: 1; white-space: nowrap; opacity: .6;
  transition: opacity .3s, background-color .3s;
}
.section-nav__track a:hover { opacity: 1; background: var(--gray-900); }
.section-nav__track a.is-active { opacity: 1; background: none; }
.section-nav__indicator { /* black pill under the active tab */
  position: absolute; top: 2px; bottom: 2px; left: 0; width: 0; z-index: 0;
  border-radius: var(--pill); background: var(--black);
  transition: transform .45s var(--ease-out), width .45s var(--ease-out);
}
/* gold layer with a black copy of the label, clipped from the right: grows from the 10px stub
   in the design to the full pill as you read through the section */
.section-nav__fill, .section-nav__toggle-fill {
  position: absolute; z-index: 2; display: grid; place-items: center;
  border-radius: var(--pill); background: var(--gold-300); color: var(--black);
  font-weight: 400; line-height: 1; white-space: nowrap; pointer-events: none;
  clip-path: inset(0 calc(100% - max(10px, var(--fill, 0%))) 0 0 round var(--pill));
}
.section-nav__fill {
  top: 2px; bottom: 2px; left: 0; width: 0;
  transition: transform .45s var(--ease-out), width .45s var(--ease-out);
}
.section-nav__fill.is-switching { clip-path: inset(0 calc(100% - 10px) 0 0 round var(--pill)); }

.section-nav__toggle { /* phone only */
  position: relative; display: none; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--pill);
  background: var(--black); box-shadow: 0 0 0 2px var(--gray-950);
  font-weight: 400; line-height: 1; white-space: nowrap;
}
.section-nav__toggle-fill { inset: 0; padding: 0 16px; grid-auto-flow: column; justify-content: start; gap: 8px; }
.section-nav__toggle svg { transition: transform .3s; }
.section-nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------- scroll reveal (content is visible at rest) ---------- */
.js .reveal { transition: transform .9s var(--ease-out); }
.js .reveal:not(.is-in) { transform: translateY(28px); }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .models__side--far { display: none; } /* keep the arrows clear of the cards */
}
@media (max-width: 1024px) {
  .row--3 { grid-template-columns: 1fr 1fr; }
  .row--3 > .span-2 { grid-column: span 1; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .site-header__inner { gap: 12px; padding-top: 16px; width: min(100% - 2 * var(--gutter), 343px); }
  .site-header__logo img { width: 47px; height: 60px; }
  .pill--blur { min-width: 0; }
  .split, .row--2, .row--3 { grid-template-columns: 1fr; }
  .span-2, .row--3 > .span-2 { grid-column: auto; }
  .copy { gap: 32px; }
  .hero__wordmark { gap: 12px; }
  .ornament { width: 20px; height: 14px; }
  /* phones: one row of compact buttons, no icons */
  .warriors { padding: 12px; }
  .warriors__toggle { flex-wrap: nowrap; gap: 6px; }
  .warriors__toggle .pill { height: 32px; min-width: 0; padding-inline: 12px; font-size: 13px; }
  .warriors__toggle svg { display: none; }
  /* statement + intro stay justified on phones too (as in Figma) */
  /* phones: no pinned scroll stage — the statement is a normal block (photo behind it), and the words
     light up as it scrolls past, so there is no empty screen to scroll through */
  .statement { height: auto; }
  .statement__bg-sticky { position: absolute; inset: 0; height: auto; }
  .statement__sticky { position: static; height: auto; padding-block: 80px; } /* same 80px gap as between the product cards */
  .statement + .info, .statement ~ .info { padding-top: 0; } /* the statement's own 80px is the gap */
  .models__side { display: none; }
  .models__figure { width: 240px; }
  .models__wrap { gap: 32px; }
  .models__detail { flex-direction: column; }
  .models__thumb { width: min(100%, 320px); aspect-ratio: 2 / 3; align-self: center; } /* same portrait crop as Figma (2:3), not a wide strip */
  .models__card { gap: 32px; }
  .models__story, .fact__text { text-align: left; }
  .bio { grid-template-columns: 1fr; }
  .bio-modal { max-height: calc(100svh - 24px); }
  .bio-modal__inner { padding: 24px 20px; }
  .bio-modal__photo { width: 64px; height: 64px; }
  .guide { padding: 32px 20px; }

  /* section menu → one pill that opens a list */
  .section-nav__toggle { display: inline-flex; }
  .section-nav__track {
    order: -1; flex-direction: column; align-items: stretch; min-width: 220px;
    margin-bottom: 8px; padding: 6px; border-radius: 16px; background: var(--gray-950);
    opacity: 0; transform: translateY(8px); visibility: hidden;
    transition: opacity .25s, transform .25s, visibility 0s .25s;
  }
  .section-nav.is-open .section-nav__track { opacity: 1; transform: none; visibility: visible; transition: opacity .25s, transform .25s; }
  .section-nav__track a { height: 40px; place-items: center start; }
  .section-nav__track a.is-active { background: var(--black); color: var(--gold-300); }
  .section-nav__indicator, .section-nav__fill { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal:not(.is-in) { transform: none; }
}

@media (max-width: 359px) { /* very small phones: tighten the header so both sides fit evenly */
  .site-header__inner { gap: 6px; }
  .site-header__inner .pill { min-width: 0; padding-inline: 8px; }
  .site-header .pill { font-size: 13px; }
}
