/* ===========================================================================
   The Gay Agenda — pre-launch landing page
   Tokens are lifted verbatim from Brand Bible v2 (see /v2-build-source/lib.js).

   Rainbow budget (bible p07): exactly ONE full-spectrum element on the page.
   Here it is the "Join the list" button — the page has one job, so the
   spectrum goes on the thing that does it. Everything else uses solid accents
   or the two-stop primary-action fill.
   ========================================================================= */

:root {
  /* Ink family */
  --ink: #0A0612;
  --ink-2: #140A1F;
  --ink-3: #1E1130;
  --ink-border: #2A1A42;

  /* Type colours — every pairing below is checked on bible p08 */
  --text: #F5EDFF;        /* 17.60:1 on Ink — AAA */
  --text-dim: #B9A8D4;    /*  9.18:1 on Ink — AAA */
  --text-body: #C9BEE0;   /* 11.38:1 on Ink — AAA */

  /* Accents */
  --violet: #8B3FE8;
  --magenta: #E83FA9;
  --gold: #F5B93C;
  --teal: #3FD9B0;
  --blue: #3F9FE8;
  --ruby: #E83F5F;
  --lime: #B4E83F;

  --rainbow: linear-gradient(90deg,
      #E83F5F 0%, #F5B93C 18%, #B4E83F 36%, #3FD9B0 54%,
      #3F9FE8 72%, #8B3FE8 88%, #E83FA9 100%);

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --measure: 60ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 12px;
}

/* --- reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--ink);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);   /* 16–17px, never below the 14px floor */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--text); text-decoration-color: rgba(232, 63, 169, 0.6); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--magenta); }

/* Focus — bible p08: 2px Magenta ring on Ink, never removed. */
:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--ink-3);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* --- nebula field ---------------------------------------------------------
   CSS gradients, not an image: they stay sharp at every viewport, cost no
   bytes, and reflow with the page. Fixed so the page scrolls over the field. */
.nebula {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 38% at 18% 8%,  rgba(232, 63, 169, 0.34), transparent 60%),
    radial-gradient(ellipse 62% 34% at 86% 6%,  rgba(63, 159, 232, 0.26), transparent 60%),
    radial-gradient(ellipse 84% 44% at 50% 34%, rgba(139, 63, 232, 0.42), transparent 62%),
    radial-gradient(ellipse 96% 40% at 50% 98%, rgba(139, 63, 232, 0.38), transparent 60%),
    radial-gradient(ellipse 48% 26% at 90% 74%, rgba(232, 63, 95, 0.20), transparent 60%),
    var(--ink);
}

