/* ==========================================================================
   IF — ប្រសិនបើ · portfolio
   Monochrome editorial × Angkor sandstone. Two colours, Khmer + Latin.
   ========================================================================== */

:root {
  --ink: #0c0c0c;
  --paper: #ece4d6; /* warm sandstone */
  --stone: #8f897f;
  --line: color-mix(in srgb, var(--paper) 18%, transparent);
  --line-ink: color-mix(in srgb, var(--ink) 18%, transparent);

  --f-display: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --f-sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --f-km: "Kantumruy Pro", "Noto Sans Khmer", sans-serif;
  --f-km-display: "Moul", "Kantumruy Pro", serif;

  --pad: clamp(1rem, 2.6vw, 2.5rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

/* Underworld mode (Konami code): everything inverts */
html.is-underworld {
  --ink: #ece4d6;
  --paper: #0c0c0c;
  --stone: #6f6a62;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-sans);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

[lang="km"], .km { font-family: var(--f-km); letter-spacing: 0; line-height: 1.75; }

.mono {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.muted { color: var(--stone); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Grain over everything, like an old museum print */
.grain {
  position: fixed; inset: -50%;
  z-index: 90; pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-3%, 2%); }
  66% { transform: translate(2%, -3%); }
  100% { transform: translate(0, 0); }
}

/* Light sections: darker muted text so small labels keep >= 4.5:1 contrast */
.band, .about, .oracle-sec, .menu, .toast { --stone: color-mix(in srgb, var(--ink) 64%, var(--paper)); }

/* Section label: "(01) — The question / សំណួរ" */
.label {
  display: flex; gap: .9em; align-items: baseline; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--stone);
}
.label .km { text-transform: none; font-size: .8rem; }

/* ---------- Preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  clip-path: inset(0 0 0 0);
}
.loader__inner { text-align: center; }
.loader__if {
  font-family: var(--f-display); font-weight: 300; font-size: clamp(6rem, 18vw, 16rem);
  line-height: .8; letter-spacing: -.04em;
}
.loader__row {
  display: flex; justify-content: space-between; gap: 2rem; margin-top: 1.4rem;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--stone);
}
.loader__km { font-family: var(--f-km); text-transform: none; font-size: .85rem; margin-top: .4rem; color: var(--stone); }
.loader__count { color: var(--paper); font-variant-numeric: tabular-nums; }
html:not(.js) .loader { display: none; }

/* ---------- Header ---------- */
.hd {
  position: fixed; inset: 0 0 auto; z-index: 60;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: var(--pad);
  color: #ebe7df;
  mix-blend-mode: difference;
  pointer-events: none;
}
.hd > * { pointer-events: auto; }
.logo { display: inline-flex; align-items: baseline; gap: .55rem; justify-self: start; }
.logo__if { font-family: var(--f-display); font-weight: 600; font-size: 1.9rem; line-height: 1; letter-spacing: -.03em; }
.logo__km { font-family: var(--f-km); font-size: .8rem; opacity: .75; }
.hd__time { text-align: center; }
.hd__time b { font-weight: 500; font-variant-numeric: tabular-nums; }
.menu-btn {
  justify-self: end; display: inline-flex; align-items: center; gap: .8rem;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
}
.menu-btn__lines { position: relative; width: 26px; height: 9px; }
.menu-btn__lines::before, .menu-btn__lines::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: currentColor;
  transition: transform .5s var(--ease-out), top .5s var(--ease-out);
}
.menu-btn__lines::before { top: 0; }
.menu-btn__lines::after { top: 8px; }
.is-menu-open .menu-btn__lines::before { top: 4px; transform: rotate(45deg); }
.is-menu-open .menu-btn__lines::after { top: 4px; transform: rotate(-45deg); }

/* ---------- Menu (numbered editorial, symmetric) ---------- */
.menu {
  position: fixed; inset: 0; z-index: 55;
  display: grid; grid-template-rows: 1fr auto;
  padding: calc(var(--pad) * 4) var(--pad) var(--pad);
  background: var(--paper); color: var(--ink);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
html.is-menu-open body { overflow: hidden; }
.menu__list { list-style: none; margin: 0; padding: 0; align-self: center; }
.menu__item { border-top: 1px solid var(--line-ink); overflow: hidden; }
.menu__item:last-child { border-bottom: 1px solid var(--line-ink); }
.menu__link {
  display: grid; grid-template-columns: 4rem 1fr auto; align-items: baseline; gap: 1rem;
  padding: .35rem 0;
  transition: opacity .4s, transform .6s var(--ease-out);
}
.menu__num { font-family: var(--f-mono); font-size: .72rem; color: var(--stone); }
.menu__en { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.6rem, 7vw, 6.4rem); line-height: 1; letter-spacing: -.02em; }
.menu__km { font-family: var(--f-km); font-size: clamp(.9rem, 1.4vw, 1.2rem); color: var(--stone); }
.menu__list:hover .menu__link { opacity: .28; }
.menu__list .menu__link:hover { opacity: 1; transform: translateX(1.2rem); }
.menu__link.is-active .menu__en { font-style: italic; }
.menu__foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.5rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden;
}
.hero__canvas, .hero__fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero__canvas.is-failed { display: none; }
.hero__fallback {
  object-fit: contain; object-position: 66% 50%;
  image-rendering: pixelated;
  display: none;
}
.hero.is-fallback .hero__fallback, html:not(.js) .hero__fallback { display: block; }

