/* Crownset site. Dark only, like the crown itself: it is the brand's home ground.
   Colours are the Crownset family tokens (Crownset docs/CROWNSET_CONTRACT.md).
   System fonts only, so a page about privacy sends no request to a font host. */
:root {
  --bg: #0f1013;
  --surface: #16171b;
  --surface-2: #1c1d22;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .13);
  --text: #ececef;
  --text-2: #a3a4ab;
  --text-3: #6d6e76;
  --accent: #f2c66d;
  --accent-2: #d9a94a;
  --accent-soft: rgba(242, 198, 109, .12);
  --on-accent: #1a1406;
  --muted-gold: #8a7446;
  /* Glitch split colours, only visible for a fraction of a second. */
  --split-a: #f07a73;
  --split-b: #7fd3e6;
  /* Crown surfaces, as the crown draws them. */
  --slice: #141519;
  --slice-hover: #4e3e1c;
  --slice-active: #3a2f18;
  --center: #0e0f12;

  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Ubuntu, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  /* Every band lines up on one page width. */
  --page: 1200px;
  --inline: max(var(--gutter), calc((100% - var(--page)) / 2));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Nav ---------- */
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) var(--inline) 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 650 17px var(--display); }
.brand svg { width: 28px; height: 28px; }
.nav nav { display: flex; gap: 24px; }
.nav nav a { color: var(--text-2); text-decoration: none; font-size: 14px; }
.nav nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 120px var(--inline) 96px;
  overflow: hidden;
  isolation: isolate;
}
/* A faint glow and scan lines: the screen the word glitches on. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 4px),
    radial-gradient(60% 55% at 22% 58%, rgba(242, 198, 109, .09), transparent 70%);
}
.claim {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(52px, 12.5vw, 184px);
  line-height: .9;
  letter-spacing: -.035em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
}
.claim .static { color: var(--text); }
.word {
  position: relative;
  display: inline-block;
  align-self: flex-start;
  color: var(--accent);
  white-space: nowrap;
}
.word::before,
.word::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.word.glitching { animation: jitter .34s steps(3) both; }
.word.glitching::before {
  opacity: .9;
  color: var(--split-a);
  mix-blend-mode: screen;
  animation: slice-a .34s steps(1) both;
}
.word.glitching::after {
  opacity: .9;
  color: var(--split-b);
  mix-blend-mode: screen;
  animation: slice-b .34s steps(1) both;
}
@keyframes jitter {
  0% { transform: translate(0, 0) skewX(0); }
  25% { transform: translate(.02em, -.01em) skewX(-4deg); }
  50% { transform: translate(-.025em, .01em) skewX(3deg); }
  75% { transform: translate(.01em, 0) skewX(-1deg); }
  100% { transform: translate(0, 0) skewX(0); }
}
@keyframes slice-a {
  0% { clip-path: inset(8% 0 72% 0); transform: translate(-.05em, 0); }
  20% { clip-path: inset(58% 0 18% 0); transform: translate(-.08em, .01em); }
  40% { clip-path: inset(30% 0 48% 0); transform: translate(-.03em, 0); }
  60% { clip-path: inset(80% 0 4% 0); transform: translate(-.07em, 0); }
  80% { clip-path: inset(4% 0 86% 0); transform: translate(-.02em, 0); }
  100% { clip-path: inset(50% 0 50% 0); transform: none; }
}
@keyframes slice-b {
  0% { clip-path: inset(66% 0 12% 0); transform: translate(.05em, 0); }
  20% { clip-path: inset(14% 0 70% 0); transform: translate(.07em, -.01em); }
  40% { clip-path: inset(44% 0 36% 0); transform: translate(.03em, 0); }
  60% { clip-path: inset(2% 0 80% 0); transform: translate(.06em, 0); }
  80% { clip-path: inset(72% 0 10% 0); transform: translate(.02em, 0); }
  100% { clip-path: inset(50% 0 50% 0); transform: none; }
}
.lede { margin: 0; max-width: 34em; color: var(--text-2); font-size: clamp(17px, 1.6vw, 20px); }
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  /* Flickers into existence a beat after the hero, so it's clearly noticed. */
  opacity: 0;
  animation: cue-glitch-in .75s steps(1, end) .9s forwards;
}
.scroll-cue svg { width: 50px; height: 50px; color: var(--accent); animation: nudge 2.2s ease-in-out infinite; }
.scroll-cue svg path { stroke-width: 2.4; }
.scroll-cue:hover { color: var(--text); }
.scroll-cue:hover svg { color: var(--accent-2); }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@keyframes cue-glitch-in {
  0%   { opacity: 0; transform: translateX(-50%) translate(-5px, 4px); }
  8%   { opacity: 1; transform: translateX(-50%) translate(4px, -2px); text-shadow: -3px 0 var(--split-a), 3px 0 var(--split-b); }
  14%  { opacity: 0; }
  22%  { opacity: 1; transform: translateX(-50%) translate(-4px, 1px); text-shadow: 3px 0 var(--split-a), -3px 0 var(--split-b); }
  28%  { opacity: .12; }
  40%  { opacity: 1; transform: translateX(-50%) translate(3px, 0); text-shadow: -2px 0 var(--split-a), 2px 0 var(--split-b); }
  48%  { opacity: .55; }
  62%  { opacity: 1; transform: translateX(-50%) translate(-1px, 0); text-shadow: 1px 0 var(--split-a), -1px 0 var(--split-b); }
  80%  { opacity: 1; transform: translateX(-50%); text-shadow: none; }
  100% { opacity: 1; transform: translateX(-50%); text-shadow: none; }
}

