/*
 * Nabo v3 — main.css
 *
 * Editorial-postal minimalism. Warm cream paper, Fraunces display serifs,
 * wine-red accent, a rubber-stamp PREVIEW watermark, and a sticky postcard
 * preview anchoring the desktop layout. The visual joke: take a silly product
 * (mailing a turnip) extremely seriously.
 */

:root {

  /* === Colours (warm paper palette) === */

  --paper:        #F5EDDE; /* warm cream — primary background */
  --paper-shade:  #ECE1C8; /* slightly darker cream — card surfaces */
  --paper-soft:   #FBF5E8; /* lightest tint — input backgrounds */
  --ink:          #1F1814; /* deep warm brown-black — primary text */
  --ink-soft:     #5C4F45; /* warm grey-brown — secondary text */
  --ink-mute:     #8C7B6B; /* muted brown — hints, captions */
  --border:       #D6C8AE; /* warm tan — input borders */
  --border-soft:  #E5D8BE; /* lighter tan — subtle dividers */
  --accent:       #7E2E2E; /* deep wine red — primary accent */
  --accent-ink:   #A83A3A; /* lighter wine — hover, focus */
  --leaf:         #6B7F4E; /* sage green — turnip leaves */
  --error:        #9C2B2B; /* warm error red */
  --success:      #4A6B3A; /* deep leaf green — confirmation state */

  /* === Typography === */

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Cascadia Code', 'Source Code Pro', ui-monospace, monospace;

  --text-xs:   0.75rem;     /* 12px — eyebrow, counters, captions */
  --text-sm:   0.875rem;    /* 14px — helper text, legal line */
  --text-base: 1rem;        /* 16px — body anchor */
  --text-md:   1.125rem;    /* 18px — subtitle, body lead */
  --text-lg:   1.375rem;    /* 22px — section heads, button text */
  --text-xl:   clamp(1.5rem, 3.5vw, 2.125rem); /* fluid — second-tier display */
  --text-display: clamp(2.75rem, 8vw, 5rem);   /* fluid hero — the showpiece */

  --leading-tight:   1.08;
  --leading-snug:    1.25;
  --leading-normal:  1.5;
  --leading-relaxed: 1.7;

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semi:    600;
  --weight-bold:    700;

  /* === Spacing === */

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* === Radius === */

  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;

  /* === Shadow === */

  --shadow-card:    0 1px 2px rgba(31, 24, 20, 0.04),
                    0 4px 18px -8px rgba(31, 24, 20, 0.12);
  --shadow-postage: 0 1px 0 var(--ink),
                    0 6px 16px -8px rgba(31, 24, 20, 0.4);
  --shadow-pressed: 0 0 0 var(--ink),
                    0 2px 8px -4px rgba(31, 24, 20, 0.35);

  /* === Motion === */

  --duration-fast:    160ms;
  --duration-normal:  280ms;
  --duration-slow:    640ms;
  --ease-out:         cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard:    cubic-bezier(0.4, 0, 0.2, 1);

}

/* =============================================================================
   RESET
   ============================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

input,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

/* =============================================================================
   BASE — warm paper background with a subtle SVG noise texture for grain
   ============================================================================= */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: var(--weight-regular);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.10 0 0 0 0 0.07 0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
  min-height: 100vh;
  scroll-behavior: smooth;
}

/* =============================================================================
   LAYOUT — single column, generous breathing room, asymmetric grid on desktop
   ============================================================================= */

main {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--space-5);
  padding-top: var(--space-8);
  padding-bottom: var(--space-20);
}

main > * + * {
  margin-top: var(--space-10);
}

/* =============================================================================
   PAGE HEADER — brand mark + eyebrow + headline + subtitle + trust line
   ============================================================================= */

.page-header {
  max-width: 720px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--ink);
  letter-spacing: 0.02em;
  padding-bottom: var(--space-2);
}

.brand-icon {
  display: inline-block;
  width: 0.95em;
  height: 1.2em;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: var(--weight-semi);
  font-size: var(--text-md);
  font-style: italic;
  font-variation-settings: "opsz" 14, "SOFT" 100;
  letter-spacing: -0.01em;
}

