/* =============================================================
   THE UGC SCOUT — design system
   Plum dark-ground · signal-gold accent · instrument register
   ============================================================= */

/* ---- Design tokens ---------------------------------------- */
:root {
  /* Ground + surfaces (plum, layered for depth) */
  --bg:          #191021;   /* deep plum page ground */
  --bg-2:        #211530;   /* alternate section ground */
  --surface:     #271733;   /* card / panel */
  --surface-2:   #33223f;   /* elevated / hover */
  --plum:        #4a2b52;   /* brand plum, sampled from logo */
  --plum-glow:   #5a2f66;   /* hero radial wash */

  /* Text */
  --text:        #f4eef7;   /* plum-white */
  --muted:       #b6a4c2;   /* lilac-gray */
  --dim:         #8c7a9a;   /* faint labels */

  /* Signal — the one accent. Stats + interactive states ONLY. */
  --signal:        #f5b13c;
  --signal-bright: #ffc55e;
  --signal-deep:   #c6892b;
  --signal-wash:   rgba(245,177,60,.12);

  /* Hairlines */
  --line:     rgba(244,238,247,.10);
  --line-2:   rgba(244,238,247,.18);
  --line-gold:rgba(245,177,60,.34);

  /* Type */
  --font-display: "Clash Display","Space Grotesk",ui-sans-serif,system-ui,sans-serif;
  --font-body:    "Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:    "JetBrains Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;

  /* Radii — kept small; sharp reads technical */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 14px;

  /* Rhythm */
  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);

  --shadow-1: 0 1px 0 rgba(255,255,255,.03) inset, 0 18px 40px -24px rgba(0,0,0,.7);
  --shadow-2: 0 1px 0 rgba(255,255,255,.05) inset, 0 30px 70px -30px rgba(0,0,0,.8);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---- Reset ------------------------------------------------ */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){ html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Plum atmosphere — washes so the ground never reads neutral-black */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--plum-glow) 0%, transparent 42%),
    radial-gradient(90% 60% at 100% 0%, rgba(74,43,82,.55) 0%, transparent 40%),
    radial-gradient(80% 70% at 0% 100%, rgba(74,43,82,.28) 0%, transparent 45%);
  opacity: .9;
  pointer-events: none;
}

img,svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }
input,select,textarea,button { font-family: inherit; }

::selection { background: var(--signal); color: #241206; }

:focus-visible {
  outline: 2px solid var(--signal-bright);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Thin plum scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 999px; border: 3px solid var(--bg); }

/* ---- Layout ----------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--signal); color: #241206; padding: 10px 16px;
  border-radius: var(--r-sm); font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---- Typography utilities --------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dim);
  display: inline-flex; align-items: center; gap: .6em;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--line-2);
}
.eyebrow--signal { color: var(--signal); }
.eyebrow--signal::before { background: var(--line-gold); }

h1,h2,h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.03; letter-spacing: -.02em; overflow-wrap: break-word; }

.display {
  font-size: clamp(2rem, 9vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.03em;
}
.h1 { font-size: clamp(1.95rem, 7vw, 4.1rem); }
.h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -.025em; }
.h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }

.lead {
  font-size: clamp(1.06rem, 1.7vw, 1.32rem);
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.5;
}
.muted { color: var(--muted); }
.mono  { font-family: var(--font-mono); }

/* ---- Buttons ---------------------------------------------- */
.btn {
  --pad-y: .85rem; --pad-x: 1.35rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--r-sm);
  font-weight: 600; font-size: .98rem; letter-spacing: -.01em;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), background .18s var(--ease),
              border-color .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
  will-change: transform;
}
.btn .arw { transition: transform .2s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--signal); color: #241206;
  box-shadow: 0 0 0 1px var(--signal-deep) inset, 0 12px 30px -12px rgba(245,177,60,.5);
}
.btn--primary:hover { background: var(--signal-bright); box-shadow: 0 0 0 1px var(--signal) inset, 0 14px 34px -10px rgba(245,177,60,.62); }

.btn--ghost {
  background: transparent; color: var(--text);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--text); background: rgba(244,238,247,.04); }

