/* Trade House Academy: founding list
   Minimal: one centred column, one typeface, one accent. Green is reserved for the primary action. */

:root {
  --bg: #050505;
  --line: #1c1c1c;
  --line-2: #2a2a2a;
  --ink: #ededeb;
  --ink-2: #9a9a95;
  --ink-3: #85857f;
  --green: #5cb85c;
  --green-hover: #6cc46c;
  --green-ink: #031003;
  --danger: #ef6b5f;

  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --col: 480px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* The background geometry is wider than a phone screen; never let it cause sideways scroll. */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(60% 45% at 50% 0%, rgba(255, 255, 255, .045), transparent 70%);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- texture ---------- */
/* Fine film grain over the whole page, behind content. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* Flower of Life field behind the hero, echoing the ring in the logo. Fades out from the centre. */
.hero::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; pointer-events: none;
  width: min(1200px, 190vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: url("/pattern.svg") center / contain no-repeat;
  opacity: .085;
  -webkit-mask-image: radial-gradient(closest-side, #000 10%, rgba(0, 0, 0, .5) 45%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 10%, rgba(0, 0, 0, .5) 45%, transparent 100%);
  animation: turn 300s linear infinite;
}
@keyframes turn { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate;
  flex: 1;
  width: 100%; max-width: 720px; margin: 0 auto;
  padding: 64px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}

.brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 48px; }
.brand-logo { width: 56px; height: 56px; object-fit: contain; }
.brand-name { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }

h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(40px, 7.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.lede {
  margin: 24px auto 0; max-width: 34em;
  font-size: 17px; line-height: 1.6; color: var(--ink-2);
  text-wrap: balance;
}

.stage { width: 100%; max-width: var(--col); margin-top: 40px; }

/* ---------- signup ---------- */
.inline {
  display: flex; gap: 6px; padding: 6px;
  border: 1px solid var(--line-2); border-radius: 14px;
  background: #0b0b0b;
  transition: border-color .2s var(--ease);
}
.inline:focus-within { border-color: #3d3d3d; }
.inline input {
  flex: 1; min-width: 0; height: 48px; padding: 0 12px;
  border: 0; background: none; outline: none; color: var(--ink);
}
.inline input::placeholder { color: var(--ink-3); }
.inline:has(input[aria-invalid="true"]) { border-color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; flex: none;
  border: 0; border-radius: 10px; cursor: pointer;
  background: var(--green); color: var(--green-ink);
  font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  transition: background .2s var(--ease);
}
.btn:hover { background: var(--green-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: progress; opacity: .8; }
.btn-sm { height: 42px; padding: 0 18px; font-size: 14.5px; }
.spinner {
  display: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(3, 16, 3, .25); border-top-color: var(--green-ink);
  animation: spin .7s linear infinite;
}
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.fine { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }
.suggest { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.suggest button {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--green); font-weight: 500; text-decoration: underline; text-underline-offset: 3px;
}
.msg { margin: 10px 0 0; font-size: 13.5px; color: var(--danger); }
.msg:empty { display: none; }

/* ---------- survey (left-aligned inside the centred column) ---------- */
.survey, .done { animation: rise .35s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.survey {
  text-align: left;
  padding: 24px; border: 1px solid var(--line); border-radius: 16px;
  background: #090909;
}
.kicker { margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--green); }
.survey-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.survey-intro { margin: 4px 0 20px; font-size: 14.5px; color: var(--ink-2); }
.progress { height: 2px; background: var(--line); overflow: hidden; margin-bottom: 24px; }
.progress-bar {
  height: 100%; width: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: left center; transition: transform .4s var(--ease);
}

.q { border: 0; margin: 0; padding: 0; min-width: 0; }
.q legend { padding: 0; font-weight: 500; font-size: 16px; letter-spacing: -.01em; }
.q-hint { margin: 2px 0 14px; font-size: 13px; color: var(--ink-3); }
.q-hint:empty { margin: 0 0 14px; }

.options { display: grid; gap: 6px; }
.options.two { grid-template-columns: 1fr 1fr; }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option span {
  display: flex; align-items: center; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14.5px; color: var(--ink-2);
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.option:hover span { border-color: var(--line-2); color: var(--ink); }
.option input:checked + span { border-color: var(--ink); color: var(--ink); background: rgba(255, 255, 255, .03); }
.option input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.option input:disabled + span { opacity: .35; cursor: not-allowed; }

textarea {
  width: 100%; min-height: 104px; padding: 12px 14px; resize: vertical; line-height: 1.5;
  background: none; border: 1px solid var(--line-2); border-radius: 10px; outline: none; color: var(--ink);
}
textarea:focus { border-color: #4a4a4a; }
textarea::placeholder { color: var(--ink-3); }

.survey-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.btn-text-only {
  height: 42px; padding: 0 4px; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); font-size: 14.5px;
}
.btn-text-only:hover { color: var(--ink); }
.btn-text-only[disabled] { visibility: hidden; }
.step-count { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.other-input {
  width: 100%; height: 46px; margin-top: 8px; padding: 0 14px;
  background: none; border: 1px solid var(--line-2); border-radius: 10px; outline: none; color: var(--ink);
}
.other-input:focus { border-color: #4a4a4a; }
.other-input::placeholder { color: var(--ink-3); }

/* ---------- story steps ---------- */
/* After signup the pitch has done its job: it steps aside and the next step takes the stage. */
body[data-step="survey"] .intro,
body[data-step="done"] .intro { display: none; }
body[data-step="survey"] .stage,
body[data-step="done"] .stage { margin-top: 0; }
body[data-step="survey"] .survey-title { font-size: 26px; letter-spacing: -.03em; }

/* ---------- done ---------- */
.done { outline: none; }
.done-mark {
  width: 52px; height: 52px; margin: 0 auto 28px; border-radius: 50%;
  border: 1.5px solid var(--green);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 12.5l4 4 8-9' fill='none' stroke='%235cb85c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 24px no-repeat;
}
.done h2 {
  margin: 0;
  font-weight: 600; font-size: clamp(40px, 7vw, 64px); line-height: 1.04; letter-spacing: -.045em;
}
.done p { margin: 20px auto 0; max-width: 420px; color: var(--ink-2); font-size: 17px; line-height: 1.6; text-wrap: balance; }

/* ---------- privacy / simple document pages ---------- */
.doc { flex: 1; width: 100%; max-width: 600px; margin: 0 auto; padding: 56px 24px 72px; }
.doc-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 56px; text-decoration: none; }
.doc-brand img { width: 40px; height: 40px; }
.doc h1 { font-size: clamp(36px, 6vw, 48px); }
.doc-date { margin: 10px 0 40px; font-size: 13px; color: var(--ink-3); }
.doc h2 { margin: 32px 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.doc p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.doc a { color: var(--ink); text-underline-offset: 3px; }
.doc .doc-back { margin-top: 48px; font-size: 14px; }

/* ---------- footer ---------- */
.foot {
  width: 100%; max-width: 720px; margin: 0 auto; padding: 0 24px 32px;
  text-align: center; font-size: 12px; line-height: 1.6; color: var(--ink-3);
}
.foot p { margin: 0; text-wrap: balance; }
.foot a { color: var(--ink-2); text-underline-offset: 3px; }
.foot a:hover { color: var(--ink); }

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .hero { padding: 48px 16px; justify-content: flex-start; padding-top: 14vh; }
  .brand { margin-bottom: 36px; }
  .brand-logo { width: 48px; height: 48px; }
  .lede { font-size: 16px; }
  .stage { margin-top: 32px; }
  .inline { flex-direction: column; }
  .btn:not(.btn-sm) { width: 100%; }
  .survey { padding: 18px; }
  .options.two { grid-template-columns: 1fr; }
  .foot { padding: 0 16px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