/* Editorial eyebrow — like the dateline on a newspaper */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background-color: var(--ink-mute);
  display: inline-block;
  flex-shrink: 0;
}
.eyebrow-number {
  color: var(--accent);
}

/* Hero headline — Fraunces display, optical size cranked up, soft serifs */
#hero-title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
  letter-spacing: -0.028em;
  color: var(--ink);
  margin-top: var(--space-5);
  font-variation-settings: "opsz" 144, "SOFT" 60;
}

/* The word "nabo" gets editorial italic + wavy underline + accent colour */
.word-nabo {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 500;
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--accent-ink);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--ink-soft);
  margin-top: var(--space-5);
  max-width: 38ch;
  font-variation-settings: "opsz" 24, "SOFT" 80;
}

.trust-line {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
}
.trust-pip {
  color: var(--accent);
  font-size: 0.45em;
  line-height: 1;
}
.trust-sep {
  color: var(--ink-mute);
  margin-inline: 0.2em;
}

/* =============================================================================
   FORM LAYOUT — asymmetric grid on desktop, sticky preview
   ============================================================================= */

#order-form:not([hidden]) {
  display: block;
  margin-top: var(--space-12);
}

.preview-aside {
  margin-bottom: var(--space-10);
}

.form-fields {
  display: block;
}

@media (min-width: 900px) {
  #order-form:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(0, 1.5fr);
    column-gap: var(--space-16);
    align-items: start;
  }

  .preview-aside {
    margin-bottom: 0;
    position: sticky;
    top: var(--space-8);
  }
}

/* =============================================================================
   POSTCARD PREVIEW — A6 proportions, faux postmark, rubber-stamp watermark
   ============================================================================= */

.preview-container {
  text-align: left;
}

/* Small editorial subtitle below the postcard — replaces the on-card PREVIEW
   watermark. Honest about what's shown: the real artwork that gets mailed. */
.preview-note {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  line-height: var(--leading-relaxed);
  color: var(--ink-mute);
  max-width: 38ch;
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}
.preview-note::before {
  content: "✱";
  color: var(--accent);
  font-size: 0.9em;
  flex-shrink: 0;
}

.postcard-preview {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 148 / 105;
  background-color: var(--paper-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(31, 24, 20, 0.015) 0%, transparent 8%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.10 0 0 0 0 0.07 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23p)'/></svg>");
  background-size: cover, 160px 160px;
}

/* Turnip illustration — anchored to the upper-left third for postcard composition */
#preview-turnip-slot {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Botanical turnip — viewBox ratio ~1:1.375, so we drive width and let the
   natural aspect ratio set height. Leaves stay clear of the postcard edge. */
.postcard-preview__turnip {
  position: absolute;
  top: 50%;
  left: 28%;
  transform: translate(-50%, -50%);
  width: 44%;
  max-height: 92%;
  height: auto;
  opacity: 1;
  animation: turnip-bob 6s var(--ease-standard) infinite alternate;
  filter: drop-shadow(0 6px 16px rgba(31, 24, 20, 0.1));
}

@keyframes turnip-bob {
  from { transform: translate(-50%, -50%) rotate(-0.6deg); }
  to   { transform: translate(-50%, -52%) rotate(0.6deg); }
}

/* Handwritten message overlay on the right half of the postcard */
.postcard-preview__message {
  position: absolute;
  top: 52%;
  right: var(--space-4);
  left: 56%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-variation-settings: "opsz" 24, "SOFT" 100, "wght" 500;
  line-height: 1.35;
  color: var(--ink);
  text-align: left;
  word-break: break-word;
  min-height: 1.3em;
}

/* Placeholder rendered purely via CSS when the message div is empty.
   Avoids the JS-managed .empty class clobbering user-typed text. */
.postcard-preview__message:empty::before {
  content: "a tua mensagem aparece aqui";
  font-family: var(--font-mono);
  font-style: normal;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  opacity: 0.55;
}


/* =============================================================================
   FORM SECTION TITLES — italic display + monospace numeric mark
   ============================================================================= */

.form-section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  font-style: italic;
  line-height: var(--leading-snug);
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-variation-settings: "opsz" 48, "SOFT" 60;
}
.form-section-title__mark {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--weight-medium);
  color: var(--accent);
  letter-spacing: 0.08em;
}

