/* Hoopers Together — brand colours taken from the logo.
   The logo green (--green, 4.2:1 on white) is too light for text, so it is only used for decoration
   (borders, swooshes). Text and buttons use --green-dark, which passes the WCAG AA contrast check. */
:root {
  --red:        #fb0202;
  --blue:       #49bffe;
  --blue-pale:  #9fdffd;
  --green:      #018f3e;
  --green-dark: #01702f;   /* text, links and anything behind white text: 6.3:1 on white */
  --green-darker: #015a26; /* hover */
  --blue-dark:  #0b72ad;   /* focus ring: 5.2:1 on white */
  --field-border: #7a8389; /* form field edges: 3.4:1 on the light grey, 3.9:1 on white */
  --charcoal:   #575757;
  --ink:        #2b2b2b;
  --muted:      #6b6b6b;
  --line:       #e4e8ea;
  --bg:         #ffffff;
  --bg-soft:    #f3f9fc;
  --header-bg:  #e2e3e5;   /* light grey menu bar */
  --alt-bg:     #d2edfb;   /* pale blue bands, e.g. "Why Hoopers Together?" */
  --soft-bg:    #f1f2f3;   /* very light grey band, e.g. "What is Canine Hoopers?" */
  --hero-bg:    #e9fde4;   /* pale green top section on every page */
  --radius:     14px;
  --max:        1100px;
  --font:       "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green-dark); text-underline-offset: 3px; }
a:hover { color: var(--green-darker); }

h1, h2, h3 {
  color: var(--charcoal);
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 5vw, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 700px) { .container { padding: 0 28px; } }

.skip-link {
  position: absolute; left: -9999px;
}
.skip-link:focus {
  left: 16px; top: 12px; z-index: 100;
  background: var(--charcoal); color: #fff; padding: 8px 14px; border-radius: 8px;
}

/* ── Header ─────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid #cfd2d5;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 16px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 52px; width: auto; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--charcoal);
  position: relative; content: ""; transition: transform .2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  display: block;
  color: var(--charcoal); text-decoration: none; font-weight: 700;
  padding: 10px 14px; border-radius: 10px;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--green-dark); }
.site-nav a[aria-current="page"] {
  color: var(--green-dark); background: var(--bg-soft);
  /* underline so the current page doesn't rely on colour alone */
  text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px;
}

@media (max-width: 899px) {
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--header-bg); border-bottom: 1px solid #cfd2d5;
    padding: 8px 16px 16px;
  }
  .site-nav.open { display: block; }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav ul { display: flex; gap: 2px; }
  .brand img { height: 60px; }
}

/* ── Hero ───────────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  padding: 48px 0 0;
  text-align: center;
}
.hero-logo { width: min(480px, 90%); margin: 0 auto 24px; }
.hero p.lead {
  font-size: 1.2rem; color: var(--muted);
  max-width: 640px; margin: 0 auto 28px;
}
.hero p.lead + .club-list { margin-top: -16px; }
.club-list { list-style: none; padding: 0; margin: 0 auto 28px; font-size: 1.2rem; font-weight: 700; line-height: 1.4; }
.club-list li { margin: 0; }
.club-list a { display: inline-block; padding: 6px 4px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
/* Home page photos: either side of the "What is Canine Hoopers?" intro on wide screens, side by side under it on smaller ones */
.photo-flank {
  display: grid; gap: 16px; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "main main" "left right";
  margin-bottom: 32px;
}
.flank-main { grid-area: main; min-width: 0; }
.section-head.flank-main { margin-bottom: 0; }
.flank-main p:last-child { margin-bottom: 0; }
.flank-photo { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.flank-photo.left { grid-area: left; }
.flank-photo.right { grid-area: right; }
@media (min-width: 1200px) {
  .photo-flank {
    max-width: 1340px; gap: 32px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 640px) minmax(0, 1fr);
    grid-template-areas: "left main right";
  }
}

