/* ==========================================================================
   SHREESH — HIGH JEWELLERY
   main.css · tokens, reset, typography, primitives
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
/* ══ THE PALETTE — GOLD · WINE · SAGE · IVORY ═════════════════════════════

   Three colours. Not five, not a spectrum. A jewellery house is judged on
   restraint, and a page that reaches for six hues looks like a paint chart,
   not a vault.

      GOLD       the house metal, and the voice of the site  --hs-*
      WINE       the counterweight — used sparingly, and     --c-ruby
                 it means something when it appears
      SAGE       the house stone                             --c-emerald
      IVORY      the light: paper, or type on ink            --bone / --void

   Gold does the talking. Wine and sage are earned: a piece is accented in
   the colour of the stone it actually holds, and the two together — with gold
   between them — form the only gradient on the site (--house).

   TOKENS ARE SEMANTIC, NOT LITERAL. --void is "the page", --bone is "the ink",
   and the house ramp runs from "furthest from the page" (--hs-100) to "closest
   to it" (--hs-950).

   The photography is shot on black and does NOT invert — see --plate.
   ═════════════════════════════════════════════════════════════════════════ */
:root {
  color-scheme: dark;

  /* The house metal — luminous gold, from deep bronze to white gold.
     Gold is the VOICE of this site. Every accent, every highlight,
     every moment of warmth is gold. */
  --hs-950: #0F0608;
  --hs-900: #1A0E12;
  --hs-800: #3D1E28;
  --hs-700: #5E3040;
  --hs-600: #8A4858;
  --hs-500: #BC6830;
  --hs-400: #D4A843;
  --hs-300: #E8C050;   /* the working accent — luminous gold */
  --hs-200: #FFE08A;
  --hs-100: #FFF2CC;

  /* The ink — deep wine-black */
  --void:   #0D0408;
  --void-2: #150A10;
  --void-3: #1E1218;
  --void-4: #2A1E24;

  /* Precious metals */
  --gold: #D4A843;
  --gold-lt: #FFE08A;
  --gold-dk: #8A4820;

  /* Ivory — warm gold text on dark wine */
  --bone: #F2EBE4;
  --bone-2: #D6CCC2;
  --mute: #C4A8B0;
  --mute-2: #9A7880;

  /* The vitrine the photography sits in. Dark wine. */
  --plate-1: #100810;
  --plate-2: #060305;

  /* ── THE THREE ──────────────────────────────────────────────────────────
     "R G B" so alpha can be applied at the point of use. */
  --c-gold:    212 168 67;
  --c-emerald: 155 24 46;
  --c-ruby:    155 24 46;
  --c-ivory:   242 235 228;

  /* The only gradient on the site: wine, through gold, to wine. */
  --house: linear-gradient(90deg,
    rgb(var(--c-ruby)), rgb(var(--c-gold)) 50%, rgb(var(--c-ruby)));
  --house-v: linear-gradient(180deg,
    rgb(var(--c-ruby)), rgb(var(--c-gold)) 50%, rgb(var(--c-ruby)));

  /* The accent of the moment. Gold unless a piece is speaking, in which case
     it is that piece's stone. */
  --accent: 212 168 67;

  --veil: rgba(13, 4, 8, 0.92);
  --vignette: rgba(13, 4, 8, 0.78);
  --hairline: rgba(242, 235, 228, 0.07);
  --stroke-ghost: rgba(242, 235, 228, 0.20);
  --grain-opacity: 0.045;

  /* Type */
  --serif: 'Cormorant Garamond', 'Didot', 'Bodoni MT', 'Times New Roman', serif;
  --sans: 'Jost', 'Futura', 'Avenir Next', 'Helvetica Neue', sans-serif;

  /* Fluid scale */
  /* Sized so the longest hero line ("you cannot say") still lands on one line
     inside its 8-column measure. */
  --t-mega: clamp(3rem, 9.4vw, 11rem);
  --t-h1: clamp(2.8rem, 7.6vw, 8.5rem);
  --t-h2: clamp(2.2rem, 5.2vw, 5.6rem);
  --t-h3: clamp(1.6rem, 2.8vw, 3rem);
  --t-h4: clamp(1.3rem, 1.8vw, 1.9rem);
  --t-body: clamp(0.95rem, 1.05vw, 1.15rem);
  --t-sm: clamp(0.78rem, 0.85vw, 0.9rem);
  --t-xs: 0.7rem;

  /* Space */
  --gut: clamp(1.4rem, 4vw, 5rem);
  --sec: clamp(7rem, 16vh, 14rem);

  /* Motion */
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-io: cubic-bezier(0.76, 0, 0.24, 1);
  --e-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Chrome */
  --line: rgba(242, 235, 228, 0.08);
  --line-2: rgba(242, 235, 228, 0.15);
  --glass: rgba(13, 4, 8, 0.60);
}



