/* =========================================================
   Champions Rise FA — "Club Crest" theme
   Palette: deep pitch green + academy gold + cream
   Type: Fraunces (serif, headings) + Inter (sans, body)
   ========================================================= */

:root {
  --green: #12503B;
  --green-dark: #0B3A2A;
  --green-tint: #E8F0EC;
  --gold: #F0B429;
  --gold-dark: #C6890F;
  --cream: #FAF7F0;
  --ink: #1A1A18;
  --ink-soft: #4A4A46;
  --white: #FFFFFF;
  --rule: rgba(18, 80, 59, 0.18);

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1140px;
  --radius: 4px;

  /* Semantic tokens — these flip between light/dark, chrome (header/footer/hero
     bands) stays brand-green regardless of mode */
  --bg: var(--cream);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --heading: var(--green-dark);
  --link: var(--green);
}

[data-theme="dark"] {
  --bg: #14170F;
  --text: #EDEAE2;
  --text-soft: #B7B3A8;
  --heading: #F2C14E;
  --link: #7FCBA4;
  --rule: rgba(242, 193, 78, 0.2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--heading);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: 68ch; color: var(--text-soft); }
a { color: var(--link); text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.rule { border: none; border-top: 1px solid var(--rule); margin: 0; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
@media (max-width: 700px) {
  .section { padding: 48px 0; }
  .section--tight { padding: 32px 0; }
  body { font-size: 16px; }
}
@media (max-width: 400px) {
  .container { padding: 0 26px; }
}
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { margin: 0; }

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn--gold { background: var(--gold); color: var(--green-dark); }
.btn--gold:hover { background: var(--gold-dark); text-decoration: none; }
.btn--outline { border-color: var(--white); color: var(--white); background: transparent; }
.btn--outline:hover { background: var(--white); color: var(--green-dark); text-decoration: none; }
.btn--outline-dark { border-color: var(--green); color: var(--green); background: transparent; }
.btn--outline-dark:hover { background: var(--green); color: var(--white); text-decoration: none; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--gold);
  color: var(--green-dark); padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header / colored nav band ---------- */
.site-header {
  background: var(--green);
  position: sticky; top: 0; z-index: 100;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  min-height: 74px;
  padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); min-width: 0; flex-shrink: 0; }
.brand img.crest { height: 42px; width: 42px; object-fit: contain; flex-shrink: 0; }
.brand .crest-fallback {
  height: 42px; width: 42px; border-radius: 50%;
  background: var(--gold); color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.brand .wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand .wordmark span {
  display: block; font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.03em;
  color: var(--gold); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.primary-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; row-gap: 8px; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: contents; }
.primary-nav li { list-style: none; margin: 0; }
.primary-nav a {
  color: var(--white); font-size: 0.95rem; font-weight: 500; opacity: 0.92; white-space: nowrap;
}
.primary-nav a:hover { opacity: 1; text-decoration: none; border-bottom: 2px solid var(--gold); }
.primary-nav .nav-cta { display: none; }

.theme-toggle {
  background: rgba(255,255,255,0.12); border: none; color: var(--white);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,0.2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.menu-toggle {
  display: none; background: none; border: none; color: var(--white);
  font-size: 1.5rem; cursor: pointer; padding: 2px 4px; flex-shrink: 0;
}

@media (min-width: 901px) and (max-width: 1300px) {
  .primary-nav { gap: 14px; }
  .primary-nav a { font-size: 0.88rem; }
}

@media (max-width: 900px) {
  .brand .wordmark { font-size: 1rem; max-width: 46vw; }
  .header-cta { display: none; }
  .primary-nav {
    display: none;
    position: fixed; top: 74px; left: 0; right: 0;
    background: var(--green-dark);
    flex-direction: column; align-items: stretch;
    padding: 12px 24px 24px; gap: 2px;
    max-height: calc(100vh - 74px); overflow-y: auto;
    z-index: 99;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .primary-nav a:hover { border-bottom: 1px solid rgba(255,255,255,0.08); }
  .primary-nav .nav-cta {
    display: block; text-align: center; margin-top: 14px; border: none;
  }
  .menu-toggle { display: block; }
}

@media (max-width: 380px) {
  .brand .wordmark span { display: none; }
  .theme-toggle { width: 34px; height: 34px; }
}

/* Anchor offset so in-page jumps land below sticky header */
section[id] { scroll-margin-top: 84px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
}
.hero::after {
  content: "RISE";
  position: absolute; right: -0.05em; bottom: -0.22em;
  font-family: var(--serif); font-weight: 700;
  font-size: 13rem; color: rgba(255,255,255,0.05);
  line-height: 1; pointer-events: none; user-select: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero-eyebrow { color: var(--gold); font-weight: 600; margin-bottom: 14px; }
.hero h1 { color: var(--white); }
.hero p.lede { color: rgba(255,255,255,0.85); font-size: 1.1rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-photo {
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero::after { font-size: 6rem; }
}
@media (max-width: 480px) {
  .hero::after { font-size: 3.5rem; }
}

/* ---------- Fact strip ---------- */
.fact-strip { background: var(--gold); color: var(--green-dark); }
.fact-strip .container { display: flex; justify-content: space-between; padding: 22px 24px; flex-wrap: wrap; gap: 16px; }
.fact-strip .fact { text-align: center; flex: 1; min-width: 120px; }
.fact-strip .fact strong { display: block; font-family: var(--serif); font-size: 1.5rem; }
.fact-strip .fact span { font-size: 0.85rem; font-weight: 500; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.pull-quote {
  border-left: 3px solid var(--gold); padding-left: 20px; margin: 24px 0;
  font-family: var(--serif); font-size: 1.25rem; color: var(--heading); font-style: italic;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Admissions band ---------- */
.admissions { background: var(--green-dark); color: var(--white); }
.admissions h2 { color: var(--white); }
.admissions p { color: rgba(255,255,255,0.8); }
.admissions-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 32px; }
.admissions-card { border: 1px solid rgba(255,255,255,0.18); padding: 24px; border-radius: var(--radius); }
.admissions-card h3 { color: var(--gold); font-size: 1.05rem; }
.admissions-card p { color: rgba(255,255,255,0.75); font-size: 0.95rem; }
.admissions-card a.btn { margin-top: 8px; }
@media (max-width: 860px) { .admissions-cards { grid-template-columns: 1fr; } }
@media (min-width: 861px) and (max-width: 1040px) { .admissions-cards { grid-template-columns: repeat(2, 1fr); } }

/* ---------- News grid ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.news-card { border-top: 3px solid var(--gold); padding-top: 14px; }
.news-card time { font-size: 0.82rem; color: var(--text-soft); }
.news-card h3 { font-size: 1.1rem; margin-top: 6px; }
.news-empty { border: 1px dashed var(--rule); padding: 36px; text-align: center; color: var(--text-soft); border-radius: var(--radius); }
@media (max-width: 860px) { .news-grid { grid-template-columns: 1fr; } }

/* ---------- Programs / pathway rail ---------- */
.pathway-rail { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.pathway-item { padding: 24px 20px; border-right: 1px solid var(--rule); }
.pathway-item:last-child { border-right: none; }
.pathway-item .num { font-family: var(--serif); color: var(--gold-dark); font-weight: 700; font-size: 1.3rem; }
@media (max-width: 860px) {
  .pathway-rail { grid-template-columns: 1fr 1fr; }
  .pathway-item:nth-child(2) { border-right: none; }
}

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.gallery-grid img { aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--heading); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--gold-dark); font-size: 1.2rem; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: 10px; }

/* ---------- Find us ---------- */
.find-us-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .find-us-grid { grid-template-columns: 1fr; } }

/* ---------- Generic editorial page content (page.php, legal pages) ---------- */
.page-header { padding: 56px 0 32px; border-bottom: 1px solid var(--rule); }
.page-header .eyebrow { color: var(--gold-dark); font-weight: 600; font-size: 0.85rem; }
.page-content { padding: 48px 0 80px; }
.page-content .container { max-width: 760px; }
.page-content h2 { margin-top: 1.6em; font-size: 1.4rem; }
.page-content ul, .page-content ol { color: var(--text-soft); padding-left: 1.3em; }
.page-content li { margin-bottom: 0.4em; }
.page-content hr { margin: 2.4em 0 1.4em; }
.page-content em { color: var(--text-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-dark); color: rgba(255,255,255,0.75); }
.footer-top { padding: 56px 0 32px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-top h4 { color: var(--white); font-family: var(--sans); font-size: 0.95rem; font-weight: 700; margin-bottom: 14px; }
.footer-top a { color: rgba(255,255,255,0.75); }
.footer-top a:hover { color: var(--gold); text-decoration: none; }
.footer-top ul { list-style: none; margin: 0; padding: 0; }
.footer-top li { margin-bottom: 8px; }
.footer-brand .brand { color: var(--white); margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,0.7); max-width: 30ch; line-height: 1.6; }

.footer-contact-list { list-style: none; margin: 0; padding: 0; }
.footer-contact-list li {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 16px; line-height: 1.4;
}
.footer-contact-list li:last-child { margin-bottom: 0; }
.footer-contact-list svg {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
  color: var(--gold);
}
.footer-contact-list a,
.footer-contact-list span { color: rgba(255,255,255,0.8); }
.footer-contact-list a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 20px 0; font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.footer-bottom a,
.footer-bottom .legal-links a { color: rgba(255,255,255,0.8); }
.footer-bottom a:hover,
.footer-bottom .legal-links a:hover { color: var(--gold); }
.footer-bottom .legal-links a { margin-left: 16px; }
.footer-bottom .legal-links a:first-child { margin-left: 0; }
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .footer-bottom .legal-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .footer-bottom .legal-links a { margin-left: 0; margin-right: 0; }
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile sticky CTA ---------- */
.mobile-sticky-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--gold); text-align: center; padding: 14px;
}
.mobile-sticky-cta a { color: var(--green-dark); font-weight: 700; }
@media (max-width: 700px) { .mobile-sticky-cta { display: block; } body { padding-bottom: 68px; } }

/* ---------- Cookie notice ---------- */
.cookie-notice {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  max-width: 640px; margin: 0 auto;
  background: var(--green-dark); color: rgba(255,255,255,0.9);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  display: none;
  align-items: center; gap: 16px; flex-wrap: wrap;
}
.cookie-notice.is-visible { display: flex; }
.cookie-notice p { margin: 0; color: rgba(255,255,255,0.85); font-size: 0.92rem; flex: 1 1 240px; }
.cookie-notice a { color: var(--gold); text-decoration: underline; }
.cookie-notice #cookie-accept { flex-shrink: 0; padding: 10px 22px; }
@media (max-width: 700px) {
  .cookie-notice { bottom: 76px; }
}
