/* Spartabots 2026-2027 site styles — dark and light themes */

/* Variables */
:root {
  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 32px;
  --s-6: 48px;
  --s-7: 64px;
  --s-8: 96px;
  --s-9: 128px;

  /* Palette: #1A453B, #48622D, #E8D7B3, #D65327, plus black and white. Colour tokens are in the dark block below. */
  color-scheme: dark;
  --gradient: linear-gradient(90deg, #1a453b 0%, #48622d 30%, #e8d7b3 70%, #d65327 100%);

  --radius: 2px;
  --container: 1152px;
  --measure: 64ch;
  --header-h: 72px;
  --ease: 150ms ease-out;

  --font-head: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-ui: "Montserrat", Arial, sans-serif;
}

/* Dark palette. Used by the page in dark mode, and always by the hero, green bands and footer,
   so their text and accents stay dark-theme colours even when the page is light. */
:root, .band, .site-footer, .hero {
  --bg: #070908;          /* board black */
  --strong: #ffffff;      /* headings, hero text */
  --text: #e8d7b3;        /* cream body text */
  --muted: rgba(232, 215, 179, 0.72);
  --line: #1a453b;        /* forest: rules and borders */
  --link: #e8d7b3;        /* links, secondary buttons, nav */
  --numeral: #e8d7b3;     /* season years */
  --accent: #d65327;      /* primary accent: buttons, active states */
  --on-accent: #070908;   /* text on accent */
  --accent-alt: #e8d7b3;  /* button hover fill */
  --ink: #1a453b;         /* green bands and footer */
  --on-ink: #e8d7b3;
  --on-ink-muted: rgba(232, 215, 179, 0.72);
  --logo-filter: brightness(0) invert(1);
}

/* Light theme. Chosen by the head script from the system setting or the visitor's toggle. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f2ec;
  --strong: #121511;
  --text: #121511;
  --muted: #4d554f;
  --line: #d3d0c4;
  --link: #1a453b;
  --numeral: #1a453b;
  --accent: #d65327;
  --on-accent: #070908;
  --accent-alt: #1a453b;
  --ink: #1a453b;
  --on-ink: #e8d7b3;
  --on-ink-muted: rgba(232, 215, 179, 0.72);
  --logo-filter: none;
}

/* Fonts — self-hosted lookalikes for Scout Condensed, Product Sans and Proxima Nova */
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 800; font-display: swap; src: url("../fonts/barlow-condensed-800-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 900; font-display: swap; src: url("../fonts/barlow-condensed-900-italic.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("../fonts/figtree-400.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("../fonts/figtree-700.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-700.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-display: swap; src: url("../fonts/montserrat-800.woff2") format("woff2"); }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--s-3)); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/28px var(--font-body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color var(--ease); }
a:hover { color: var(--strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p { margin: 0 0 var(--s-3); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

h1, h2, h3 { margin: 0 0 var(--s-3); font-family: var(--font-head); font-style: italic; font-weight: 900; color: var(--strong); text-transform: uppercase; letter-spacing: 0.005em; }
h1 { font-size: clamp(56px, 9vw, 104px); line-height: 0.92; }
h2 { font-size: clamp(36px, 5vw, 48px); line-height: 1; }
h3 { font-size: 28px; line-height: 32px; font-weight: 800; }
.lead { font-size: 22px; line-height: 32px; color: var(--muted); max-width: 52ch; }
.small { font-size: 14px; line-height: 24px; color: var(--muted); }

.skip-link { position: absolute; left: var(--s-3); top: -100px; z-index: 100; padding: var(--s-2) var(--s-3); background: var(--accent); color: var(--on-accent); border-radius: var(--radius); font-family: var(--font-ui); font-weight: 700; }
.skip-link:focus { top: var(--s-2); color: var(--on-accent); }

/* Layout */
.container { width: 100%; max-width: calc(var(--container) + var(--s-5) * 2); margin: 0 auto; padding: 0 var(--s-3); }
@media (min-width: 720px) { .container { padding: 0 var(--s-5); } }
.section { padding: var(--s-7) 0; }
@media (min-width: 840px) { .section { padding: var(--s-8) 0; } }
.section--ruled { border-top: 1px solid var(--line); }
.band { background: var(--ink); color: var(--on-ink); }
.band p { color: var(--on-ink-muted); }
.band a { color: var(--on-ink); }
.section-head { margin-bottom: var(--s-6); }
.split { display: grid; gap: var(--s-4); }
@media (min-width: 840px) { .split { grid-template-columns: 4fr 8fr; gap: var(--s-6); } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--gradient); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: var(--s-2); color: var(--strong); text-decoration: none; font: 900 26px/1 var(--font-head); font-style: italic; text-transform: uppercase; letter-spacing: 0.02em; }
.brand:hover { color: var(--strong); }
.brand__logo { display: block; width: auto; height: 40px; filter: var(--logo-filter); }

.nav-toggle, .theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: none; border: 0; border-radius: var(--radius); color: var(--strong); cursor: pointer; }
.nav-toggle { margin-left: auto; margin-right: calc(var(--s-2) * -1); }
.nav-toggle:hover, .theme-toggle:hover { opacity: 0.7; }
.nav-toggle svg, .theme-toggle svg { width: 24px; height: 24px; }
.theme-toggle[hidden] { display: none; }
.theme-toggle { margin-right: calc(var(--s-2) * -1); }
[data-theme="dark"] .theme-toggle .icon-moon, [data-theme="light"] .theme-toggle .icon-sun { display: none; }

.nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; padding: var(--s-2) var(--s-3) var(--s-4); background: var(--bg); border-bottom: 4px solid transparent; }
.nav.is-open { display: block; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li + li { border-top: 1px solid var(--line); }
.nav a { display: block; padding: var(--s-3) 0; color: var(--strong); text-decoration: none; font: 700 20px/24px var(--font-ui); }
.nav a[aria-current="page"] { color: var(--numeral); }

@media (min-width: 840px) {
  .nav-toggle { display: none; }
  .nav { display: block; position: static; margin-left: auto; margin-right: var(--s-5); padding: 0; background: none; border: 0; }
  .nav ul { display: flex; gap: var(--s-5); }
  .nav li + li { border: 0; }
  .nav a { padding: var(--s-2) 0; font-size: 14px; line-height: 24px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--link); border-bottom: 2px solid transparent; transition: color var(--ease), border-color var(--ease); }
  .nav a:hover { color: var(--strong); border-bottom-color: var(--link); }
  .nav a[aria-current="page"] { color: var(--strong); border-bottom-color: var(--accent); }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: var(--s-2) var(--s-4); border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font: 700 15px/24px var(--font-ui); letter-spacing: 0.02em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color var(--ease), color var(--ease), border-color var(--ease); }