/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto;
}

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 300;
  font-size: var(--t-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Scroll is locked during the preloader and while the menu is open */
body.is-locked { overflow: hidden; height: 100vh; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--hs-300); color: var(--void); }

/* Custom scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--void-4) transparent;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--void-4);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--mute-2); }

/* Hide native cursor on precision pointers — we draw our own */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor * { cursor: none !important; }
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.display {
  font-family: var(--serif);
  font-size: var(--t-h1);
  line-height: 0.88;
  letter-spacing: -0.03em;
}

.display em,
.serif-em {
  font-style: italic;
  color: var(--hs-300);
  font-weight: 300;
}

.eyebrow {
  font-family: var(--sans);
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--hs-300);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.eyebrow::before {
  content: '';
  width: 2.6rem;
  height: 1px;
  background: linear-gradient(90deg, var(--hs-400), transparent);
  display: block;
}
.eyebrow.is-center { justify-content: center; }
.eyebrow.is-plain::before { display: none; }

.lede {
  font-family: var(--serif);
  font-size: var(--t-h4);
  line-height: 1.5;
  color: var(--bone-2);
  font-weight: 300;
}

.body-mute { color: var(--mute); font-size: var(--t-sm); line-height: 1.85; letter-spacing: 0.01em; }

.num {
  font-family: var(--sans);
  font-size: var(--t-xs);
  letter-spacing: 0.3em;
  color: var(--mute-2);
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.shell { width: 100%; padding-inline: var(--gut); }
.shell-narrow { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: var(--gut); }
.section { position: relative; padding-block: var(--sec); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gut); }
.rule { height: 1px; width: 100%; background: var(--line); transform-origin: left; }

/* --------------------------------------------------------------------------
   5. Reveal engine (driven by IntersectionObserver in core.js)
   -------------------------------------------------------------------------- */
[data-reveal] { --d: 0ms; }

[data-reveal="up"] {
  opacity: 0;
  transform: translate3d(0, 2.6rem, 0);
  transition: opacity 1.1s var(--e-out) var(--d), transform 1.1s var(--e-out) var(--d);
}
[data-reveal="fade"] {
  opacity: 0;
  transition: opacity 1.4s var(--e-out) var(--d);
}
[data-reveal="scale"] {
  opacity: 0;
  transform: scale(1.14);
  transition: opacity 1.5s var(--e-out) var(--d), transform 1.8s var(--e-out) var(--d);
}
[data-reveal="clip"] {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.6s var(--e-io) var(--d);
}
[data-reveal="rule"] {
  transform: scaleX(0);
  transition: transform 1.6s var(--e-io) var(--d);
}

[data-reveal].is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  clip-path: inset(0 0 0 0);
}
[data-reveal="rule"].is-in { transform: scaleX(1); }

/* Split-text: each word is its own mask; words on the same visual line share a
   delay, so it still reads as a line-by-line reveal. Padding + negative margin
   keep descenders and italic overhang from being clipped by the mask. */
.split-line {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.02em 0.06em 0.14em;
  margin: -0.02em -0.06em -0.14em;
}
.split-inner {
  display: inline-block;
  transform: translate3d(0, 110%, 0) rotate(4deg);
  opacity: 0;
  transition: transform 1.25s var(--e-out), opacity 0.9s var(--e-out);
  transition-delay: var(--d, 0ms);
  transform-origin: left bottom;
}
.is-in .split-inner,
.split-inner.is-in { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; }

/* --------------------------------------------------------------------------
   6. Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem 2.4rem;
  font-family: var(--sans);
  font-size: var(--t-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone);
  border: 1px solid var(--line-2);
  border-radius: 100px;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--e-out), border-color 0.5s var(--e-out);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, var(--hs-300), var(--hs-500));
  transform: translate3d(0, 101%, 0) scale(1.4);
  border-radius: 50% 50% 0 0;
  transition: transform 0.75s var(--e-out), border-radius 0.75s var(--e-out);
}
.btn:hover { color: var(--void); border-color: transparent; }
.btn:hover::before { transform: translate3d(0, 0, 0) scale(1.4); border-radius: 0; }
.btn .btn-ico { transition: transform 0.6s var(--e-out); }
.btn:hover .btn-ico { transform: translateX(5px); }

.btn-solid { background: var(--bone); color: var(--void); border-color: var(--bone); }
.btn-solid:hover { color: var(--void); }

/* Underline link with wipe */
.ulink {
  position: relative;
  display: inline-block;
  font-size: var(--t-xs);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding-bottom: 0.45rem;
  overflow: hidden;
}
.ulink::after,
.ulink::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 1px; width: 100%;
}
.ulink::before { background: var(--line-2); }
.ulink::after {
  background: var(--hs-300);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.7s var(--e-out);
}
.ulink:hover::after { transform: scaleX(1); transform-origin: left; }

