@import url('tokens.css');

/* -------------------------------------------------------------------------
   Reset
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-midnight-canvas);
  color: var(--color-frost-white);
  font-family: var(--font-roobert);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: var(--font-weight-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Selection */
::selection {
  background: var(--color-frost-white);
  color: var(--color-midnight-canvas);
}

/* -------------------------------------------------------------------------
   Layout primitives
   ------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, var(--spacing-40));
}

.section {
  padding-block: clamp(var(--spacing-64), 10vw, var(--spacing-152));
}

.section + .section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* -------------------------------------------------------------------------
   Header / nav
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-28);
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
  font-size: var(--text-body);
}

.brand__mark {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-28);
}

.nav__link {
  font-size: 14px;
  /* Keep each link on a single line. Without this, the narrow viewport
     can wrap "What it is" and "Who it's for" inside their <a> tag and
     break the header into two lines. */
  white-space: nowrap;
  color: var(--color-whisper-gray);
  transition: color 160ms ease;
}

/* On narrow viewports trim the type + flex gap so the two nav links
   plus the Apply button fit on one line. Tested against iPhone-SE (375 px),
   which was the worst-case wrap before this rule. */
@media (max-width: 560px) {
  .nav {
    gap: var(--spacing-12);
  }
  .nav__link {
    font-size: 12.5px;
  }
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--color-frost-white);
  outline: none;
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: var(--text-body);
  font-weight: var(--font-weight-regular);
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    color 200ms ease,
    transform 200ms ease;
}

.btn:focus-visible {
  outline: 2px solid var(--color-frost-white);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--color-frost-white);
  color: var(--color-midnight-canvas);
  border: 1px solid var(--color-frost-white);
}

.btn--primary:hover {
  background: transparent;
  color: var(--color-frost-white);
}

.btn--ghost {
  background: transparent;
  color: var(--color-frost-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn--ghost:hover {
  border-color: var(--color-frost-white);
}

.btn--arrow::after {
  content: '→';
  font-size: 1.1em;
  transform: translateX(0);
  transition: transform 200ms ease;
}

.btn--arrow:hover::after {
  transform: translateX(4px);
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  /* +200 px on the cap so the hero breathes — the photograph + stack of
     content (kicker, headline, lede, store badges, meta, CTAs) was
     pressed tight against the marquee at the previous 720 px cap. */
  min-height: min(92vh, 920px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--color-midnight-canvas);
}

/* Hero atmosphere: three drifting gradient orbs blurred together,
   plus a top+bottom radial veil to anchor the headline. */
.hero__orbs {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero__orb {
  position: absolute;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;
  will-change: transform;
  mix-blend-mode: screen;
}

.hero__orb--a {
  background: radial-gradient(closest-side, rgb(160, 224, 171), transparent 70%);
  top: -15%;
  left: -10%;
  animation: orb-drift-a 38s ease-in-out infinite alternate;
}

.hero__orb--b {
  background: radial-gradient(closest-side, rgb(255, 172, 46), transparent 70%);
  top: -5%;
  right: -20%;
  animation: orb-drift-b 52s ease-in-out infinite alternate;
}

.hero__orb--c {
  background: radial-gradient(closest-side, rgb(165, 45, 37), transparent 70%);
  bottom: -25%;
  left: 25%;
  animation: orb-drift-c 64s ease-in-out infinite alternate;
}

@keyframes orb-drift-a {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(14vw, 8vh, 0) scale(1.15); }
}

@keyframes orb-drift-b {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-12vw, 12vh, 0) scale(0.85); }
}

@keyframes orb-drift-c {
  0%   { transform: translate3d(0, 0, 0) scale(0.9); }
  100% { transform: translate3d(8vw, -10vh, 0) scale(1.2); }
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 60% at 50% 110%, rgba(0, 0, 0, 0.88), transparent 70%),
    radial-gradient(60% 50% at 50% -10%, rgba(0, 0, 0, 0.7), transparent 65%);
  pointer-events: none;
}

.hero__inner {
  padding-block: clamp(var(--spacing-64), 12vw, var(--spacing-152));
}

/* Mobile hero spacing (item 17). Without this override, the centred
   action-button row landed within ~30px of the scroll-cue on short
   viewports, hiding the cue behind the buttons. Adding 120px of
   bottom padding inside the inner pushes the centred stack up far
   enough that the scroll-cue (24px line + 12px bottom offset) sits
   below the buttons with clear breathing room.
   Override scoped to phones (≤560px) — desktops have ample vertical
   space and the earlier 152px clamp already covers them. */
@media (max-width: 560px) {
  .hero__inner {
    padding-bottom: calc(var(--spacing-64) + 120px);
  }
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-caption);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-frost-white);
  opacity: 0.85;
  margin: 0 0 var(--spacing-28);
}

