/*
Theme Name: Sway Bowmen
Theme URI: https://swaybowmen.example
Author: Sway Bowmen
Description: A classy, accessible one-page-style theme for Sway Bowmen archery club. Every module (hero, shooting times, beginners' courses, fees, gallery, contact) is editable in Appearance → Customize with live preview. Simple navigation, full-screen app-style mobile menu, large readable type.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sway-bowmen
Tags: one-column, custom-menu, custom-logo, featured-images, accessibility-ready
*/

/* ============================================================
   TOKENS — the whole design derives from these
   Palette drawn from the World Archery target face + English field
   ============================================================ */
:root {
  --yew:        #1c2a1e;   /* deep yew-wood green: primary ink */
  --ivy:        #41573f;   /* mid green: secondary ink, buttons */
  --fletch:     #f5f6f2;   /* cool fletching white: page ground */
  --card:       #ffffff;
  --gold:       #e3a72f;   /* target gold: primary accent */
  --gold-deep:  #b9820f;
  --ring-red:   #be3b2a;   /* target red: rare emphasis only */
  --ring-blue:  #2d7fb8;   /* target blue */
  --line:       #dcded6;

  /* Editable in Appearance → Customize → Colours */
  --dark-bg:      var(--yew);      /* dark section + footer background */
  --hero-title:   var(--yew);      /* big hero heading */
  --hero-accent:  var(--gold-deep);/* the *starred* word in the hero heading */
  --kicker:       var(--ivy);      /* small uppercase labels */

  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body:    "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --max: 1120px;
  --pad: clamp(20px, 5vw, 48px);
  --radius: 14px;
  --shadow: 0 8px 30px rgba(28, 42, 30, 0.08);
}

/* ============================================================
   RESET / BASE — large, readable, kind to older eyes
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.65;
  color: var(--yew);
  background: var(--fletch);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ivy); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0 0 0.4em; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.9rem, 8vw, 5.4rem); }
h2 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.75rem); }
p  { margin: 0 0 1.1em; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--yew); color: #fff; padding: 12px 20px; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ============================================================
   SIGNATURE — the target stripe
   Five thin bands in official ring colours: white/black/blue/red/gold
   ============================================================ */
.target-stripe {
  display: block; height: 6px; width: 100%; border: 0; margin: 0;
  background: linear-gradient(to right,
    #ffffff 0 20%, #2b2b2b 20% 40%, var(--ring-blue) 40% 60%,
    var(--ring-red) 60% 80%, var(--gold) 80% 100%);
}
.stripe-mark { /* short version under section headings */
  display: inline-block; height: 6px; width: 110px; border-radius: 3px; margin: 4px 0 26px;
  background: linear-gradient(to right,
    #ffffff 0 20%, #2b2b2b 20% 40%, var(--ring-blue) 40% 60%,
    var(--ring-red) 60% 80%, var(--gold) 80% 100%);
  box-shadow: inset 0 0 0 1px rgba(28,42,30,0.12);
}

/* ============================================================
   HEADER — simple links, nothing hidden, nothing clever
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 246, 242, 0.94);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 78px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--yew); }
.brand:hover { color: var(--yew); }
.brand-roundel { flex: 0 0 auto; }
.brand-name { font-family: var(--display); font-size: 1.65rem; line-height: 1; }
.brand-sub { display: block; font-family: var(--body); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ivy); margin-top: 3px; }

.desktop-nav ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.desktop-nav a {
  display: block; padding: 12px 16px; text-decoration: none;
  color: var(--yew); font-weight: 600; font-size: 1rem; border-radius: 10px;
}
.desktop-nav a:hover { background: rgba(227, 167, 47, 0.16); color: var(--yew); }

/* Drop-down menus: click to open, big targets, no hover tricks */
.desktop-nav li { position: relative; }
.desktop-nav li.menu-item-has-children > a::after {
  content: "▾"; margin-left: 8px; font-size: 0.75em;
  display: inline-block; transition: transform 0.2s ease;
}
.desktop-nav li.menu-item-has-children.open > a { background: rgba(227, 167, 47, 0.16); }
.desktop-nav li.menu-item-has-children.open > a::after { transform: rotate(180deg); }
.desktop-nav .sub-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px;
  margin: 0; padding: 8px; list-style: none;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  display: none; z-index: 120;
}
.desktop-nav li.open > .sub-menu { display: block; }
.desktop-nav .sub-menu a {
  display: block; padding: 14px 16px; border-radius: 8px;
  font-weight: 600; white-space: nowrap;
}

/* Hamburger — big, obvious, labelled */
.menu-toggle {
  display: none; align-items: center; gap: 10px;
  font: 700 1rem var(--body); color: var(--yew);
  background: var(--card); border: 2px solid var(--yew); border-radius: 12px;
  padding: 12px 18px; cursor: pointer; min-height: 52px;
}
.menu-toggle .bars { display: inline-block; width: 22px; }
.menu-toggle .bars span { display: block; height: 3px; background: var(--yew); border-radius: 2px; margin: 4px 0; }

/* ============================================================
   FULL-SCREEN MOBILE MENU — like an app
   ============================================================ */