.btn:hover { background: var(--accent-alt); border-color: var(--accent-alt); color: var(--on-accent); }
.btn--secondary { background: transparent; color: var(--link); border-color: var(--link); }
.btn--secondary:hover { background: var(--link); border-color: var(--link); color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.link { font-family: var(--font-ui); font-weight: 700; }

/* Page head */
.page-head { padding-top: var(--s-7); padding-bottom: var(--s-6); }
@media (min-width: 840px) { .page-head { padding-top: var(--s-8); padding-bottom: var(--s-7); } }
.page-head h1 { margin-bottom: var(--s-4); }
.page-image { display: block; width: 100%; max-width: 900px; margin-inline: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--ink); }

/* Home hero */
.hero { position: relative; background: var(--bg); color: var(--strong); }
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--gradient); z-index: 1; }
.hero__img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 60%; }
.hero__content { padding-top: var(--s-6); padding-bottom: var(--s-7); }
.hero h1 { margin-bottom: var(--s-3); font-size: clamp(64px, 12vw, 120px); line-height: 0.9; }
.hero .lead { color: var(--text); max-width: 44ch; }
.btn--light { background: transparent; border-color: var(--strong); color: var(--strong); }
.btn--light:hover { background: var(--strong); border-color: var(--strong); color: var(--bg); }
.hero .btn:not(.btn--light) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hero .btn:not(.btn--light):hover { background: var(--accent-alt); border-color: var(--accent-alt); }
@media (min-width: 840px) {
  .hero { display: flex; align-items: center; min-height: 720px; overflow: hidden; }
  .hero__img { position: absolute; top: 0; right: 0; width: 64%; height: 100%; aspect-ratio: auto; object-position: 50% 60%;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 30%); mask-image: linear-gradient(to right, transparent, #000 30%); }
  .hero__content { position: relative; padding-top: var(--s-8); padding-bottom: var(--s-8); }
  .hero__content > * { max-width: 520px; }
}

/* Rows */
.rows { margin: 0; padding: 0; list-style: none; }
.row { display: grid; gap: var(--s-4); padding: var(--s-6) 0; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row h2, .row h3 { margin-bottom: var(--s-3); }
.row img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--ink); }
@media (min-width: 840px) { .row { grid-template-columns: 6fr 5fr; gap: var(--s-7); align-items: start; } }