.hero__kicker::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.hero__headline {
  margin: 0;
  font-family: var(--font-roobert);
  font-weight: var(--font-weight-light);
  font-size: clamp(40px, 8vw, 88px);
  line-height: var(--leading-display);
  letter-spacing: -0.02em;
  max-width: 24ch;
  text-wrap: balance;
}

.hero__headline br {
  display: block;
}

@media (max-width: 560px) {
  .hero__headline br {
    display: none;
  }
}

.hero__lede {
  margin: var(--spacing-40) 0 0;
  font-size: clamp(18px, 2.2vw, var(--text-subheading));
  line-height: var(--leading-subheading);
  max-width: 52ch;
  color: var(--color-frost-white);
  opacity: 0.92;
}

.hero__actions {
  margin-top: var(--spacing-48);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-12);
}

.hero__meta {
  margin-top: var(--spacing-48);
  font-size: var(--text-caption);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-frost-white);
  opacity: 0.7;
}

/* -------------------------------------------------------------------------
   Section: "What Guild is" — feature stanzas
   ------------------------------------------------------------------------- */
.eyebrow {
  font-size: var(--text-caption);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-whisper-gray);
  margin: 0 0 var(--spacing-28);
}

.section__title {
  font-family: var(--font-roobert);
  font-weight: var(--font-weight-light);
  font-size: clamp(36px, 5vw, var(--text-heading-lg));
  line-height: var(--leading-heading-lg);
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 22ch;
}

.section__lede {
  margin-top: var(--spacing-28);
  font-size: var(--text-subheading);
  line-height: var(--leading-subheading);
  color: var(--color-whisper-gray);
  max-width: 60ch;
}

.section__figure {
  /* TODO: tune this treatment — see chat. */
  margin: clamp(var(--spacing-40), 5vw, var(--spacing-68)) 0 0;
  max-width: 720px;
  overflow: hidden;
  border-radius: 2px;
}

.section__figure--square {
  max-width: 520px;
}

.section__figure img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.95) contrast(1.05);
}

.stanzas {
  margin-top: clamp(var(--spacing-48), 6vw, var(--spacing-68));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-48) var(--spacing-64);
}

.stanza__num {
  font-size: var(--text-caption);
  letter-spacing: 0.22em;
  color: var(--color-misty-gray);
  margin: 0 0 var(--spacing-12);
}

.stanza__head {
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-heading-sm);
  margin: 0 0 var(--spacing-12);
  letter-spacing: -0.01em;
}

.stanza__body {
  margin: 0;
  color: var(--color-whisper-gray);
  font-size: var(--text-body);
  line-height: 1.55;
}

/* -------------------------------------------------------------------------
   Closing CTA panel
   ------------------------------------------------------------------------- */
.cta-panel {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius-lg);
  padding: clamp(var(--spacing-48), 7vw, 96px) clamp(var(--spacing-28), 5vw, 80px);
  overflow: hidden;
  text-align: center;
}

.cta-panel__gradient {
  position: absolute;
  inset: -20%;
  z-index: -1;
  background: var(--gradient-deep-ocean);
  filter: blur(60px) saturate(110%);
  opacity: 0.7;
}

.cta-panel__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(80% 100% at 50% 50%, transparent, rgba(0, 0, 0, 0.45));
}

.cta-panel__title {
  font-size: clamp(32px, 5vw, var(--text-heading));
  font-weight: var(--font-weight-light);
  line-height: var(--leading-heading);
  letter-spacing: -0.015em;
  margin: 0 auto;
  max-width: 22ch;
}

.cta-panel__lede {
  margin: var(--spacing-28) auto 0;
  max-width: 50ch;
  color: var(--color-frost-white);
  opacity: 0.9;
}

.cta-panel__actions {
  margin-top: var(--spacing-40);
  display: inline-flex;
  gap: var(--spacing-12);
  flex-wrap: wrap;
  justify-content: center;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: var(--spacing-48);
  color: var(--color-whisper-gray);
  font-size: var(--text-caption);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-28);
  justify-content: space-between;
  align-items: center;
}

.site-footer__links {
  display: inline-flex;
  gap: var(--spacing-28);
}

.site-footer__links a {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: var(--text-caption);
  color: var(--color-whisper-gray);
  transition: color 160ms ease;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--color-frost-white);
}

/* Buried admin link — quieter than its siblings on purpose. Findable
   for those who know where to look, ignorable for the public reader.
   Click-through navigates to /admin which is gated by Supabase auth. */