.hero__ui {
  position: relative; z-index: 2; height: 100%;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: calc(var(--pad) * 3.2) var(--pad) var(--pad);
  pointer-events: none;
  color: #ebe7df;
  mix-blend-mode: difference; /* stays readable over the dithered statue, in both modes */
}
.hero__ui a, .hero__ui button { pointer-events: auto; }
.hero__meta { display: flex; flex-direction: column; gap: .2rem; max-width: 22rem; }
.hero__meta .km { font-size: .85rem; color: var(--stone); }

.hero__title { align-self: end; margin: 0; font-weight: 400; }
.hero__if {
  display: block;
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(9rem, 31vw, 34rem);
  line-height: .74; letter-spacing: -.05em;
  margin-left: -.06em;
}
.hero__km {
  display: block;
  font-family: var(--f-km-display); font-weight: 400;
  font-size: clamp(2.2rem, 6.6vw, 7rem);
  line-height: 1.5; margin-top: .1em;
}
.hero__line { margin: .8rem 0 0; font-family: var(--f-display); font-style: italic; font-size: clamp(1.2rem, 1.8vw, 1.7rem); line-height: 1.2; }
.hero__line .km { display: block; font-style: normal; font-size: .62em; color: var(--stone); margin-top: .2rem; }

.hero__foot {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 1rem;
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line);
}
.hero__foot > :last-child { text-align: right; }
.hero__scroll { display: inline-flex; flex-direction: column; align-items: center; gap: .5rem; }
.hero__scroll i { display: block; width: 1px; height: 34px; background: var(--paper); transform-origin: top; animation: drip 2.2s var(--ease-io) infinite; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* split chars (SplitText) */
.split-word { display: inline-block; white-space: nowrap; }
.char-wrap { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .04em; }
[data-weight] .char { font-variation-settings: "wght" var(--w, 300); }

/* ---------- Intro (scroll words) ---------- */
.intro { padding: clamp(6rem, 16vw, 14rem) var(--pad) clamp(5rem, 12vw, 10rem); }
.intro__text {
  margin: 2.2rem 0 0;
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 5.2rem); line-height: 1.04; letter-spacing: -.015em;
  max-width: 15.5em;
}
.intro__text em { font-style: italic; }
.intro__km { margin: 2.4rem 0 0; max-width: 46rem; font-size: clamp(1rem, 1.4vw, 1.3rem); color: var(--stone); }
.intro__sign { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.word { display: inline-block; }

/* ---------- Manifesto band ---------- */
.band {
  background: var(--paper); color: var(--ink);
  padding: clamp(1.5rem, 3vw, 3rem) 0;
  overflow: hidden;
}
.band__row { display: flex; white-space: nowrap; will-change: transform; }
.band__track { display: flex; flex-shrink: 0; align-items: center; }
.band__word {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(4rem, 13vw, 14rem); line-height: 1.05; letter-spacing: -.03em;
  padding: 0 .25em;
}
.band__word.km { font-family: var(--f-km-display); font-weight: 400; font-size: clamp(2.8rem, 8.5vw, 9rem); line-height: 1.6; }
.band__word.gr { font-style: italic; }
.band__row--outline .band__word { color: transparent; -webkit-text-stroke: 1px var(--ink); }
.band__sep { width: clamp(1.2rem, 3vw, 3rem); height: clamp(1.2rem, 3vw, 3rem); border: 1px solid var(--ink); border-radius: 50%; flex-shrink: 0; }

/* ---------- About ---------- */
.about { background: var(--paper); color: var(--ink); padding: clamp(5rem, 11vw, 10rem) var(--pad); }
.about .label { color: var(--stone); }
.about__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem var(--pad); margin-top: 2.5rem; }
.about__title {
  grid-column: 1 / -1; margin: 0;
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(3.4rem, 9.5vw, 10.5rem); line-height: .9; letter-spacing: -.035em;
}
.about__title em { font-style: italic; }
.about__title .km { display: block; font-family: var(--f-km-display); font-size: .32em; line-height: 1.8; letter-spacing: 0; margin-top: .3em; }
.about__copy { grid-column: 7 / -1; display: grid; gap: 1.4rem; font-size: clamp(1rem, 1.25vw, 1.2rem); }
.about__copy p { margin: 0; }
.about__copy .km { color: #5b574f; font-size: .95em; }
html.is-underworld .about__copy .km { color: var(--stone); }

/* Journey: Phnom Kulen → Phnom Penh */
.journey { grid-column: 1 / 7; align-self: start; border: 1px solid var(--line-ink); padding: 1.2rem; }
.journey__svg { width: 100%; height: auto; margin: 1rem 0; overflow: visible; }
.journey__svg .arc { fill: none; stroke: var(--ink); stroke-width: 1; }
.journey__svg .grid { fill: var(--ink); opacity: .16; }
.journey__svg .pin { fill: var(--ink); }
.journey__svg .pin-ring { fill: none; stroke: var(--ink); stroke-width: 1; }
.journey__svg text { font-family: var(--f-mono); font-size: 9px; letter-spacing: .05em; fill: var(--ink); text-transform: uppercase; }
.journey__ends { display: flex; justify-content: space-between; gap: 1rem; }
.journey__ends div { display: grid; gap: .15rem; }
.journey__ends div:last-child { text-align: right; }
.journey__km { font-family: var(--f-display); font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.journey__km .km { font-family: var(--f-km); font-size: .85rem; margin-left: .4rem; }

.pillars { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(3rem, 7vw, 6rem); border-top: 1px solid var(--line-ink); }
.pillar { padding: 1.4rem 1.4rem 0 0; border-right: 1px solid var(--line-ink); }
.pillar + .pillar { padding-left: 1.4rem; }
.pillar:last-child { border-right: 0; }
.pillar__num { font-family: var(--f-display); font-style: italic; font-size: 3.4rem; line-height: 1; }
.pillar h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.6rem, 2.4vw, 2.3rem); line-height: 1.05; margin: 1.6rem 0 .2rem; }
.pillar h3 .km { display: block; font-family: var(--f-km); font-weight: 600; font-size: .5em; color: var(--stone); margin-top: .3rem; }
.pillar p { margin: .6rem 0 0; }
.pillar p.km { color: #5b574f; font-size: .92em; }
html.is-underworld .pillar p.km { color: var(--stone); }

/* ---------- Myths: pinned horizontal gallery ---------- */
.myths { position: relative; padding-top: clamp(5rem, 10vw, 9rem); overflow: hidden; }
.myths__head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding: 0 var(--pad); flex-wrap: wrap; }
.myths__title { margin: 1.4rem 0 0; font-family: var(--f-display); font-weight: 300; font-size: clamp(3rem, 7.5vw, 8rem); line-height: .92; letter-spacing: -.03em; }
.myths__title .km { display: block; font-family: var(--f-km-display); font-size: .3em; line-height: 1.9; letter-spacing: 0; color: var(--stone); }
.myths__hint { display: inline-flex; gap: .6rem; align-items: center; }
.myths__hint i { display: inline-block; width: 40px; height: 1px; background: currentColor; }

