/* Half Moon Bay Volunteer Fire Department — site styles */

/* Poppins (SIL Open Font License), self-hosted */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/poppins-700.woff2") format("woff2"); }

:root {
  --ink: #1b1d23;
  --ink-2: #2a2d35;
  --gold: #f2b318;
  --gold-dark: #b98200;
  --red: #c8281c;
  --red-dark: #9e1d13;
  --paper: #ffffff;
  --paper-2: #f5f3ef;
  --text: #22252b;
  --muted: #5b606b;
  --line: #e2ded6;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px rgb(0 0 0 / .08);
  --wrap: 72rem;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red); text-underline-offset: .18em; }
a:hover { color: var(--red-dark); }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 46rem; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--gold); color: var(--ink); padding: .6rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ---------- Header ---------- */

.site-header {
  background: var(--ink);
  color: #fff;
  border-bottom: 4px solid var(--gold);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4.75rem;
}

.brand {
  display: flex; align-items: center; gap: .75rem;
  color: #fff; text-decoration: none; padding: .5rem 0;
}
.brand:hover { color: #fff; }
.brand img { width: 3.6rem; height: auto; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; line-height: 1.1;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em;
}
.brand-name small {
  display: block; font-family: var(--font); font-weight: 500;
  font-size: .72rem; letter-spacing: .12em; color: var(--gold);
}

.nav-toggle {
  display: none;
  background: transparent; color: #fff; border: 2px solid rgb(255 255 255 / .35);
  border-radius: 8px; padding: .45rem .7rem; font: inherit; font-weight: 600; cursor: pointer;
  align-items: center; gap: .5rem;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 1.2rem; height: 2px; background: currentColor; position: relative;
  transition: transform .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.site-nav a {
  display: block; color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .55rem .8rem; border-radius: 6px;
}
.site-nav a:hover { background: rgb(255 255 255 / .1); color: #fff; }
.site-nav a[aria-current] { color: var(--gold); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
.site-nav .nav-911 a { background: var(--red); margin-left: .5rem; }
.site-nav .nav-911 a:hover { background: var(--red-dark); }

@media (max-width: 960px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; padding-bottom: 1rem; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: .75rem .5rem; border-bottom: 1px solid rgb(255 255 255 / .08); }
  .site-nav a[aria-current] { box-shadow: inset 4px 0 0 var(--gold); padding-left: 1rem; }
  .site-nav .nav-911 a { margin: .75rem 0 0; text-align: center; border-radius: 6px; border: 0; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--ink); color: #e9e9ec; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }

.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: var(--red); margin-bottom: .6rem;
}
.section-dark .eyebrow, .hero .eyebrow { color: var(--gold); }

.lead { font-size: 1.2rem; color: var(--muted); }
.section-dark .lead { color: #c9cad0; }

/* ---------- Hero ---------- */

.hero {
  position: relative; color: #fff; isolation: isolate;
  background: var(--ink);
  min-height: clamp(24rem, 60vh, 38rem);
  display: grid; align-items: end;
}
.hero picture, .hero > img { position: absolute; inset: 0; z-index: -2; }
.hero picture img, .hero > img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(15 17 22 / .25) 0%, rgb(15 17 22 / .55) 45%, rgb(15 17 22 / .9) 100%);
}
.hero .wrap { padding: 4rem 0 3.5rem; }
.hero h1 { color: #fff; max-width: 18ch; text-shadow: 0 2px 16px rgb(0 0 0 / .4); }
.hero p { font-size: 1.2rem; max-width: 38rem; color: #eceff3; }

.page-hero { background: var(--ink); color: #fff; padding: 3.5rem 0 3rem; border-bottom: 1px solid var(--ink-2); }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p { margin: .75rem 0 0; color: #c9cad0; font-size: 1.15rem; max-width: 40rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--gold); color: var(--ink); text-decoration: none;
  font-weight: 700; padding: .8rem 1.3rem; border-radius: 8px; border: 2px solid var(--gold);
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: #ffc634; border-color: #ffc634; color: var(--ink); }
.btn-outline { background: transparent; color: #fff; border-color: rgb(255 255 255 / .6); }
.btn-outline:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Announcement ---------- */

.announcement {
  background: var(--gold); color: var(--ink);
}
.announcement .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 2rem; padding: 1.25rem 0;
}
.announcement h2 { font-size: 1.5rem; margin: 0; }
.announcement p { margin: 0; font-weight: 600; }

/* ---------- Layout helpers ---------- */

.split { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: center; }
@media (min-width: 820px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-reverse > :first-child { order: 2; }
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35rem; }
.card p:last-child { margin-bottom: 0; }

a.card { display: block; color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--gold); color: inherit; }
a.card .card-link { color: var(--red); font-weight: 600; font-size: .95rem; }
.card-ext::after { content: " ↗"; }

.card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.card-icon {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--gold); margin-bottom: 1rem;
}
.card-icon svg { width: 1.4rem; height: 1.4rem; }

/* ---------- Conditions bar (rain / wind / air / fire / power) ---------- */

.conditions { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.conditions a {
  display: flex; align-items: flex-start; gap: .75rem;
  background: var(--ink-2); color: #fff; text-decoration: none; border-radius: var(--radius);
  padding: 1rem 1.1rem; border: 1px solid rgb(255 255 255 / .08);
}
.conditions a:hover { border-color: var(--gold); color: #fff; }
.conditions svg { width: 1.6rem; height: 1.6rem; color: var(--gold); flex: none; margin-top: .15rem; }
.conditions strong { display: block; text-transform: capitalize; }
.conditions span { font-size: .85rem; color: #b8bac2; }

/* ---------- Timeline (About) ---------- */

.timeline { list-style: none; margin: 2rem 0 0; padding: 0; border-left: 3px solid var(--gold); }
.timeline li { position: relative; padding: 0 0 1.75rem 1.75rem; }
.timeline li::before {
  content: ""; position: absolute; left: -.6rem; top: .35rem; width: .95rem; height: .95rem;
  border-radius: 50%; background: var(--red); border: 3px solid var(--paper-2);
}
.timeline .year {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink);
}
.timeline p { margin: .2rem 0 0; }

/* ---------- Events ---------- */

.event {
  display: grid; gap: 1.5rem; grid-template-columns: auto 1fr; align-items: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.event-date {
  width: 4.5rem; text-align: center; border-radius: 8px; overflow: hidden;
  background: var(--paper); border: 2px solid var(--ink); line-height: 1;
}
.event-date .m { display: block; background: var(--ink); color: var(--gold); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; padding: .35rem 0; }
.event-date .d { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; padding: .4rem 0; color: var(--ink); }
.event-date .y { display: block; font-size: .75rem; color: var(--muted); padding-bottom: .35rem; }
.event h3 { margin: 0 0 .25rem; }
.event h3 a { color: var(--ink); text-decoration: none; }
.event h3 a:hover { color: var(--red); }
.event-meta { color: var(--muted); font-size: .95rem; margin-bottom: .75rem; }
.event-past { opacity: .85; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; background: var(--paper-2); color: var(--muted); padding: .2rem .5rem; border-radius: 4px; margin-left: .5rem; vertical-align: middle; }

.empty-state {
  text-align: center; padding: 2.5rem 1.5rem; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted);
}
.empty-state h3 { color: var(--ink); }

.banner-img { border-radius: var(--radius); margin-bottom: 2rem; box-shadow: var(--shadow); width: 100%; }

.back-link { display: inline-block; margin-bottom: 1.5rem; font-weight: 600; text-decoration: none; }
.back-link::before { content: "← "; }

/* ---------- Video ---------- */

.video-embed { position: relative; aspect-ratio: 16 / 9; margin: 2rem 0 .75rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--ink); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Store ---------- */

.product-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.product-pair img { border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }

/* ---------- Contact ---------- */

.contact-callout {
  display: flex; gap: 1rem; align-items: center;
  background: #fdecea; border: 1px solid #f3c2bd; border-left: 6px solid var(--red);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 2rem;
}
.contact-callout strong { font-size: 1.1rem; color: var(--red-dark); }
.contact-callout svg { width: 2rem; height: 2rem; color: var(--red); flex: none; }

dl.contact-list { margin: 0; display: grid; gap: 1.25rem; }
dl.contact-list dt { font-weight: 700; color: var(--ink); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }
dl.contact-list dd { margin: .2rem 0 0; font-size: 1.15rem; }


/* ---------- Footer ---------- */

.site-footer { background: #121318; color: #b9bbc3; font-size: .95rem; border-top: 4px solid var(--red); }
.site-footer .wrap { padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .9rem; font-family: var(--font); }
.site-footer a { color: #e5e6ea; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.site-footer address { font-style: normal; }
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer-brand img { width: 4.5rem; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / .08);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .85rem; color: #8b8e98;
}

/* ---------- Utilities ---------- */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  .hero { min-height: 0; color: #000; }
  .hero::after, .hero picture { display: none; }
  .hero h1, .hero p { color: #000; text-shadow: none; }
}
