/*
 * Winter Warriors XC brand theme.
 * Winter-night navy header, hero and footer; viking red as the action colour; ice blue as the accent;
 * frost-white content surfaces. Display face Teko, body face Rubik (loaded by <link> in each page head).
 */
:root {
  --background: #f5f9fc;
  --foreground: #0b2239;
  --card: #ffffff;
  --card-foreground: #0b2239;
  --popover: #ffffff;
  --popover-foreground: #0b2239;
  --primary: #c8102e;
  --primary-foreground: #ffffff;
  --secondary: #0d2a4a;
  --secondary-foreground: #ffffff;
  --muted: #e3edf5;
  --muted-foreground: #475a6e;
  --accent: #d3eaf8;
  --accent-foreground: #0d2a4a;
  --destructive: #b42318;
  --destructive-foreground: #ffffff;
  --border: #c3d3e0;
  --input: #6d89a3;
  --ring: #0b6fb8;
  --chart-1: #0b6fb8;
  --chart-2: #c8102e;
  --chart-3: #3aa6d8;
  --chart-4: #0d2a4a;
  --chart-5: #8a97a6;
  --sidebar: #ffffff;
  --sidebar-foreground: #0b2239;
  --sidebar-primary: #c8102e;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #d3eaf8;
  --sidebar-accent-foreground: #0d2a4a;
  --sidebar-border: #c3d3e0;
  --sidebar-ring: #0b6fb8;
  --font-sans: 'Rubik', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Teko', 'Arial Narrow', Impact, sans-serif;
  --tracking-normal: 0em;
  --radius: 0.375rem;
  --spacing: 0.25rem;
  --shadow-2xs: 0 0 0 0 rgb(0 0 0 / 0);
  --shadow-xs: 0 0 0 0 rgb(0 0 0 / 0);
  --shadow-sm: 0 1px 2px 0 rgb(13 42 74 / 0.08);
  --shadow: 0 1px 3px 0 rgb(13 42 74 / 0.1);
  --shadow-md: 0 2px 6px -1px rgb(13 42 74 / 0.12);
  --shadow-lg: 0 6px 12px -2px rgb(13 42 74 / 0.14);
  --shadow-xl: 0 10px 20px -4px rgb(13 42 74 / 0.16);
  --shadow-2xl: 0 16px 32px -6px rgb(13 42 74 / 0.2);
}

.dark {
  --background: #081c33;
  --foreground: #e8f1f8;
  --card: #0e2a47;
  --card-foreground: #e8f1f8;
  --popover: #0e2a47;
  --popover-foreground: #e8f1f8;
  --primary: #ff6b7d;
  --primary-foreground: #07182c;
  --secondary: #1d4b78;
  --secondary-foreground: #ffffff;
  --muted: #123556;
  --muted-foreground: #a9bdcf;
  --accent: #14406b;
  --accent-foreground: #bfe6fa;
  --destructive: #ff8a80;
  --destructive-foreground: #07182c;
  --border: #2a4d71;
  --input: #5f84a8;
  --ring: #8fd6f7;
  --chart-1: #8fd6f7;
  --chart-2: #ff6b7d;
  --chart-3: #3aa6d8;
  --chart-4: #c3d3e0;
  --chart-5: #8a97a6;
  --sidebar: #0e2a47;
  --sidebar-foreground: #e8f1f8;
  --sidebar-primary: #ff6b7d;
  --sidebar-primary-foreground: #07182c;
  --sidebar-accent: #14406b;
  --sidebar-accent-foreground: #bfe6fa;
  --sidebar-border: #2a4d71;
  --sidebar-ring: #8fd6f7;
}

/* Base */
html,
body {
  font-family: var(--font-sans);
}
:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}
main h1,
main h2,
main h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
main h1 { font-size: clamp(2.75rem, 7vw, 4.25rem); font-weight: 700; }
main h2 { font-size: clamp(2rem, 4.5vw, 2.75rem); }
main h3 { font-size: clamp(1.5rem, 3vw, 1.875rem); }
main .cms-rich-content {
  max-width: 70ch;
}
main .cms-rich-content :is(h1, h2, h3) {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
}

/*
 * Header, hero and footer share one navy surface. Tokens are redefined inside the region so every
 * utility class (bg-background, text-foreground, hover:bg-muted ...) follows, in light and dark mode.
 */