.myths__pin { height: 100vh; height: 100svh; display: flex; align-items: center; }
.myths__track { display: flex; gap: clamp(1rem, 2.2vw, 2.2rem); padding: 0 var(--pad); will-change: transform; }

.card { flex: 0 0 auto; width: clamp(260px, 27vw, 420px); }
.card__top { display: flex; justify-content: space-between; margin-bottom: .7rem; }
.px {
  position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--ink);
  outline: 1px solid var(--line);
}
.px img, .px canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.px__dither { image-rendering: pixelated; opacity: 0; }
.px.is-revealed .px__dither, html:not(.js) .px__dither { opacity: 1; }
.px__canvas { image-rendering: pixelated; }
.px__full { clip-path: circle(var(--px-r, 0px) at var(--px-x, 50%) var(--px-y, 50%)); filter: contrast(1.05); }
html.is-underworld .px img, html.is-underworld .hero__fallback { filter: invert(1); }
.card__name { margin: 1rem 0 0; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.8rem, 2.6vw, 2.6rem); line-height: 1; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.card__name .km { font-family: var(--f-km); font-weight: 500; font-size: .45em; color: var(--stone); }
.card__q { margin: .6rem 0 0; font-family: var(--f-display); font-style: italic; font-size: clamp(1.15rem, 1.5vw, 1.45rem); line-height: 1.2; }
.card__q.km { font-family: var(--f-km); font-style: normal; font-size: .92rem; color: var(--stone); margin-top: .35rem; line-height: 1.7; }