.mobile-menu {
  position: fixed; inset: 0; z-index: 150;
  background: var(--yew); color: #fff;
  display: flex; flex-direction: column;
  padding: 20px var(--pad) 40px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu-top { display: flex; justify-content: space-between; align-items: center; min-height: 58px; }
.mobile-menu-title { font-family: var(--display); font-size: 1.5rem; }
.menu-close {
  font: 700 1.05rem var(--body); color: var(--yew); background: var(--gold);
  border: 0; border-radius: 12px; padding: 14px 22px; cursor: pointer; min-height: 54px;
}
.mobile-menu nav { flex: 1; display: flex; align-items: center; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; width: 100%; }
.mobile-menu li + li { border-top: 1px solid rgba(255,255,255,0.14); }
.mobile-menu a {
  display: block; padding: 20px 8px;
  color: #fff; text-decoration: none;
  font-family: var(--display); font-size: clamp(1.9rem, 7vw, 2.5rem); line-height: 1.15;
}
/* On mobile, sub-pages are simply listed under their parent — nothing to open */
.mobile-menu .sub-menu { list-style: none; margin: 0 0 10px; padding: 0 0 0 26px; }
.mobile-menu .sub-menu li + li { border-top: 0; }
.mobile-menu .sub-menu a {
  font-family: var(--body); font-weight: 600;
  font-size: 1.25rem; padding: 12px 8px;
  color: rgba(255, 255, 255, 0.88);
}
.mobile-menu .sub-menu a::before { content: "— "; color: var(--gold); }
.mobile-menu a:hover, .mobile-menu a:focus-visible { color: var(--gold); }
.mobile-menu-foot { font-size: 0.95rem; color: rgba(255,255,255,0.75); }
body.menu-locked { overflow: hidden; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; background: var(--fletch); }
.hero-inner {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 5vw, 64px);
  align-items: center; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px);
}
.hero-eyebrow {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--kicker); margin-bottom: 18px;
}
.hero h1 { color: var(--hero-title); }
.hero h1 em { font-style: italic; color: var(--hero-accent); }
.hero-arrow { display: block; width: min(420px, 80%); height: 34px; margin: 6px 0 22px; }
.hero-arrow .shaft { stroke: var(--yew); stroke-width: 3; fill: none; stroke-dasharray: 460; stroke-dashoffset: 460; animation: loose 1s ease-out 0.35s forwards; }
.hero-arrow .tip, .hero-arrow .fletch { fill: var(--gold-deep); opacity: 0; animation: land 0.3s ease-out 1.2s forwards; }
@keyframes loose { to { stroke-dashoffset: 0; } }
@keyframes land { to { opacity: 1; } }
.hero-lede { font-size: clamp(1.15rem, 2vw, 1.35rem); max-width: 34em; color: #33402f; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* Hero slider: images and/or a YouTube video crossfading, no controls */
.hero-slider {
  position: relative; width: 100%; aspect-ratio: 4 / 5;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: var(--ivy);
  /* Safari < 15 fallback for aspect-ratio */
  min-height: 300px;
}
.hero-slider .slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-slider .slide.is-active { opacity: 1; }
.hero-slider .slide img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* A 16:9 YouTube frame scaled to fully cover the 4:5 window (no black bars) */
.hero-slider .slide-video iframe {
  position: absolute; top: 50%; left: 50%;
  width: 225%; height: 101%;
  transform: translate(-50%, -50%);
  border: 0; pointer-events: none;
}

/* ============================================================
   BUTTONS — big targets everywhere
   ============================================================ */
.btn {
  display: inline-block; padding: 16px 30px; min-height: 54px;
  font: 700 1.05rem var(--body); text-decoration: none; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; text-align: center;
}
.btn-gold { background: var(--gold); color: var(--yew); }
.btn-gold:hover { background: var(--gold-deep); color: #fff; }
.btn-ghost { border-color: var(--yew); color: var(--yew); background: transparent; }
.btn-ghost:hover { background: var(--yew); color: #fff; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--dark-bg); color: #f2f4ee; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: var(--gold); }
.section-kicker {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--kicker); margin: 0 0 10px;
}
.section-dark .section-kicker { color: var(--gold); }
.section-intro { max-width: 46em; font-size: 1.12rem; }

/* Welcome: text + image */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* Shooting times cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow);
}
.section-dark .card { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); box-shadow: none; }
.card-day { font-family: var(--display); font-size: 1.7rem; margin-bottom: 4px; }
.card-time { font-weight: 700; color: var(--gold-deep); font-size: 1.1rem; margin-bottom: 12px; }
.section-dark .card-time { color: var(--gold); }
.card p:last-child { margin-bottom: 0; }

/* Beginners steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; counter-reset: step; }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px 26px; box-shadow: var(--shadow); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 14px; border-radius: 50%;
  background: var(--gold); color: var(--yew);
  font: 700 1.2rem var(--body);
}
.step h3 { font-size: 1.35rem; }
.step p:last-child { margin-bottom: 0; }
/* White cards keep dark ink even inside the dark section */
.section-dark .step { color: var(--yew); }
.section-dark .step h3 { color: var(--yew); }
/* Buttons keep their own text colour inside the dark section
   (.section-dark a would otherwise turn gold-button text gold) */
