/* ==========================================================================
   Preble Volunteer Fire Fighting Association -- Site Styles
   Design tokens live at the top. Change these to re-theme the whole site.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Public+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  /* Colors */
  --ink:        #1a1714;   /* soot / asphalt background */
  --ink-2:      #241f1a;   /* slightly lighter panel on ink */
  --paper:      #efe9dc;   /* parchment / program paper */
  --paper-2:    #e4ddcb;   /* darker parchment panel */
  --red:        #c8272a;   /* fire engine red */
  --red-dark:   #8f1c1e;
  --yellow:     #f0b429;   /* caution yellow, accent only */
  --steel:      #948c7e;   /* secondary text on dark */
  --steel-dark: #6b6456;   /* secondary text on light */
  --white:      #fbf9f4;

  /* Type */
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --body:    'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* Layout */
  --max: 1180px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.4em;
  line-height: 1.05;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* --------------------------------------------------------------------
   Hazard stripe -- the site's signature divider. Used deliberately,
   at full-bleed page transitions only, never as generic decoration.
   -------------------------------------------------------------------- */
.hazard-stripe {
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    var(--yellow) 0px, var(--yellow) 22px,
    var(--ink) 22px, var(--ink) 44px
  );
}

/* --------------------------------------------------------------------
   Header / Nav
   -------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 3px solid var(--red);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}
.brand-badge {
  height: 54px;
  width: auto;
  flex-shrink: 0;
}
.brand-text {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.03em;
  line-height: 1.15;
}
.brand-text small {
  display: block;
  font-family: var(--mono);
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--steel);
}

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
nav.primary-nav a {
  color: var(--paper);
  text-decoration: none;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
}
nav.primary-nav a:hover,
nav.primary-nav a:focus-visible {
  background: var(--red);
  color: var(--white);
}
nav.primary-nav a.current {
  color: var(--yellow);
}
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--ink-2);
  border: 1px solid #3a332b;
  border-radius: var(--radius);
  min-width: 220px;
  padding: 6px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  font-size: 13px;
  padding: 10px 12px;
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  color: var(--yellow);
  font-size: 14px;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--paper);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--display);
  font-size: 13px;
  touch-action: manipulation;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 860px) {
  nav.primary-nav, .nav-phone { display: none; }
  .nav-toggle { display: inline-block; }
  .nav-row.open + .mobile-nav { display: flex; }
  .mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--ink-2);
    border-top: 1px solid #3a332b;
    padding: 8px 24px 20px;
  }
  .mobile-nav a {
    color: var(--paper);
    text-decoration: none;
    font-family: var(--display);
    letter-spacing: 0.03em;
    padding: 12px 0;
    border-bottom: 1px solid #34302a;
    text-transform: uppercase;
    font-size: 14px;
  }
  .mobile-nav .sub { padding-left: 16px; font-size: 13px; color: var(--steel); }
}

/* --------------------------------------------------------------------
   Seasonal announcement strip -- swap in/out between fundraisers,
   replacing the old index.php / index2.php swap-file approach.
   -------------------------------------------------------------------- */
.announce-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  padding: 12px 24px;
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}
.announce-strip .tag {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  background: var(--ink);
  color: var(--yellow);
  padding: 3px 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.announce-strip .go {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 13px;
  border-bottom: 2px solid var(--white);
  flex-shrink: 0;
}
.announce-strip:hover { background: var(--red-dark); }

/* --------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------- */
.hero {
  background: var(--ink);
  color: var(--white);
  padding: 40px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 240px;
  background: radial-gradient(ellipse at center, rgba(200,39,42,0.25), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  position: relative;
}
.eyebrow {
  font-family: var(--mono);
  color: var(--yellow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 14px;
  display: inline-block;
}
.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  color: var(--yellow);
}
.hero h1 span { color: var(--red); -webkit-text-stroke: 1px var(--yellow); }
.hero-sub {
  font-size: 1.1rem;
  color: var(--paper-2);
  max-width: 46ch;
  margin-top: 18px;
}
.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-logo {
  display: flex;
  justify-content: left;
  width: 100%;
}
.hero-logo img {
  width: 100%;
  max-width: 400px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}

@media (max-width: 860px) {
  .hero-logo { justify-content: flex-start; margin-top: 8px; }
  .hero-logo img { max-width: 0px; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 14px;
  padding: 14px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { border-color: var(--paper); color: var(--paper); }
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-dark { border-color: var(--ink); color: var(--ink); }
.btn-dark:hover { background: var(--ink); color: var(--white); }

/* Date block -- the "marquee sign" element */
.date-block {
  justify-self: end;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 40px 48px;
  text-align: center;
  transform: rotate(-2deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border: 4px solid var(--red);
  min-width: 300px;
}
.date-block .month {
  font-family: var(--mono);
  letter-spacing: 0.2em;
  color: var(--red);
  font-size: 22px;
}
.date-block .day {
  font-family: var(--display);
  font-size: 7.5rem;
  line-height: 1;
  margin: 10px 0;
}
.date-block .yr { font-family: var(--mono); color: var(--steel-dark); font-size: 20px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .date-block { justify-self: start; transform: rotate(-1deg); }
}

/* --------------------------------------------------------------------
   Ticket-stub cards (signature element)
   -------------------------------------------------------------------- */
.stub-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  margin: -46px auto 0;
  position: relative;
  z-index: 2;
  max-width: var(--max);
  padding: 0 24px;
}
.stub-row-inline {
  margin: 40px auto 0;
  max-width: none;
  padding: 0;
}
.stub {
  background: var(--white);
  border: 2px dashed var(--steel-dark);
  padding: 22px 18px;
  text-align: center;
  position: relative;
}
.stub + .stub { border-left: none; }
.stub::before, .stub::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  background: var(--paper);
  border-radius: 50%;
  transform: translateY(-50%);
}
.stub::before { left: -11px; }
.stub::after { right: -11px; }
.stub:first-child::before, .stub:last-child::after { display: none; }
.stub .label {
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-dark);
}
.stub .value {
  font-family: var(--display);
  font-size: 1.9rem;
  margin-top: 6px;
  color: var(--red);
}
.stub .sub { font-family: var(--mono); font-size: 12px; color: var(--steel-dark); margin-top: 2px; }

/* --------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------- */
section { padding: 48px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .eyebrow { color: var(--red); }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.section-head p { color: var(--steel-dark); font-size: 1.05rem; }

.section-dark { background: var(--ink); color: var(--paper); }
.section-dark .section-head p { color: var(--steel); }
.section-dark h2 { color: var(--white); }

/* Event program cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.card-grid-2col {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 700px) {
  .card-grid-2col { grid-template-columns: 1fr; }
}
.event-card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #ddd4bf;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0,0,0,0.12); }
.event-card img { height: 200px; object-fit: cover; width: 100%; }
.event-card .body { padding: 22px 24px 26px; }
.event-card .date-tag {
  font-family: var(--mono);
  font-size: 20px;
  color: var(--red);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.event-card .title-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.event-card h3 { font-size: 1.4rem; margin-top: 6px; }
.event-card a.card-link {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
}

/* Department group photo */
.group-photo {
  padding: 48px 0 0;
}
.group-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid #ddd4bf;
}

/* Embedded third-party forms (e.g. Cognito Forms) */
.embed-frame {
  background: var(--white);
  border: 1px solid #ddd4bf;
  border-radius: var(--radius);
  padding: 20px;
}
.embed-frame iframe {
  display: block;
  width: 100%;
  border: 0;
  overflow: hidden;
}

/* Featured event photo */
.feature-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #ddd4bf;
  line-height: 0;
}
.feature-photo img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
}

