/* =============================================================
   Oaklands PAC - shared stylesheet.
   Aesthetic: bright, friendly, rounded - a modern take on a
   school community site. Light/dark theme via CSS custom properties.
   ============================================================= */

:root {
  --ink:      #1F2A24;   /* near-black green-grey - headings & body text */
  --ink-2:    #4E5F55;   /* secondary text */
  --bg:       #FBF8F1;   /* warm off-white page background */
  --bg-2:     #F1ECDD;   /* alternating section background */
  --line:     #E3DCC8;   /* hairlines / borders */
  --accent:   #F5A623;   /* sunshine yellow - accent on dark sections */
  --accent-2: #2E7D5B;   /* leaf green - accent on light (AA >= 4.5:1) */
  --sky:      #2F80B3;   /* sky blue - secondary accent */
  --dark:     #16362B;   /* deep green - dark sections / footer / hero */
  --on-dark:  #F1ECDD;
  --white:    #ffffff;
  --surface:  #ffffff;

  --display: "Baloo 2", "Segoe UI", sans-serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 14px;
  --maxw: 1180px;
  --gap:  clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ink:#F1ECDD; --ink-2:#BFCFC4; --bg:#122019; --bg-2:#182A21;
    --line:rgba(255,255,255,.14); --surface:#1B2E24;
    color-scheme:dark;
  }
}
:root[data-theme="dark"] {
  --ink:#F1ECDD; --ink-2:#BFCFC4; --bg:#122019; --bg-2:#182A21;
  --line:rgba(255,255,255,.14); --surface:#1B2E24;
  color-scheme:dark;
}
:root[data-theme="light"] { color-scheme:light; }

[hidden] { display: none !important; }

.sr-only {
  position:absolute !important; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}
:focus-visible { outline:2px solid var(--accent-2); outline-offset:2px; border-radius:2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *, *::before, *::after { transition:none !important; animation:none !important; }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-2); }
[id] { scroll-margin-top: 96px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.14;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.32rem; }
p  { font-size: 1.02rem; }