/* --------------------------------------------------------------------------
   7. Global chrome — grain, vignette, cursor, progress
   -------------------------------------------------------------------------- */
/* Film grain.
   This used to be a 4x-viewport layer with mix-blend-mode: overlay, animated
   every 200ms — which asks the compositor to re-blend the entire screen
   several times a second, and was the single biggest source of jank.
   Now: viewport-sized, no blend mode, animated on the compositor only
   (transform + opacity), and it repeats a small tile. */
.grain {
  position: fixed;
  top: -12%; left: -12%;
  width: 124%; height: 124%;
  z-index: 9000;
  pointer-events: none;
  opacity: var(--grain-opacity);
  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='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  will-change: transform;
  animation: grain-shift 0.7s steps(2) infinite;
  contain: strict;
}
@keyframes grain-shift {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(-1.5%, 1.2%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 8000;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 40%, var(--vignette) 100%);
}

/* --------------------------------------------------------------------------
   Custom cursor — a faceted triangle.

   Not an arrow: a cut stone seen edge-on. A single facet line splits it into a
   lit crown and a dark pavilion, exactly like the gems in jewels.js. It leans
   and stretches into the direction of travel, and an outline of itself trails
   half a beat behind.

   The tip of the triangle is the hotspot, so every transform pivots there.
   -------------------------------------------------------------------------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 9500;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.cursor.is-hidden { opacity: 0; }

.cursor-arrow,
.cursor-echo {
  position: absolute;
  top: 0; left: 0;
  width: 27px;
  height: 31px;
  transform-origin: 2px 2px;      /* the tip */
  will-change: transform;
}
.cursor-arrow svg,
.cursor-echo svg { width: 100%; height: 100%; overflow: visible; }

.cursor-arrow {
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.12))
          drop-shadow(0 0 9px rgba(212, 168, 67, 0.45));
  transition: filter 0.5s var(--e-out);
}

/* The echo: the same stone, hollow, running late. */
.cursor-echo {
  opacity: 0.4;
  transition: opacity 0.5s var(--e-out);
}