.card--end { display: flex; flex-direction: column; justify-content: center; width: clamp(240px, 22vw, 340px); }
.card--end p { font-family: var(--f-display); font-size: clamp(1.8rem, 2.6vw, 2.6rem); line-height: 1.05; margin: 0; }
.card--end .km { font-family: var(--f-km); font-size: 1rem; color: var(--stone); margin-top: .8rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: clamp(4rem, 8vw, 7rem); }
.stat { padding: clamp(1.4rem, 3vw, 2.6rem) var(--pad); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__num { font-family: var(--f-display); font-weight: 300; font-size: clamp(4rem, 10vw, 10rem); line-height: .9; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.stat__label { display: flex; gap: .7rem; align-items: baseline; margin-top: .8rem; flex-wrap: wrap; }

/* ---------- Oracle ---------- */
.oracle-sec {
  position: relative; overflow: hidden;
  background: var(--paper); color: var(--ink);
  padding: clamp(5rem, 11vw, 10rem) var(--pad);
}
.oracle-sec .label { color: var(--stone); }
.oracle-sec__bg {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--f-display); font-weight: 600; font-size: 38vw; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--line-ink);
  pointer-events: none; user-select: none; white-space: nowrap;
}
.oracle-sec__bg[lang="km"] { font-family: var(--f-km-display); font-weight: 400; font-size: 30vw; line-height: 1.7; }
.oracle-sec__head { position: relative; display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; }
.oracle-sec__title { margin: 1.4rem 0 0; font-family: var(--f-display); font-weight: 300; font-size: clamp(3rem, 7.5vw, 8rem); line-height: .92; letter-spacing: -.03em; }
.oracle-sec__title .km { display: block; font-family: var(--f-km-display); font-size: .3em; line-height: 1.9; letter-spacing: 0; color: var(--stone); }
.oracle-sec__hint { max-width: 22rem; }
.oracle-sec__hint .km { display: block; color: var(--stone); }

