:root {
  --bg: #021C28;
  --accent: #eeff4a;
  --text: #ffffff;
  --ink: #0a0f14;
  --line: rgba(255, 255, 255, 0.55);
  --err: #ff8f80;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  min-height: 100svh;
  background: transparent;
  color: var(--text);
  font-family: "Space Mono", ui-monospace, Menlo, Consolas, monospace;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg) url("/bg.svg") center / cover no-repeat;
}
a { color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px;
}

/* Header: logo and social icons, always centred */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: clamp(1.5rem, 4vh, 2.5rem) 1.5rem 0;
}
.logo { display: block; line-height: 0; }
.logo img { display: block; width: clamp(170px, 26vw, 260px); height: auto; }
.social { display: flex; gap: 1.75rem; justify-content: center; align-items: center; }
.social a { color: var(--text); display: inline-flex; transition: color .2s; }
.social a:hover, .social a:focus-visible { color: var(--accent); }
.social svg { width: 1.6rem; height: 1.6rem; fill: currentColor; }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center;
  width: min(100%, 18rem);
  padding: 0.85rem 1.25rem;
  border: 0; border-radius: 999px;
  font-family: inherit; font-weight: 400;
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); opacity: .92; font-weight: 700; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn.primary { background: var(--accent); }
.btn.secondary { background: #fff; }

/* Landing */
.landing {
  flex: 1;
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(1rem, 2.6vh, 1.75rem);
  text-align: center;
}
.landing .brand { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 3vw, 1.75rem); }
.landing .logo img { width: clamp(130px, min(26vw, 30vh), 240px); }
.landing .social { gap: 1.5rem; margin-top: clamp(0.25rem, 1.5vh, 1rem); }
.landing .social svg { width: 1.4rem; height: 1.4rem; }
.eyebrow { color: var(--accent); font-size: clamp(0.9rem, min(1.8vw, 3vh), 1.25rem); margin-top: clamp(0.25rem, 1.5vh, 1rem); }
.landing h1 { font-weight: 400; font-size: clamp(1.1rem, min(2.4vw, 3.8vh), 1.75rem); line-height: 1.35; max-width: 30ch; }
.launch { font-size: clamp(1.1rem, min(2.4vw, 3.8vh), 1.75rem); }
.actions { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; margin-top: 1rem; }

/* Register */
.register {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 4rem) 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.copy h1 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); font-weight: 700; margin-bottom: 1.25rem; }
.copy p { font-size: clamp(1rem, 1.7vw, 1.15rem); margin-bottom: 1.5rem; max-width: 38ch; }

.field { margin-bottom: 1.5rem; animation: reveal .25s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.label { display: block; font-size: 1rem; margin-bottom: .6rem; }
.req { margin-left: .25rem; }
.help { font-size: .85rem; opacity: .8; margin-top: .4rem; }
.field input:not([type="radio"]), .field select {
  width: 100%; height: 3rem; padding: 0 1rem;
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: .75rem;
  font: inherit; font-size: 1rem;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2.75rem; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 1.1rem;
}
.field select option { background: #04121c; color: #fff; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.field [aria-invalid="true"] { border-color: var(--err); }
.radios { border: 0; min-inline-size: 0; }
.radio { position: relative; display: flex; align-items: center; gap: .9rem; margin-bottom: .9rem; cursor: pointer; font-size: .95rem; }
.radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dot { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
.radio input:checked + .dot { border-color: #fff; }
.radio input:checked + .dot::after { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent); }
.radio input:focus-visible + .dot { outline: 2px solid var(--accent); outline-offset: 2px; }
.err { color: var(--err); font-size: .85rem; margin-top: .45rem; }
.form-error { color: var(--err); margin-bottom: 1rem; }
#submit { width: 100%; margin-top: .5rem; }
.status { opacity: .85; }
.thanks { border: 1px solid var(--line); border-radius: 1rem; padding: 2rem; }
.thanks p + p { margin-top: 1rem; }

@media (max-width: 820px) {
  .register { grid-template-columns: 1fr; max-width: 34rem; gap: 2rem; }
  .copy { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .field { animation: none; } .btn { transition: none; } }

/* Mobile: custom full-width option sheet instead of the native popup */
@media (max-width: 820px) { .field select { pointer-events: none; } }
.sheet-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.65); display: flex; align-items: flex-end; font-family: "Arimo", Arial, sans-serif; }
.sheet { width: 100%; max-height: 75vh; overflow-y: auto; background: #04121c; color: #fff; border-top: 1px solid var(--line); border-radius: 1rem 1rem 0 0; padding: .5rem 0 max(1rem, env(safe-area-inset-bottom)); animation: sheetUp .2s ease; }
.sheet-title { padding: 1rem 1.25rem .5rem; font-size: .9rem; opacity: .7; }
.sheet-opt { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; font-size: 1.05rem; padding: .95rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); cursor: pointer; }
.sheet-opt[aria-selected="true"] { color: var(--accent); font-weight: 700; }
.sheet-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }

/* Footer */
.site-footer { text-align: center; padding: 1.5rem 1.5rem max(1.5rem, env(safe-area-inset-bottom)); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--accent); }
.site-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem 2rem; }


/* Substack pop-up */
.promo-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(0, 0, 0, .7); opacity: 0; transition: opacity .2s; }
.promo-overlay.open { opacity: 1; }
.promo { position: relative; width: 100%; max-width: 26rem; background: var(--bg); border: 1px solid var(--line); border-radius: 1rem; padding: 2.25rem 1.75rem 1.5rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem; transform: translateY(12px); transition: transform .2s; }
.promo-overlay.open .promo { transform: none; }
.promo-title { color: var(--accent); font-size: 1.15rem; font-weight: 700; }
.promo-text { font-family: "Arimo", Arial, sans-serif; font-size: 1rem; line-height: 1.6; }
.promo-cta { width: 100%; }
.promo-dismiss { background: none; border: 0; color: var(--text); font: inherit; font-size: .85rem; text-decoration: underline; opacity: .8; cursor: pointer; }
.promo-close { position: absolute; top: .5rem; right: .75rem; background: none; border: 0; color: var(--text); font-size: 1.75rem; line-height: 1; cursor: pointer; padding: .25rem; }
.promo-close:hover, .promo-dismiss:hover { color: var(--accent); }
.promo-close:focus-visible, .promo-dismiss:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .promo-overlay, .promo { transition: none; } }