.page-hero {
  background: var(--hero-bg);
  padding: 48px 0 0;
}
.page-hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; }

/* Wave divider echoing the logo's swooshes */
.swoosh { display: block; width: 100%; height: 56px; margin-top: 32px; }

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-block;
  font: inherit; font-weight: 800;
  padding: 12px 24px; border-radius: 999px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-dark); color: #fff; }
.btn-primary:hover { background: var(--green-darker); color: #fff; }
.btn-outline { border-color: var(--charcoal); color: var(--charcoal); background: transparent; }
.btn-outline:hover { background: var(--charcoal); color: #fff; }

/* ── Sections & cards ───────────────────────────── */
section { padding: 56px 0; }
/* stronger pale blue bands; grey text darkened a touch so it stays 4.5:1 on them */
section.soft { background: var(--soft-bg); }
section.alt { background: var(--alt-bg); --muted: #5e5e5e; }

.section-head { max-width: 700px; margin-bottom: 32px; }
.section-head p { color: var(--muted); }

.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  border-top: 5px solid var(--blue);
}
.card.green { border-top-color: var(--green); }
.card.red   { border-top-color: var(--red); }
.card.grey  { border-top-color: var(--charcoal); }
.card h3 { margin-bottom: 0.4em; }
.card h4 { color: var(--charcoal); font-size: 1.2rem; font-weight: 800; line-height: 1.2; margin: 0 0 0.4em; }
.club-group { margin-top: 32px; }
.club-note { color: var(--muted); max-width: 700px; }
.club-join { margin: 24px 0 0; }
.section-head + .club-group { margin-top: 0; }
.grid.fill { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card p:last-child { margin-bottom: 0; }

.wide-photo { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.two-col { display: grid; gap: 32px; }
.callout-stack { display: grid; gap: 20px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.2fr 1fr; align-items: start; } }

.prose { max-width: 760px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; }

.callout {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--green);
  border-radius: var(--radius); padding: 20px 24px;
}

/* Events list */
.event {
  display: grid; gap: 16px; grid-template-columns: 76px 1fr;
  align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.event + .event { margin-top: 14px; }
.event-date {
  background: var(--green-dark); color: #fff; border-radius: 12px;
  text-align: center; padding: 8px 4px; line-height: 1.1; font-weight: 800;
}
.event-date .day { font-size: 1.7rem; display: block; }
.event-date .mon { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.event h3 { margin-bottom: .2em; }
.event .meta { color: var(--muted); font-size: .95rem; margin: 0; }

/* Rules table of contents */
.toc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px;
}
.toc ol { margin: 0; padding-left: 1.3em; }
.rules-section { scroll-margin-top: 90px; padding-top: 8px; }

/* Placeholder text that still needs real content — remove the class once filled in */
.todo {
  background: #fff6d6; outline: 1px dashed #d9a800; border-radius: 4px; padding: 0 3px;
}

/* ── Forms ──────────────────────────────────────── */
.form { display: grid; gap: 16px; }
.form label { font-weight: 700; color: var(--charcoal); display: block; margin-bottom: 6px; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--field-border); border-radius: 10px; background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 3px solid var(--blue-dark); outline-offset: 1px; border-color: var(--blue-dark);
}
.form textarea { min-height: 160px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.form-status { margin: 0; font-weight: 700; }
.form-status.ok  { color: var(--green-dark); }
.form-status.err { color: #c00000; }

/* ── Footer ─────────────────────────────────────── */
.site-footer {
  background: var(--charcoal); color: #e9e9e9;
  padding: 40px 0 28px; margin-top: 0;
  border-top: 6px solid var(--green);
}
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 24px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: .6em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15);
  font-size: .9rem; color: #dedede;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* FAQ accordion */
.faq-group { margin-top: 1.6em; scroll-margin-top: 90px; }
.faq-group:first-of-type { margin-top: 0.8em; }
.faq {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 16px 48px 16px 20px; position: relative;
  font-weight: 800; color: var(--charcoal);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; line-height: 1; color: var(--green-dark);
}
.faq[open] summary::after { content: "–"; }
.faq[open] summary { border-bottom: 1px solid var(--line); }
.faq > :not(summary) { margin-left: 20px; margin-right: 20px; }
.faq > summary + * { margin-top: 14px; }
.faq > :last-child { margin-bottom: 18px; }
@media (min-width: 860px) { .faq-toc { position: sticky; top: 96px; } }

/* Fee and grade comparison tables */
.fee-table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .97rem; }
.fee-table th, .fee-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fee-table thead th { background: var(--bg-soft); color: var(--charcoal); }
.fee-table caption { text-align: left; font-weight: 800; color: var(--charcoal); font-size: 1.2rem; margin-bottom: .5em; }
.show-dates { background: #fff; border-radius: var(--radius); overflow: hidden; }
.show-dates thead th { background: var(--header-bg); }
.fee-table small { font-weight: 600; color: var(--muted); }
.faq > .fee-table { width: calc(100% - 40px); }

.price { font-size: 1.6rem; font-weight: 800; color: var(--green-dark); margin-bottom: .2em; }
.price small { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); }

/* Competition rules page: wide tables scroll sideways on phones, contents beside the rules on wide screens */
.table-wrap { overflow-x: auto; margin: 0 0 1em; }
.table-wrap .fee-table { margin: 0; }
.fee-table tbody th { font-weight: 700; color: var(--charcoal); }
.note {
  background: var(--bg-soft); border-left: 5px solid var(--blue);
  border-radius: 8px; padding: 12px 16px;
}
.rules-section h3 { margin-top: 1.4em; }
.rules-section + .rules-section { margin-top: 2.2em; }

/* Rules contents: a closed box at the top of the page, opened when wanted */
.rules-toc {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 0 0 24px;
}
.rules-toc summary {
  cursor: pointer; list-style: none; padding: 14px 20px;
  font-weight: 800; color: var(--charcoal); position: relative;
}
.rules-toc summary::-webkit-details-marker { display: none; }
.rules-toc summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; line-height: 1; color: var(--green-dark);
}
.rules-toc[open] summary::after { content: "–"; }
.rules-toc ol { margin: 0; padding: 0 20px 16px 2.6em; font-size: .97rem; }
.rules-toc li { margin-bottom: 4px; break-inside: avoid; }
@media (min-width: 640px) { .rules-toc ol { columns: 2; column-gap: 32px; } }

/* Phones on their side: little height, so the header stops following the page */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { position: static; }
  .header-inner { min-height: 60px; }
  .page-hero { padding-top: 28px; }
  .hero { padding-top: 28px; }
}

/* Nursery Exercises: course plans in a grid, each opening full size */
.exercise-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.exercise {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; scroll-margin-top: 90px;
}
.exercise-plan img { border: 1px solid var(--line); border-radius: 8px; width: 100%; }
.exercise h3 { font-size: 1.05rem; margin: 12px 0 4px; }
.exercise .meta { color: var(--muted); font-size: .95rem; margin: 0 0 4px; }
.nursery-about { margin-top: 1.2em; }
.experts { display: grid; gap: 20px; margin: 8px 0 24px; }
@media (min-width: 560px) { .experts { grid-template-columns: 1fr 1fr; } }
.experts figure { margin: 0; }
.experts img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.experts figcaption { font-weight: 800; color: var(--charcoal); margin-top: 8px; }
.photo-pair { display: grid; gap: 20px; margin-top: 32px; }
@media (min-width: 600px) { .photo-pair { grid-template-columns: 1fr 1fr; } }
.photo-pair img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.offer-photo { margin-top: 24px; }
.hero-with-pic { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.hero-pic { width: clamp(96px, 20vw, 220px); height: auto; display: block; }
