/* pages/marketing.css
 *
 * Landing page - "Editorial Ledger", minimal pre-launch teaser.
 * One screen: masthead, centered hero with waitlist form, colophon.
 *
 * Brass (--color-accent) shows up exactly twice:
 *   (1) masthead stripe, (2) underline under "failed payments" in the H1.
 * Forest (--color-primary) carries every other ink cue - wordmark, H1, CTA.
 */

.marketing {
  --mkt-container:  72rem;
  --mkt-gutter:     clamp(1.5rem, 5vw, 4rem);
  --mkt-hairline:   1px solid hsl(var(--color-border));

  font-feature-settings: "ss01", "cv11", "tnum";
  color: hsl(var(--color-foreground));
  background-color: hsl(var(--color-background));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.marketing-container {
  max-width: var(--mkt-container);
  margin-inline: auto;
  padding-inline: var(--mkt-gutter);
  width: 100%;
}

/* ---------- Banners ---------- */

.marketing-banner {
  padding: var(--space-3) var(--mkt-gutter);
  font-size: var(--text-sm);
  background-color: hsl(var(--color-muted));
  border-bottom: 1px solid hsl(var(--color-border));
  color: hsl(var(--color-foreground));
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;

  strong {
    font-weight: 600;
  }

  &.marketing-banner--success {
    background-color: hsl(var(--color-primary) / 0.08);
    border-bottom-color: hsl(var(--color-primary) / 0.35);
    color: hsl(var(--color-primary));
    font-weight: 500;
  }

  &.marketing-banner--alert {
    background-color: hsl(var(--color-destructive) / 0.1);
    border-bottom-color: hsl(var(--color-destructive) / 0.55);
    color: hsl(var(--color-destructive));
    font-weight: 500;
  }
}

/* ---------- Masthead ---------- */

.marketing-masthead {
  padding-block: var(--space-8);

  .marketing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-6);
  }

  .marketing-nav__wordmark {
    font-weight: 800;
    font-size: var(--text-xl);
    letter-spacing: -0.03em;
    text-decoration: none;
    line-height: 1;

    .marketing-nav__wordmark-fore {
      color: hsl(var(--color-primary));
    }

    .marketing-nav__wordmark-accent {
      color: hsl(var(--color-accent-bright));
    }

    &:hover {
      .marketing-nav__wordmark-fore   { color: hsl(var(--color-primary) / 0.8); }
      .marketing-nav__wordmark-accent { color: hsl(var(--color-accent-bright) / 0.85); }
    }
  }

  .marketing-nav__meta {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: var(--space-8);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: hsl(var(--color-muted-foreground));

    @media (min-width: 48rem) {
      display: flex;
    }
  }
}

/* ---------- Eyebrow ---------- */

.marketing-eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--color-accent-strong));
  margin: 0 0 var(--space-8);

  .marketing-eyebrow__detail {
    color: hsl(var(--color-muted-foreground));
    font-weight: 500;
  }
}

/* ---------- Hero ---------- */

.marketing-hero {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  padding-block: clamp(3rem, 10vw, 6rem);

  .marketing-hero__inner {
    text-align: center;
  }

  .marketing-hero__headline {
    font-size: clamp(2.75rem, 7.5vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 0.94;
    color: hsl(var(--color-primary));
    margin: 0 auto var(--space-8);
    max-width: 20ch;
    text-wrap: balance;
  }

  .marketing-hero__emphasis {
    white-space: nowrap;
    color: hsl(var(--color-accent-bright));
  }

  .marketing-hero__sub {
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
    line-height: 1.55;
    color: hsl(var(--color-muted-foreground));
    margin: 0 auto var(--space-12);
    max-width: 36ch;
    text-wrap: balance;
  }

  .marketing-hero__form {
    max-width: 32rem;
    margin-inline: auto;
  }
}

/* ---------- Colophon ---------- */

.marketing-colophon {
  padding-block: var(--space-10) var(--space-12);

  .marketing-colophon__rule {
    height: 1px;
    background-color: hsl(var(--color-border));
    margin-bottom: var(--space-8);
  }

  .marketing-colophon__copy {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: hsl(var(--color-muted-foreground));
    text-align: center;
  }
}

/* ---------- Waitlist form ---------- */

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: left;

  .waitlist-form__honeypot {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .waitlist-form__label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: hsl(var(--color-muted-foreground));
  }

  .waitlist-form__row {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);

    @media (min-width: 32rem) {
      flex-direction: row;
      align-items: stretch;
    }
  }

  .waitlist-form__input {
    flex: 1 1 auto;
    min-height: 2.75rem;
    font-size: var(--text-base);
    padding-inline: var(--space-4);
  }

  .waitlist-form__submit {
    min-height: 2.75rem;
    padding-inline: var(--space-6);
    font-size: var(--text-base);
    white-space: nowrap;
  }

  .waitlist-form__error {
    font-size: var(--text-sm);
    color: hsl(var(--color-destructive));
    font-weight: 500;
    margin: 0;
  }

  .waitlist-form__caption {
    font-size: var(--text-sm);
    color: hsl(var(--color-muted-foreground));
    margin: 0;
    text-align: center;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .marketing *,
  .marketing *::before,
  .marketing *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