.site-footer__links a.footer-admin {
  opacity: 0.35;
  font-size: 10px;
  letter-spacing: 0.18em;
}
.site-footer__links a.footer-admin:hover,
.site-footer__links a.footer-admin:focus-visible {
  opacity: 0.75;
}

/* -------------------------------------------------------------------------
   Interior pages (apply, imprint, privacy)
   ------------------------------------------------------------------------- */
.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page__main {
  flex: 1;
  padding-block: clamp(var(--spacing-48), 8vw, 120px);
}

.page__header {
  margin-bottom: clamp(var(--spacing-40), 6vw, var(--spacing-68));
  max-width: 56ch;
}

.page__kicker {
  font-size: var(--text-caption);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-whisper-gray);
  margin: 0 0 var(--spacing-12);
}

.page__title {
  font-family: var(--font-roobert);
  font-weight: var(--font-weight-light);
  font-size: clamp(36px, 6vw, var(--text-heading));
  line-height: var(--leading-heading);
  letter-spacing: -0.015em;
  margin: 0;
}

.page__lede {
  margin-top: var(--spacing-28);
  font-size: var(--text-subheading);
  line-height: var(--leading-subheading);
  color: var(--color-whisper-gray);
  max-width: 60ch;
}

/* -------------------------------------------------------------------------
   Apply form — uses existing DOM/class hooks from apply.js
   ------------------------------------------------------------------------- */
.apply-form {
  display: grid;
  gap: clamp(var(--spacing-40), 5vw, var(--spacing-64));
}

.fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--spacing-28);
}

.legend {
  display: block;
  font-size: var(--text-caption);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-whisper-gray);
  padding: 0 0 var(--spacing-12);
  margin-bottom: var(--spacing-8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-28);
}

@media (max-width: 640px) {
  .row.two {
    grid-template-columns: 1fr;
  }
}

.field {
  display: grid;
  gap: 8px;
}

.label {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--color-frost-white);
}

.req {
  color: var(--color-deep-ocean-gradient);
  margin-left: 2px;
}

.hint {
  font-size: var(--text-caption);
  color: var(--color-whisper-gray);
  line-height: var(--leading-caption);
}

.error {
  font-size: var(--text-caption);
  color: #ffb4a8;
  min-height: 1em;
  line-height: var(--leading-caption);
}

input,
textarea,
select {
  width: 100%;
  font: inherit;
  color: var(--color-frost-white);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-misty-gray);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-frost-white);
  background: rgba(255, 255, 255, 0.07);
}

input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: #ffb4a8;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23ffffff' d='M6 8 0 0h12z' opacity='.7'/></svg>");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}

/* Honeypot — hidden from humans, visible to bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile-mount:empty {
  display: none;
}

.form-error {
  margin: 0;
  color: #ffb4a8;
  font-size: var(--text-body);
  min-height: 1em;
}

.actions {
  display: grid;
  gap: var(--spacing-12);
}

.submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-frost-white);
  color: var(--color-midnight-canvas);
  border: 1px solid var(--color-frost-white);
  border-radius: var(--radius-full);
  padding: 16px 32px;
  font: inherit;
  font-size: var(--text-body);
  cursor: pointer;
  justify-self: start;
  min-width: 220px;
  transition:
    background-color 200ms ease,
    color 200ms ease;
}

.submit:hover:not(:disabled) {
  background: transparent;
  color: var(--color-frost-white);
}

.submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.submit.is-loading .submit-label {
  opacity: 0;
}

.submit-spinner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0;
  animation: spin 700ms linear infinite;
}

.submit.is-loading .submit-spinner {
  opacity: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.legalese {
  margin: 0;
  font-size: var(--text-caption);
  color: var(--color-whisper-gray);
  line-height: var(--leading-caption);
  max-width: 56ch;
}

/* Success state */
.success {
  display: grid;
  gap: var(--spacing-28);
  padding: var(--card-padding);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
}

/* The success card must stay hidden until JS reveals it on submit. The
   `display: grid` above otherwise overrides the [hidden] attribute, so the
   "Thank you" box showed permanently at the bottom of the apply page and
   read as an already-submitted application (GGE-135 #3). */
.success[hidden] {
  display: none;
}

.success-title {
  font-family: var(--font-roobert);
  font-weight: var(--font-weight-light);
  font-size: var(--text-heading);
  line-height: var(--leading-heading);
  letter-spacing: -0.015em;
  margin: 0;
}

.success-body {
  margin: 0;
  color: var(--color-whisper-gray);
  font-size: var(--text-subheading);
  line-height: var(--leading-subheading);
  max-width: 56ch;
}

/* -------------------------------------------------------------------------
   Legal pages — prose styles
   ------------------------------------------------------------------------- */
.prose {
  max-width: 68ch;
  color: var(--color-frost-white);
}