.btn--lg { --pad-y: 1.05rem; --pad-x: 1.7rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ---- Header / logo ---------------------------------------- */
.site-head {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1.4rem; flex-wrap: wrap;
}
.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); }
.logo .mark {
  width: 26px; height: 26px; color: var(--text);
  transition: color .2s var(--ease), transform .3s var(--ease);
}
.logo:hover .mark { color: var(--signal); transform: rotate(-8deg); }
.logo__text {
  font-family: var(--font-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .02em; font-size: 1.02rem;
}
.head-nav { display: flex; align-items: center; gap: clamp(.75rem,2vw,1.5rem); }
.navlink {
  font-size: .92rem; color: var(--muted);
  display: inline-flex; align-items: center; gap: .4em;
  transition: color .18s var(--ease);
}
.navlink:hover { color: var(--text); }
.navlink--signal { color: var(--signal); }
.navlink--signal:hover { color: var(--signal-bright); }

/* ---- Hero (landing) --------------------------------------- */
.hero { position: relative; padding-top: clamp(2rem,6vw,4.5rem); padding-bottom: var(--section-y); }
.hero__inner { max-width: 62rem; }
.hero .display { margin-top: 1.4rem; }
.hero .lead { margin-top: 1.5rem; max-width: 40ch; font-size: clamp(1.1rem,1.8vw,1.4rem); }

/* Scan line (signature) */
[data-scan] { position: relative; }
.scanline {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 5;
  background: linear-gradient(90deg, transparent, var(--signal) 18%, var(--signal-bright) 50%, var(--signal) 82%, transparent);
  box-shadow: 0 0 22px 2px rgba(245,177,60,.55);
  opacity: 0; pointer-events: none;
}
/* word that resolves under the scan — white, with a fine gold "signal" underline drawn after the sweep */
.resolve { color: var(--text); position: relative; white-space: nowrap; }
.resolve::after {
  content: ""; position: absolute; left: .02em; right: .02em; bottom: .04em; height: 3px;
  background: linear-gradient(90deg, var(--signal), var(--signal-bright));
  border-radius: 2px; transform: scaleX(0); transform-origin: left;
}
html.js .resolve::after { animation: underline .55s var(--ease) 1.15s forwards; }
@keyframes underline { to { transform: scaleX(1); } }

/* ---- The two doors ---------------------------------------- */
.doors {
  margin-top: clamp(2.25rem,4vw,3rem);
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
.door {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(1.3rem,2.6vw,1.9rem) clamp(1.4rem,2.6vw,2rem);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: var(--surface);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  isolation: isolate;
}
.door::before { /* cursor lens glow */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(160px 160px at var(--mx) var(--my), var(--signal-wash), transparent 70%);
  transition: opacity .3s var(--ease);
}
.door:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.door:hover::before { opacity: 1; }
.door__text { display: flex; flex-direction: column; gap: .3rem; }
.door__label { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem,2vw,1.5rem); letter-spacing: -.02em; }
.door__sub { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-top: .35rem; }
.door__arw { flex: none; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--line-2); transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease); }
.door:hover .door__arw { transform: translateX(5px); }

.door--primary {
  background:
    linear-gradient(180deg, rgba(245,177,60,.06), transparent 60%),
    var(--surface-2);
  border-color: var(--line-gold);
  box-shadow: 0 0 0 1px rgba(245,177,60,.08) inset, var(--shadow-1);
}
.door--primary .door__sub { color: var(--signal); }
.door--primary .door__arw { background: var(--signal); color: #241206; border-color: var(--signal); }
.door--primary:hover { border-color: var(--signal); }
.door--ghost { background: transparent; }
.door--ghost:hover { border-color: var(--text); }

/* ---- Stat readout (instrument) ---------------------------- */
.readout {
  position: relative;
  margin-top: clamp(2.5rem,5vw,3.75rem);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
  display: grid; grid-template-columns: 1fr;
}
/* instrument bezel ticks */
.readout::before, .readout::after {
  content: ""; position: absolute; width: 9px; height: 9px; border: 1px solid var(--line-gold); pointer-events: none;
}
.readout::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.readout::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.stat { padding: clamp(1.4rem,3vw,2rem) clamp(1.3rem,3vw,2rem); border-top: 1px solid var(--line); }
.stat:first-child { border-top: 0; }
.stat__fig {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(2.4rem,6vw,3.8rem); line-height: 1;
  color: var(--signal); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
.stat__label {
  margin-top: .7rem; max-width: 22ch;
  font-family: var(--font-mono); font-size: .74rem; line-height: 1.5;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}

/* ---- Cards (value props) ---------------------------------- */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: clamp(2rem,4vw,3rem); }
.card {
  position: relative;
  padding: clamp(1.5rem,2.6vw,1.9rem);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 40%), var(--surface);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow-1); }
.card__kicker {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--signal); display: inline-flex; align-items: center; gap: .5em; margin-bottom: 1rem;
}
.card__kicker .mark { width: 15px; height: 15px; color: var(--signal); }
.card .h3 { margin-bottom: .6rem; }
.card__body { color: var(--muted); font-size: .98rem; }