/* --- shared bits ----------------------------------------------------------- */
.rainbow-text {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
/* Fallback for engines without background-clip:text — never leave it invisible. */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .rainbow-text { color: var(--magenta); -webkit-text-fill-color: var(--magenta); }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.eyebrow__dash {
  flex: 0 0 1.75rem;
  height: 2px;
  border-radius: 2px;
  background: var(--rainbow);
}

/* --- header ---------------------------------------------------------------- */
.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: clamp(1rem, 3vw, 1.75rem) var(--gutter);
  border-bottom: 1px solid var(--ink-border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;          /* comfortable 44px pointer target */
  text-decoration: none;
  color: var(--text);
}
.brand__mark { width: 2.5rem; height: 2.5rem; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.site-head__tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
/* Under ~34rem the brand and the tag cannot share a line without both
   wrapping mid-phrase, so the tag drops to its own line, left-aligned. */
@media (max-width: 33.999rem) {
  .site-head__tag { flex: 1 0 100%; }
}
@media (min-width: 34rem) {
  .site-head__tag { text-align: right; }
}

/* --- hero ------------------------------------------------------------------ */
.hero {
  padding: clamp(2.5rem, 8vw, 5.5rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
  max-width: 68rem;
  margin-inline: auto;
}

/* The decorative mark only appears once there is genuinely room for it plus
   its 1X exclusion zone. Below that the hero is a single column. */
.hero__mark { display: none; }

@media (min-width: 64rem) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: center;
  }
  .hero__mark { display: block; }
  .hero__mark img {
    --mark: clamp(9rem, 14vw, 13rem);
    width: var(--mark);
    height: var(--mark);
    /* 1X = 30% of the diameter (bible p05); 0.34 leaves a little margin over. */
    margin: calc(var(--mark) * 0.34);
  }
}
.hero__title {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  /* 40px at 320w up to 92px — always far above the 24px gradient-text floor */
  font-size: clamp(2.5rem, 1.4rem + 5.6vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
}
.hero__lede {
  margin-top: 1.5rem;
  max-width: var(--measure);
  color: var(--text-dim);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  text-wrap: pretty;
}
.hero__hook {
  margin-top: 1rem;
  max-width: var(--measure);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--text);
}
.hero__hook strong { font-weight: 700; }

/* --- sign-up form ---------------------------------------------------------- */
.join { margin-top: clamp(1.75rem, 4vw, 2.5rem); max-width: 34rem; }

.join__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.join__row { display: flex; flex-wrap: wrap; gap: 0.625rem; }

.join__input {
  flex: 1 1 15rem;
  min-width: 0;
  padding: 0.95rem 1.05rem;
  font-family: var(--font-body);
  font-size: 1rem;                     /* 16px — stops iOS zooming on focus */
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #4A2A75;
  border-radius: var(--radius);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.join__input::placeholder { color: #8B7AA5; }
.join__input:hover { border-color: #6B44A8; }
.join__input:focus { background: rgba(255, 255, 255, 0.08); }
.join__input[aria-invalid="true"] { border-color: var(--ruby); }

/* The standard two-stop primary-action fill (bible p15), NOT the full spectrum:
   the page's one rainbow moment is the headline. White on Magenta is 3.67:1 —
   AA Large only — so p08 requires the label be 18px+ bold. It is 19px/700.
   Putting the spectrum here instead would need a heavy ink scrim to make white
   legible over the lime and gold stops, which mutes the brand to mud. */
.join__btn {
  flex: 0 0 auto;
  padding: 0.85rem 1.6rem;
  min-height: 3rem;                    /* >= 44px pointer target */
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #E83FA9 0%, #8B3FE8 100%);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1875rem;                /* 19px — clears the 18px AA-Large floor */
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease;
}
.join__btn:hover { filter: brightness(1.1); }
.join__btn:active { transform: translateY(1px); }
.join__btn[disabled] { opacity: 0.6; cursor: progress; }
/* Success is a finished state, not an unavailable one — keep it at full
   strength so the label stays legible. */
.join__btn.is-done { opacity: 1; cursor: default; }

/* Once the button has wrapped beneath the field it should span the full width —
   a half-width button under a full-width input reads as unfinished. Declared
   after .join__btn so it wins the cascade at equal specificity. */
@media (max-width: 30rem) {
  .join__btn { flex: 1 1 100%; }
}

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.join__status {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  min-height: 1.4em;
}
.join__status:empty { margin-top: 0; min-height: 0; }
.join__status[data-state="error"] { color: #FF8FA3; }     /* 7.9:1 on Ink */
.join__status[data-state="ok"] { color: var(--teal); }    /* 10.1:1 on Ink */

.join__note {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 44ch;
}

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hero__proof li::before { content: "↳"; margin-right: 0.45rem; color: var(--teal); }

/* --- three props ----------------------------------------------------------- */
.props {
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(3rem, 7vw, 5rem);
  max-width: 68rem;
  margin-inline: auto;
  border-top: 1px solid var(--ink-border);
}
.props__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  letter-spacing: -0.02em;
  color: var(--text);
}
.props__list {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.prop {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius);
}
.prop__num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  color: var(--gold);
}
.prop__name {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.prop__body { margin-top: 0.6rem; font-size: 0.9375rem; line-height: 1.6; }

/* --- footer ---------------------------------------------------------------- */
.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding: clamp(1.5rem, 4vw, 2.25rem) var(--gutter) clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--ink-border);
}
.site-foot__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
}
.site-foot__brand img { width: 1.75rem; height: 1.75rem; }
.site-foot__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: 0.875rem; }
/* Navigation links, not prose links — give them a real tap target. */
.site-foot__links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.site-foot__legal {
  flex: 1 0 100%;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
@media (min-width: 48rem) {
  .site-foot__links { margin-left: auto; }
  .site-foot__legal { flex: 1 0 100%; }
}

/* --- motion + contrast preferences ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
@media (prefers-contrast: more) {
  .nebula { background: var(--ink); }
  .prop, .join__input { border-color: var(--text-dim); }
}

/* Print: the page is a sign-up, but don't hand over a black rectangle. */
@media print {
  .nebula, .skip { display: none; }
  body { background: #fff; color: #140A1E; }
  .hero__title, .props__title, .prop__name, .brand__name { color: #140A1E; }
  .rainbow-text { -webkit-text-fill-color: #8B3FE8; color: #8B3FE8; }
  .join__btn { background: #8B3FE8; }
}