.prose h2 {
  font-family: var(--font-roobert);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-heading-sm);
  line-height: var(--leading-heading-sm);
  letter-spacing: -0.01em;
  margin: var(--spacing-48) 0 var(--spacing-12);
}

.prose h3 {
  font-family: var(--font-roobert);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-subheading);
  line-height: var(--leading-subheading);
  margin: var(--spacing-28) 0 var(--spacing-8);
}

.prose p,
.prose ul {
  margin: 0 0 var(--spacing-12);
  color: var(--color-whisper-gray);
  line-height: 1.7;
}

.prose ul {
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 6px;
}

.prose a {
  color: var(--color-frost-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: border-color 160ms ease;
}

.prose a:hover {
  border-bottom-color: var(--color-frost-white);
}

.prose strong {
  color: var(--color-frost-white);
  font-weight: var(--font-weight-semibold);
}

.legal-meta {
  margin-top: var(--spacing-48);
  font-size: var(--text-caption);
  color: var(--color-misty-gray);
}

/* =========================================================================
   MOTION LAYER
   Atmospheric interactions. Everything below gates on prefers-reduced-motion.
   ========================================================================= */

/* --- Grain ----------------------------------------------------------------
   Full-page noise overlay. Adds tactile, expensive-feeling texture without
   shipping any image asset. Sub-1px, fixed, GPU-friendly. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* --- Hero kinetic reveal --------------------------------------------------
   Per-word stagger driven by --i custom property on each span. */
.hero__line {
  display: inline-block;
}

.hero__word {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  animation: word-rise 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 80ms + 200ms);
}

@keyframes word-rise {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Sibling elements fade up after the headline completes. */
.hero__kicker,
.hero__lede,
.hero__actions,
.hero__meta {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__kicker  { animation-delay: 100ms; }
.hero__lede    { animation-delay: 1100ms; }
.hero__actions { animation-delay: 1300ms; }
.hero__meta    { animation-delay: 1500ms; }

@keyframes hero-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Scroll reveal --------------------------------------------------------
   Driven by motion.js IntersectionObserver. */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 1100ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 1100ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* --- Section: draw-on-scroll top hairline ---------------------------------
   The .section + .section { border-top } rule earlier is replaced by an
   animated pseudo-element on the second-and-later sections. */
.section {
  position: relative;
}

.section + .section {
  border-top: 0;
}

.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1) 150ms;
}

.section + .section.is-in::before {
  width: 100%;
}

/* --- Magnetic primary CTA -------------------------------------------------
   motion.js writes transform; CSS supplies the easing for return. */
[data-magnetic] {
  transition: transform 380ms cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* --- Marquee --------------------------------------------------------------
   Quiet horizontal scroller between hero and content. Items duplicated
   in HTML so a translateX(-50%) cycle is seamless. */
.marquee {
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: var(--spacing-28);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--spacing-48);
  width: max-content;
  animation: marquee 55s linear infinite;
  will-change: transform;
}

.marquee__item {
  font-size: var(--text-subheading);
  font-weight: var(--font-weight-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-frost-white);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-48);
}

.marquee__item::after {
  content: '·';
  color: var(--color-misty-gray);
  font-size: 0.8em;
}

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* Edge fade — masks marquee ends so items don't pop in/out hard. */
.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 1;
}

.marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--color-midnight-canvas), transparent);
}

.marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--color-midnight-canvas), transparent);
}

/* --- Numbered stanzas — oversize the index marker ------------------------ */
.stanza__num {
  font-family:
    ui-monospace, 'SF Mono', SFMono-Regular, 'JetBrains Mono', Menlo,
    Consolas, monospace;
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-light);
  line-height: 1;
  letter-spacing: 0;
  color: var(--color-frost-white);
  opacity: 0.4;
  margin: 0 0 var(--spacing-28);
  transition: opacity 240ms ease;
}

.stanza:hover .stanza__num {
  opacity: 1;
}

/* --- Scroll cue (hero) ---------------------------------------------------- */
.scroll-cue {
  position: absolute;
  /* Sits flush near the bottom edge so it never lands on top of the
     centred hero content. On narrow mobile, the action-button stack
     can grow tall enough to overflow the hero padding box — keeping
     the cue close to the floor is what stops it overlapping the
     Apply button. */
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  justify-items: center;
  opacity: 0;
  animation: cue-appear 900ms 2200ms cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: none;
}

.scroll-cue__label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-frost-white);
  opacity: 0.6;
}

.scroll-cue__line {
  width: 1px;
  height: 48px;
  background: var(--color-frost-white);
  opacity: 0.5;
  transform-origin: top;
  animation: cue-pulse 2.6s ease-in-out infinite;
}

