/* ==========================================================================
   Reef Digital - club template stylesheet
   Sports Club & Community. Sits on top of ../assets/reef-template.css and
   gives the club its own look: sand and sea colours, a beach horizon, match
   tickets for the fixtures and a roster for the committee.

   The colour variables below are the club palette. The CMS overwrites them
   on <body> at run time, so a customer can change the brand colours from
   the editor without touching this file.

   A NOTE ON LIST ORDER
   The engine inserts every cloned list item straight after the prototype
   element, so a filled list comes out of the DOM in the reverse of the
   order the editor wrote it. The two helpers below (.cms-stack and
   .cms-row) put the items back the right way round with flex direction.
   Use .cms-stack for a vertical list and .cms-row for a single row.
   ========================================================================== */

:root {
  --primary: #0f6d52;
  --accent: #f0b429;
  --ink: #15201c;
  --paper: #f4f6f4;
  --surface: #ffffff;
  --line: #dde4e0;
  --muted: #5f7169;
  --radius: 16px;
}

body {
  --sand: color-mix(in srgb, var(--accent) 22%, var(--surface));
  --deep: color-mix(in srgb, var(--primary) 68%, #04150f);
  --soft: color-mix(in srgb, var(--primary) 9%, var(--surface));
  background: var(--paper);
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex: 0 0 auto; }
.crest { display: block; color: var(--primary); }
.crest-sm { width: 42px; height: 42px; }
.crest-lg { width: 108px; height: 108px; color: #ffffff; position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); filter: drop-shadow(0 10px 20px rgba(4, 25, 18, .35)); }

/* --------------------------------------------------------- list helpers */
.cms-stack { display: flex; flex-direction: column-reverse; gap: 16px; }
.cms-row { display: flex; flex-direction: row-reverse; flex-wrap: nowrap; gap: 16px; }

/* The prototype element is the fallback copy. Once the CMS has loaded the
   real items are in place, so the prototype is hidden. Without the CMS it
   stays visible and the page still reads properly. */
[data-cms-loaded="true"] [data-cms-template] { display: none !important; }

/* --------------------------------------------------------------- basics */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 20px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .9rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { letter-spacing: -.02em; }
.section { scroll-margin-top: 96px; }
.band {
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sec-head { margin-bottom: 34px; }
.sec-head-inner h2 { margin-bottom: 10px; }
.sec-head .lead { max-width: 62ch; }
.sep { color: var(--muted); margin: 0 .4rem; }
.vs { color: var(--muted); font-weight: 500; margin: 0 .14rem; }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.02rem; letter-spacing: .04em; color: var(--ink); white-space: nowrap; }
.brand-sub { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.site-nav { display: none; }
.nav-list { align-items: center; gap: 4px; }
.nav-link {
  display: block; padding: 9px 14px; border-radius: 999px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .92rem;
  color: var(--ink); transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: var(--soft); color: var(--primary); }
.header-cta { flex: 0 0 auto; padding: 11px 20px; font-size: .9rem; }

.nav-drawer { position: relative; flex: 0 0 auto; }
.nav-drawer-summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .9rem; color: var(--ink);
}
.nav-drawer-summary::-webkit-details-marker { display: none; }
.nav-drawer-summary:hover { border-color: var(--primary); color: var(--primary); }
.nav-drawer-list {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 70;
  min-width: 230px; gap: 2px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lift);
}
.nav-drawer-link {
  display: block; padding: 11px 14px; border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .95rem; color: var(--ink);
}
.nav-drawer-link:hover { background: var(--soft); color: var(--primary); }

/* ----------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  padding: 68px 0 76px;
  background: linear-gradient(165deg, var(--primary) 0%, var(--deep) 100%);
  color: #ffffff;
}
.hero-waves { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 190px; }
.hero-inner { position: relative; z-index: 1; display: grid; gap: 34px; }
.hero-eyebrow { color: var(--accent); }
.hero-title { color: #ffffff; margin-bottom: 16px; max-width: 16ch; }
.hero-sub { color: rgba(255, 255, 255, .84); font-size: 1.08rem; max-width: 54ch; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.hero .btn-ghost { color: #ffffff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-accent {
  background: var(--accent); color: var(--ink);
  box-shadow: 0 10px 24px rgba(4, 25, 18, .28);
}
.btn-accent:hover { transform: translateY(-2px); }
.hero-note {
  display: flex; align-items: center; gap: 9px; margin: 0;
  color: rgba(255, 255, 255, .78); font-size: .92rem;
}
.hero-note .icon { color: var(--accent); }

.next-match { align-self: start; }
.next-match-list { display: flex; flex-direction: column-reverse; gap: 14px; }
.next-match-card {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius); border-top: 5px solid var(--accent);
  padding: 20px 24px 22px; box-shadow: 0 20px 44px rgba(4, 25, 18, .3);
}
.next-match-tag {
  margin: 0 0 10px; font-family: 'Poppins', sans-serif; font-size: .72rem;
  font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--primary);
}
.next-match-when { margin: 0 0 4px; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.28rem; color: var(--ink); }
.next-match-what { margin: 0 0 6px; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.02rem; }
.next-match-where { margin: 0; font-size: .88rem; color: var(--muted); }

/* ---------------------------------------------------------- quick strip */
.quick-strip {
  background: color-mix(in srgb, var(--primary) 7%, var(--paper));
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}
.quick-list { gap: 14px; }
.quick-item { flex: 1 1 0; display: flex; }
.quick-link {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  width: 100%; padding: 16px 44px 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.quick-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); }
.quick-label { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1rem; color: var(--ink); }
.quick-desc { font-size: .86rem; color: var(--muted); }
.quick-arrow { position: absolute; top: 18px; right: 18px; color: var(--primary); opacity: .65; }

