/* ============================================================================
   scentfest.events — site styles
   Brand-matched to the ScentFest SF exit banner (../Banners/build_banner.py).
   Self-hosted Work Sans (variable woff2). No third-party CSS. Cookie-free.

   Color usage rule (WCAG 2.2 AA — verified, see MAINTENANCE.md):
     • Orange #CF4520 on cream #F0EFEA = ~4.0:1  -> LARGE text / rules / focus only.
     • Body & small text -> Display Black #3D3935 (~9.6:1) or muted #6B655E (~5.0:1).
     • White on orange (button) = ~4.6:1 -> AA for the bold button label.
   ============================================================================ */

@font-face {
  font-family: "Work Sans";
  src: url("/fonts/WorkSans-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange: #CF4520;   /* International Orange — large/accent ONLY */
  --ink:    #3D3935;   /* Display Black — body + headlines */
  --grey:   #BFB8AF;   /* warm grey — hairlines, duotone secondary */
  --bg:     #F0EFEA;   /* warm light background */
  --muted:  #6B655E;   /* muted text — passes AA on cream (~5:1) */
  --field:  #FFFFFF;   /* input background */
  --field-border: #B4ADA3;
  --maxw:   33rem;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss02" 1;   /* match the banner's shaping (Stylistic Set 2) */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  position: relative;
  overflow: hidden;                  /* clips the decorative stamp into the corner */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem 2rem;
  flex: 1 0 auto;
}

/* Brand link styling (ink text, orange underline) — never browser-blue */
a { color: var(--ink); text-underline-offset: 2px; text-decoration-color: var(--orange); }
a:hover { text-decoration-color: var(--ink); }

/* ---- Brand marks ---------------------------------------------------------- */
.wordmark {
  display: block;
  width: 11.5rem;
  max-width: 64%;
  height: auto;
  margin: 0 0 1.75rem;
}

.stamp {                              /* decorative postmark, cropped top-right like the banner */
  position: absolute;
  top: -2.75rem;
  right: -2.75rem;
  width: clamp(8.5rem, 38vw, 12rem);
  height: auto;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ---- Rules (orange hairlines, mirroring the banner) ----------------------- */
.rule {
  border: 0;
  height: 3px;
  background: var(--orange);
  margin: 1.5rem 0;
}

/* ---- Headline beats ------------------------------------------------------- */
.hero { position: relative; z-index: 1; }   /* keep text above the stamp */

h1 {
  font-size: clamp(2.85rem, 13vw, 4.5rem);
  font-weight: 700;                  /* Bold — the dominant element, per build_banner.py */
  letter-spacing: -0.012em;
  line-height: 0.9;
  margin: 0;
  text-transform: uppercase;
}

.subhead {
  font-size: clamp(0.95rem, 3.4vw, 1.12rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  margin: 0.85rem 0 0;
}

.see {
  font-size: clamp(2rem, 9.4vw, 3rem);
  font-weight: 600;                  /* SemiBold orange, per build_banner.py */
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.96;
  margin: 0;
}

.see-tag {
  display: block;
  font-size: clamp(1.55rem, 5.2vw, 1.85rem);  /* >=24px so orange qualifies as LARGE text (AA 3:1) */
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-top: 0.35rem;
}

/* ---- Signup --------------------------------------------------------------- */
.signup { position: relative; z-index: 1; margin-top: 2.1rem; }

.stay {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.86rem;
  margin: 0 0 0.4rem;
}

.benefit {
  font-size: clamp(1.05rem, 3.6vw, 1.2rem);
  font-weight: 500;
  margin: 0 0 1.4rem;
  max-width: 30rem;
}

form { display: grid; gap: 0.9rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }

.field { display: grid; gap: 0.3rem; }

label {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.72rem 0.8rem;
  font: inherit;
  font-size: 1rem;                   /* >=16px: prevents iOS zoom-on-focus */
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: 2px;
  min-height: 44px;                  /* comfortable touch target */
}

textarea { min-height: 5.5rem; resize: vertical; line-height: 1.5; }

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--orange);  /* orange ring passes non-text contrast on cream + white */
  outline-offset: 2px;
}

/* Inline validation errors */
input[aria-invalid="true"],
textarea[aria-invalid="true"] { border-color: var(--orange); border-width: 2px; }

.error-msg {
  font-size: 0.8rem;
  color: var(--ink);
  font-weight: 600;
  min-height: 0;
}
.error-msg::before { content: ""; }
.error-msg:not(:empty) { margin-top: 0.05rem; }
.error-msg:not(:empty)::before { content: "▲ "; color: var(--orange); }

/* Consent */
.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  font-size: 0.9rem;
  font-weight: 400;              /* override the uppercase label defaults — this is readable body copy */
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.45;
  cursor: pointer;
}
.consent input[type="checkbox"] {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0.1rem 0 0;
  accent-color: var(--orange);
  flex: 0 0 auto;
}

.purpose {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.1rem 0 0;
}

/* Honeypot — visually + programmatically hidden, still submittable by bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

button[type="submit"] {
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--orange);
  border: 0;
  border-radius: 2px;
  padding: 0.95rem 1rem;
  min-height: 48px;
  cursor: pointer;
  transition: filter 0.15s ease;
}
button[type="submit"]:hover { filter: brightness(0.94); }
button[type="submit"]:disabled { opacity: 0.6; cursor: progress; }

/* Form-level alert (API/server error) */
.form-error {
  margin: 0 0 0.25rem;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid var(--orange);
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}
.form-error[hidden] { display: none; }

/* Confirmation state (JS swaps this in; confirm.html mirrors it for no-JS) */
.confirm { position: relative; z-index: 1; }
.confirm[hidden] { display: none; }
.confirm h2 {
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  line-height: 1.0;
}
.confirm .lead { font-size: 1.05rem; font-weight: 500; margin: 0 0 0.75rem; max-width: 28rem; }
.confirm .muted { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ---- Footer --------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  text-align: center;
  padding: 1.25rem 1.5rem 2rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer .brandline { color: var(--ink); }
.site-footer .intl { color: var(--ink); font-weight: 600; }  /* emphasis via weight (orange small text would fail AA) */
.site-footer a { color: var(--ink); }
.site-footer .priv { margin-top: 0.6rem; }
.site-footer .sep { color: var(--grey); }

/* ---- Privacy / simple text pages ----------------------------------------- */
.doc {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  line-height: 1.6;
}
.doc h1 { font-size: 1.9rem; font-weight: 700; text-transform: none; letter-spacing: 0; line-height: 1.1; margin: 0 0 1rem; }
.doc h2 { font-size: 1.1rem; font-weight: 700; margin: 1.6rem 0 0.4rem; }
.doc a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 2px; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 0.35rem 0; }
.doc .muted { color: var(--muted); font-size: 0.85rem; }

/* ---- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---- Larger screens ------------------------------------------------------- */
@media (min-width: 40rem) {
  .wrap { padding-top: 3rem; padding-bottom: 2.5rem; }
  .stamp { top: -2.5rem; right: -2rem; }
}
