/* ─── Community & members template ───────────────────────────────────
   For a club, association, society or membership group: somewhere with
   an open front door and a members-only back room. Five real build
   prompts wanted this shape, and it is also the ONLY template that
   shows a customer what member logins look like — a Growth feature we
   have sold since launch and never demonstrated.

   THE MEMBERS AREA IS DATA, NOT PAGES. Nothing client-side makes a page
   private: the enforced boundary is the collection prefix on the data
   API (public_ / member_ / officer_ / admin_), checked server-side. The
   "members only" section here is a signed-in SHELL that fetches from a
   member_ collection at runtime — it hides a misleading screen and
   nothing more. Never bake anything private into the page itself.

   NO PHONE NUMBER, NO EMAIL ADDRESS, NO STREET ADDRESS. Contact runs
   through the form.

   THREE BREAKPOINTS: >=1080 desktop, 768-1079 tablet, <768 phone.
   ------------------------------------------------------------------ */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* newsite-shell D11: bind the two sc-components tokens the
     library deliberately leaves literal to this template's own
     palette, so a dropped-in component doesn't announce itself
     as foreign (brewery blue on every site). One identical
     fallback chain across all 7 templates -- covers both naming
     schemes in use (--accent-hover vs local-services' own
     --accent-dark). */
  --sc-bar: var(--accent);
  --sc-foot-bg: var(--bg-deep, var(--accent-hover, var(--accent-dark, var(--accent))));
  --bg:        #fbfaf8;
  --bg-alt:    #f2efe9;
  --bg-deep:   #1f2421;
  --fg:        #1f2421;
  --fg-soft:   #646b66;
  /* Darkened from #9aa19c, same cool-green hue -- 4.81:1 against
     --bg-alt / 5.52:1 against #ffffff (2026-09-14, newsite-shell
     --fg-fade contrast fix). Real usages (.eyebrow on light ground,
     .fine/.fine.fine.fine in the footer on --bg-alt) all failed
     against a model-overridden white --bg -- build 138 measured 44
     contrast failures, all --fg-fade on shipped defaults; QA
     confirmed no dark-band rule reads this token on any of the five
     templates touched here (the dark-band eyebrow is already
     re-pointed at --accent-on-dark). White, not this template's own
     --bg, is the target ground -- the override system can put pure
     white there and did. */
  --fg-fade:   #636b65;
  --fg-on-dark: #fbfaf8;
  --accent:    #8a5a2b;
  --accent-hover: #6f4721;
  --accent-soft: #f5ede3;
  /* `.section.dark .eyebrow` reads --accent-on-dark, not --accent
     directly (newsite-shell Finding 4, 2026-09-14): this template's
     OWN accent scored 2.69:1 against --bg-deep with no override
     involved at all. Computed the same way `_token_overrides` derives
     an override -- push the accent toward white only as far as
     --bg-deep requires -- and pinned to a literal here so the default
     ships fixed too, not just the overridden path. */
  --accent-on-dark: #a88562;
  --border:    #e6e1d8;
  --border-soft: #f0ece5;

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Inter", -apple-system, system-ui, sans-serif;

  --type-xs:   0.8125rem;
  --type-sm:   0.9375rem;
  --type-base: 1rem;
  --type-lg:   1.125rem;
  --type-xl:   1.375rem;
  --type-2xl:  1.75rem;
  --type-3xl:  2.25rem;
  --type-4xl:  clamp(2rem, 4.5vw, 3.25rem);
  --type-display: clamp(2.5rem, 6vw, 4.25rem);

  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem;  --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem;  --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;    --space-24: 6rem;

  --radius-sm: 6px;  --radius: 10px;  --radius-lg: 16px;  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(31,36,33,.05);
  --shadow:    0 4px 16px -6px rgba(31,36,33,.12), 0 1px 3px rgba(31,36,33,.05);
  --shadow-lg: 0 18px 44px -20px rgba(31,36,33,.28);
  --dur: .18s;  --ease: cubic-bezier(.22,.61,.36,1);
}

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

body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: var(--type-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.015em; }
h1 { font-size: var(--type-display); line-height: 1.05; margin: 0; text-wrap: balance; }
h2 { font-size: var(--type-3xl); line-height: 1.15; margin: 0; text-wrap: balance; }
h3 { font-size: var(--type-xl); line-height: 1.25; margin: 0; }
p  { margin: var(--space-3) 0 0; }

