/* ── Brand tokens ── */
:root {
  --paper: #EFE6DA;
  --ink: #43382B;
  --muted: #9C8A74;
  --accent: #B0795C;
  --invert: #F7F2EA;
  --warm: #E4D9CB;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  /* Layout */
  --container-max: 68.75rem; /* ~1100px */
  --measure: 65ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 0.375rem;

  /* Type scale */
  --text-sm: 0.8125rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.375rem, 2.5vw, 1.75rem);
  --text-2xl: clamp(1.5rem, 3vw, 2rem);
  --text-hero: clamp(2.5rem, 5.5vw, 4rem);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-reveal: 380ms;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--prose {
  max-width: min(var(--container-max), calc(var(--measure) + var(--gutter) * 2));
}

.band {
  padding-block: var(--space-5);
}

.band--paper {
  background-color: var(--paper);
}

.band--warm {
  background-color: var(--warm);
}

.band--dark {
  background-color: var(--ink);
  color: var(--invert);
}

@media (min-width: 48rem) {
  .band {
    padding-block: var(--space-6);
  }
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 100;
  padding: var(--space-1) var(--space-2);
  background: var(--ink);
  color: var(--invert);
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--space-2);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Wordmark & signature detail ── */
.site-header {
  padding-block: var(--space-4) var(--space-2);
}

.wordmark {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: var(--text-lg);
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.wordmark::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  margin-top: var(--space-2);
  background-color: var(--accent);
}

.wordmark--footer::after {
  width: 2rem;
  margin-top: var(--space-1);
}

/* ── Typography ── */
.hero__headline,
.mirror__line,
.final-cta__line,
.taste__quote,
.success__text {
  font-family: "Fraunces", Georgia, serif;
}

.hero__headline {
  font-size: var(--text-hero);
  font-weight: 600;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
  max-width: 22ch;
}

.hero__subhead {
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.6;
  margin: 0 0 var(--space-4);
  max-width: var(--measure);
}

/* ── Success & errors ── */
.success,
.form-error {
  padding: var(--space-3);
  border-left: 2px solid var(--accent);
  background-color: color-mix(in srgb, var(--warm) 60%, var(--paper));
}

.success__text {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 400;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  line-height: 1.45;
}

.form-error p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ── Form ── */
.signup-form {
  margin-top: var(--space-3);
  max-width: var(--measure);
}

.signup-form__fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.signup-form__input {
  width: 100%;
  padding: 1rem 1.125rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background-color: var(--invert);
  border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent);
  outline: none;
  transition:
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

.band--dark .signup-form__input {
  background-color: color-mix(in srgb, var(--invert) 92%, var(--paper));
  border-color: color-mix(in srgb, var(--invert) 30%, transparent);
  color: var(--ink);
}

.signup-form__input::placeholder {
  color: var(--muted);
}

.signup-form__input:hover {
  border-color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.signup-form__input:focus {
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent),
    0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.signup-form__input:focus-visible {
  outline: none;
}

.signup-form__button {
  display: inline-block;
  width: 100%;
  padding: 1rem 1.75rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--invert);
  background-color: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition:
    background-color 0.2s var(--ease-out),
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

.signup-form__button:hover {
  background-color: #9a684f;
}

@media (hover: hover) {
  .signup-form__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .signup-form__button {
    transition: background-color 0.2s var(--ease-out);
  }
}

.signup-form__button:active {
  transform: translateY(0);
  box-shadow: none;
}

.signup-form__button:focus-visible {
  outline: 2px solid var(--invert);
  outline-offset: 3px;
}

.band--paper .signup-form__button:focus-visible {
  outline-color: var(--ink);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 36rem) {
  .signup-form__fields {
    flex-direction: row;
    align-items: stretch;
  }

  .signup-form__input {
    flex: 1 1 auto;
  }

  .signup-form__button {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* ── Feeling mirror ── */
.mirror__line {
  font-size: var(--text-2xl);
  font-weight: 500;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  line-height: 1.3;
  margin: 0 0 var(--space-4);
  color: var(--ink);
}

.mirror__line:last-child {
  margin-bottom: 0;
}

/* ── What it is ── */
.what__text {
  margin: 0;
}

/* ── Taste card (centerpiece) ── */
.taste__card {
  margin: 0;
  padding: clamp(var(--space-4), 6vw, var(--space-5));
  max-width: 52rem;
  margin-inline: auto;
}

.taste__quote {
  margin: 0 0 var(--space-4);
  font-size: clamp(1.375rem, 3.5vw, 2rem);
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  line-height: 1.45;
  color: var(--invert);
}

.taste__quote p {
  margin: 0 0 var(--space-3);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.taste__quote p:last-child {
  margin-bottom: 0;
}

.taste__attrib {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--invert) 55%, transparent);
}

/* ── Byline ── */
.byline__text {
  margin: 0 0 var(--space-2);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.byline__name {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ── Final CTA ── */
.final-cta__line {
  font-size: var(--text-xl);
  font-weight: 500;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  line-height: 1.25;
  margin: 0 0 var(--space-4);
  color: var(--invert);
}

/* ── Footer ── */
.site-footer {
  padding-block: var(--space-5) var(--space-4);
  border-top: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
  background-color: var(--paper);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.site-footer .wordmark {
  margin-bottom: var(--space-1);
}

.footer__safety {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink);
  max-width: var(--measure);
}

.footer__privacy,
.footer__copy {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--muted);
  max-width: var(--measure);
}

.footer__support {
  margin: var(--space-1) 0 0;
  padding-top: var(--space-3);
  border-top: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
}

.footer__support-link {
  font-size: var(--text-sm);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer__support-link:hover {
  color: var(--accent);
}

.footer__support-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Scroll reveal (progressive enhancement) ── */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity var(--duration-reveal) var(--ease-out),
    transform var(--duration-reveal) var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