/* On narrow viewports the cue takes up vertical real estate the hero
   content needs. Shrink the line + gap so the whole cue is compact
   and stays out of the action-button zone even when the content stack
   reaches the floor. */
@media (max-width: 560px) {
  .scroll-cue {
    bottom: 8px;
    gap: 6px;
  }
  .scroll-cue__line {
    height: 24px;
  }
}

@keyframes cue-appear {
  to { opacity: 1; }
}

@keyframes cue-pulse {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50%      { transform: scaleY(0.35); opacity: 0.2; }
}

/* --- Footer wordmark ------------------------------------------------------
   A monopo signature — oversized brand wordmark, near-invisible, sitting
   above the legal footer like a watermark. */
.footer-mark {
  pointer-events: none;
  user-select: none;
  font-family: var(--font-roobert);
  font-weight: var(--font-weight-light);
  font-size: clamp(96px, 22vw, 320px);
  line-height: 0.85;
  letter-spacing: -0.045em;
  color: var(--color-frost-white);
  opacity: 0.06;
  margin: 0;
  text-align: center;
  padding-top: var(--spacing-64);
  overflow: hidden;
  white-space: nowrap;
}

/* --- Reduced motion override ---------------------------------------------
   Single switch: kill everything kinetic, keep layout static & legible. */
@media (prefers-reduced-motion: reduce) {
  .hero__orb,
  .marquee__track,
  .scroll-cue,
  .scroll-cue__line {
    animation: none !important;
  }

  .hero__word,
  .hero__kicker,
  .hero__lede,
  .hero__actions,
  .hero__meta {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .section + .section.is-in::before,
  .section + .section::before {
    width: 100%;
    transition: none;
  }

  [data-magnetic] {
    transition: none;
  }

  .scroll-cue {
    opacity: 1;
  }
}

/* ─── Hero background photograph + cloudy noise overlay ─────────────────── */
/* Painted gold-streak photograph sits behind the orbs. Its dimming is
   intentional — orbs + noise + veil combine to keep it atmospheric
   rather than literal. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
}

.hero__bg img {
  position: absolute;
  top: -15%;
  left: 0;
  right: 0;
  bottom: -15%;
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: center 60%;
  /* Image's own brightness moderated by opacity. Combined with the
     dedicated .hero__darken 25% layer, the net visible image is
     ~0.45 × (1 − 0.25) ≈ 0.34 of the original photo. */
  opacity: 0.45;
  filter: saturate(0.85) contrast(1.05);
  will-change: transform;
  /* The ±15% inset gives the parallax JS room to drift without ever
     revealing a black gap above or below. transform is left untouched
     here so the JS (motion.js parallax handler) can own it. */
}

/* 25 % darken layer sitting on top of the photograph AND the orbs.
   Brings the whole hero atmosphere down to ~75% brightness, independent
   of the image's own opacity so contrast can be tuned without changing
   the photo's tonal range. */
.hero__darken {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.25);
}

/* Cloudy / pixellated noise overlay — monopo-style atmospheric texture.
   Generated inline as an SVG feTurbulence so we ship zero extra bytes
   and the texture stays crisp at any DPR. */
.hero__noise {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.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 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  opacity: 0.12;
  mix-blend-mode: overlay;
}

/* Reduce noise visibility for low-DPR or older browsers — overlay
   mix-blend can shimmer aggressively. */
@media (prefers-reduced-motion: reduce) {
  .hero__noise { opacity: 0.07; }
}

/* Hero actions are now placed AFTER the meta line per layout brief —
   add a margin that visually anchors them as a separate call-to-action
   block rather than appearing crammed against the meta caption. */
.hero__inner .hero__actions {
  margin-top: var(--spacing-32, 32px);
}

/* Scroll-cue arrow: the existing label + vertical line gets a small
   chevron icon below so the affordance reads at a glance — monopo-
   style downward cue. The <a> wrapping makes it clickable for users
   on touch devices. */
.scroll-cue {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-cue__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  animation: scroll-cue-bob 2.2s ease-in-out infinite;
}

@keyframes scroll-cue-bob {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(4px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue__arrow { animation: none; }
}

/* ─── Band dividers — partial-image strips with parallax ────────────────── */
/* The full image is much taller than the band; we crop a horizontal
   slice that contains the gold-streak band, then scroll the inner
   image vertically as the user scrolls past. */
.band-divider {
  position: relative;
  overflow: hidden;
  height: 180px;
  background: var(--color-midnight-canvas);
  /* Soft fade at top + bottom so it transitions cleanly into adjacent
     black sections without a hard edge. */
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 18%,
    black 82%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 18%,
    black 82%,
    transparent 100%
  );
}