/* ---------- Suite ---------- */
.suite {
  padding: 72px var(--inline) 120px;
}
.suite-head { max-width: 40em; }
.kicker { margin: 0 0 10px; color: var(--accent); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.suite h2 { margin: 0; font: 700 clamp(30px, 4vw, 46px)/1.08 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.hint { margin: 14px 0 0; color: var(--text-2); }

.stage {
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.wheel-wrap { position: relative; }
.wheel-wrap::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 198, 109, .10), transparent);
  z-index: -1;
}
.wheel { display: block; width: 100%; max-width: 600px; height: auto; margin: 0 auto; overflow: visible; }

.wheel .slice { cursor: pointer; outline: none; }
.wheel .slice path.face {
  fill: var(--slice);
  stroke: rgba(255, 255, 255, .1);
  stroke-width: 1;
  transition: fill .14s ease-out, stroke .14s ease-out;
}
.wheel .slice .label { fill: #e8e8ec; font: 600 15px var(--body); text-anchor: middle; pointer-events: none; }
.wheel .slice .sub { fill: var(--text-3); font: 12px var(--body); text-anchor: middle; pointer-events: none; }
.wheel .slice:hover path.face,
.wheel .slice:focus-visible path.face { fill: var(--slice-hover); stroke: rgba(242, 198, 109, .9); }
.wheel .slice.active path.face { fill: var(--slice-active); stroke: rgba(242, 198, 109, .8); }
.wheel .slice.active .label { fill: #fff; }
.wheel .slice.active .sub { fill: var(--accent); }
.wheel .slice:focus-visible path.face { stroke-width: 2; }

.wheel .level { fill: none; stroke: rgba(242, 198, 109, .35); stroke-width: 1; stroke-dasharray: 3 4; }
.wheel .center-disc { fill: var(--center); stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.wheel .center-name { fill: #fff; font: 700 22px var(--display); text-anchor: middle; }
.wheel .center-status { fill: var(--accent); font: 12px var(--body); letter-spacing: .1em; text-transform: uppercase; text-anchor: middle; }
.wheel .center-content { transition: opacity .16s ease-out; }
.wheel .center-open { fill: var(--text-2); font: 600 13px var(--body); text-anchor: middle; }
.wheel .center.opens { cursor: pointer; }
.wheel .center.opens:hover .center-disc { stroke: rgba(242, 198, 109, .9); }
.wheel .center.opens:hover .center-open { fill: var(--accent); }
.wheel .center-content.swap { opacity: 0; }

/* The crown opens when it scrolls into view: slices fan out one after another. */
.js .wheel .slice,
.js .wheel .center,
.js .wheel .level {
  opacity: 0;
  transform-box: view-box;
  transform-origin: 320px 320px;
  transform: rotate(-24deg) scale(.82);
  transition: opacity .5s ease-out, transform .6s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--i, 0) * 90ms + 120ms);
}
.js .wheel .center { transform: scale(.6); transition-delay: 0ms; }
.js .suite.in .wheel .slice,
.js .suite.in .wheel .center,
.js .suite.in .wheel .level { opacity: 1; transform: none; }

.js .suite .suite-head,
.js .suite .card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease-out, transform .6s cubic-bezier(.2, .8, .2, 1);
}
.js .suite .card { transition-delay: .35s; }
.js .suite.in .suite-head,
.js .suite.in .card { opacity: 1; transform: none; }

/* ---------- Product card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(22px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.card-head { display: flex; align-items: center; gap: 16px; }
.card-logo { width: 56px; height: 56px; flex: none; }
.card h3 { margin: 0; font: 700 26px/1.1 var(--display); letter-spacing: -.01em; }
.status {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
}
.tagline { margin: 0; font: 600 19px/1.35 var(--display); color: var(--text); }
.desc { margin: 0; color: var(--text-2); }
.facts { margin: 0; display: grid; gap: 8px; border-top: 1px solid var(--border); padding-top: 14px; }
.facts div { display: flex; gap: 16px; }
.facts dt { width: 6.5em; flex: none; color: var(--text-3); font-size: 14px; }
.facts dd { margin: 0; color: var(--text-2); font-size: 14px; }
.card-action { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.card-action .note { color: var(--text-3); font-size: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font: 600 15px var(--body);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  transition: background .12s ease-out;
}
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-2); }

.plain-list { color: var(--text-2); display: grid; gap: 8px; padding-left: 20px; }

/* ---------- Alpha entry page ---------- */
.hero.gate { min-height: 100svh; }
.gate-form { display: grid; gap: 10px; width: 100%; max-width: 520px; margin-top: 8px; }
.gate-form label { color: var(--text-2); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.gate-row { display: flex; gap: 10px; flex-wrap: wrap; }
.gate-row input {
  flex: 1 1 260px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font: 600 16px ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.gate-row input::placeholder { color: var(--text-3); }
.gate-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gate-row .btn { border: 0; cursor: pointer; }
.gate-error { margin: 0; color: var(--split-a); font-size: 14px; }
.gate-help { margin: 0; color: var(--text-3); font-size: 14px; }
.admin-login-title { margin: 0 0 4px; font: 700 24px var(--display); letter-spacing: -.01em; }

/* ---------- Footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--inline) calc(env(safe-area-inset-bottom, 0px) + 36px);
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 14px;
}

@media (max-width: 860px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 86svh; }
}
/* On a phone the wheel is about half its drawn size: bigger names, no status line in the slices. */
@media (max-width: 600px) {
  .wheel .slice .label { font-size: 22px; }
  .wheel .slice .sub { display: none; }
  .wheel .center-name { font-size: 28px; }
  .wheel .center-status { font-size: 15px; }
  .wheel .center-open { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .wheel .slice, .js .wheel .center, .js .wheel .level,
  .js .suite .suite-head, .js .suite .card { opacity: 1; transform: none; }
  .scroll-cue { opacity: 1 !important; transform: translateX(-50%) !important; }
}

/* ---------- Contact (button in nav + modal, src public/contact.js) ---------- */
.navlink { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: var(--text-2); font: 500 14px var(--body); }
.navlink:hover { color: var(--text); }

.cs-modal { border: none; padding: 0; background: transparent; max-width: 460px; width: calc(100% - 32px); color: var(--text); }
.cs-modal::backdrop { background: rgba(5, 6, 8, .66); backdrop-filter: blur(3px); }
.cs-card { position: relative; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; padding: 28px clamp(20px, 5vw, 32px); box-shadow: 0 24px 70px rgba(0, 0, 0, .55); }
.cs-card h2 { margin: 0 0 6px; font: 700 23px var(--display); letter-spacing: -.01em; }
.cs-sub { margin: 0 0 18px; color: var(--text-2); font-size: 14px; }
.cs-card label { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--text-2); }
.cs-opt { color: var(--text-3); font-weight: 400; }
.cs-card input, .cs-card textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font: 15px var(--body); resize: vertical;
}
.cs-card input:focus, .cs-card textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cs-error { margin: 12px 0 0; color: var(--danger); font-size: 14px; }
.cs-submit { width: 100%; margin-top: 16px; justify-content: center; border: 0; cursor: pointer; padding: 12px; }
.cs-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--text-3); cursor: pointer; }
.cs-close:hover { background: var(--surface-2); color: var(--text); }
.cs-close svg { width: 18px; height: 18px; }
#contact-done { text-align: center; }
#contact-done .btn { width: 100%; justify-content: center; margin-top: 8px; }
