/* ═══════════════════════════════════════════════════════════
   AWHI Yoga & Wellbeing — shared site styles
   Single source of truth for tokens, nav, footer, buttons,
   and accessibility behaviour. Page-specific styles stay in
   each page's own <style> block.
   ═══════════════════════════════════════════════════════════ */

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --ngahere:   #1C3829;   /* deep forest green */
  --hua:       #F4EFE4;   /* warm cream */
  --repo:      #C05C2C;   /* terracotta */
  --repo-dark: #a34a20;   /* terracotta hover */
  --pango:     #242424;   /* charcoal */
  --kawakawa:  #7A9E7E;   /* sage */
  --kowhai:    #D4A553;   /* warm gold */
  --dusk:      #C4896A;   /* warm blush */
  --ao:        #2A2320;   /* warm charcoal (school) */
  --ua:        #EBE0D8;   /* warm sand (school) */
  --muted:     #666666;   /* secondary text */

  --font-display: 'Cormorant', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --max-w: 1280px;
  --nav-h: 80px;

  /* Component indirection — school pages override these */
  --nav-bg:    var(--ngahere);
  --footer-bg: var(--ngahere);
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--hua);
  color: var(--pango);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
[id] { scroll-margin-top: calc(var(--nav-h) + 1rem); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Prose links keep an underline so they don't rely on colour alone */
main p a:not(.btn):not([class*="nav"]) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ─── UTILITIES ──────────────────────────────────────────── */
.container { max-width: var(--max-w); margin-inline: auto; padding-inline: clamp(1.5rem, 5vw, 4rem); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.btn-primary { background: var(--repo); color: var(--hua); border-color: var(--repo); }
.btn-primary:hover { background: var(--repo-dark); border-color: var(--repo-dark); }
.btn-outline-cream { background: transparent; color: var(--hua); border-color: var(--hua); }
.btn-outline-cream:hover { background: var(--hua); color: var(--ngahere); }
.btn-outline-dark { background: transparent; color: var(--ngahere); border-color: var(--ngahere); }
.btn-outline-dark:hover { background: var(--ngahere); color: var(--hua); }

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--kawakawa);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1.5px;
  background: var(--kawakawa);
}

.display-heading {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
}

.te-reo { font-family: var(--font-display); }

/* ─── NAVIGATION ─────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled,
.nav.nav-solid {
  background: var(--nav-bg);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo img { height: 44px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  color: var(--hua);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
  white-space: nowrap;
}
@media (max-width: 1180px) {
  .nav-links { gap: 1.3rem; }
  .nav-logo-main { font-size: 1.5rem; }
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; color: var(--kawakawa); }
.nav-book {
  background: var(--repo);
  color: var(--hua) !important;
  padding: 0.6rem 1.4rem;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 1 !important;
  transition: background 0.25s !important;
}
.nav-book:hover { background: var(--repo-dark) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--hua);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── SCHOOL SUB-BRAND ───────────────────────────────────── */
/* School pages set --nav-bg/--footer-bg to var(--ao) in their
   page styles; the text wordmark and subnav live here so all
   school pages share one header. */
:root { --subnav-h: 44px; }
.nav-logo {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
}
.nav-logo-main {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--hua);
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}
.nav-logo-sub {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(244, 239, 228, 0.6);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.subnav {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 90;
  height: var(--subnav-h);
  background: rgba(42, 35, 32, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(235, 224, 216, 0.15);
  display: flex;
  align-items: center;
}
.subnav .container {
  display: flex;
  align-items: center;
  width: 100%;
}
.subnav-links {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav-links::-webkit-scrollbar { display: none; }
.subnav-links a {
  color: rgba(244, 239, 228, 0.7);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 1.1rem;
  transition: color 0.2s;
  border-right: 1px solid rgba(235, 224, 216, 0.12);
  white-space: nowrap;
}
.subnav-links a:first-child { padding-left: 0; }
.subnav-links a:last-child { border-right: none; }
.subnav-links a:hover { color: var(--hua); }
.subnav-links a.active { color: var(--ua); }
@media (max-width: 768px) {
  :root { --subnav-h: 40px; }
  .nav-logo-main { font-size: 1.5rem; }
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--footer-bg);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  border-top: 1px solid rgba(244, 239, 228, 0.1);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand img { height: 40px; margin-bottom: 1.25rem; }
.footer-brand p {
  color: rgba(244, 239, 228, 0.65);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.footer-socials {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.footer-socials a {
  display: inline-block;
  width: 38px;
  height: 38px;
  padding: 9px;
  border: 1px solid rgba(244, 239, 228, 0.25);
  color: rgba(244, 239, 228, 0.7);
  line-height: 0;
  transition: background 0.2s, border-color 0.2s;
}
.footer-socials a:hover {
  background: rgba(244, 239, 228, 0.1);
  border-color: var(--kawakawa);
  color: var(--hua);
}
.footer-socials a img,
.footer-socials a svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kawakawa);
  margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul a {
  color: rgba(244, 239, 228, 0.65);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--hua); }
.footer-contact p {
  color: rgba(244, 239, 228, 0.65);
  font-size: 0.9rem;
  line-height: 1.7;
}
.footer-contact a {
  color: rgba(244, 239, 228, 0.65);
  transition: color 0.2s;
}
.footer-contact a:hover { color: var(--hua); }
.footer-bottom {
  border-top: 1px solid rgba(244, 239, 228, 0.1);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(244, 239, 228, 0.4);
}
.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}
.footer-bottom-links a {
  font-size: 0.8rem;
  color: rgba(244, 239, 228, 0.4);
  transition: color 0.2s;
}
.footer-bottom-links a:hover { color: var(--hua); }

/* ─── SCROLL ANIMATIONS ──────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Content must never be trapped invisible: if JS hasn't run
   (site.js stamps .js on <html>), show everything. */
html:not(.js) .fade-up { opacity: 1; transform: none; }

/* ─── ACCESSIBILITY ──────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--ngahere);
  color: var(--hua);
  padding: 0.5rem 1.25rem;
  border-radius: 0 0 4px 4px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus { top: 0; }
:focus-visible {
  outline: 3px solid var(--kowhai);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; transition: none; }
  .hero-bg { transform: none !important; transition: none !important; }
  .hero-scroll::after { animation: none !important; }
  .nav, .btn, .nav-toggle span { transition: none; }
}

/* ─── RESPONSIVE NAV ─────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--nav-bg);
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
