/*
Theme Name: LVVA Derby
Theme URI: https://waucondaicefishingderby.com
Author: Rob McLamore
Description: Custom theme for the LVVA Ice Fishing Derby — a winter event site benefiting veteran service organizations. Deep lake-ice palette with tip-up flag orange accents.
Version: 1.1.5
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: lvva-derby
*/

/* ==========================================================
   Design tokens
   ========================================================== */
:root {
  --ice-deep:   #0E2A3C;  /* lake under the ice */
  --lake-blue:  #1D5C7A;  /* mid-depth blue */
  --ice-pale:   #EAF2F5;  /* frozen surface */
  --frost:      #FFFFFF;
  --flag:       #F25C1F;  /* tip-up flag blaze orange */
  --flag-dark:  #C74712;
  --ink:        #12232E;
  --ink-soft:   #4A6272;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1140px;
  --wrap-narrow: 760px;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(14, 42, 60, 0.12);
}

/* ==========================================================
   Reset / base
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ice-pale);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lake-blue); }
a:hover { color: var(--flag-dark); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--flag);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--ice-deep);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 700; }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.7rem); font-weight: 600; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.wrap--narrow { max-width: var(--wrap-narrow); }

.screen-reader-text {
  position: absolute !important;
  clip-path: inset(50%);
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ==========================================================
   Signature: tip-up flag eyebrow + ice-line divider
   ========================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  color: var(--flag-dark);
  margin-bottom: 0.75rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 25px;
  height: 31px;
  background-color: #F25C1F;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-size: contain;
  mask-repeat: no-repeat;
  vertical-align: middle;
  margin-bottom: -3px;
  margin-right: 4px;
}
.section--frost .eyebrow::before,
.entry-content .eyebrow::before {
  background-color: #0E2A3C;
}

.ice-line {
  border: 0;
  height: 8px;
  margin: 0;
  background:
    linear-gradient(135deg, transparent 49%, var(--ice-pale) 50%) 0 0 / 24px 8px repeat-x;
}
.ice-line--deep {
  background:
    linear-gradient(135deg, transparent 49%, var(--ice-deep) 50%) 0 0 / 24px 8px repeat-x;
}

/* ==========================================================
   Announcement bar
   ========================================================== */
.announce {
  background: var(--flag);
  color: #fff;
  text-align: center;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.announce a { color: #fff; text-decoration: underline; }

/* ==========================================================
   Header / nav
   ========================================================== */
.site-header {
  background: var(--ice-deep);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  max-width: var(--wrap);
  margin: 0 auto;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-brand .custom-logo-link { display: flex; }
.site-brand img,
.site-brand .custom-logo,
.custom-logo {
  max-height: 72px !important;
  width: auto !important;
  height: auto;
}
@media (max-width: 960px) {
  .site-brand img,
  .site-brand .custom-logo,
  .custom-logo { max-height: 54px !important; }
}
.site-brand__link { text-decoration: none; }
.site-brand__text {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--frost);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  line-height: 1;
}
.site-brand__text small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: #9CC3D6;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid #35586E;
  border-radius: var(--radius);
  color: var(--frost);
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
}
.site-nav a {
  display: block;
  padding: 0.55rem 0.75rem;
  color: #D7E7EE;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--flag);
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.is-open { display: block; }
  .site-header__inner { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; padding-bottom: 0.75rem; }
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(255,255,255,0.14), transparent 60%),
    linear-gradient(180deg, var(--ice-deep) 0%, var(--lake-blue) 78%, #2E7396 100%);
  color: var(--frost);
  overflow: hidden;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(4rem, 10vw, 7.5rem);
}
.hero::after { /* drilled ice holes */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 46px at 88% 78%, rgba(255,255,255,0.10) 44px, transparent 46px),
    radial-gradient(circle 30px at 78% 30%, rgba(255,255,255,0.08) 28px, transparent 30px),
    radial-gradient(circle 60px at 8% 88%, rgba(255,255,255,0.07) 58px, transparent 60px);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: var(--frost); max-width: 15ch; }