.band-divider__strip {
  position: absolute;
  inset: -40% 0 -40% 0;
  will-change: transform;
}

.band-divider__strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  opacity: 0.72;
  filter: saturate(0.95) contrast(1.05);
}

.band-divider--alt .band-divider__strip img {
  /* Pull a different vertical slice for visual variety — slightly
     higher in the source frame so the gold-streak reads differently. */
  object-position: center 30%;
  opacity: 0.66;
}

@media (max-width: 640px) {
  .band-divider { height: 140px; }
}

/* ─── Section-level gold accents (used on "A working community") ────────── */
.eyebrow-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--spacing-12, 12px);
}

.eyebrow-rule {
  width: 36px;
  height: 1px;
  background: var(--color-gold, #d9b66f);
  opacity: 0.85;
}

/* When a stanza-divider sits between two stanzas it draws a thin gold
   horizontal rule. Visual rhythm: read → pause → read. */
.stanza-divider {
  display: block;
  width: 64px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(217, 182, 111, 0.55) 50%,
    transparent 100%
  );
  margin: var(--spacing-28, 28px) 0;
}

/* Gold bracket accents on the .section--gold variant.
   The top-left bracket is now an explicit <span class="stanzas__corner">
   inside the .stanzas container so it sits directly above the "01"
   stanza number with breathing room. The bottom-right pseudo stays as
   a visual closure mark for the section. Subtle: 24px L-shapes, gold
   at 55% alpha. */
.section--gold {
  position: relative;
}

.section--gold .wrap {
  position: relative;
}

.section--gold .wrap::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(217, 182, 111, 0.55);
  border-style: solid;
  border-width: 0 1px 1px 0;
  bottom: 0;
  right: clamp(8px, 4vw, 24px);
  pointer-events: none;
}

.stanzas__corner {
  display: block;
  width: 24px;
  height: 24px;
  border-color: rgba(217, 182, 111, 0.55);
  border-style: solid;
  border-width: 1px 0 0 1px;
  /* Padding above is the user-requested breathing room between the
     section lede and this marker. Margin-bottom anchors it visually
     to the 01 stanza that follows. */
  margin: 28px 0 18px 0;
}

/* monopo-style downward arrow at the foot of a section. */
.section-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(217, 182, 111, 0.7);
  text-decoration: none;
  transition: color 200ms ease;
}

.section-cue:hover {
  color: rgba(217, 182, 111, 1);
}

.section-cue__line {
  width: 1px;
  height: 28px;
  background: currentColor;
  opacity: 0.55;
}

.section-cue__arrow {
  display: inline-flex;
  animation: scroll-cue-bob 2.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .section-cue__arrow { animation: none; }
}

/* ─── Apply page tabs (Guide / Operator) ────────────────────────────────── */
.apply-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  margin: 24px 0 28px 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  border-radius: 999px;
}

.apply-tab {
  background: none;
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.6));
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.apply-tab:hover {
  color: #fff;
}

.apply-tab.is-active {
  background: #fff;
  color: var(--color-midnight-canvas, #000);
}

.apply-pane__note {
  margin: 20px 0 0 0;
  padding: 16px 18px;
  background: rgba(217, 182, 111, 0.08);
  border: 1px solid rgba(217, 182, 111, 0.3);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-whisper-gray, rgba(255, 255, 255, 0.85));
}

/* ─── Referral fieldset on /apply ─────────────────────────────────────── */
.apply-referral {
  background: rgba(217, 182, 111, 0.05);
  border: 1px solid rgba(217, 182, 111, 0.25);
  border-radius: 14px;
  padding: 18px 20px 14px;
}
.apply-referral .legend {
  color: var(--color-gold, #d9b66f);
}
.apply-referral__lede {
  margin: -4px 0 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-whisper-gray, rgba(255, 255, 255, 0.85));
}
.apply-referral input[name="referralCode"] {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.apply-referral .hint code {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}
.field--prefilled input[name="referralCode"] {
  border-color: rgba(217, 182, 111, 0.55);
  box-shadow: 0 0 0 3px rgba(217, 182, 111, 0.12);
}

/* ─── Tours chip picker on /apply ────────────────────────────────────── */
.tours-picker .label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tours-picker__count {
  font-weight: 400;
  font-size: 12px;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.55));
  letter-spacing: 0.02em;
}
.tours-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  min-height: 36px;
}
.tours-picker__status {
  margin: 0;
  font-size: 13px;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.6));
}
.tours-picker__status[data-state="error"] {
  color: #e07a6e;
  cursor: pointer;
  text-decoration: underline;
}
.tours-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-whisper-gray, rgba(255, 255, 255, 0.85));
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.tours-chip:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.tours-chip.is-selected {
  background: rgba(46, 140, 130, 0.18);
  border-color: rgba(46, 140, 130, 0.6);
  color: #edf3f1;
}
.tours-chip:focus-visible {
  outline: 2px solid rgba(46, 140, 130, 0.7);
  outline-offset: 2px;
}