/* The facets themselves */
.cur-crown { fill: url(#curCrown); }
.cur-pav   { fill: url(#curPav); }
.cur-edge  { fill: none; stroke: var(--hs-100); stroke-width: 1; stroke-linejoin: round; }
.cur-ghost { fill: none; stroke: rgb(var(--accent)); stroke-width: 1; stroke-linejoin: round; }
.cur-facet { stroke: rgba(255, 240, 204, 0.65); stroke-width: 0.7; }

/* The label rides with the tip but never tilts — text must stay level, so the
   positioning and the entrance animation live on separate elements. */
.cursor-tag {
  position: absolute;
  top: 0; left: 0;
  will-change: transform;
}
.cursor-chip {
  position: absolute;
  top: 26px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  background: rgb(var(--accent));
  color: var(--void);
  font-family: var(--sans);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(-10px, -10px, 0) scale(0.7);
  transform-origin: left top;
  transition: opacity 0.45s var(--e-out), transform 0.55s var(--e-out);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
}

/* --- states ------------------------------------------------------------- */

/* Anything clickable: the stone opens up and catches gold. */
body.cur-link .cur-crown { fill: url(#curCrownGold); }
body.cur-link .cur-edge  { stroke: var(--gold-lt); }
body.cur-link .cursor-arrow {
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.12))
          drop-shadow(0 0 12px rgba(212, 168, 67, 0.55));
}
body.cur-link .cursor-echo { opacity: 0.75; }

/* A piece, or a draggable rail: the stone swells and names itself. */
body.cur-view .cursor-chip,
body.cur-drag .cursor-chip {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}
body.cur-view .cursor-echo,
body.cur-drag .cursor-echo { opacity: 0; }

/* Sparkle trail canvas */
.sparkle {
  position: fixed;
  inset: 0;
  z-index: 8500;
  pointer-events: none;
}

/* Scroll progress — a thin filament of emerald down the right edge */
.progress {
  position: fixed;
  top: 0; right: 0;
  width: 2px; height: 100vh;
  z-index: 7000;
  background: var(--hairline);
  pointer-events: none;
}
.progress-bar {
  width: 100%; height: 100%;
  transform: scaleY(0);
  transform-origin: top;
  background: var(--house-v);
  box-shadow: 0 0 12px rgb(var(--accent) / 0.5);
}

/* --------------------------------------------------------------------------
   8. Preloader — Kinetic Text Loader
   -------------------------------------------------------------------------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9800;
  background: var(--void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.8s var(--e-out);
}
.loader.is-out { opacity: 0; pointer-events: none; }
.loader.is-done { display: none; }

/* Kinetic text container */
.kinetic-loader {
  position: relative;
  transform: scale(0.85);
}

/* The text */
.kinetic-text {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 300;
  letter-spacing: 8px;
  color: var(--bone);
  display: flex;
  gap: 0;
  white-space: nowrap;
}

/* Individual letters */
.k-letter {
  display: inline-block;
  position: relative;
}

/* First letter bounce animation — 2 bounces only */
.k-bounce {
  animation: ktl-l-bounce 1800ms cubic-bezier(0.25, 0.25, 0.75, 0.75) 2;
  transform-origin: 100% 70%;
}

/* Stretch animation for the "E" — 2 cycles only */
.k-stretch {
  animation: ktl-letterStretch 1800ms cubic-bezier(0.25, 0.23, 0.73, 0.75) 2;
  transform-origin: 100% 70%;
}

/* ─── The Ball ──────────────────────────────────────────────────────────── */
.kinetic-dot {
  position: absolute;
  top: 40px;
  left: 85px;
  width: 6px;
  height: 6px;
  background: var(--bone);
  border-radius: 50%;
  z-index: 10;
  pointer-events: none;
  animation: ktl-dotMove 1800ms cubic-bezier(0.25, 0.25, 0.75, 0.75) 4;
}

/* ─── Dot orbit path ─────────────────────────────────────────────────── */
@keyframes ktl-dotMove {
  0%, 100% {
    transform: rotate(180deg) translate(-80px, -10px) rotate(-180deg);
  }
  50% {
    transform: rotate(0deg) translate(-81px, 10px) rotate(0deg);
  }
}

/* ─── Letter bounce (S letters) ──────────────────────────────────────── */
@keyframes ktl-l-bounce {
  0%, 45%, 70%, 100% { transform: scaleY(1.11); }
  49% { transform: scaleY(0.31); }
  50% { transform: scaleY(0.16); }
  53% { transform: scaleY(0.63); }
  60% { transform: scaleY(1.275); }
  68% { transform: scaleY(1.04); }
}

/* ─── Letter stretch (E) ────────────────────────────────────────────── */
@keyframes ktl-letterStretch {
  0%, 100% { transform: scale(1, 0.35); transform-origin: 100% 75%; }
  8%, 28% { transform: scale(1, 1.4); transform-origin: 100% 67%; }
  37% { transform: scale(1, 0.875); transform-origin: 100% 75%; }
  46% { transform: scale(1, 1.03); transform-origin: 100% 75%; }
  50%, 97% { transform: scale(1); transform-origin: 100% 75%; }
}

/* ─── Subtitle & line ────────────────────────────────────────────────── */
.loader-sub {
  margin-top: 1rem;
  font-size: var(--t-xs);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--mute-2);
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity 0.8s var(--e-out) 0.4s, transform 0.8s var(--e-out) 0.4s;
}
.loader.is-ready .loader-sub { opacity: 1; transform: translateY(0); }

.loader-line {
  position: absolute;
  left: var(--gut);
  right: var(--gut);
  bottom: var(--gut);
  height: 1px;
  background: var(--hairline);
  z-index: 2;
}
.loader-line i {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--house);
  transition: transform 0.1s linear;
}

/* ─── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .kinetic-loader { transform: scale(0.6); }
}
@media (max-width: 480px) {
  .kinetic-loader { transform: scale(0.45); }
}

/* --------------------------------------------------------------------------
   9. Page transition wipe
   -------------------------------------------------------------------------- */
.wipe {
  position: fixed;
  inset: 0;
  z-index: 9700;
  display: flex;
  pointer-events: none;
}
.wipe i {
  flex: 1;
  background: linear-gradient(180deg, var(--hs-800), var(--void));
  transform: translate3d(0, 101%, 0);
}
.wipe.is-in i { animation: wipe-in 1s var(--e-io) forwards; }
.wipe.is-out i { animation: wipe-out 1s var(--e-io) forwards; }
@keyframes wipe-in  { to { transform: translate3d(0, 0, 0); } }
@keyframes wipe-out { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -101%, 0); } }

/* --------------------------------------------------------------------------
   10. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 6000;
  padding: 1.7rem var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: difference;
  transition: transform 0.8s var(--e-out), opacity 0.5s ease;
  border-bottom: 1px solid rgba(242, 235, 228, 0.06);
  background: rgba(13, 4, 8, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav.is-hidden { transform: translate3d(0, -110%, 0); opacity: 0; }

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
  color: var(--hs-400);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.brand-gem { width: 16px; height: 16px; flex: none; }

.nav-links { display: flex; gap: 2.6rem; align-items: center; }
/* The label is printed twice — once as text, once as the ::after — and the link
   is a one-line window that the pair slides through on hover.
   The window and the line MUST be the same height, and the slide MUST be one
   line. translateY(-100%) moves the span by its OWN height, and the span is two
   lines tall, so it sent both copies out of the window and the nav went blank
   on hover. -50% of a two-line span is exactly one line. */