.hero .eyebrow { color: #FFB48C; }
.hero__lede {
  font-size: 1.2rem;
  max-width: 46ch;
  color: #DCEBF2;
  margin: 0 0 1.75rem;
}
.hero__meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 2rem;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero__meta span {
  padding: 0.55rem 1.1rem;
  font-size: 1.05rem;
}
.hero__meta span + span { border-left: 2px solid rgba(255,255,255,0.35); }

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.15rem;
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.btn--flag { background: var(--flag); color: #fff; }
.btn--flag:hover { background: var(--flag-dark); color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--frost);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.6);
  margin-left: 0.6rem;
}
.btn--ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Hero two-column layout when artwork is set */
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.hero__art img {
  max-width: min(100%, 520px);
  margin: 0 auto;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.35));
}
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: 2; margin-top: 1.5rem; }
  .hero__art img { max-width: 340px; }
}

/* ==========================================================
   Sections
   ========================================================== */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--frost { background: var(--frost); }
.section--deep { background: var(--ice-deep); color: #D7E7EE; }
.section--deep h2, .section--deep h3 { color: var(--frost); }
.section--deep .eyebrow { color: #FFB48C; }

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  background: var(--frost);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem 1.5rem;
  border-top: 5px solid var(--flag);
}
.card h3 { margin-top: 0; }
.card p { color: var(--ink-soft); margin-bottom: 0; }
.card a.more {
  display: inline-block;
  margin-top: 0.85rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-decoration: none;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  align-items: center;
  margin-top: 2rem;
}
.sponsor-grid img {
  margin: 0 auto;
  max-height: 90px;
  width: auto;
  filter: grayscale(1) contrast(0.9);
  opacity: 0.85;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.sponsor-grid img:hover { filter: none; opacity: 1; }

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

/* ==========================================================
   Interior pages
   ========================================================== */
.page-hero {
  background: linear-gradient(180deg, var(--ice-deep), var(--lake-blue));
  color: var(--frost);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.page-hero h1 { color: var(--frost); margin-bottom: 0; }
.entry-content { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.entry-content > .wrap--narrow > *:first-child { margin-top: 0; }
.entry-content h2 { margin-top: 2rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 5px solid var(--flag);
  background: var(--frost);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.entry-content .wp-block-table table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  background: var(--frost);
}
.entry-content th, .entry-content td {
  padding: 0.65rem 0.9rem;
  border: 1px solid #C9DAE2;
  text-align: left;
}
.entry-content th {
  background: var(--ice-deep);
  color: var(--frost);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  background: var(--ice-deep);
  color: #9CC3D6;
  padding: 3rem 0 2rem;
  font-size: 0.95rem;
}
.site-footer a { color: #D7E7EE; }
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.site-footer h3 {
  color: var(--frost);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer__legal {
  border-top: 1px solid #24455A;
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Anchor offset — clears the sticky header on jump links */
h2[id], h3[id] {
  scroll-margin-top: 90px;
}

/* Responsive map embed */
.map-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
}
.map-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}
@media (max-width: 600px) {
  .map-embed {
    padding-bottom: 75%;
  }
}

/* =====================================================
   Mobile fixes — hero meta strip, buttons, cards
   ===================================================== */
@media (max-width: 600px) {

  /* Hero: clip decorative circles */
  .hero { overflow: hidden; }

  /* Hero meta strip: each item full width, stacked */
  .hero__meta {
    flex-direction: column;
    width: 100%;
  }
  .hero__meta span {
    border-left: 0 !important;
    border-top: 2px solid rgba(255,255,255,0.35);
    text-align: center;
    width: 100%;
  }
  .hero__meta span:first-child { border-top: 0; }

  /* Hero buttons: both full width, stacked */
  .hero .btn,
  .btn--ghost {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin-left: 0;
    margin-top: 0.6rem;
  }
  .hero .btn:first-child { margin-top: 0; }

  /* Hero grid: single column, art shows above headline on mobile */
  .hero__grid {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }
  .hero__art {
    order: -1;
    text-align: center;
    margin-bottom: 1rem;
  }
  .hero__art img {
    max-width: 220px !important;
    margin: 0 auto;
  }

  /* Cards: single column */
  .card-grid { grid-template-columns: 1fr; }

  /* Sponsor grid: two columns */
  .sponsor-grid { grid-template-columns: repeat(2, 1fr); }

  /* Eyebrow */
  .eyebrow { font-size: 0.8rem; }

  /* Section padding */
  .section { padding: 2rem 0; }
}
