/* =========================================================================
   Old 41 Run — Harvest Field Day
   Brand palette + Bevan / Source Serif 4, self-hosted. Single warm theme
   (a deliberate commitment to the cream/harvest brand world).
   ========================================================================= */

/* ---- Fonts (self-hosted, latin subset) ---- */
@font-face {
  font-family: "Bevan";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/bevan-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700; /* variable */
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212;
}

/* ---- Design tokens ---- */
:root {
  /* Brand palette (from the vector master) */
  --navy: #0F283A;
  --rust: #AB4F1B;
  --corn: #936230;
  --brown: #573D22;
  --cream: #F6EAD9;

  /* Applied roles */
  --bg: var(--cream);
  --bg-card: #FCF5E9;      /* warm off-white, biased toward cream */
  --bg-band: #EFE0C9;      /* slightly deeper cream for alternating bands */
  --ink: var(--navy);
  --ink-soft: #3C4A54;     /* navy-biased slate for secondary text */
  --muted: var(--brown);
  --accent: var(--rust);
  --accent-ink: #8F3F14;   /* darker rust for text-on-cream where needed */
  --line: rgba(15, 40, 58, 0.14);
  --line-strong: rgba(15, 40, 58, 0.28);
  --focus: #1E6FB8;        /* accessible blue focus ring, distinct from brand */
  --shadow-sm: 0 2px 6px -3px rgba(15, 40, 58, 0.35);
  --shadow-md: 0 16px 36px -24px rgba(15, 40, 58, 0.55);

  /* Type */
  --display: "Bevan", "Rockwell", "Roboto Slab", Georgia, serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --container: 1080px;
  --measure: 66ch;
  --radius: 12px;
  --radius-sm: 7px;

  color-scheme: light;
}

/* ---- Reset / base ---- */
*, *::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;
  font-family: var(--body);
  font-size: 1.0625rem;          /* ~17px */
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  /* faint harvest warmth, not a texture */
  background-image:
    radial-gradient(120% 80% at 50% -10%, #FBF1E0 0%, transparent 60%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--rust); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;              /* Bevan is a single heavy weight */
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  text-wrap: balance;
  margin: 0 0 0.5em;
  color: var(--ink);
}
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* ---- Focus + a11y ---- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 0.5rem; top: -3rem; z-index: 100;
  background: var(--navy); color: var(--cream);
  padding: 0.6rem 1rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: var(--cream); }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: clamp(2.75rem, 7vw, 4.75rem); }
.section--band { background: var(--bg-band); }
.section--tight { padding-block: clamp(2rem, 5vw, 3rem); }
.measure { max-width: var(--measure); }
.center { text-align: center; margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }

.eyebrow {
  font-family: var(--display); text-transform: uppercase;
  letter-spacing: 0.18em; font-size: 0.75rem; color: var(--accent-ink);
  margin: 0 0 0.75rem;
}
.section__title { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
.lede { font-size: 1.15rem; color: var(--ink-soft); }

/* ---- Centerline-stripe divider (accent borrowed from the highway system) ---- */
.stripe {
  height: 12px; border: 0; margin: 0;
  background: repeating-linear-gradient(90deg, var(--rust) 0 28px, transparent 28px 56px);
  opacity: 0.9;
}
.rule { width: 54px; height: 3px; background: var(--corn); border: 0; border-radius: 2px; margin: 0 0 1.25rem; }
.center .rule { margin-inline: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 0.95rem; line-height: 1;
  padding: 0.85rem 1.4rem; border-radius: var(--radius-sm);
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--rust); color: var(--cream); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: #97430F; color: var(--cream); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--rust); }
.btn--ghost:hover { background: rgba(171, 79, 27, 0.08); color: var(--navy); }
.btn--on-navy { background: var(--rust); color: var(--cream); }
.btn--on-navy:hover { background: #C15A20; color: var(--cream); }
.btn--lg { font-size: 1.05rem; padding: 1rem 1.7rem; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 234, 217, 0.9);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.nav__brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.nav__brand svg, .nav__brand img { width: 40px; height: auto; }
.nav__brand b {
  font-family: var(--display); text-transform: uppercase; font-size: 1rem; letter-spacing: 0.03em;
  color: var(--navy); font-weight: 400;
}
.nav__right { display: flex; align-items: center; gap: 1.25rem; }
.nav__links { display: flex; align-items: center; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 0.85rem; color: var(--navy); text-decoration: none; padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { border-bottom-color: var(--rust); color: var(--navy); }
.nav__cta { padding: 0.6rem 1.05rem; font-size: 0.85rem; }
.nav__toggle {
  display: none; background: none; border: 2px solid var(--line-strong);
  border-radius: var(--radius-sm); width: 44px; height: 44px; cursor: pointer; color: var(--navy);
}
.nav__toggle svg { width: 22px; height: 22px; margin: auto; }

@media (max-width: 720px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 0.5rem clamp(1rem, 4vw, 2rem) 1rem;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__right { gap: 0.6rem; }
}

/* ---- Hero (Direction B: cream, centered, cornstalk logo) ---- */
.hero { position: relative; text-align: center; padding-block: clamp(2.5rem, 7vw, 4.5rem) 0; overflow: hidden; }
.hero__inner { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.hero__logo { width: clamp(190px, 42vw, 300px); height: auto; filter: drop-shadow(0 10px 22px rgba(15,40,58,0.16)); }
.hero__title { font-size: clamp(2.2rem, 8vw, 4.25rem); line-height: 0.98; margin: 0.2rem 0 0; }
.hero__title .n41 { color: var(--rust); }
.hero__meta {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em;
  font-size: clamp(1rem, 3.4vw, 1.4rem); color: var(--accent-ink); margin: 0;
}
.hero__sub { max-width: 54ch; font-size: 1.15rem; color: var(--ink-soft); margin: 0.25rem auto 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 0.6rem; }
.hero__stripe { margin-top: clamp(2rem, 5vw, 3rem); }

/* ---- Countdown ---- */
.countdown { display: flex; gap: clamp(0.5rem, 2.5vw, 1.25rem); justify-content: center; margin-top: 0.4rem; }
.countdown li { list-style: none; }
.countdown__box {
  min-width: clamp(58px, 16vw, 84px);
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.55rem 0.4rem 0.45rem; box-shadow: var(--shadow-sm);
}
.countdown__num { font-family: var(--display); font-size: clamp(1.6rem, 6vw, 2.4rem); color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown__label { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.62rem; color: var(--muted); margin-top: 0.3rem; }
.countdown--done { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-ink); }

/* ---- Prose ---- */
.prose { max-width: var(--measure); }
.prose p, .prose li { color: var(--ink); }
.prose h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); margin-top: 1.6em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }

/* ---- Logistics grid ---- */
.grid { display: grid; gap: 1.1rem; }
.grid--logistics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.3rem; box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.card .card__k { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.68rem; color: var(--accent-ink); display: block; margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---- Course map ---- */
.map-figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-md); background: var(--navy); }
.map-figure img { width: 100%; }
.map-figure figcaption { font-size: 0.85rem; color: var(--muted); padding: 0.7rem 1rem; background: var(--bg-card); }
.map-embed { border: 0; width: 100%; height: 360px; display: block; border-radius: var(--radius); }

/* ---- FAQ ---- */
.faq { display: grid; gap: 0.75rem; max-width: 780px; }
.faq details {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 1.1rem; box-shadow: var(--shadow-sm);
}
.faq summary {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.02em; font-size: 0.98rem;
  color: var(--navy); cursor: pointer; padding: 1rem 2rem 1rem 0; position: relative; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--rust); line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .faq__a { padding: 0.9rem 0 1.1rem; color: var(--ink-soft); }

/* ---- Sponsors (ALL EQUAL WEIGHT — no tiers, no ordering by rank) ---- */
.sponsor-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  align-items: stretch;
}
.sponsor {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 128px; padding: 1.25rem;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
}
.sponsor img { max-height: 72px; width: auto; }
.sponsor__placeholder {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); font-size: 0.95rem; line-height: 1.25;
}
.sponsor__placeholder small { display: block; font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 0.72rem; color: var(--accent-ink); margin-top: 0.4rem; }

/* ---- Callouts / notes ---- */
.callout {
  display: flex; gap: 0.9rem; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--line); border-left: 4px solid var(--rust);
  border-radius: var(--radius-sm); padding: 1rem 1.2rem;
}
.callout svg { flex: none; width: 22px; height: 22px; color: var(--rust); margin-top: 2px; }
.callout p { font-size: 0.95rem; color: var(--ink-soft); }
.callout strong { color: var(--ink); }

/* ---- PENDING placeholder marker (obviously not final) ---- */
.pending {
  font-style: normal;
  background: repeating-linear-gradient(45deg, rgba(171,79,27,0.10) 0 8px, rgba(171,79,27,0.02) 8px 16px);
  border: 1px dashed var(--rust); border-radius: 4px;
  padding: 0 0.35em; color: var(--accent-ink); white-space: nowrap;
}
.pending::before { content: "TBD "; font-family: var(--display); font-size: 0.68em; letter-spacing: 0.05em; vertical-align: 0.08em; opacity: 0.85; }
.pending--block { display: block; white-space: normal; padding: 0.5rem 0.7rem; margin: 0.5rem 0; }