.oracle {
  position: relative; margin-top: clamp(2.5rem, 6vw, 5rem);
  display: grid; justify-items: center; text-align: center; gap: 1.2rem;
  padding: clamp(2rem, 5vw, 4rem) 0; border-top: 1px solid var(--line-ink); border-bottom: 1px solid var(--line-ink);
}
.oracle__en {
  margin: 0; min-height: 2.2em; max-width: 20ch;
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(2rem, 5vw, 4.6rem); line-height: 1.05;
}
.oracle__en:empty::before { content: "Yadi — ?"; font-style: normal; color: var(--stone); letter-spacing: .1em; }
.oracle__km { margin: 0; min-height: 1.8em; max-width: 40rem; font-size: clamp(1rem, 1.6vw, 1.35rem); color: #5b574f; opacity: 0; filter: blur(8px); transform: translateY(8px); transition: opacity .9s var(--ease-out), filter .9s var(--ease-out), transform .9s var(--ease-out); }
html.is-underworld .oracle__km { color: var(--stone); }
.oracle__km.is-in { opacity: 1; filter: blur(0); transform: none; }
.oracle__btn {
  display: inline-flex; align-items: center; gap: .8rem; margin-top: .6rem;
  padding: 1.05rem 1.8rem; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-family: var(--f-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .5s var(--ease-out);
}
.oracle__btn .km { font-family: var(--f-km); text-transform: none; letter-spacing: 0; opacity: .7; }
.oracle.is-asking .oracle__btn { pointer-events: none; opacity: .8; }

/* ---------- Contact ---------- */
.contact { padding: clamp(6rem, 12vw, 11rem) var(--pad) var(--pad); }
.contact__title {
  margin: 1.6rem 0 0; font-family: var(--f-display); font-weight: 300;
  font-size: clamp(3.6rem, 11vw, 12rem); line-height: .88; letter-spacing: -.04em;
}
.contact__title em { font-style: italic; }
.contact__title .km { display: block; font-family: var(--f-km-display); font-size: .26em; line-height: 1.9; letter-spacing: 0; color: var(--stone); }
.contact__row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem var(--pad); margin-top: clamp(2.5rem, 5vw, 4rem); align-items: end; }
.contact__text { grid-column: 1 / 6; margin: 0; }
.contact__text .km { display: block; color: var(--stone); margin-top: .4rem; }
.contact__btns { grid-column: 7 / -1; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.btn {
  display: inline-flex; align-items: center; gap: .9rem;
  padding: 1.1rem 1.6rem; border-radius: 999px;
  border: 1px solid var(--paper);
  font-family: var(--f-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  transition: background .4s, color .4s;
}
.btn .km { font-family: var(--f-km); text-transform: none; letter-spacing: 0; opacity: .7; }
.btn--solid, .btn:hover { background: var(--paper); color: var(--ink); }
.btn--solid:hover { background: transparent; color: var(--paper); }
.btn svg { width: 14px; height: 14px; }

/* ---------- Footer ---------- */
.ft { padding: clamp(4rem, 8vw, 7rem) var(--pad) var(--pad); overflow: hidden; }
.ft__mark {
  display: flex; align-items: baseline; justify-content: space-between; gap: 2vw;
  border-top: 1px solid var(--line); padding-top: 2rem;
}
.ft__if { font-family: var(--f-display); font-weight: 300; font-size: 24vw; line-height: .75; letter-spacing: -.05em; }
.ft__km { font-family: var(--f-km-display); font-size: 8.4vw; line-height: 1.4; }
.ft__row { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-top: 2.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.ft__row .km { text-transform: none; font-family: var(--f-km); letter-spacing: 0; }
.ft__top { display: inline-flex; gap: .5rem; }

/* ---------- Custom cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; mix-blend-mode: difference; color: #ebe7df; display: none; }
.has-cursor .cursor { display: block; }
.cursor__dot { position: fixed; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cursor__ring {
  position: fixed; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid currentColor;
  display: grid; place-items: center;
  transition: width .45s var(--ease-out), height .45s var(--ease-out), left .45s var(--ease-out), top .45s var(--ease-out), background .3s;
}
.cursor__label { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; opacity: 0; transition: opacity .3s; white-space: nowrap; color: var(--ink); color: #0c0c0c; }
.cursor.is-label .cursor__ring { width: 92px; height: 92px; left: -46px; top: -46px; background: currentColor; }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; left: -32px; top: -32px; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.6rem; z-index: 96; transform: translate(-50%, 140%);
  display: flex; gap: .8rem; align-items: baseline;
  padding: .9rem 1.3rem; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  visibility: hidden;
  transform: translate(-50%, calc(100% + 3rem));
  transition: transform .7s var(--ease-out), visibility 0s linear .7s;
}
.toast .km { font-family: var(--f-km); text-transform: none; letter-spacing: 0; }
.toast.is-on { visibility: visible; transform: translate(-50%, 0); transition: transform .7s var(--ease-out); }

/* View Transition: circular reveal for Underworld mode */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Pre-JS hidden states (only when JS is running) ---------- */
html.js .reveal-up { opacity: 0; transform: translateY(30px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hd { grid-template-columns: 1fr auto; }
  .hd__time { display: none; }
  .about__copy, .journey { grid-column: 1 / -1; }
  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 1.4rem 0; border-right: 0; border-bottom: 1px solid var(--line-ink); }
  .myths__pin { height: auto; display: block; padding: 3rem 0 0; }
  .myths__track { flex-direction: column; gap: 3.5rem; }
  .card, .card--end { width: 100%; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .contact__text, .contact__btns { grid-column: 1 / -1; justify-content: flex-start; }
  .hero__foot { grid-template-columns: 1fr 1fr; }
  .hero__scroll { display: none; }
  .menu__link { grid-template-columns: 2.4rem 1fr; }
  .menu__km { grid-column: 2; margin-top: -.2rem; }
}

@media (max-width: 600px) {
  .hero__if { font-size: 44vw; }
  .hero__km { font-size: 11vw; }
  .hero__ui { padding-top: calc(var(--pad) * 5); }
  .hero__foot { font-size: .62rem; }
}

@media (prefers-reduced-motion: reduce) and (min-width: 901px) {
  .myths__pin { height: auto; display: block; padding: 3rem 0; }
  .myths__track { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1.5rem; }
  .card { scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { animation: none; }
}