.container        { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-6); }
.container-narrow { max-width: 720px;  margin: 0 auto; padding: 0 var(--space-6); }

.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-soft);
}
.brand { font-family: var(--font-display); font-weight: 600; font-size: var(--type-lg); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: var(--space-1); }
.nav-links a {
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  font-size: var(--type-sm); text-decoration: none; color: var(--fg-soft);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-links a:hover { color: var(--accent); background: var(--accent-soft); }
.nav-cta {
  padding: var(--space-2) var(--space-5) !important; border-radius: 999px;
  background: var(--accent); color: var(--fg-on-dark) !important; font-weight: 600;
}
.nav-cta:hover { background: var(--accent-hover) !important; }

.hero { position: relative; padding: var(--space-20) var(--space-6) var(--space-16); background: var(--bg-alt); }
.hero-inner { max-width: 1120px; margin: 0 auto; }
.hero .eyebrow { color: var(--accent); }
.hero .lede { max-width: 46ch; font-size: var(--type-lg); color: var(--fg-soft); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

.eyebrow { font-size: var(--type-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-fade); }

.btn {
  display: inline-block; padding: var(--space-3) var(--space-6); border-radius: 999px;
  background: var(--accent); color: var(--fg-on-dark); font-weight: 600;
  font-size: var(--type-sm); text-decoration: none;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); border-color: var(--accent); }
/* Finding, real-build follow-up (2026-09-14) -- see
   templates/classes/htdocs/style.css for why. */
.section.dark .btn-ghost { color: var(--fg-on-dark); }
.section.dark .btn-ghost:hover { color: var(--fg-on-dark); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--type-base); }
.btn-block { display: block; text-align: center; width: 100%; }

.section { padding: var(--space-20) 0; }
.section.alt  { background: var(--bg-alt); }
.section.dark {
  background: var(--bg-deep); color: var(--fg-on-dark);
  /* Finding 4b, 2026-09-14: `.sc-info-tile__title`/`__text` have no
     ground of their own and read `--fg`/`--fg-soft`-derived tokens
     that assume a light ambient. `--fg` is always byte-identical to
     `--bg-deep` here, so those elements measured EXACTLY 1.00 inside
     this section. Setting the -on-dark variants here lets them
     inherit a correct colour with no template-specific selector
     needed in sc-components.css. */
  --heading-on-dark: var(--fg-on-dark);
  --body-on-dark: var(--fg-on-dark);
}
.section.dark .eyebrow { color: var(--accent-on-dark, var(--accent)); }
/* This rule is also what protects `.section-head p` (elsewhere in this
   file) from reading raw --fg-soft on --bg-deep, by coincidence: at
   (0,2,1) it out-specifies `.section-head p`'s (0,1,1). It was NOT
   written for that purpose -- portfolio/restaurant carry no equivalent
   and measured 2.71/2.75 on real builds for exactly that gap. Do not
   add a MORE specific rule than this (0,2,1) anywhere in this file
   without re-checking it still protects `.section-head p`. */
.section.dark p { color: rgba(251,250,248,.72); }
.section-head { max-width: 62ch; margin-bottom: var(--space-10); }
.section-head p { color: var(--fg-soft); font-size: var(--type-lg); }
.lede { font-size: var(--type-lg); color: var(--fg-soft); }
/* Same shape one level over (QA finding, 2026-09-14): `.section.dark p`
   above covers `<p class="lede">` by the same coincidence, but a
   `<div class="lede">` matches no type-selector rule at all and reads
   raw --fg-soft on --bg-deep, unmeasured. Fixed directly rather than
   left to coincidence. */