/* The first section title (Para quem?) sits closer to the message field */
.field + .form-section-title {
  margin-top: var(--space-8);
}

/* =============================================================================
   SOFT-REVEAL SECTIONS — sections 02 (Para quem?), 03 (email), and 04 (payment)
   each start `[hidden]` and reveal as the user progresses (see main.ts →
   softReveal). CSS transitions (not keyframes) so max-height, margin-top,
   opacity, and transform interpolate together — the form below slides down
   smoothly instead of snapping.

   We override the UA `[hidden] { display: none }` to `display: block` so the
   element stays in the layout tree and transitions can run between the
   collapsed and revealed property values.
   ============================================================================= */

.section-reveal {
  overflow: hidden;
  transition:
    max-height 700ms var(--ease-out),
    margin-top 700ms var(--ease-out),
    opacity 500ms var(--ease-out) 100ms,
    transform 700ms var(--ease-out);
}

.section-reveal:not([hidden]) {
  /* Revealed state — `max-height` is a generous upper bound (sections fit
     well within 1500 px including spacing). */
  max-height: 1500px;
  margin-top: var(--space-8);
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.section-reveal[hidden] {
  /* Override UA `display: none` so the element stays laid out for transitions. */
  display: block;
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  visibility: hidden;
}

/* The first child of every soft-reveal section is its heading. Reset its top
   margin so the outer `margin-top` on the section handles the spacing. */
.section-reveal > .form-section-title {
  margin-top: 0;
}

/* =============================================================================
   FORM FIELDS — labels, inputs, hints, errors
   ============================================================================= */

.field {
  margin-bottom: var(--space-5);
}

label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--ink);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.field-label-mark {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--accent);
  letter-spacing: 0.05em;
}

.field-label-optional {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: var(--weight-medium);
  color: var(--ink-mute);
  margin-left: auto;
}

input[type="text"],
input[type="email"],
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  background-color: var(--paper-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  -webkit-appearance: none;
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: var(--ink-mute);
  opacity: 0.6;
  font-style: italic;
}

textarea {
  min-height: 92px;
  resize: vertical;
  line-height: var(--leading-relaxed);
  padding: 0.7rem 0.85rem;
}

#message {
  min-height: 76px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-md);
  font-variation-settings: "opsz" 24, "SOFT" 80, "wght" 500;
  line-height: var(--leading-snug);
}

/* Monospace input variant — postal code */
.input-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--paper-soft);
  box-shadow:
    inset 0 0 0 1px var(--accent),
    0 0 0 4px rgba(126, 46, 46, 0.08);
}

input[type="text"].error,
input[type="email"].error,
textarea.error {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

.field-hint {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  margin-top: var(--space-2);
}

.field-error {
  display: none;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--error);
  margin-top: var(--space-2);
}
.field-error.visible {
  display: block;
}

.char-counter {
  display: flex;
  justify-content: flex-end;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-mute);
  margin-top: var(--space-1);
  letter-spacing: 0.04em;
  transition: color var(--duration-fast) var(--ease-standard);
}
.char-counter.over-limit {
  color: var(--error);
  font-weight: var(--weight-medium);
}

/* Postal-code + city sit side by side */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-3);
}
.field-row > .field {
  margin-bottom: var(--space-5);
}

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

/* =============================================================================
   PAYMENT AREA — Stripe Element mount with a static placeholder until lazy load
   ============================================================================= */

.payment-area {
  margin-bottom: var(--space-6);
}

#stripe-payment {
  min-height: 60px;
  background-color: var(--paper-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  transition: border-color var(--duration-fast) var(--ease-standard);
}
#stripe-payment:focus-within {
  border-color: var(--accent);
  box-shadow:
    inset 0 0 0 1px var(--accent),
    0 0 0 4px rgba(126, 46, 46, 0.08);
}

.payment-placeholder {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  transition: opacity var(--duration-normal) var(--ease-standard);
}
.payment-placeholder__icon {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
}
.payment-placeholder.loading {
  opacity: 0.4;
}

/* =============================================================================
   PAY BUTTON — wine-red stamp aesthetic with press-down interaction
   ============================================================================= */

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