.nav-link {
  position: relative;
  font-size: var(--t-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone);
  overflow: hidden;
  display: block;
  height: 1.25em;
  line-height: 1.25em;
}
.nav-link span {
  display: block;
  transition: transform 0.6s var(--e-out);
}
.nav-link span::after {
  content: attr(data-t);
  display: block;
  color: var(--hs-300);
}
.nav-link:hover span { transform: translateY(-50%); }
.nav-link.is-active { color: var(--hs-300); }

.nav-right { display: flex; align-items: center; gap: 2rem; }

.burger {
  display: none;
  width: 30px; height: 14px;
  position: relative;
  flex: none;
}
.burger i {
  position: absolute;
  left: 0;
  height: 1px; width: 100%;
  background: var(--bone);
  transition: transform 0.6s var(--e-io), width 0.6s var(--e-io);
}
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { bottom: 0; width: 60%; }
body.menu-open .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .burger i:nth-child(2) { transform: translateY(-7px) rotate(-45deg); width: 100%; }

/* Fullscreen menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 5500;
  background: var(--hs-950);
  clip-path: circle(0% at calc(100% - 4rem) 2.4rem);
  transition: clip-path 1.1s var(--e-io);
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 12vh var(--gut) var(--gut);
  pointer-events: none;
}
body.menu-open .menu { clip-path: circle(150% at calc(100% - 4rem) 2.4rem); pointer-events: auto; }
.menu-list { display: flex; flex-direction: column; justify-content: center; gap: 0.4rem; }
.menu-item { overflow: hidden; display: block; }
.menu-item a {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 6.4rem);
  line-height: 1.14;
  color: var(--bone);
  transform: translate3d(0, 110%, 0);
  transition: transform 0.9s var(--e-out), color 0.5s ease;
  transition-delay: var(--d, 0ms);
}
body.menu-open .menu-item a { transform: translate3d(0, 0, 0); }
.menu-item a:hover { color: var(--hs-300); font-style: italic; }
.menu-item .m-num { font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.3em; color: var(--hs-500); }
.menu-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.8s ease 0.5s;
}
body.menu-open .menu-foot { opacity: 1; }

/* --------------------------------------------------------------------------
   11. Marquee
   -------------------------------------------------------------------------- */
.marquee {
  display: flex;
  overflow: hidden;
  width: 100%;
  user-select: none;
}
.marquee-track {
  display: flex;
  flex: none;
  gap: 3rem;
  padding-right: 3rem;
  align-items: center;
  will-change: transform;
}
.marquee-item {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 6rem);
  line-height: 1.1;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3rem;
  color: var(--bone);
}
.marquee-item.is-ghost {
  color: transparent;
  -webkit-text-stroke: 1px var(--stroke-ghost);
}
/* the diamonds alternate through the three: gold, emerald, ruby */
.marquee-item i { font-size: 0.4em; font-style: normal; color: rgb(var(--c-gold)); }
.marquee-item:nth-child(3n + 2) i { color: rgb(var(--c-emerald)); }
.marquee-item:nth-child(3n + 3) i { color: rgb(var(--c-ruby)); }

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  background: linear-gradient(180deg, var(--void), var(--hs-950) 60%, var(--hs-900));
  padding: calc(var(--sec) * 0.8) 0 2rem;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: var(--gut);
  padding-bottom: 5rem;
}
.foot-h {
  font-size: var(--t-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hs-400);
  margin-bottom: 1.6rem;
}
.foot-list li { margin-bottom: 0.75rem; }
.foot-list a { color: var(--bone-2); font-size: var(--t-sm); transition: color 0.4s, padding-left 0.4s var(--e-out); display: inline-block; }
.foot-list a:hover { color: var(--hs-300); padding-left: 0.5rem; }
.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  color: var(--mute);
  text-transform: uppercase;
}
.foot-credit {
  color: var(--hs-300);
  transition: color 0.4s;
  border-bottom: 1px solid rgb(var(--accent) / 0.35);
  padding-bottom: 1px;
}
.foot-credit:hover { color: var(--hs-100); }

.foot-word {
  font-family: var(--serif);
  font-size: clamp(4rem, 21vw, 22rem);
  line-height: 0.8;
  text-align: center;
  color: var(--hs-700);
  letter-spacing: 0.02em;
  padding-bottom: 2rem;
  user-select: none;
}