/* ---- Register page ---- */
.reg-layout { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); align-items: start; }
@media (min-width: 900px) { .reg-layout { grid-template-columns: 1fr 1.15fr; } }
.reg-context .card + .card { margin-top: 1rem; }
.detail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.detail-list > li { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: baseline; }
.detail-list dt, .detail-list .k {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem;
  color: var(--accent-ink); white-space: nowrap;
}
.detail-list .v { color: var(--ink); }
.detail-list .v strong { font-family: var(--display); font-weight: 400; font-size: 1.05rem; }

/* Ticket breakdown (Register page) — its own block, not the key/value grid */
.ticket-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.ticket-list li { display: flex; flex-direction: column; gap: 0.15rem; padding-left: 0.85rem; border-left: 3px solid var(--rust); }
.ticket-list li strong { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; color: var(--navy); font-size: 1rem; }
.ticket-list li span { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }

/* Zeffy embed shell — brand frame around the bare form */
.embed-shell {
  position: sticky; top: 84px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden;
}
@media (max-width: 899px) { .embed-shell { position: static; } }
.embed-shell__head { background: var(--navy); color: var(--cream); padding: 1rem 1.25rem; }
.embed-shell__head h2 { color: var(--cream); font-size: 1.15rem; margin: 0; }
.embed-shell__head p { color: #D8C8AD; font-size: 0.85rem; margin: 0.35rem 0 0; }
.embed-shell__body { padding: 0.75rem; }
.embed-fallback-note { font-size: 0.8rem; color: var(--muted); padding: 0.5rem 0.75rem 0.25rem; text-align: center; }

/* ---- Footer ---- */
.site-footer { background: var(--navy); color: #E8D9BF; margin-top: 0; }
.site-footer .stripe { opacity: 1; }
.site-footer__inner { display: grid; gap: 2rem; padding-block: clamp(2.25rem, 5vw, 3.25rem); }
@media (min-width: 720px) { .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer a { color: #F1E4CC; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: var(--cream); font-size: 0.85rem; letter-spacing: 0.12em; margin-bottom: 0.9rem; }
.footer-brand { display: flex; gap: 0.75rem; align-items: flex-start; }
.footer-brand svg, .footer-brand img { width: 52px; height: auto; }
.footer-brand p { color: #C9B896; font-size: 0.9rem; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-nav a { text-decoration: none; font-size: 0.95rem; }
.footer-legal { border-top: 1px solid rgba(246,234,217,0.15); padding-block: 1.1rem 1.4rem; font-size: 0.8rem; color: #A9986F; }
.footer-legal .container { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; justify-content: space-between; }

/* ---- Thanks page hero ---- */
.thanks-hero { text-align: center; padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.thanks-hero .check { width: 76px; height: 76px; margin: 0 auto 1rem; color: var(--rust); }

/* ---- Hero facts line ---- */
.hero__facts {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em;
  font-size: clamp(0.82rem, 2.6vw, 1rem); color: var(--navy); margin: 0.1rem 0 0;
}
.hero__facts span { color: var(--accent-ink); }

/* ---- Schedule timeline ---- */
.schedule {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: grid; gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
}
.schedule li {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  border-top: 4px solid var(--rust); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 0.25rem;
}
.schedule .t { font-family: var(--display); font-size: 1.35rem; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.schedule .l { font-size: 0.9rem; color: var(--ink-soft); }

/* ---- Festivities ---- */
.fest-card .card__k { color: var(--corn); }
.fest-card h3 { display: flex; align-items: center; gap: 0.5rem; }
.fest-card svg { width: 22px; height: 22px; color: var(--rust); flex: none; }

/* ---- Awards ---- */
.awards { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; max-width: var(--measure); }
.awards li { display: flex; gap: 0.6rem; align-items: baseline; color: var(--ink); }
.awards li::before { content: "\2605"; color: var(--rust); font-size: 0.9rem; line-height: 1.4; }

/* ---- Course download button ---- */
.course-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin-top: 1.25rem; }
.course-note { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.78rem; color: var(--accent-ink); }

/* ---- Sponsor logos (real files, equal weight) ---- */
.sponsor img { max-height: 84px; max-width: 82%; width: auto; object-fit: contain; }
.sponsor--tall img { max-height: 96px; }

/* ---- Utilities ---- */
.mt-0 { margin-top: 0; }
.text-navy { color: var(--navy); }