.btn-primary {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 60px;
  padding: var(--space-4) var(--space-6);
  background-color: var(--accent);
  color: var(--paper);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--weight-medium);
  font-size: var(--text-lg);
  font-variation-settings: "opsz" 48, "SOFT" 60, "wght" 500;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-postage);
  transition:
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-standard);
}
.btn-primary__label {
  font-family: var(--font-display);
}
.btn-primary__price {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: var(--weight-medium);
  font-size: var(--text-md);
  letter-spacing: 0.04em;
  opacity: 0.92;
}
.btn-primary__arrow {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: var(--weight-regular);
  font-size: var(--text-md);
  margin-left: var(--space-2);
  transition: transform var(--duration-fast) var(--ease-out);
}
.btn-primary:hover {
  background-color: var(--accent-ink);
  transform: translateY(-2px) rotate(-0.4deg);
  box-shadow:
    0 3px 0 var(--ink),
    0 12px 28px -10px rgba(31, 24, 20, 0.5);
}
.btn-primary:hover .btn-primary__arrow {
  transform: translateX(4px);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn-primary:active {
  transform: translateY(1px) rotate(0deg);
  box-shadow: var(--shadow-pressed);
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Ghost button — used by the /done "Enviar outro nabo" action */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: var(--space-3) var(--space-6);
  background-color: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--weight-medium);
  font-size: var(--text-md);
  transition: background-color var(--duration-fast) var(--ease-standard);
}
.btn-secondary:hover {
  background-color: rgba(126, 46, 46, 0.08);
}
.btn-secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pay-legal {
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  text-align: center;
  line-height: var(--leading-relaxed);
}
.pay-legal a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 0.18em;
  transition: text-decoration-color var(--duration-fast) var(--ease-standard);
}
.pay-legal a:hover {
  text-decoration-color: var(--accent);
}

/* =============================================================================
   CONFIRMATION (#step-done) — renders after a successful payment
   ============================================================================= */

#step-done {
  max-width: 600px;
  text-align: left;
  padding: var(--space-10) 0;
}

#step-done .done-icon {
  display: inline-block;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: var(--space-5);
}

#step-done .done-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

#step-done h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--weight-medium);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
  font-variation-settings: "opsz" 144, "SOFT" 80;
  margin-bottom: var(--space-5);
  color: var(--ink);
}

#step-done .done-order-number {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  background-color: var(--paper-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-3);
  letter-spacing: 0.08em;
  color: var(--accent);
}

#step-done .done-estimate {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-md);
  color: var(--ink);
  margin-top: var(--space-5);
  font-variation-settings: "opsz" 24, "SOFT" 80;
}

#step-done .done-email-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  margin-top: var(--space-3);
  margin-bottom: var(--space-8);
}

/* =============================================================================
   FOOTER — small dateline-style legal strip
   ============================================================================= */

footer {
  max-width: 1080px;
  margin-inline: auto;
  padding: var(--space-8) var(--space-5) var(--space-10);
  border-top: 1px solid var(--border-soft);
  margin-top: var(--space-16);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

footer p {
  line-height: var(--leading-relaxed);
}

.footer-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  letter-spacing: 0;
}

.footer-tag {
  margin-top: var(--space-2);
  font-style: italic;
  font-family: var(--font-display);
  color: var(--ink-mute);
  letter-spacing: 0;
}

footer a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-fast) var(--ease-standard);
}
footer a:hover {
  border-bottom-color: var(--accent);
}

/* =============================================================================
   STAGGERED PAGE-LOAD REVEAL
   Each element with .reveal has a --reveal-delay var; together they orchestrate
   a soft top-down fade-up. One delight moment instead of scattered micro-anims.
   ============================================================================= */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 700ms var(--ease-out) var(--reveal-delay, 0ms) both;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================================================
   UTILITIES
   ============================================================================= */

.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;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* =============================================================================
   REDUCED MOTION — collapses every animation and transition
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .postcard-preview__turnip {
    animation: none;
  }
}

/* =============================================================================
   TABLET / DESKTOP REFINEMENT
   ============================================================================= */

@media (min-width: 768px) {
  main {
    padding-inline: var(--space-8);
    padding-top: var(--space-12);
  }
  .page-header {
    padding-top: var(--space-4);
  }
}

@media (min-width: 1100px) {
  main {
    padding-inline: var(--space-10);
  }
}