.eyebrow {
  font-family: var(--body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1rem;
}
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 56ch; line-height: 1.6; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gap); }
section { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.section-alt  { background: var(--bg-2); }
.section-dark { background: var(--dark); color: var(--on-dark); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .eyebrow { color: var(--accent); }
.section-dark .rule { background: var(--accent); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.rule { width: 56px; height: 4px; border-radius: 2px; background: var(--accent-2); border: 0; margin: 1.4rem 0; }
.center .rule { margin-left: auto; margin-right: auto; }
.measure { max-width: 60ch; }

.btn {
  display: inline-block;
  font-family: var(--body);
  font-size: 0.92rem; font-weight: 600;
  padding: 0.85rem 1.8rem;
  background: var(--accent-2); color: var(--white);
  border: 2px solid var(--accent-2);
  border-radius: 999px;
  cursor: pointer; transition: all .2s ease;
}
.btn:hover { background: var(--white); color: var(--accent-2); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { background: var(--bg-2); color: var(--ink); border-color: var(--accent-2); }
.btn-light { background: rgba(255,255,255,.14); color: var(--white); border-color: rgba(255,255,255,.6); }
.btn-light:hover { background: var(--white); color: var(--dark); border-color: var(--white); }
.link-arrow { font-size: .9rem; font-weight: 700; color: var(--accent-2); }
.link-arrow::after { content: " →"; }

/* ---- site-wide announcement banner ------------------------- */
.site-banner {
  background: var(--accent);
  color: var(--dark);
  font-family: var(--body);
  font-size: .9rem;
  line-height: 1.5;
  padding: .65rem 1rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  justify-content: center;
}
.site-banner__message { flex: 1; text-align: center; }
.site-banner__link { color: var(--dark); text-decoration: underline; margin-left: .4em; white-space: nowrap; }
.site-banner__close {
  flex-shrink: 0; background: none; border: none;
  color: rgba(22,54,43,.55); cursor: pointer; font-size: 1rem; line-height: 1;
  padding: 0 0 0 .5rem; transition: color .15s;
}
.site-banner__close:hover { color: var(--dark); }
.site-banner--sunshine { background: var(--accent); color: var(--dark); }
.site-banner--sky { background: var(--sky); color: #fff; }
.site-banner--sky .site-banner__link { color: #fff; text-decoration-color: rgba(255,255,255,.6); }
.site-banner--sky .site-banner__close { color: rgba(255,255,255,.7); }
.site-banner--green { background: var(--dark); color: var(--on-dark); }
.site-banner--green .site-banner__link { color: var(--accent); }
.site-banner--green .site-banner__close { color: rgba(241,236,221,.6); }

/* ---- header / nav ----------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,248,241,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
:root[data-theme="dark"] .site-header { background: rgba(18,32,25,.85); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .site-header { background: rgba(18,32,25,.85); }
}
.nav {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gap); max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.brand .mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 1.1rem;
}
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--ink); cursor: pointer; line-height: 1; }
.nav-menu { display: flex; align-items: center; gap: 1.8rem; }
.nav-links { display: flex; gap: 1.6rem; list-style: none; align-items: center; margin: 0; }
.nav-links a {
  font-size: 0.86rem; font-weight: 600; color: var(--ink-2); padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); border-bottom-color: var(--accent-2); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; margin-left: .5rem; flex: 0 0 auto;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2); cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--accent-2); }
.theme-toggle svg { display: block; }
.theme-toggle .i-moon { display: none; }
.theme-toggle .i-sun  { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .i-sun  { display: none; }
  :root:not([data-theme]) .theme-toggle .i-moon { display: block; }
}
:root[data-theme="light"] .theme-toggle .i-sun  { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"]  .theme-toggle .i-sun  { display: none; }
:root[data-theme="dark"]  .theme-toggle .i-moon { display: block; }

/* ---- hero -------------------------------------------------- */
.hero {
  position: relative; min-height: 70vh; display: flex; align-items: center;
  background: linear-gradient(120deg, var(--dark) 0%, #1F4A3A 100%);
  color: var(--white);
}
.hero-inner { max-width: 760px; padding: 4rem 0; }
.hero .eyebrow { color: var(--accent); }
.hero h1 { color: var(--white); }
.hero .lead { color: rgba(255,255,255,.85); margin: 1.4rem 0 2.2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.page-banner { padding: clamp(4rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem); }
.page-banner h1 { max-width: 18ch; }
.page-banner-photo {
  width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius);
  margin-top: 2.2rem;
}
.page-banner-photo--contain { object-fit: contain; background: var(--bg-2); }
.mission-photo {
  width: 100%; min-height: 320px; object-fit: cover; border-radius: var(--radius);
}
.mission-photo--contain { object-fit: contain; background: var(--bg-2); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 7vw, 5rem); align-items: center; }
.split.flip > div:first-child { order: 2; }
.placeholder-media {
  width: 100%; min-height: 320px; border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, var(--bg-2), var(--bg-2) 14px, var(--line) 14px, var(--line) 16px);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); font-size: .85rem; font-weight: 600; text-align: center; padding: 1rem;
  border: 1px dashed var(--line);
}

/* ---- grid / tiles ------------------------------------------ */
.grid { display: grid; gap: clamp(1.4rem, 3.5vw, 2.2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.tile { padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tile h3 { margin-bottom: .5rem; }
.tile p { color: var(--ink-2); font-size: .98rem; }

/* ---- date list (meeting dates) ------------------------------ */
.date-list { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.date-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; font-weight: 600; font-size: .95rem; color: var(--ink);
}
.date-chip--agm { border-color: var(--accent-2); color: var(--accent-2); }
.date-chip-tag {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--accent-2); background: var(--bg-2); padding: .18rem .5rem; border-radius: 999px;
}

/* ---- featured cards (home page) ------------------------------ */
.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.featured-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.featured-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(22,54,43,.12); }
.featured-card-photo {
  width: 100%; aspect-ratio: 16 / 9; background: var(--bg-2); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.featured-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-card-photo--contain { background: linear-gradient(135deg, var(--bg-2), var(--surface)); padding: 1.5rem; }
.featured-card-photo--contain img { width: auto; height: auto; max-width: 65%; max-height: 65%; object-fit: contain; }
.featured-card-photo.placeholder-media { border-radius: 0; border: none; min-height: 0; }
.featured-card-body { padding: 1.8rem; display: flex; flex-direction: column; gap: .85rem; flex: 1; }
.featured-card-body h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
.featured-card-body p { color: var(--ink-2); font-size: 1rem; line-height: 1.55; flex: 1; }
.featured-card-body .btn { align-self: flex-start; pointer-events: none; }
@media (max-width: 760px) {
  .featured-grid { grid-template-columns: 1fr; }
}

/* ---- stat band -------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem; }
.stat .num { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; color: var(--accent); line-height: 1.2; }
.stat .label { font-size: .82rem; color: rgba(241,236,221,.75); margin-top: .6rem; }

/* ---- fundraiser cards --------------------------------------- */
.fundraiser-list { display: grid; gap: 1.4rem; }
.fundraiser-card {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 1.6rem; align-items: center;
  padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.fundraiser-card .placeholder-media { min-height: 120px; margin: 0; font-size: .72rem; }
.fundraiser-card .fundraiser-photo {
  width: 100%; min-height: 120px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  padding: .85rem; overflow: hidden;
}
.fundraiser-card .fundraiser-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fundraiser-card h3 { margin-bottom: .3rem; }
.fundraiser-card p { color: var(--ink-2); font-size: .95rem; }
.fundraiser-card .go { white-space: nowrap; }

/* ---- board / people ----------------------------------------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 2.4rem); }
.member .photo {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 999px;
  background: var(--bg-2); display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 2rem; color: var(--accent-2);
  border: 1px solid var(--line); margin-bottom: 1rem; overflow: hidden; position: relative;
}
.member .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.member h3 { margin-bottom: .1rem; }
.member .role { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); }

/* ---- forms ------------------------------------------------- */
.form-wrap { max-width: 720px; }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: .45rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; font-family: var(--body); font-size: 1rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent-2); border-color: var(--accent-2); }
.field textarea { min-height: 140px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.consent { margin: 0 0 1.5rem; }
.consent label { display: flex; align-items: flex-start; gap: .5rem; font-size: .85rem; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.consent input { width: auto; margin: .2rem 0 0; flex-shrink: 0; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,6vw,4rem); }
.info-line { margin-bottom: 1.3rem; }
.info-line .k { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); display:block; margin-bottom: .25rem; }
.info-line .v { font-size: 1.02rem; color: var(--ink); }

/* ---- footer ------------------------------------------------ */
.site-footer { background: var(--dark); color: rgba(241,236,221,.75); padding: 3.5rem 0 2rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.3fr; gap: 2.4rem; margin-bottom: 2.5rem; }
.site-footer .brand { color: var(--white); }
.site-footer .brand .mark { background: var(--accent); color: var(--dark); }
.site-footer h4 { color: var(--white); font-family: var(--body); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; font-weight: 700; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: .5rem; }
.site-footer a { color: rgba(241,236,221,.75); }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-top: 1.4rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .8rem; color: rgba(241,236,221,.55); }
.land-ack { max-width: 75ch; font-size: .82rem; color: rgba(241,236,221,.6); margin-top: 1rem; line-height: 1.6; }

/* ---- calendar embed ------------------------------------------ */
.calendar-wrap { max-width: 980px; margin: 0 auto; }
.calendar-frame { width: 100%; min-height: 600px; border: 0; border-radius: var(--radius); background: var(--surface); }
.calendar-fallback { text-align: center; margin-top: 1.2rem; font-size: .9rem; color: var(--ink-2); }

/* ---- responsive ------------------------------------------- */
@media (max-width: 920px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr; gap: 2rem; text-align: left; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gap);
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .8rem 0; width: 100%; }
}
@media (max-width: 800px) {
  .split, .contact-grid, .footer-grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .fundraiser-card { grid-template-columns: 1fr; text-align: left; }
}
@media (max-width: 540px) {
  .team-grid, .field-row { grid-template-columns: 1fr; }
}

/* ---- bylaws / legal document ------------------------------- */
.toc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-top: 1.5rem; }
.toc-grid h3 { font-size: 1rem; margin-bottom: .8rem; }
.toc-list { list-style: none; }
.toc-list li { margin-bottom: .55rem; }
.toc-list a { font-size: .92rem; color: var(--accent-2); border-bottom: 1px solid transparent; }
.toc-list a:hover { border-bottom-color: var(--accent-2); }
@media (max-width: 700px) { .toc-grid { grid-template-columns: 1fr; } }

.legal-text h3 { scroll-margin-top: 110px; margin-top: 2.6rem; margin-bottom: .8rem; }
.legal-text h3:first-of-type { margin-top: 0; }
.legal-text p, .legal-text li { color: var(--ink-2); line-height: 1.65; }
.legal-text p { margin-bottom: 1.1rem; }
.legal-text ul, .legal-text ol { margin: 0 0 1.3rem 1.3rem; }
.legal-text ul li, .legal-text ol li { margin-bottom: .6rem; }
.legal-text strong { color: var(--ink); }
.legal-amended { font-style: italic; font-size: .9rem; margin-top: 2.5rem; }