.section-dark .btn-gold { color: var(--yew); }
.section-dark .btn-gold:hover { color: #fff; }
.section-dark .btn-ghost { border-color: #fff; color: #fff; }
.section-dark .btn-ghost:hover { background: #fff; color: var(--yew); }

/* Fees table */
.fees-table { width: 100%; border-collapse: collapse; margin-top: 30px; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.fees-table th, .fees-table td { padding: 18px 22px; text-align: left; font-size: 1.05rem; }
.fees-table th { background: var(--yew); color: #fff; font-family: var(--body); font-weight: 700; letter-spacing: 0.04em; }
.fees-table tr:nth-child(even) td { background: #fbfbf8; }
.fees-table td { border-top: 1px solid var(--line); }
.fees-table td:last-child { font-weight: 700; white-space: nowrap; }
.fees-note { margin-top: 18px; font-size: 0.98rem; color: #4a5546; }
.section-dark .fees-note { color: rgba(255,255,255,0.75); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 12px; aspect-ratio: 1/1; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.gallery figcaption { font-size: 0.9rem; color: var(--ivy); margin-top: 8px; }
.gallery-item { display: block; border-radius: 12px; }
.gallery-item img {
  border-radius: 12px; aspect-ratio: 1 / 1; object-fit: cover; width: 100%;
  box-shadow: var(--shadow); transition: transform 0.25s ease;
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.03); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 56px); align-items: start; margin-top: 36px; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
.section-dark .contact-list li { border-color: rgba(255,255,255,0.16); }
.contact-list .ico { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: var(--gold); color: var(--yew); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.map-frame { border: 0; width: 100%; height: 380px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ============================================================
   INNER PAGES / POSTS
   ============================================================ */
.page-plain { padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(56px, 8vw, 104px); }
.page-plain .entry { max-width: 46em; }
.entry h2, .entry h3 { margin-top: 1.4em; }
.entry ul, .entry ol { padding-left: 1.4em; }
.entry blockquote { border-left: 5px solid var(--gold); margin: 1.4em 0; padding: 4px 0 4px 22px; font-style: italic; }
.post-meta { color: var(--ivy); font-size: 0.95rem; margin-bottom: 26px; }
.post-list article { padding: 28px 0; border-bottom: 1px solid var(--line); }
.post-list h2 { font-size: 1.8rem; }
.post-list h2 a { text-decoration: none; color: var(--yew); }
.post-list h2 a:hover { color: var(--gold-deep); }

/* ============================================================
   DIVERSITY STATEMENT — quiet centred band above the footer
   ============================================================ */
.diversity {
  background: var(--card); border-top: 1px solid var(--line);
  padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px);
  text-align: center;
}
.diversity-inner { max-width: 46em; margin: 0 auto; }
.diversity h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
.diversity .stripe-mark { margin-bottom: 22px; }
.diversity-text {
  font-family: var(--display); font-style: italic;
  font-size: clamp(1.25rem, 2.3vw, 1.6rem); line-height: 1.55;
  color: var(--yew); margin: 0 0 20px;
}
.diversity-link { font-weight: 700; font-size: 1.05rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--dark-bg); color: rgba(255,255,255,0.85); }
.site-footer a { color: var(--gold); }
.footer-brand { font-family: var(--display); font-size: 1.5rem; color: #fff; margin-bottom: 10px; }

.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 48px; padding-top: 56px; padding-bottom: 44px; font-size: 0.98rem;
}
.footer-col-brand .footer-text { margin: 0 0 20px; max-width: 34em; }

.footer-heading {
  font-family: var(--body); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin: 6px 0 16px;
}
.footer-affils { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.footer-affils li { margin: 0 0 10px; break-inside: avoid; }
.footer-affils a { color: rgba(255,255,255,0.85); text-decoration-color: rgba(255,255,255,0.35); }
.footer-affils a:hover { color: var(--gold); }

.footer-socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.footer-socials a {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  color: #fff; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.footer-socials a:hover,
.footer-socials a:focus-visible { background: var(--gold); color: var(--dark-bg); transform: translateY(-2px); }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 20px; padding-bottom: 26px; font-size: 0.92rem;
  color: rgba(255,255,255,0.6);
}

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero-inner, .split, .contact-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 520px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; }
}
@media (max-width: 560px) {
  .footer-affils { columns: 1; }
}
@media (max-width: 480px) {
  body { font-size: 18px; }
  .btn { width: 100%; }
  .fees-table th, .fees-table td { padding: 14px 14px; font-size: 0.98rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-arrow .shaft { animation: none; stroke-dashoffset: 0; }
  .hero-arrow .tip, .hero-arrow .fletch { animation: none; opacity: 1; }
  .mobile-menu { transition: none; }
  .hero-slider .slide { transition: none; }
  .gallery-item img { transition: none; }
  .gallery-item:hover img, .gallery-item:focus-visible img { transform: none; }
  .footer-socials a { transition: none; }
  .footer-socials a:hover, .footer-socials a:focus-visible { transform: none; }
}