/* Intro note above the apply form — referral-only stance. */
.page__lede--note {
  background: rgba(217, 182, 111, 0.06);
  border-left: 3px solid rgba(217, 182, 111, 0.55);
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  line-height: 1.55;
  margin-top: 14px;
}

.apply-pane__note .link {
  color: var(--color-gold, #d9b66f);
  border-bottom-color: rgba(217, 182, 111, 0.4);
}

/* ─── Consent block on /apply ─────────────────────────────────────────── */
.apply-consent {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-top: 16px;
}
.apply-consent .legend {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  padding: 0 8px;
  font-weight: 600;
}
.apply-consent__row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-whisper-gray, rgba(255, 255, 255, 0.86));
  cursor: pointer;
}
.apply-consent__row input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-gold, #d9b66f);
  cursor: pointer;
}
.apply-consent__row .link {
  color: var(--color-gold, #d9b66f);
}

/* ─── Hero store badges ──────────────────────────────────────────────────── */
.hero__stores {
  margin-top: var(--spacing-32, 32px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-frost-white, #fff);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
  min-width: 168px;
}

.hero-store:hover {
  border-color: var(--color-frost-white, #fff);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.hero-store[aria-disabled="true"] {
  opacity: 0.78;
  cursor: default;
}

.hero-store[aria-disabled="true"]:hover {
  transform: none;
}

.hero-store__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #fff;
}

.hero-store__body {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.hero-store__meta {
  font-size: 10.5px;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.7));
}

.hero-store__name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1px;
  margin-top: 2px;
}

/* ─── /app landing page ─────────────────────────────────────────────────── */
.app-install,
.app-next {
  background: var(--color-card, rgba(255, 255, 255, 0.025));
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  padding: 28px;
  margin-top: var(--spacing-32, 32px);
}

.store-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0 0 18px 0;
}

@media (min-width: 540px) {
  .store-row {
    grid-template-columns: 1fr 1fr;
  }
}

.store-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease;
}

.store-link:hover:not(.store-link--disabled) {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

.store-link--disabled {
  cursor: default;
  opacity: 0.55;
}

.store-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.store-link__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-link__meta {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #fff;
}

.store-link__status {
  font-size: 11.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.55));
}

.app-install__note {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.6));
}

.app-next__list {
  margin: 0 0 14px 0;
  padding: 0 0 0 1.2em;
  display: grid;
  gap: 10px;
}

.app-next__list li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-whisper-gray, rgba(255, 255, 255, 0.85));
}

.app-next__small {
  margin: 0;
  font-size: 13px;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.55));
}

.app-next__small strong {
  color: #fff;
  font-weight: 600;
}

/* ─── Tier comparison (home) ────────────────────────────────────────────── */
.tier-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: var(--spacing-40, 40px);
}

@media (min-width: 980px) {
  .tier-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

.tier-card {
  background: var(--color-card, rgba(255, 255, 255, 0.025));
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tier-card--featured {
  border-color: rgba(217, 182, 111, 0.42);
  background:
    radial-gradient(
      120% 80% at 100% 0%,
      rgba(217, 182, 111, 0.08),
      transparent 60%
    ),
    var(--color-card, rgba(255, 255, 255, 0.025));
}

.tier-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  padding-bottom: 16px;
}

.tier-card__kicker {
  margin: 0;
  font-family: var(--font-roobert, "Manrope", system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.55));
}

.tier-card--featured .tier-card__kicker {
  color: var(--color-gold, #d9b66f);
}

.tier-card__price {
  margin: 0;
  font-size: 16px;
  color: var(--color-whisper-gray, rgba(255, 255, 255, 0.9));
}

.tier-card__price strong {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
}

.tier-card__alt {
  display: block;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.55));
  margin-top: 2px;
}

.tier-promo {
  margin: var(--spacing-40, 40px) 0 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-whisper-gray, rgba(255, 255, 255, 0.85));
  background: linear-gradient(
    135deg,
    rgba(217, 182, 111, 0.10) 0%,
    rgba(217, 182, 111, 0.03) 100%
  );
  border: 1px solid rgba(217, 182, 111, 0.28);
  border-radius: 999px;
}
.tier-promo__pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(217, 182, 111, 0.22);
  color: #e0c485;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.tier-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
  flex: 1;
}

.tier-card__list li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-whisper-gray, rgba(255, 255, 255, 0.85));
  padding-left: 22px;
  position: relative;
}