/* ---- Steps (how it works) --------------------------------- */
.steps { margin-top: clamp(2rem,4vw,3rem); display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem,2.5vw,1.6rem);
  padding-block: clamp(1.4rem,2.6vw,1.8rem);
  border-top: 1px solid var(--line);
  align-items: start;
}
.step:first-child { border-top: 0; }
.step__num {
  position: relative; width: 46px; height: 46px; flex: none;
  display: grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-family: var(--font-mono); font-weight: 700; font-size: .95rem; color: var(--signal);
}
.step__num .mark { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; color: var(--line-gold); opacity: .5; }
.step__num span { position: relative; z-index: 1; }
.step__title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; }
.step__body { color: var(--muted); margin-top: .35rem; font-size: .98rem; }

/* ---- Closing block ---------------------------------------- */
.closing {
  margin-top: clamp(3rem,6vw,5rem);
  position: relative; overflow: hidden;
  padding: clamp(2rem,5vw,3.5rem);
  border-radius: var(--r-lg); border: 1px solid var(--line-gold);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(90,47,102,.6), transparent 55%),
    linear-gradient(180deg, var(--plum), var(--surface));
  box-shadow: var(--shadow-2);
}
.closing .h2 { max-width: 20ch; }
.closing__body { color: var(--muted); margin-top: 1rem; max-width: 52ch; font-size: 1.05rem; }
.closing__cta { margin-top: 1.8rem; }

/* ---- Forms ------------------------------------------------ */
.form-section { position: relative; }
.form-wrap {
  margin-top: clamp(2rem,4vw,2.75rem);
  padding: clamp(1.5rem,3.5vw,2.5rem);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 30%), var(--surface);
  box-shadow: var(--shadow-1);
}
.form { display: grid; gap: 1.2rem; }
.grid-2 { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
.field { display: grid; gap: .5rem; }
.field > label, .fieldset-label {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.req { color: var(--signal); }
.input, .select, .textarea {
  width: 100%;
  padding: .85rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--text); font-size: 1rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-wash); background: var(--surface);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b6a4c2' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.6rem;
}

/* chip multi-select */
.chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: .5rem .9rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--bg-2);
  font-size: .9rem; color: var(--muted);
  transition: all .16s var(--ease);
}
.chip input:hover + span { border-color: var(--line-gold); color: var(--text); }
.chip input:checked + span { border-color: var(--signal); color: var(--signal); background: var(--signal-wash); }
.chip input:focus-visible + span { outline: 2px solid var(--signal-bright); outline-offset: 2px; }

/* yes/no segmented */
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span {
  display: block; padding: .6rem 1.3rem; font-size: .92rem; color: var(--muted);
  border-right: 1px solid var(--line-2); transition: all .16s var(--ease); font-family: var(--font-mono); letter-spacing: .04em;
}
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--signal); color: #241206; font-weight: 600; }
.segmented input:focus-visible + span { outline: 2px solid var(--signal-bright); outline-offset: -2px; }

.form__foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .4rem; }
.form__note { font-family: var(--font-mono); font-size: .72rem; color: var(--dim); letter-spacing: .04em; }

/* success state — reads as invitation */
.form__success { display: none; text-align: left; }
.form-wrap.is-sent .form { display: none; }
.form-wrap.is-sent .form__success { display: block; animation: reveal .5s var(--ease) both; }
.form__success .mark { width: 40px; height: 40px; color: var(--signal); margin-bottom: 1.1rem; }
.form__success h3 { font-size: 1.5rem; margin-bottom: .6rem; }
.form__success p { color: var(--muted); max-width: 46ch; }

/* ---- Footer ----------------------------------------------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem,5vw,3.5rem) 2.5rem;
  margin-top: var(--section-y);
}
.foot-grid { display: grid; gap: 1.4rem; }
.foot-brand { font-family: var(--font-mono); font-size: .84rem; letter-spacing: .04em; color: var(--muted); max-width: 40ch; }
.foot-brand strong { font-family: var(--font-display); color: var(--text); letter-spacing: .02em; display:inline-flex; align-items:center; gap:.5em; }
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.foot-links a { color: var(--muted); font-size: .9rem; transition: color .18s var(--ease); display: inline-flex; align-items: center; gap: .45em; }
.foot-links a:hover { color: var(--signal); }

/* ---- Reveal motion ---------------------------------------- */
html.js [data-reveal] { opacity: 0; transform: translateY(16px); }
html.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
@keyframes reveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@keyframes scan {
  0%   { top: 0; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.scanline.run { animation: scan 1.15s var(--ease) forwards; }

/* ---- Responsive ------------------------------------------- */
@media (min-width: 620px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .doors { grid-template-columns: 1.15fr 1fr; }
}
@media (min-width: 820px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .readout { grid-template-columns: repeat(3, 1fr); }
  .stat { border-top: 0; border-left: 1px solid var(--line); }
  .stat:first-child { border-left: 0; }
}

/* ---- Reduced motion — everything resolved, no sweep ------- */
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scanline { display: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .resolve::after { transform: scaleX(1); }
}
