/* ─────────────────────────────────────────────
   Five Borders – shared styles: colours, fonts, buttons, forms, simple pages.
   Section styles live with each component in src/components/.
   This file is also used by /admin and the unsubscribe page.
   Fonts: Anybody (logo), Bricolage Grotesque (headings), Onest (body)
   ───────────────────────────────────────────── */
:root {
  --teal: #034A54;
  --teal-deep: #02363d;
  --cream: #F7F1E4;
  --red: #C0392B;
  --red-deep: #a12f23;
  --gold: #C5A75B;
  --ink: #2B2B2B;
  --paper: #fffaf0;
  --line: #e2d8c3;
  --muted: #5d5a52;

  /* aliases used by admin.css */
  --green: var(--teal);
  --green-2: #0b6470;
  --amber: var(--gold);
  --amber-ink: #7a5d17;
  --danger: var(--red);
  --serif: var(--head);

  --logo: "Anybody Variable", "Arial Black", sans-serif;
  --head: "Bricolage Grotesque Variable", "Arial Narrow", system-ui, sans-serif;
  --sans: "Onest Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 18px;
  --shadow-hard: 6px 6px 0 var(--ink);
  --burst: polygon(50.0% 0.0%, 56.4% 9.5%, 65.5% 2.4%, 68.6% 13.5%, 79.4% 9.5%, 79.0% 21.0%, 90.5% 20.6%, 86.5% 31.4%, 97.6% 34.5%, 90.5% 43.6%, 100.0% 50.0%, 90.5% 56.4%, 97.6% 65.5%, 86.5% 68.6%, 90.5% 79.4%, 79.0% 79.0%, 79.4% 90.5%, 68.6% 86.5%, 65.5% 97.6%, 56.4% 90.5%, 50.0% 100.0%, 43.6% 90.5%, 34.5% 97.6%, 31.4% 86.5%, 20.6% 90.5%, 21.0% 79.0%, 9.5% 79.4%, 13.5% 68.6%, 2.4% 65.5%, 9.5% 56.4%, 0.0% 50.0%, 9.5% 43.6%, 2.4% 34.5%, 13.5% 31.4%, 9.5% 20.6%, 21.0% 21.0%, 20.6% 9.5%, 31.4% 13.5%, 34.5% 2.4%, 43.6% 9.5%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.6 var(--sans); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; line-height: 1.02; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 7vw, 5.4rem); }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
