/**
 * Teaser page styles.
 *
 * Everything here consumes the tokens in tokens.css — the same file the
 * marketing site and the app use, copied in verbatim so a diff shows drift.
 * No hex, no raw px, exactly as tokens.css requires.
 *
 * The page is deliberately light-only, like the marketing site: cream is the
 * paper the seal is pressed into, and a dark inversion breaks that metaphor.
 */

/* ================= Reset (from marketing-site/src/styles/base.css) ======== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Short states (thank-you, confirmed) would otherwise leave the footer
   floating mid-viewport. */
body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input {
  font: inherit;
  color: inherit;
}

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

h1,
h2,
h3 {
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tighter);
  line-height: var(--leading-tight);
}

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-xs);
}

::selection {
  background: var(--color-primary-soft);
  color: var(--color-primary-active);
}

/* ================= Reveal ================================================
   The marketing site reveals sections on scroll with an IntersectionObserver.
   This page's CSP is script-src 'none', so the same motion is done in CSS:
   one fade-up, staggered by position. Same distance, same easing, same
   duration as [data-reveal] in base.css. */

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

[data-reveal] {
  animation: reveal 620ms var(--ease-out) both;
}

[data-reveal="1"] { animation-delay: 60ms; }
[data-reveal="2"] { animation-delay: 120ms; }
[data-reveal="3"] { animation-delay: 180ms; }
[data-reveal="4"] { animation-delay: 240ms; }
[data-reveal="5"] { animation-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    animation: none;
  }
}

/* ================= Hero ================================================== */

/* The vermilion wash from Hero.module.css — the page's only large use of the
   brand colour besides the CTA. */
.hero {
  padding: var(--space-12) var(--space-5) var(--space-16);
  text-align: center;
  background: radial-gradient(
    ellipse 70% 60% at 50% -10%,
    rgba(201, 74, 38, 0.13),
    transparent 70%
  );
}

.heroInner {
  max-width: var(--width-content);
  margin: 0 auto;
}

/* Block, not inline-block: the pill below is an inline-flex, so an inline
   seal shares its line box and the pair centres as a group — which leaves the
   seal sitting left of centre. */
.seal {
  display: block;
  width: fit-content;
  margin: 0 auto var(--space-6);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.pillDot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  flex-shrink: 0;
}

.title {
  font-size: var(--text-hero);
  font-weight: var(--weight-black);
  line-height: 1.05;
  max-width: 18ch;
  margin: 0 auto;
  text-wrap: balance;
}

/* The hero's signature: the second sentence carries the wax gradient. */
.accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: var(--space-5) auto 0;
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 46ch;
  /* Two short lines, so balance beats pretty — pretty leaves "it now." alone
     on the second line. */
  text-wrap: balance;
}

/* ================= Signup form =========================================== */

.signup {
  margin-top: var(--space-8);
}

.signupRow {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 30rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .signupRow {
    flex-direction: row;
  }
}

.field {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--touch-target);
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
  font-size: var(--text-base); /* 16px, or iOS Safari zooms on focus */
  transition: border-color var(--transition-fast);
}

.field::placeholder {
  color: var(--color-text-subtle);
}

.field:hover {
  border-color: var(--color-text-subtle);
}

.field[aria-invalid="true"] {
  border-color: var(--color-danger);
}

/* The one action on the page, so it gets the gradient fill — everything else
   stays ink or bordered. See the fill hierarchy note in tokens.css. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target);
  padding: 0 var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-inverse);
  background: var(--gradient-primary);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.button:hover {
  background: var(--color-primary-hover);
}

.button:active {
  transform: scale(0.985);
}

.note {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.error {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-danger);
}

/* Honeypot: off-canvas rather than display:none, which some bots skip. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

/* ================= Proof cards (from Problem.module.css) ================= */

.proof {
  padding: 0 var(--space-5) var(--section-y);
}

.proofInner {
  max-width: var(--width-app);
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  text-align: left;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.statRow {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

.stat {
  font-size: var(--text-4xl);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tighter);
  color: var(--color-primary);
  line-height: var(--leading-none);
}

.statLabel {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.cardTitle {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.cardBody {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

/* ================= Closing band (from Closing.module.css) ================ */

.closing {
  padding: var(--section-y) var(--space-5);
  background: var(--color-ink);
  color: var(--color-text-inverse);
  text-align: center;
}

.closingInner {
  max-width: var(--width-content);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.closingTitle {
  font-size: var(--text-4xl);
  max-width: 20ch;
}

.closingLead {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.72);
  max-width: 46ch;
}

.closingAction {
  margin-top: var(--space-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target);
  padding: 0 var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-inverse);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: border-color var(--transition-fast);
}

.closingAction:hover {
  border-color: rgba(255, 255, 255, 0.55);
}

/* ================= Interior states ======================================= */

/* Thank-you, confirmed, unsubscribed. Same hero wash, narrower column, no
   cards — these pages have one job each. */
.state {
  max-width: var(--width-narrow);
  margin: 0 auto;
}

.stateTitle {
  font-size: var(--text-4xl);
}

.stateLead {
  margin-top: var(--space-4);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

.qualify {
  margin-top: var(--space-8);
}

.fieldGroup {
  margin-bottom: var(--space-6);
  padding: 0;
  border: 0;
}

.fieldGroup legend {
  padding: 0;
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast),
    background var(--transition-fast);
}

.choice span:hover {
  border-color: var(--color-text-subtle);
  color: var(--color-text);
}

/* Colour alone never carries the state — the ground and the ring change too. */
.choice input:checked + span {
  color: var(--color-primary-active);
  background: var(--color-primary-soft);
  border-color: var(--color-primary-border);
  box-shadow: inset 0 0 0 1px var(--color-primary-border);
}

.choice input:focus-visible + span {
  box-shadow: var(--shadow-focus);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

/* Inline style attributes would need 'unsafe-inline' in the page CSP, so
   spacing that varies by context is a class, never an attribute. */
.state form .actions {
  margin-top: var(--space-8);
}

.skip {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.skip:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* ================= Footer (from Closing.module.css) ====================== */

.footer {
  padding: var(--space-10) var(--space-5);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-subtle);
}

.footerInner {
  max-width: var(--width-app);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  text-align: center;
}

@media (min-width: 640px) {
  .footerInner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footerBrand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tighter);
}

.copy {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ================= Mark =================================================
   The seal is inlined, so it re-themes with the tokens. Sizes are set here
   rather than on the SVG, which carries only a viewBox. */

.seal svg {
  width: 44px;
  height: 44px;
}

.footerBrand svg {
  width: 24px;
  height: 24px;
}