/* About */
.feature { display: grid; gap: var(--s-4); padding: var(--s-6) 0; border-top: 1px solid var(--line); scroll-margin-top: var(--header-h); }
.feature img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--ink); }
@media (min-width: 840px) {
  .feature { grid-template-columns: 4fr 7fr; gap: var(--s-7); }
  .feature h2 { position: sticky; top: calc(var(--header-h) + var(--s-4)); }
}
.feature__media { display: grid; gap: var(--s-4); }

/* Panels */
.panels { display: grid; gap: var(--s-5); }
@media (min-width: 720px) { .panels--2 { grid-template-columns: repeat(2, 1fr); } .panels--3 { grid-template-columns: repeat(3, 1fr); } }
.panels--1 { max-width: 36rem; margin-inline: auto; }
.panel { display: flex; flex-direction: column; padding-top: var(--s-3); border-top: 3px solid var(--accent); }
.panel img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--s-3); background: var(--ink); }
.photo-ph { display: block; width: 100%; border-radius: var(--radius); background: var(--line); }
.panel .photo-ph { aspect-ratio: 4 / 3; margin-bottom: var(--s-3); }
.panel h3 { margin-bottom: var(--s-2); }
.panel p { color: var(--muted); }
.panel .link { margin-top: auto; padding-top: var(--s-3); }
.panel p + .link { margin-top: var(--s-3); padding-top: 0; }
.callout { display: grid; gap: var(--s-3); justify-items: start; padding: var(--s-6) 0; border-top: 3px solid var(--accent); }
.callout h2 { margin-bottom: 0; }

/* Video */
.video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border-radius: var(--radius); overflow: hidden; }
.video__poster, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__poster { display: block; padding: 0; background: var(--ink); cursor: pointer; }
.video__poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; transition: opacity var(--ease); }
.video__poster:hover img { opacity: 0.8; }
.video__play { position: absolute; left: var(--s-4); bottom: var(--s-4); display: flex; align-items: center; gap: var(--s-2); min-height: 48px; padding: 0 var(--s-4) 0 var(--s-3); background: var(--accent); color: var(--on-accent); border-radius: var(--radius); font: 700 15px/24px var(--font-ui); text-transform: uppercase; }
.video__play svg { width: 20px; height: 20px; }
.video.is-loading .video__play span::after { content: "…"; }
.video.is-loading::after { content: ""; position: absolute; right: var(--s-3); bottom: var(--s-3); width: 24px; height: 24px; border: 3px solid rgba(232, 215, 179, 0.3); border-top-color: var(--on-ink); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.video-caption { margin-top: var(--s-3); max-width: none; }

/* History */
.season { display: grid; gap: var(--s-3); padding: var(--s-5) 0; border-top: 1px solid var(--line); }
.season:last-child { border-bottom: 1px solid var(--line); }
.season__year { font: 900 56px/1 var(--font-head); font-style: italic; color: var(--numeral); }
.season h3 { margin-bottom: var(--s-1); }
.season p { color: var(--muted); }
.season img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--ink); }
@media (min-width: 840px) {
  .season { grid-template-columns: 160px 1fr 240px; gap: var(--s-5); align-items: start; }
  .season__year { font-size: 72px; }
}
.back { display: inline-block; margin-bottom: var(--s-5); font-family: var(--font-ui); font-weight: 700; }

/* Footer (always dark forest in both themes) */
.site-footer { position: relative; background: var(--ink); color: var(--on-ink-muted); font-size: 16px; line-height: 24px; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--gradient); }
.site-footer .container { padding-top: var(--s-7); padding-bottom: var(--s-5); }
.footer-grid { display: grid; gap: var(--s-6); }
@media (min-width: 840px) { .footer-grid { grid-template-columns: 5fr 3fr 4fr; gap: var(--s-7); } }
.site-footer h2 { margin-bottom: var(--s-3); font: 700 15px/24px var(--font-ui); font-style: normal; text-transform: uppercase; letter-spacing: 0.04em; color: var(--on-ink); }
.site-footer a { color: var(--on-ink-muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: var(--s-2); }
.footer-name { font: 900 40px/40px var(--font-head); font-style: italic; text-transform: uppercase; color: var(--on-ink); margin-bottom: var(--s-3); }
.social { display: flex; gap: var(--s-2); margin-top: var(--s-4); }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--on-ink); border-radius: var(--radius); transition: border-color var(--ease), color var(--ease); }
.social a:hover { border-color: var(--accent); }
.social svg { width: 20px; height: 20px; }
.footer-legal { margin-top: var(--s-7); padding-top: var(--s-3); border-top: 1px solid var(--on-ink-muted); font-size: 14px; max-width: none; }
.footer-credit { font-size: 11px; opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