[data-theme-region="header"],
[data-theme-region="footer"],
.wwxc-hero {
  --background: #0d2a4a;
  --foreground: #f2f7fb;
  --card: #123a63;
  --card-foreground: #f2f7fb;
  --muted: #17406b;
  --muted-foreground: #bcd0e2;
  --accent: #17406b;
  --accent-foreground: #ffffff;
  --border: #2b5584;
  --input: #5f86ad;
  --ring: #8fd6f7;
  --primary: #c8102e;
  --primary-foreground: #ffffff;
  color: var(--foreground);
}
[data-theme-region="header"] {
  background: #0d2a4a;
  border-bottom: 3px solid #8fd6f7;
}
[data-theme-region="footer"] {
  --background: #081c33;
  --card: #0e2a47;
  --muted: #123556;
  --border: #24476b;
  background: #081c33;
  border-top: 3px solid #8fd6f7;
}
[data-theme-region="header"] [data-slot="navigation-menu-link"],
[data-theme-region="header"] [data-slot="navigation-menu-trigger"] {
  font-weight: 500;
}

/* Footer */
.wwxc-foot {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 62rem) {
  .wwxc-foot { grid-template-columns: 1.2fr 1fr 1fr 1fr; }
}
.wwxc-foot h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5rem;
  color: #8fd6f7;
}
.wwxc-foot address,
.wwxc-foot ul {
  font-style: normal;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.375rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.wwxc-foot a {
  color: #bfe6fa;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wwxc-foot a:hover { color: #ffffff; }

/* Home hero: the one bold element */
.wwxc-hero {
  background: #0d2a4a
    repeating-linear-gradient(115deg, rgb(143 214 247 / 0.05) 0 2px, transparent 2px 22px);
  border-bottom: 6px solid #8fd6f7;
}
.wwxc-hero__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
  display: grid;
  gap: 1.75rem;
  align-items: center;
  justify-items: start;
}
@media (min-width: 48rem) {
  .wwxc-hero__inner {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    gap: 3.5rem;
    padding: 3.5rem 2rem 4rem;
  }
}
.wwxc-hero__logo {
  width: clamp(9rem, 38vw, 17rem);
  height: auto;
  display: block;
}
.wwxc-hero .cms-rich-content {
  max-width: none;
  color: var(--foreground);
}
.wwxc-hero .cms-rich-content h1 {
  color: #ffffff;
  font-size: clamp(3.5rem, 11vw, 7.5rem);
  font-weight: 700;
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  margin: 0 0 1rem;
}
.wwxc-hero .cms-rich-content p {
  color: #dbe9f4;
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  line-height: 1.5;
  max-width: 38rem;
  margin: 0;
}
.wwxc-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.wwxc-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.wwxc-btn--primary {
  background: #c8102e;
  color: #ffffff;
  border-color: #c8102e;
}
.wwxc-btn--primary:hover { background: #a60d26; border-color: #a60d26; }
.wwxc-btn--ghost {
  background: transparent;
  color: #ffffff;
  border-color: #8fd6f7;
}
.wwxc-btn--ghost:hover { background: #17406b; }

/* Weekends and flyer */
.wwxc-weekends {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 48rem) {
  .wwxc-weekends {
    grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
    padding: 4rem 2rem 5rem;
    gap: 4rem;
  }
}
.wwxc-weekends .cms-rich-content ul,
.wwxc-schedule .cms-rich-content ul {
  list-style: none;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  border-top: 2px solid var(--border);
}
.wwxc-weekends .cms-rich-content li,
.wwxc-schedule .cms-rich-content li {
  margin: 0;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.125rem;
  font-weight: 500;
}
.wwxc-flyer img,
.wwxc-schedule figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Schedule page */
.wwxc-schedule {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
}
@media (min-width: 48rem) {
  .wwxc-schedule { padding: 4rem 2rem 5rem; }
}
.wwxc-schedule figure { margin: 2.5rem 0 0; max-width: 28rem; }

@media (prefers-reduced-motion: reduce) {
  .wwxc-btn { transition: none; }
}

/* Links in editable content read as links without relying on colour alone */
main .cms-rich-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wwxc-hero .cms-rich-content a { color: #bfe6fa; }

/* Focus ring: beats the template's ring/50 utilities */
main :is(a, button, [role="button"], input, select, textarea, summary, [tabindex]):focus-visible,
[data-theme-region] :is(a, button, [role="button"]):focus-visible {
  outline: 3px solid var(--ring);
  outline-color: var(--ring) !important; /* template utilities set a 50% ring colour */
  outline-offset: 2px;
  box-shadow: none;
}

/* Rules accordion titles stay compact */
[data-slot="collapsible-trigger"] :is(h2, h3) {
  font-size: 1.75rem;
}

/* Menus opened from the header: body-level dropdowns/mobile sheet and the in-header theme menu. */
:is(.imported-menu-popup, .imported-sheet-panel, [data-slot="navigation-menu-content"], [data-slot="sheet-content"]) :is(a, button, summary, [role="button"]):focus-visible,
[role="menu"] [role^="menuitem"]:focus-visible { outline: 3px solid currentColor; outline-offset: -3px; box-shadow: none; }

/* The header is dark in both modes: its menus (theme switcher) need dark popover tokens too. */
[data-theme-region="header"] {
  --popover: #0e2a47;
  --popover-foreground: #f2f7fb;
}
