:root {
  --bg: #100f11;
  --bg-2: #17151a;
  --card: rgba(255, 255, 255, 0.045);
  --card-line: rgba(232, 200, 140, 0.16);
  --line: rgba(255, 255, 255, 0.08);
  --text: #efe9df;
  --muted: #a79f95;
  --dim: #6f685f;
  --gold: #e3c48c;
  --gold-deep: #b8925a;
  --amethyst: #8b5cf6;
  --rose: #f4b6d2;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #f3dcb0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.02; }
h3 { font-size: 26px; line-height: 1.15; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(18px, 2vw, 21px); color: #d7cfc3; max-width: 64ch; }
.muted { color: var(--muted); }

/* ── Dock: sticky menu, bottom-right ───────────────────── */
.dock {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50;
  display: flex; align-items: center; gap: 4px;
  padding: 6px;
  background: rgba(22, 20, 26, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--card-line);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
}
.dock a { color: var(--muted); text-decoration: none; padding: 10px 14px; border-radius: 999px; white-space: nowrap; transition: color .2s, background .2s; }
.dock a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.dock a.dock-cta { color: #1a140b; background: linear-gradient(180deg, #f0d7a6, #d5af6d); }
.dock a.dock-cta:hover { color: #1a140b; filter: brightness(1.06); }
@media (max-width: 520px) {
  .dock { left: 50%; right: auto; transform: translateX(-50%); font-size: 10px; letter-spacing: 0.1em; }
  .dock a { padding: 10px 10px; }
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  padding-top: 28px;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(227, 196, 140, 0.20), transparent 70%),
    radial-gradient(40% 40% at 50% 62%, rgba(139, 92, 246, 0.16), transparent 70%),
    var(--bg);
  overflow: hidden;
  isolation: isolate;
}
.hero::before { /* dot grid, à la instrument HUD */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,0.13) 1px, transparent 1.4px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 70% at 50% 45%, #000 30%, transparent 85%);
}
.wordmark {
  display: block;
  margin: 0 auto;
  padding: 0 calc(var(--gutter) * 0.6);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15.2vw;           /* refined by fitWordmark() */
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(100deg, #f6e6d2 0%, #f2c9dc 28%, #d9c8f4 52%, #f4e0bd 76%, #efe2cf 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  position: relative; z-index: 1;
}
.hero-sub {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: end; gap: 20px;
  margin: 18px var(--gutter) 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.hero-sub .left { font: italic 400 clamp(20px, 2.4vw, 30px)/1.1 var(--serif); color: #dcd2c3; }
.hero-sub .right { font: 500 12px/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); text-align: right; }

.stage {
  position: relative;
  /* whatever is left of the first screen under the wordmark */
  height: clamp(300px, calc(100svh - 18vw - 250px), 760px); /* refined in JS */
  margin-top: 0;               /* crystal sits below the wordmark so labels stay readable */
  z-index: 2;
}
.stage canvas, .stage .crystal-fallback {
  position: absolute; left: 50%; top: 0; z-index: 2; transform: translateX(-50%);
  width: min(100%, 980px); height: 100%;
}
.stage canvas {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 8%);
}
.crystal-fallback { display: grid; place-items: center; transition: opacity .8s; }
.crystal-fallback svg { height: 78%; width: auto; animation: float 7s ease-in-out infinite; filter: drop-shadow(0 30px 60px rgba(139,92,246,.35)); }
.stage canvas { opacity: 0; transition: opacity 1.2s ease; }
.stage.gl-ready canvas { opacity: 1; }
.stage.gl-ready .crystal-fallback { opacity: 0; transition: none; }
@keyframes float { 50% { transform: translateY(-14px) rotate(1.5deg); } }

/* HUD annotations */
.hud { position: absolute; inset: 0; z-index: 3; pointer-events: none; font: 500 clamp(10px, 1vw, 13px)/1.45 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #ece4d6; }
.hud .tag { position: absolute; white-space: nowrap; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.hud .tag small { display: block; color: var(--muted); font-size: 0.86em; }
.hud .tag b { font-weight: 600; color: var(--gold); }
.hud svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hud line, .hud polyline { stroke: rgba(236, 228, 214, 0.55); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.hud circle { fill: var(--gold); }
.t1 { left: 20%; top: 14%; }
.t2 { right: 18%; top: 30%; text-align: right; }
.t3 { right: 14%; bottom: 22%; text-align: right; }
.t4 { left: 14%; bottom: 32%; }
.hud .blink { animation: blink 2.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
@media (max-width: 720px) {
  .t1 { left: 4%; top: 6%; } .t2 { right: 4%; top: 22%; } .t3 { right: 4%; bottom: 10%; } .t4 { display: none; }
  .hud svg { display: none; }
  .stage { height: 60vh; margin-top: 0; }
}

.hero-cta {
  position: relative; z-index: 3;
  display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: center;
  padding: 0 var(--gutter) 56px;
  margin-top: -40px;
}
.btn-store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px 12px 18px;
  background: linear-gradient(180deg, #f0d7a6, #d5af6d);
  color: #1a140b; text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 10px 40px rgba(227, 196, 140, 0.28), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .2s, box-shadow .2s;
}
.btn-store:hover { color: #1a140b; transform: translateY(-2px); box-shadow: 0 16px 50px rgba(227, 196, 140, 0.38); }
.btn-store svg { width: 22px; height: 22px; }
.btn-store span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 600; font-size: 17px; }
.btn-store small { font-size: 11px; font-weight: 500; letter-spacing: .04em; }
.hero-cta .note { font: 500 12px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ── Sections ────────────────────────────────────────── */
section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
section + section { border-top: 1px solid var(--line); }

.answer { padding-top: 64px; }
.answer h2 { max-width: 18ch; margin-bottom: 28px; }
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; margin-top: 48px;
  background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.facts div { background: var(--bg); padding: 22px 20px; }
.facts b { display: block; font: 500 34px/1 var(--serif); color: var(--gold); margin-bottom: 8px; }
.facts span { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.feature {
  display: grid; grid-template-columns: 1fr minmax(240px, 360px); gap: clamp(32px, 7vw, 110px);
  align-items: center; padding: clamp(40px, 6vw, 80px) 0;
}
.feature:nth-child(even) { grid-template-columns: minmax(240px, 360px) 1fr; }
.feature:nth-child(even) .copy { order: 2; }
.feature .copy h3 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 18px; }
.feature ul { padding: 0; margin: 20px 0 0; list-style: none; }
.feature li { padding: 10px 0 10px 26px; border-top: 1px solid var(--line); position: relative; color: #d7cfc3; }
.feature li::before { content: "◆"; position: absolute; left: 0; color: var(--gold-deep); font-size: 11px; top: 14px; }
.shot {
  border-radius: 34px; overflow: hidden;
  border: 1px solid var(--card-line);
  box-shadow: 0 40px 100px rgba(0,0,0,.6), 0 0 80px rgba(139,92,246,.12);
  aspect-ratio: 1242 / 2688; background: var(--bg-2);
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; }
  .feature:nth-child(even) .copy { order: 0; }
  .shot { max-width: 300px; margin: 0 auto; }
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 48px; counter-reset: s; }
.card {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 22px; padding: 28px;
}
.steps .card::before {
  counter-increment: s; content: "0" counter(s);
  display: block; font: 500 12px var(--mono); letter-spacing: .2em; color: var(--gold); margin-bottom: 26px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; }

table.compare { width: 100%; border-collapse: collapse; margin-top: 40px; font-size: 15px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 18px; margin-top: 40px; }
.table-scroll table.compare { margin: 0; min-width: 560px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); }
.compare tbody th { font-weight: 500; color: var(--text); }
.compare td:nth-child(2) { color: var(--gold); }
.compare td { color: var(--muted); }
.compare tr:last-child > * { border-bottom: 0; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 48px; }
.price b { font: 500 56px/1 var(--serif); color: var(--text); display: block; margin: 8px 0 4px; }
.price.pro { border-color: rgba(227,196,140,.45); background: linear-gradient(180deg, rgba(227,196,140,.10), rgba(227,196,140,.02)); }
.price ul { list-style: none; padding: 0; margin: 22px 0 0; }
.price li { padding: 8px 0; border-top: 1px solid var(--line); color: #d7cfc3; font-size: 15px; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 24px 40px 24px 0; position: relative;
  font: 500 clamp(21px, 2.4vw, 26px)/1.25 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 20px; font: 300 28px var(--sans); color: var(--gold); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: #cfc6b9; max-width: 72ch; padding-bottom: 8px; }

.closing { text-align: center; }
.closing h2 { max-width: 16ch; margin: 0 auto 28px; }

footer { border-top: 1px solid var(--line); padding: 48px 0 110px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ── Inner pages ─────────────────────────────────────── */
.page-head { padding: 88px 0 56px; background: radial-gradient(60% 80% at 50% 0%, rgba(227,196,140,.14), transparent 70%); }
.page-head h1 { font-size: clamp(44px, 7vw, 92px); line-height: .98; max-width: 16ch; margin-bottom: 24px; }
.prose > * { max-width: 760px; }
.prose h2 { font-size: clamp(30px, 4vw, 42px); margin: 56px 0 18px; }
.prose h3 { margin: 32px 0 10px; }
.prose ul, .prose ol { padding-left: 22px; color: #d7cfc3; }
.prose li { margin-bottom: 8px; }
.prose p { color: #d7cfc3; }
.byline { font: 500 12px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.catalog-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 28px; }
.catalog-tools input {
  flex: 1 1 260px; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--card-line);
  background: var(--card); color: var(--text); font: inherit;
}
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.specimen { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; font-size: 14.5px; }
.specimen header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.specimen h3 { font-size: 24px; }
.specimen .formula { font: 500 12px var(--mono); color: var(--gold); text-align: right; max-width: 48%; overflow-wrap: anywhere; }
.specimen dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0 0 14px; }
.specimen dt { font: 500 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.specimen dd { margin: 0; color: #d7cfc3; }
.specimen p { color: var(--muted); margin: 0 0 8px; }
.specimen p.meta { font-style: italic; color: #a99fb8; }
.specimen[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 520px) { .hero-cta { padding-bottom: 84px; } }