.section.dark .lede { color: var(--body-on-dark, var(--fg-on-dark, #ffffff)); }

/* ── What's on ───────────────────────────────────────────────────── */
.events { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.event {
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.event:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
/* The picture-block — empty, and named like a picture, which is what
   _find_visual looks for. Approved imagery lands here. */
.event-photo { aspect-ratio: 3/2; background: var(--bg-alt); background-size: cover; background-position: center; }
.event-body { padding: var(--space-5); }
.event-date { font-size: var(--type-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.event-body h3 { font-family: var(--font-body); font-size: var(--type-base); font-weight: 600; margin-top: var(--space-2); }
.event-body p { font-size: var(--type-sm); color: var(--fg-soft); }
/* Same specificity war as .tier-price above -- `.event-body p` is one
   class + a type selector, `.section.dark p` is two classes + a type
   selector, and the ambient rule wins regardless of `.event`'s own
   color fix. Three real ancestor classes (matching the actual grid ->
   card -> body nesting) beats it outright. */
.events .event .event-body p { color: var(--fg-soft); }

/* ── Membership tiers ────────────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.tier {
  display: flex; flex-direction: column; padding: var(--space-8) var(--space-6);
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.tier.featured { border-color: var(--accent); box-shadow: var(--shadow); }
.tier-price { font-family: var(--font-display); font-size: var(--type-3xl); margin: var(--space-3) 0; }
.tier-price span { font-family: var(--font-body); font-size: var(--type-sm); color: var(--fg-soft); }
/* Finding 5, real-build follow-up (2026-09-14): `.tier`'s own color
   fix (above) only helps a descendant with NO directly-matching rule
   of its own. If a worker renders the price as a `<p class="tier-
   price">` (the seeded template uses a bare <div>, but composed pages
   are worker-authored and not guaranteed to match exactly),
   `.section.dark p` (two classes + a type selector) directly matches
   it and beats an inherited value regardless of `.tier`'s own
   specificity -- QA measured 1.03 on a real build. Repeating the class
   selector is the standard way to out-rank a two-class rule
   tag-agnostically (CSS compares total class-selector COUNT, not
   unique classes, before type selectors are ever considered), so this
   works whether the element is a div, p, or anything else. */
.tier-price.tier-price.tier-price { color: var(--fg); }
.tier ul { margin: var(--space-4) 0 var(--space-6); padding: 0; list-style: none; flex: 1; }
.tier li { padding: var(--space-2) 0; font-size: var(--type-sm); color: var(--fg-soft); border-bottom: 1px solid var(--border-soft); }

/* ── Members-only strip ──────────────────────────────────────────── */
.members-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5);
  padding: var(--space-6); background: var(--accent-soft);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.members-note p { margin: 0; flex: 1; min-width: 16rem; font-size: var(--type-sm); color: var(--fg-soft); }
.members-note strong { display: block; color: var(--fg); font-size: var(--type-base); }
/* Same specificity war as .tier-price/.event-body p above. */
.members-note.members-note.members-note p { color: var(--fg-soft); }

.form { display: grid; gap: var(--space-4); max-width: 34rem; }
.form label { font-size: var(--type-sm); font-weight: 500; }
.form input, .form textarea {
  width: 100%; margin-top: var(--space-2); padding: var(--space-3) var(--space-4);
  font: inherit; font-size: var(--type-sm); color: var(--fg);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  outline: none; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form textarea { min-height: 7rem; resize: vertical; }
.form input:focus, .form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.footer { padding: var(--space-12) 0; background: var(--bg-alt); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-8); }
.footer h4 { font-size: var(--type-sm); margin: 0 0 var(--space-3); }
.footer ul { margin: 0; padding: 0; list-style: none; }
.footer li a { display: inline-block; padding: var(--space-2) 0; font-size: var(--type-sm); color: var(--fg-soft); text-decoration: none; }
.footer li a:hover { color: var(--accent); }
.fine { margin-top: var(--space-8); font-size: var(--type-xs); color: var(--fg-fade); }
/* Same specificity war as .tier-price above -- .fine has no guaranteed ancestor chain (a page-level disclaimer note), so the class is repeated on itself rather than scoped to a container that may not exist. */
.fine.fine.fine { color: var(--fg-fade); }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE — three breakpoints. Tablet keeps two columns; only the
   phone collapses to one.
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 1079px) {
  .container, .container-narrow { padding: 0 var(--space-5); }
  .section { padding: var(--space-16) 0; }
  .hero { padding: var(--space-16) var(--space-5) var(--space-12); }
  .events, .tiers { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .nav { padding: var(--space-3) var(--space-4); }
  .nav-links a { padding: var(--space-2); font-size: var(--type-xs); }
  .nav-cta { padding: var(--space-3) var(--space-4) !important; }
  .container, .container-narrow { padding: 0 var(--space-4); }
  .section { padding: var(--space-12) 0; }
  .hero { padding: var(--space-12) var(--space-4) var(--space-10); }
  .events, .tiers, .footer-grid { grid-template-columns: 1fr; }
  .hero-ctas .btn { flex: 1; text-align: center; }
  .members-note { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