/* Class badges (legit numbered sequence -- real derby classes) */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}
.class-badge {
  background: var(--ink-2);
  border: 1px solid #3a332b;
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}
.class-badge .num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  color: var(--yellow);
  font-family: var(--display);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.class-badge .name {
  font-family: var(--display);
  font-size: 0.99rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--white);
}

/* Apparatus photo gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.gallery-item {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid #3a332b;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.08);
  opacity: 0.9;
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 8, 6, 0.92);
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: 2px solid var(--paper);
  color: var(--paper);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: var(--red); border-color: var(--red); }

/* Alert / rules bar */
.alert-bar {
  background: var(--yellow);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 22px 26px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  border-left: 6px solid var(--red);
}
.alert-bar strong { text-transform: uppercase; }

/* Downloads */
.doc-list { display: grid; gap: 12px; }
.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid #ddd4bf;
  border-radius: var(--radius);
  padding: 16px 20px;
  text-decoration: none;
  color: var(--ink);
}
.doc-row:hover { border-color: var(--red); }
.doc-row .name { font-family: var(--display); letter-spacing: 0.02em; }
.doc-row .tag { font-family: var(--mono); font-size: 12px; color: var(--steel-dark); }

/* Sponsor wall */
.tier-label {
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--red);
  border-bottom: 2px solid var(--red);
  display: inline-block;
  padding-bottom: 4px;
  margin-bottom: 20px;
}
.sponsor-tier { margin-bottom: 44px; }
.sponsor-grid { display: grid; gap: 20px; align-items: center; }
.sponsor-grid.platinum { grid-template-columns: 1fr; max-width: 420px; }
.sponsor-grid.gold { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.sponsor-grid.silver { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.sponsor-tile {
  background: var(--white);
  border: 1px solid #ddd4bf;
  border-radius: var(--radius);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
}
.sponsor-tile img { max-height: 60px; width: auto; margin: 0 auto; }
.sponsor-tile.large { min-height: 130px; padding: 16px; }
.sponsor-tile.large img { max-height: 110px; }
.bronze-list {
  columns: 3 220px;
  gap: 24px;
  font-family: var(--mono);
  font-size: 15.5px;
  color: var(--steel-dark);
  line-height: 2;
}
@media (max-width: 700px) { .bronze-list { columns: 2 160px; } }

/* Info / contact blocks */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.info-block h3 { font-size: 1.3rem; color: var(--red); }
.info-block .mono { font-family: var(--mono); font-size: 18px; }

/* Forms */
.form-grid { display: grid; gap: 16px; max-width: 560px; }
.form-grid label {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--steel-dark);
  display: block;
  margin-bottom: 6px;
}
.form-grid input, .form-grid textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c9bfa6;
  border-radius: var(--radius);
  font-family: var(--body);
  font-size: 15px;
  background: var(--white);
}
.form-grid input:focus, .form-grid textarea:focus {
  outline: 3px solid var(--yellow);
  outline-offset: 1px;
}

/* Footer */
footer.site-footer {
  background: var(--ink);
  color: var(--steel);
  padding: 48px 0 28px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #34302a;
}
.footer-grid h4 { color: var(--paper); font-size: 0.95rem; }
.footer-grid a { color: var(--steel); text-decoration: none; display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--yellow); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.max-prose { max-width: 62ch; }
.icon-links { display: flex; gap: 16px; flex-wrap: wrap; }
.icon-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid #ddd4bf;
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.icon-link:hover { border-color: var(--red); color: var(--red); }