/* --------------------------------------------------------------------------
   13. Utility
   -------------------------------------------------------------------------- */
.mag { position: relative; display: inline-flex; will-change: transform; }
.mag-in { display: inline-flex; will-change: transform; }
.only-mobile { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem var(--gut); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .only-mobile { display: block; }
  .menu { padding-top: 16vh; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
    14b. Mobile — comprehensive touch-device optimisation
    -------------------------------------------------------------------------- */

/* Touch devices: disable hover-heavy interactions, prevent iOS zoom */
@media (hover: none) and (pointer: coarse) {
  /* Prevent iOS 300ms tap delay and zoom on input focus */
  * { -webkit-touch-callout: none; }
  input, textarea, select { font-size: 16px !important; }

  /* Disable hover effects that have no meaning on touch */
  .btn:hover::before { transform: translate3d(0, 101%, 0) scale(1.4); }
  .btn:hover { color: var(--bone); border-color: var(--line-2); }
  .btn-solid:hover { color: var(--void); }
  .craft-row:hover { padding-left: 0; padding-right: 0; }
  .craft-row:hover::before { transform: scaleX(0); }
  .craft-row:hover .c-t { color: inherit; font-style: normal; }
  .val:hover { border-color: var(--line); transform: none; }
  .ulink:hover::after { transform: scaleX(0); }

  /* Disable magnetic effect — JS already guards this, but belt-and-braces */
  .mag { transform: none !important; }
}

/* Safe area insets for notch devices (iPhone X+, modern Androids) */
@supports (padding: env(safe-area-inset-top)) {
  .nav { padding-top: max(1.7rem, env(safe-area-inset-top)); }
  .footer { padding-bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1rem)); }
  .menu { padding-bottom: env(safe-area-inset-bottom); }
  .btn { padding-left: max(2.4rem, calc(env(safe-area-inset-left) + 1rem)); padding-right: max(2.4rem, calc(env(safe-area-inset-right) + 1rem)); }
  .cta { padding-bottom: env(safe-area-inset-bottom); }
}

/* Tablet tweaks (≤ 1024px) */
@media (max-width: 1024px) {
  .hero-title { font-size: clamp(2.4rem, 8vw, 6rem); }
  .hero-meta { gap: 1.2rem; }
  .gem-stage { width: clamp(200px, 35vw, 360px); height: clamp(200px, 35vw, 360px); }
  .sig-word { font-size: clamp(4rem, 18vw, 16rem); }
  .sig-jewel { width: clamp(240px, 40vw, 520px); }
  .foot-word { font-size: clamp(3rem, 18vw, 16rem); }
}

/* Large phone (≤ 860px) — enhanced from existing breakpoint */
@media (max-width: 860px) {
  /* Tighter section spacing */
  :root { --sec: clamp(5rem, 12vh, 10rem); }

  /* Hero: stack everything vertically */
  .hero-inner { grid-template-columns: 1fr; }
  .hero-title { grid-column: 1; font-size: clamp(2.2rem, 10vw, 4.5rem); line-height: 0.88; }
  .hero-meta { grid-column: 1; padding-top: 1.6rem; }
  .hero-top { top: 14vh; }
  .hero-coord { font-size: 0.6rem; }

  /* Manifesto */
  .manifesto-text { font-size: clamp(1.3rem, 4.5vw, 2.4rem); }

  /* Navigation */
  .brand { font-size: 1.15rem; letter-spacing: 0.28em; }
  .nav { padding: 1.2rem var(--gut); }
  /* Buttons: larger tap targets */
  .btn { padding: 1rem 2rem; min-height: 48px; }
  .ulink { padding-bottom: 0.6rem; min-height: 44px; display: inline-flex; align-items: center; }

  /* Menu: better spacing */
  .menu { padding-top: 14vh; }
  .menu-item a { font-size: clamp(2rem, 8vw, 4rem); }

  /* Craft rows: stack */
  .craft-row { grid-template-columns: 3rem 1fr auto; padding: 2rem 0; }
  .craft-row .c-t { font-size: clamp(1.3rem, 3.5vw, 2rem); }
  .craft-row .c-img { display: none; }

  /* Stats: horizontal layout */
  .stats { flex-direction: row; flex-wrap: wrap; gap: 1.5rem; }
  .stat { flex: 1; min-width: 120px; }

  /* Process timeline */
  .proc-step { font-size: clamp(2.5rem, 8vw, 4rem); }
  .proc-copy h3 { font-size: clamp(1.4rem, 3.5vw, 2rem); }

  /* Quote */
  .quote-mark { font-size: clamp(4rem, 14vw, 10rem); }
  .quote-body { font-size: clamp(1.3rem, 4vw, 2.4rem); }

  /* CTA */
  .cta-title { font-size: clamp(1.8rem, 6vw, 4rem); }

  /* Marquee */
  .marquee-item { font-size: clamp(1.8rem, 5vw, 4rem); }

  /* Atelier grid: already single column, but tighten */
  .atelier-grid { gap: 2rem; }
  .atelier-copy h2 { font-size: var(--t-h3); }

  /* Page head */
  .phead h1 { font-size: clamp(2rem, 7vw, 4.5rem); }
}