/* ----------------------------------------------------------------- about */
.about-grid { display: grid; gap: 40px; }
.about-history { font-size: 1.04rem; color: var(--ink); max-width: 60ch; }
.facts { margin-top: 26px; border-top: 1px solid var(--line); }
.fact {
  display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: space-between;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.fact-label {
  font-family: 'Poppins', sans-serif; font-size: .74rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
}
.fact-value { font-weight: 500; text-align: right; }
.fact-value a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.club-visual {
  position: relative; aspect-ratio: 5 / 4; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow); background: var(--deep);
}
.club-visual-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-caption { margin: 14px 0 0; font-size: .88rem; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------ news */
.news-card {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 20px;
  padding: 22px 24px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.news-date {
  flex: 0 0 auto; margin: 0; padding: 7px 13px; border-radius: 999px;
  font-family: 'Poppins', sans-serif; font-size: .78rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--primary); background: var(--soft); white-space: nowrap;
}
.news-body { flex: 1 1 260px; }
.news-body h3 { margin: 0 0 6px; font-size: 1.14rem; }
.news-body p { margin: 0; color: var(--muted); font-size: .96rem; }
.news-arrow { align-self: center; color: var(--primary); opacity: .5; }

/* -------------------------------------------------------------- fixtures */
.fixture {
  display: grid; gap: 12px; align-items: center;
  padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.fixture-when { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.fixture-date { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.06rem; color: var(--ink); }
.fixture-time { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: .98rem; color: var(--primary); }
.fixture-meta {
  margin: 0 0 4px; font-family: 'Poppins', sans-serif; font-size: .74rem;
  font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
}
.fixture-opponent { margin: 0 0 6px; font-size: 1.16rem; }
.fixture-venue { display: flex; align-items: center; gap: 7px; margin: 0; font-size: .9rem; color: var(--muted); }
.fixture-venue .icon { width: 17px; height: 17px; color: var(--primary); }
.fixture-side { justify-self: end; }
.fixture-tag {
  margin: 0; padding: 6px 13px; border-radius: 999px;
  font-family: 'Poppins', sans-serif; font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary); background: var(--soft);
}
.fixture-side[data-side="Away"] .fixture-tag { color: var(--ink); background: var(--sand); }

/* --------------------------------------------------------------- results */
.result {
  display: grid; gap: 12px 18px; align-items: center;
  padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.result-score {
  margin: 0; justify-self: start; padding: 8px 15px; border-radius: 12px;
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.3rem;
  letter-spacing: .04em; color: var(--primary); background: var(--soft); white-space: nowrap;
}
.result-opponent { margin: 0 0 4px; font-size: 1.08rem; }
.result-meta {
  margin: 0; font-size: .82rem; color: var(--muted);
  font-family: 'Poppins', sans-serif; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.result-tag {
  margin: 0; justify-self: end; padding: 5px 12px; border-radius: 999px;
  font-family: 'Poppins', sans-serif; font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line);
}

/* ------------------------------------------------------------ membership */
.tier-list { gap: 20px; align-items: stretch; }
.tier { flex: 1 1 0; display: flex; }
.tier-card {
  display: flex; flex-direction: column; width: 100%;
  padding: 28px 26px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.tier-card[data-featured="true"] { border-color: var(--accent); box-shadow: var(--shadow-lift); }
.tier-flag {
  display: none; align-self: flex-start; margin: 0 0 14px; padding: 5px 11px; border-radius: 999px;
  font-family: 'Poppins', sans-serif; font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--accent);
}
.tier-card[data-featured="true"] .tier-flag { display: inline-block; }
.tier-name { margin: 0 0 8px; font-size: 1.3rem; }
.tier-price { margin: 0 0 16px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tier-amount { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 2.2rem; color: var(--primary); line-height: 1; }
.tier-period { font-size: .86rem; color: var(--muted); }
.tier-includes { margin: 0 0 22px; font-size: .93rem; line-height: 1.7; color: var(--muted); word-spacing: .1em; letter-spacing: .012em; }
.tier-includes-label {
  display: block; margin-bottom: 4px; font-family: 'Poppins', sans-serif;
  font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--ink);
}
.tier-btn { margin-top: auto; color: var(--primary); border-color: var(--primary); }
.tier-card[data-featured="true"] .tier-btn { background: var(--primary); color: #fff; }
.membership-note {
  margin: 26px auto 0; max-width: 62ch; text-align: center;
  font-size: .92rem; color: var(--muted);
}

/* ------------------------------------------------------------- committee */
.people-list { gap: 12px; }
.person {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.person-avatar {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--soft); color: var(--primary);
}
.person-avatar .icon { width: 24px; height: 24px; }
.person-name { margin: 0; font-size: 1.06rem; }
.person-role {
  margin: 0 0 0 auto; text-align: right;
  font-family: 'Poppins', sans-serif; font-size: .76rem;
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}

/* -------------------------------------------------------------- sponsors */
.sponsors-section { text-align: center; }
.sponsors-title { margin-bottom: 8px; }
.sponsors-lead { margin: 0 auto 30px; }
.sponsor-list { gap: 16px; }
.sponsor {
  flex: 1 1 0; padding: 22px 18px;
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}
.sponsor-name { margin: 0 0 5px; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.sponsor-tag { margin: 0; font-size: .86rem; color: var(--muted); }

/* --------------------------------------------------------------- contact */
.contact-grid { display: grid; gap: 40px; }
.contact-list { margin-top: 26px; border-top: 1px solid var(--line); }
.contact-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.contact-icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; background: var(--soft); color: var(--primary);
}
.contact-body { display: flex; flex-direction: column; }
.contact-label {
  font-family: 'Poppins', sans-serif; font-size: .72rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px;
}
.contact-value { font-weight: 500; }
.contact-link { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.join-form {
  padding: 28px 26px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.join-form-title { margin-bottom: 8px; font-size: 1.3rem; }
.join-form-lead { margin-bottom: 22px; color: var(--muted); font-size: .95rem; }
.form-note { margin: 16px 0 0; font-size: .83rem; color: var(--muted); }
.form-note a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- footer */
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.footer-brand span { color: #fff; }
.footer-brand .crest { color: var(--accent); }
.footer-tagline { color: rgba(255, 255, 255, .74); font-size: .95rem; }
.footer-demo {
  margin: 16px 0 0; padding-left: 14px; border-left: 2px solid var(--accent);
  font-size: .84rem; color: rgba(255, 255, 255, .55);
}
.footer-col h4 { margin-bottom: 14px; }
.footer-list li { margin-bottom: 9px; font-size: .92rem; }
.footer-list.cms-stack { gap: 8px; }
.footer-bottom p { margin: 0; }

/* ----------------------------------------------------------- responsive */
@media (min-width: 760px) {
  .fixture {
    grid-template-columns: 148px 1fr auto;
    gap: 10px 22px;
  }
  .fixture-when { border-right: 1px solid var(--line); padding-right: 18px; }
  .fixture-side { justify-self: end; }
  .result { grid-template-columns: auto 1fr auto; gap: 18px; }
  .news-card { flex-wrap: nowrap; }
}

@media (min-width: 900px) {
  .site-nav { display: block; flex: 1 1 auto; }
  .nav-list { justify-content: flex-end; }
  .nav-drawer { display: none; }
  .hero { padding: 92px 0 104px; }
  .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 54px; align-items: center; }
  .about-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
}

@media (max-width: 900px) {
  .tier-list.cms-row { flex-direction: column-reverse; }
}

@media (max-width: 760px) {
  .quick-list.cms-row,
  .sponsor-list.cms-row { flex-direction: column-reverse; }
  .hero { padding: 52px 0 62px; }
  .brand-sub { display: none; }
  .footer-brand { flex-wrap: wrap; }
}

@media (max-width: 540px) {
  .header-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

