/* Parlor Doughnuts — base + components. Requires tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

/* ---------- Type ---------- */
.display, h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-tight);
  margin: 0;
  text-wrap: balance;
}
.display { font-size: var(--text-hero); }
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-h3);
  line-height: var(--leading-snug);
  margin: 0;
}
p { margin: 0; }
.lead { font-size: var(--text-lead); font-weight: 300; line-height: 1.55; }
.muted { color: var(--color-text-muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-ui);
  text-transform: uppercase;
}
.eyebrow::before { content: "★"; font-size: 0.9em; color: var(--pd-glaze); letter-spacing: 0; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-y); }
.section--navy { background: var(--pd-navy); color: var(--color-text-inverse); }
.section--sky { background: var(--color-surface-alt); }
.section--white { background: var(--color-surface); }
.stack > * + * { margin-top: var(--stack, var(--space-4)); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--color-primary);
  --btn-fg: var(--pd-bone);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 52px;
  padding: 0 var(--space-6);
  border: var(--border);
  border-color: var(--btn-bg);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: var(--tracking-ui);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-stamp); }
.btn:active { transform: none; box-shadow: none; }
.btn--outline { --btn-fg: var(--pd-navy); background: transparent; }
.btn--outline:hover { background: var(--pd-white); }
.btn--bone { --btn-bg: var(--pd-bone); --btn-fg: var(--pd-navy); }
.btn--bone:hover { box-shadow: 4px 4px 0 var(--pd-glaze); }
.btn--sm { min-height: 42px; padding: 0 var(--space-5); font-size: 0.8125rem; }

/* ---------- Bunting divider (brand wave + stars) ---------- */
.bunting {
  height: clamp(28px, 5vw, 56px);
  background: url("../assets/img/wave-navy-long.webp") center / auto 100% repeat-x;
}
.bunting--white { background-image: url("../assets/img/wave-white.webp"); }

/* ---------- Badge / stamp ---------- */
.stamp {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border: 1.5px solid currentColor;
  border-radius: var(--radius-pill);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: var(--tracking-ui); text-transform: uppercase;
}

/* ---------- Card ---------- */
.card {
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-stamp);
}

/* ---------- Form ---------- */
.field { display: grid; gap: var(--space-2); }
.field label, .field legend {
  font-family: var(--font-ui);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.field .hint { font-size: var(--text-small); color: var(--color-text-muted); }
.input, .select, .textarea {
  width: 100%;
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--pd-white);
  color: var(--pd-navy);
  font: inherit;
  font-size: 1rem; /* >=16px prevents iOS zoom */
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.textarea { min-height: 128px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--pd-navy) 50%), linear-gradient(135deg, var(--pd-navy) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: var(--space-7); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--pd-navy); box-shadow: 0 0 0 4px rgba(181, 148, 106, 0.35); }
.input:user-invalid, .select:user-invalid, .textarea:user-invalid { border-color: var(--color-error); }

.choice-group { display: flex; flex-wrap: wrap; gap: var(--space-2); border: 0; padding: 0; margin: 0; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-4);
  border: 1.5px solid var(--color-line); border-radius: var(--radius-pill);
  background: var(--pd-white); font-weight: 500; cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.choice input:checked + span { background: var(--pd-navy); border-color: var(--pd-navy); color: var(--pd-bone); }
.choice input:focus-visible + span { outline: 3px solid var(--color-focus); outline-offset: 2px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