/* Standard phone (≤ 640px) — enhanced from existing breakpoint */
@media (max-width: 640px) {
  :root { --gut: clamp(1.2rem, 4vw, 2rem); --sec: clamp(4rem, 10vh, 7rem); }

  /* Typography */
  .hero-title { font-size: clamp(2rem, 11vw, 3.5rem); }
  .manifesto-text { font-size: clamp(1.1rem, 5vw, 1.8rem); }
  .manifesto-foot { flex-direction: column; gap: 1.5rem; }
  .eyebrow { font-size: 0.62rem; letter-spacing: 0.36em; }
  .body-mute { font-size: 0.82rem; }
  .lede { font-size: clamp(1rem, 2.5vw, 1.3rem); }

  /* Hero */
  .hero { min-height: 92svh; padding-bottom: clamp(1.5rem, 4vh, 3rem); }
  .hero-top { top: 12vh; left: var(--gut); right: var(--gut); }
  .hero-coord { display: none; }
  .gem-stage { width: clamp(180px, 50vw, 300px); height: clamp(180px, 50vw, 300px); transform: translate(-50%, -58%); }
  .scroll-cue { bottom: 1.4rem; }

  /* Section spacing */
  .section { padding-block: var(--sec); }
  .shell { padding-inline: var(--gut); }
  .shell-narrow { padding-inline: var(--gut); }

  /* Process timeline: single column */
  .proc::before, .proc-fill { left: 6px; margin-left: 0; }
  .proc-row,
  .proc-row:nth-of-type(even) {
    grid-template-columns: 2.5rem 1fr;
    gap: 0 0.8rem;
  }
  .proc-row .proc-node,
  .proc-row:nth-of-type(even) .proc-node { width: 10px; height: 10px; margin-top: 0.8rem; }
  .proc-row .proc-copy,
  .proc-row:nth-of-type(even) .proc-copy { padding: 0; }
  .proc-row .proc-vis,
  .proc-row:nth-of-type(even) .proc-vis { padding: 1.5rem 0 0; max-width: 100%; }
  .proc-copy p { font-size: 0.82rem; }
  .proc-when { font-size: 0.6rem; padding: 0.4rem 0.9rem; }

  /* Rail */
  .rail { min-height: 100vh; }
  .rail-head h2 { font-size: var(--t-h3); }
  .rail-head { padding: clamp(2rem, 6vh, 4rem) var(--gut) 0; }

  /* Signature */
  .sig-word { font-size: clamp(3rem, 16vw, 10rem); }
  .sig-jewel { width: clamp(200px, 60vw, 360px); }
  .sig-fact { max-width: 9rem; }
  .sig-fact h4 { font-size: 0.58rem; }
  .sig-fact p { font-size: 0.7rem; }

  /* Modal */
  .modal-card { border-radius: 0; max-height: 92vh; }
  .modal-vis { padding: 2rem; }
  .modal-body { padding: 1.6rem; }
  .modal-body h3 { font-size: var(--t-h4); }
  .modal-close { width: 38px; height: 38px; top: 0.6rem; right: 0.6rem; }

  /* Footer */
  .footer { padding: clamp(3rem, 6vh, 5rem) 0 1.6rem; }
  .footer-grid { gap: 2.5rem var(--gut); }
  .foot-word { font-size: clamp(2.5rem, 16vw, 8rem); padding-bottom: 1.5rem; }
  .foot-bottom { gap: 0.6rem; }
  .foot-bottom span { font-size: 0.6rem; }

  /* Contact info cards */
  .cinfo { margin-top: 3rem; }
  .cinfo-card p { font-size: 1.1rem; }

  /* Form */
  .form { gap: 2rem 1.5rem; margin-top: 2.5rem; }
  .field input, .field textarea, .field select { padding: 0.8rem 0; }
  .form-foot { flex-direction: column; align-items: flex-start; }

  /* Values */
  .vals { gap: 1.5rem; }
  .val { padding: 2rem 1.5rem; }
  .val h3 { font-size: 1.3rem; }

  /* Grain: reduce on mobile for performance */
  .grain { animation: none; opacity: calc(var(--grain-opacity) * 0.6); }

  /* Nav: drop backdrop-filter blur — expensive on mobile GPUs */
  .nav { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(13, 4, 8, 0.88); }

  /* Hide decorative elements that waste mobile resources */
  .craft-peek { display: none; }
}