.tier-card__list li::before {
  content: "·";
  position: absolute;
  left: 6px;
  top: -1px;
  font-weight: 700;
  font-size: 18px;
  color: var(--color-gold, #d9b66f);
}

.tier-card__list strong {
  color: #fff;
  font-weight: 600;
}

.tier-card__cta {
  margin: 0;
}

/* ─── /upgrade page ─────────────────────────────────────────────────────── */
.upgrade {
  display: grid;
  gap: var(--spacing-32, 32px);
  grid-template-columns: 1fr;
  margin-top: var(--spacing-32, 32px);
}

@media (min-width: 820px) {
  .upgrade {
    grid-template-columns: 1.05fr 1fr;
    align-items: start;
  }
}

.upgrade__compare,
.upgrade-form {
  background: var(--color-card, rgba(255, 255, 255, 0.025));
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  padding: 28px;
}

.upgrade__subtitle {
  font-family: var(--font-roobert, "Manrope", system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.55));
  margin: 0 0 18px 0;
}

.upgrade__list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px 0;
  display: grid;
  gap: 12px;
}

.upgrade__list li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-whisper-gray, rgba(255, 255, 255, 0.85));
  padding-left: 22px;
  position: relative;
}

.upgrade__list li::before {
  content: "·";
  position: absolute;
  left: 6px;
  top: -1px;
  font-weight: 700;
  font-size: 18px;
  color: var(--color-gold, #d9b66f);
}

.upgrade__list strong {
  color: #fff;
  font-weight: 600;
}

.upgrade__price {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  font-size: 14px;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.6));
}

.upgrade__back {
  margin-top: 32px;
  font-size: 13px;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.55));
}

/* First-month-free promo banner — sits under the page lede, picks up
   the restrained-gold accent without dominating the page. */
.upgrade__promo {
  margin: 24px 0 0;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-whisper-gray, rgba(255, 255, 255, 0.85));
  background: linear-gradient(
    135deg,
    rgba(217, 182, 111, 0.10) 0%,
    rgba(217, 182, 111, 0.03) 100%
  );
  border: 1px solid rgba(217, 182, 111, 0.28);
  border-radius: 14px;
}
.upgrade__promo-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(217, 182, 111, 0.22);
  color: #e0c485;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* ─── /upgrade picker (tier + cadence radios) ─────────────────────────────── */
.upgrade--picker {
  grid-template-columns: 1fr;
}

.upgrade-tiers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 8px 0 4px;
}
@media (min-width: 680px) {
  .upgrade-tiers { grid-template-columns: 1fr 1fr; }
}

.upgrade-tier {
  display: block;
  cursor: pointer;
  position: relative;
}

.upgrade-tier input[type="radio"] {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.upgrade-tier__inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 160ms ease, background 160ms ease;
}

.upgrade-tier input[type="radio"]:checked ~ .upgrade-tier__inner {
  border-color: var(--color-gold, #d9b66f);
  background: rgba(217, 182, 111, 0.06);
}

.upgrade-tier__title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.upgrade-tier__sub {
  font-size: 12.5px;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.65));
  line-height: 1.45;
}

.upgrade-tier__price,
.upgrade-tier__price-alt {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gold, #d9b66f);
}

.upgrade-cadence {
  display: flex;
  gap: 10px;
  margin: 4px 0;
}

.upgrade-cadence__opt {
  flex: 1;
  cursor: pointer;
  position: relative;
}

.upgrade-cadence__opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.upgrade-cadence__opt > span {
  display: block;
  padding: 12px 14px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.7));
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  transition: border-color 160ms ease, color 160ms ease;
}

.upgrade-cadence__opt > span em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-gold, #d9b66f);
  margin-top: 2px;
}

.upgrade-cadence__opt input[type="radio"]:checked ~ span {
  color: #fff;
  border-color: var(--color-gold, #d9b66f);
}

.upgrade-consent {
  flex-direction: row;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--color-fog-dim, rgba(255, 255, 255, 0.7));
  line-height: 1.5;
}

.upgrade-consent input[type="checkbox"] {
  margin-top: 3px;
  flex: 0 0 auto;
}

.link {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.2));
  transition: border-color 160ms ease;
}

.link:hover,
.link:focus-visible {
  border-bottom-color: var(--color-gold, #d9b66f);
}

.submit--busy {
  cursor: progress;
  opacity: 0.7;
}

/* Apply submission confirmation modal (request #5). The inner card reuses
   the .success styling; the <dialog> itself just needs a reset + backdrop. */
.apply-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 460px;
  width: calc(100% - 32px);
  color: inherit;
}
.apply-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.apply-modal__card {
  margin: 0;
}
.apply-modal__actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}