h3 { font-size: 1.4rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
b, strong { font-weight: 700; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 clamp(20px, 3vw, 40px); }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.small { font-size: .88rem; opacity: .85; }
.hidden { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.kicker, .eyebrow { font: 700 .8rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 1.1rem; }
.eyebrow a { text-decoration: none; }
.kicker--red { color: var(--red); }
.kicker--gold { color: var(--gold); }

/* Wordmark */
.wordmark { font-family: var(--logo); font-weight: 900; font-stretch: 140%; text-transform: uppercase; letter-spacing: -.01em;
  line-height: .9; text-decoration: none; font-size: 1.35rem; color: var(--cream); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .75em 1.5em;
  border: 2.5px solid var(--ink); border-radius: 999px; font: 700 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  background: var(--teal); color: var(--cream); box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn--red { background: var(--red); color: #fff; }
.btn--gold, .btn.amber { background: var(--gold); color: var(--ink); }
.btn--teal { background: var(--teal); color: var(--cream); }
.btn--outline, .btn.ghost { background: transparent; color: var(--ink); }
.btn--outline-light { background: transparent; color: var(--cream); border-color: var(--cream); box-shadow: none; }
.btn--sm { min-height: 40px; padding: .55em 1.1em; font-size: .92rem; }
.btn--lg { min-height: 56px; padding: .9em 1.8em; font-size: 1.08rem; }
.btn--block { width: 100%; }
.link-btn { background: none; border: 0; padding: .5em; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* Starburst badge */
.burst { position: absolute; display: grid; place-items: center; width: 118px; aspect-ratio: 1; clip-path: var(--burst);
  background: var(--cream); color: var(--ink); text-align: center; transform: rotate(-12deg); z-index: 3; }
.burst span { font: 800 .92rem/1.05 var(--head); text-transform: uppercase; letter-spacing: .02em; max-width: 70%; }

/* ── Mountain-ridge top edge ──
   Add class="ridge" to a section. It draws two jagged ridges above the section:
   the front one in --edge (the section's colour), a taller one behind in --edge-back. */
.ridge { position: relative; }
.ridge::before, .ridge::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); pointer-events: none;
  -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x; -webkit-mask-position: 0 100%; mask-position: 0 100%; }
.ridge::before { height: 100px; z-index: 1; background: var(--edge-back, var(--gold));
  -webkit-mask-image: url(/img/edges/ridge-back.svg); mask-image: url(/img/edges/ridge-back.svg);
  -webkit-mask-size: 1440px 100%; mask-size: 1440px 100%; }
.ridge::after { height: 64px; z-index: 2; background: var(--edge, var(--cream));
  -webkit-mask-image: url(/img/edges/ridge-front.svg); mask-image: url(/img/edges/ridge-front.svg);
  -webkit-mask-size: 1440px 100%; mask-size: 1440px 100%; }
@media (max-width: 600px) {
  .ridge::before { height: 64px; -webkit-mask-size: 900px 100%; mask-size: 900px 100%; }
  .ridge::after { height: 42px; -webkit-mask-size: 900px 100%; mask-size: 900px 100%; }
}

/* ── Forms (sign-up, survey, admin) ── */
label { display: block; font-weight: 700; margin-bottom: .4em; }
.field { margin-bottom: 1.1rem; }
.opt { font-weight: 400; opacity: .7; }
input[type="email"], input[type="text"], input[type="password"], input[type="number"], textarea {
  width: 100%; font: inherit; font-size: 16px; padding: .8em 1em; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); }
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus { outline: none; box-shadow: 0 0 0 4px rgba(197,167,91,.55); }
.check { display: flex; gap: .7em; align-items: flex-start; font-weight: 600; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--red); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--red); font-weight: 600; font-size: .92rem; margin: .4em 0 0; }
.form-error { background: #f6d7d2; color: var(--red-deep); border: 2px solid var(--red); border-radius: 10px; padding: .7em 1em; margin-bottom: 1rem; font-weight: 600; }
.under { margin-top: 1rem; }
#turnstile:not(:empty) { margin-bottom: 1rem; }

fieldset { border: 0; padding: 0; margin: 0 0 1.6rem; }
legend { font-weight: 800; margin-bottom: .6em; padding: 0; font-family: var(--head); font-size: 1.08rem; }
legend .opt { font-family: var(--sans); font-size: .85rem; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.options label { margin: 0; font-weight: 600; }
.options input { position: absolute; opacity: 0; pointer-events: none; }
.options span { display: inline-block; padding: .5em 1em; border: 2px solid var(--ink); border-radius: 999px; background: #fff; cursor: pointer; font-size: .93rem; transition: background .12s; }
.options span:hover { background: #f3e9d2; }
.options input:checked + span { background: var(--teal); color: var(--cream); }
.options input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.survey-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.share { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1rem; }

/* ── Simple pages (privacy, terms, unsubscribe) ── */
body.simple { background: var(--cream); }
body.simple main { padding: 48px 20px 80px; }
body.simple .eyebrow { color: var(--red); }
body.simple h1 { color: var(--teal); font-size: clamp(2.2rem, 6vw, 3.4rem); }
body.simple h2 { color: var(--teal); font-size: 1.4rem; margin-top: 1.8em; }
body.simple a { color: var(--teal); }
body.simple .footer a, body.simple .age-gate a { color: inherit; }
table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem; }
th, td { text-align: left; padding: .6em; border-bottom: 2px solid var(--line); vertical-align: top; }
th { font-weight: 700; color: var(--teal); }
.terms li { margin-bottom: .8em; }

/* ── Responsive (shared bits; each component has its own) ── */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wordmark { font-size: 1.05rem; font-stretch: 125%; }
  .burst span { font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .glow__line path { stroke-dashoffset: 0; }
}
[tabindex="-1"]:focus { outline: none; }