/* Small phone (≤ 420px) — tightest screens */
@media (max-width: 420px) {
  .hero-title { font-size: clamp(1.8rem, 10vw, 2.8rem); }
  .hero-meta p { font-size: 0.75rem; line-height: 1.7; }
  .manifesto-text { font-size: clamp(1rem, 4.5vw, 1.5rem); line-height: 1.3; }

  .nav { padding: 1rem var(--gut); }
  .brand { font-size: 1rem; letter-spacing: 0.22em; }

  .hero-top { top: 10vh; }
  .gem-stage { width: clamp(140px, 42vw, 220px); height: clamp(140px, 42vw, 220px); }

  .menu-item a { font-size: clamp(1.6rem, 7vw, 2.8rem); gap: 1rem; }
  .menu-item .m-num { font-size: 0.58rem; }

  .btn { padding: 0.85rem 1.6rem; font-size: 0.62rem; min-height: 44px; }
  .ulink { font-size: 0.62rem; }

  .stats { gap: 1rem; }
  .stat-n { font-size: clamp(1.8rem, 6vw, 2.4rem); }
  .stat-l { font-size: 0.58rem; }

  .craft-row { padding: 1.5rem 0; }
  .craft-row .c-n { font-size: 0.58rem; }
  .craft-row .c-t { font-size: clamp(1.1rem, 4vw, 1.5rem); }

  .phead { min-height: 50svh; }
  .phead h1 { font-size: clamp(1.8rem, 8vw, 3rem); }
  .phead-sub { font-size: 0.85rem; }

  .quote-body { font-size: clamp(1.1rem, 4vw, 1.8rem); }
  .cta-title { font-size: clamp(1.6rem, 7vw, 2.8rem); }

  .atelier-vis { aspect-ratio: 3 / 4; }
  .atelier-copy p { font-size: 0.8rem; }
  .atelier-sign { font-size: 1.3rem; }

  .marquee-item { font-size: clamp(1.4rem, 5vw, 2.5rem); gap: 2rem; padding-right: 2rem; }
  .marquee-track { gap: 2rem; padding-right: 2rem; }

  .sig-facts { display: none; }
  .sig-word { font-size: clamp(2.5rem, 14vw, 6rem); }

  .proc-step { font-size: clamp(2rem, 7vw, 3rem); }
  .proc-copy h3 { font-size: clamp(1.2rem, 4vw, 1.6rem); }
  .proc-copy p { font-size: 0.75rem; }

  .vals { gap: 1.2rem; }
  .val { padding: 1.6rem 1.2rem; }
  .val-ico { width: 36px; height: 36px; margin-bottom: 1.2rem; }
  .val h3 { font-size: 1.15rem; }
  .val p { font-size: 0.75rem; }
}

/* Ultra-small screens (≤ 360px) — Galaxy Fold, SE etc. */
@media (max-width: 360px) {
  :root { --gut: 1rem; }
  .hero-title { font-size: clamp(1.6rem, 9vw, 2.2rem); }
  .hero-top { top: 8vh; }
  .gem-stage { width: clamp(120px, 40vw, 180px); height: clamp(120px, 40vw, 180px); }
  .manifesto-text { font-size: 0.95rem; }
  .phead h1 { font-size: 1.6rem; }
  .menu-item a { font-size: 1.5rem; }
  .brand { font-size: 0.9rem; }
}

/* Reduce GPU-heavy animations on low-end mobile */
@media (max-width: 860px) and (hover: none) {
  .grain { animation: none; }
  .gem-glow { animation-duration: 8s; }
  .gem-flare { animation: none; }
  .phead-lights .light { animation: none; }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .split-inner { opacity: 1 !important; transform: none !important; }
}


/* --------------------------------------------------------------------------
   15. Focus, skip link — the professional plumbing
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid rgb(var(--accent));
  outline-offset: 3px;
  border-radius: 2px;
}
body:not(.has-cursor) a:focus-visible,
body:not(.has-cursor) button:focus-visible { outline-offset: 4px; }

.skip {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 9900;
  padding: 0.8rem 1.4rem;
  background: var(--bone);
  color: var(--void);
  font-size: var(--t-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 100px;
  transform: translateY(-160%);
  transition: transform 0.4s var(--e-out);
}
.skip:focus { transform: translateY(0); }

/* --------------------------------------------------------------------------
   16. Colour — each piece carries its own stone
   The accent is set per card from the stone it holds, so the archive is a row
   of different colours rather than nine variations of green.
   -------------------------------------------------------------------------- */
.accent-text { color: rgb(var(--accent)); }
