/* ============================================================
   Down East Music — shared styles
   "Down home" Maritime country: kraft cream, barn red,
   harvest gold, walnut-brown ink, hand-lettered touches.
   ============================================================ */

/* Fonts: slab serif for a warm Americana feel + a hand-lettered
   accent. Loaded from Google Fonts in each page's <head>, with
   system fallbacks so the site still works if they don't load. */

:root {
  --bg:        #f4ead6;   /* warm kraft cream */
  --surface:   #fffdf6;   /* warm paper white */
  --ink:       #3a2b20;   /* walnut brown */
  --ink-soft:  #6b5644;   /* faded bark */
  --muted:     #998772;   /* dry straw */
  --line:      #e4d4b8;   /* tan rule */
  --accent:    #b23a2e;   /* barn red */
  --accent-dk: #8f2c22;   /* deep barn red */
  --gold:      #cf9526;   /* harvest gold */
  --gold-dk:   #a9781a;
  --pine:      #4a6b52;   /* muted pine green */
  --shadow:    0 12px 30px rgba(58, 43, 32, 0.14);
  --radius:    10px;
  --wrap:      1080px;
  --serif: "Zilla Slab", "Rockwell", "Roboto Slab", "Bitter", Georgia, serif;
  --hand:  "Caveat", "Segoe Script", "Bradley Hand", cursive;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* subtle paper grain over the whole page */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: var(--accent-dk); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* hand-lettered kicker */
.kicker {
  font-family: var(--hand); color: var(--accent);
  font-size: 1.5rem; line-height: 1; margin: 0 0 6px;
  transform: rotate(-2deg); transform-origin: left center;
}

/* guitar-pick motif — echoes the logo mark; inherits currentColor */
.pick {
  display: inline-block; width: 0.72em; height: 0.79em; vertical-align: -0.06em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 132'%3E%3Cpath d='M60,128 C38,110 8,80 8,46 C8,18 30,4 60,4 C90,4 112,18 112,46 C112,80 82,110 60,128 Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 132'%3E%3Cpath d='M60,128 C38,110 8,80 8,46 C8,18 30,4 60,4 C90,4 112,18 112,46 C112,80 82,110 60,128 Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 234, 214, 0.94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 2px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 92px; }
.brand {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 700;
  letter-spacing: 0.005em; color: var(--ink); display: flex; align-items: center; gap: 10px;
}
.brand:hover { text-decoration: none; }
/* logo lockup — min width 180px per brand guidance */
.logo-lockup { width: 210px; height: auto; display: block; }
.brand .brand-mark {
  font-family: var(--hand); font-size: 1.15rem; letter-spacing: 0;
  color: var(--accent); font-weight: 700; transform: rotate(-4deg);
}
.brand-admin img { display: block; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--ink-soft); font-size: 0.96rem; font-weight: 600; letter-spacing: 0.01em; }
.nav-links a:hover { color: var(--accent-dk); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--ink); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 70px;
  border-bottom: 2px solid var(--line);
  background:
    radial-gradient(1100px 420px at 82% -12%, rgba(207,149,38,0.20), transparent 62%),
    radial-gradient(900px 400px at 2% 118%, rgba(178,58,46,0.14), transparent 60%);
}

/* Photo hero — used on the home page */
.hero-photo {
  position: relative; border-bottom: 2px solid var(--line);
  padding: 132px 0 118px;
  background-image:
    /* full-coverage scrim keeps text legible over any part of the photo */
    linear-gradient(180deg, rgba(20,12,8,0.68) 0%, rgba(20,12,8,0.72) 55%, rgba(20,12,8,0.86) 100%),
    /* directional wash deepens the area behind the copy */
    linear-gradient(100deg, rgba(20,12,8,0.82) 0%, rgba(20,12,8,0.62) 52%, rgba(20,12,8,0.22) 92%),
    var(--hero-img);
  background-size: cover, cover, cover;
  background-position: center, center, center 32%;
  color: #fff;
}
.hero.hero-photo h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.55); }
.hero.hero-photo p.lede {
  color: #fff; font-weight: 500;
  text-shadow: 0 1px 10px rgba(0,0,0,0.65), 0 1px 3px rgba(0,0,0,0.45);
}
.hero.hero-photo .kicker { color: var(--gold); }
.hero.hero-photo h1 .u { background-image: linear-gradient(transparent 62%, rgba(207,149,38,0.55) 62%); }
.hero.hero-photo .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.65); }
.hero-photo .btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.hero-credit {
  position: absolute; right: 18px; bottom: 12px;
  font-size: 0.74rem; color: rgba(255,255,255,0.62); letter-spacing: 0.02em;
}

/* Photo strip — a band of images from the archive */
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.strip a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; border: 2px solid var(--line); }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.strip a:hover img { transform: scale(1.07); }
@media (max-width: 900px) { .strip { grid-template-columns: repeat(3, 1fr); } }
.hero .kicker { font-size: 1.7rem; margin-bottom: 10px; }
.hero h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.9rem); line-height: 1.06;
  margin: 0 0 20px; letter-spacing: -0.005em;
}
.hero h1 .u {
  background-image: linear-gradient(transparent 62%, rgba(207,149,38,0.45) 62%);
  padding: 0 2px;
}
.hero p.lede { font-size: 1.22rem; color: var(--ink-soft); max-width: 620px; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 0.98rem; font-weight: 700;
  padding: 12px 24px; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-dk); }
.btn-primary:hover { background: var(--accent-dk); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(58,43,32,0.04); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 34px; gap: 18px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--serif); font-weight: 700; font-size: 2.1rem; margin: 0; letter-spacing: -0.005em; }
.section-head .sub { font-family: var(--hand); color: var(--gold-dk); margin: 2px 0 0; font-size: 1.35rem; }
.section-alt { background: var(--surface); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }

/* hand-drawn style divider */
.divider { display: flex; align-items: center; gap: 16px; color: var(--gold); margin: 8px 0; }
.divider::before, .divider::after { content: ""; height: 2px; flex: 1; background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 16px); }
.divider .glyph { font-size: 1.1rem; color: var(--accent); }

/* ---------- Festival feature tiles ---------- */
.fest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.fest-card {
  position: relative; border-radius: 14px; overflow: hidden;
  min-height: 300px; display: flex; align-items: flex-end;
  color: #fff; border: 2px solid rgba(0,0,0,0.08);
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.fest-card:hover { transform: translateY(-4px); text-decoration: none; box-shadow: 0 18px 40px rgba(58,43,32,0.22); }
.fest-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.10) 15%, rgba(0,0,0,0.78) 100%); }
.fest-card.cbmf { background: linear-gradient(150deg, #d98a24 0%, #b23a2e 55%, #6e2018 100%); }
.fest-card.sommo { background: linear-gradient(150deg, #4a6b52 0%, #2c4a56 55%, #22303a 100%); }
/* photo-backed festival tile */
.fest-card.has-photo { background-size: cover; background-position: center; }

/* ------------------------------------------------------------------
   Photo assignments live HERE, never in inline style="" attributes.
   Netlify's HTML minifier re-quotes attributes and will mangle a
   url('...') into url(\'...\'), which browsers discard — the image
   then silently fails to paint. Unquoted url() in a .css file is safe.
   To swap a photo, change the filename below.
   ------------------------------------------------------------------ */
.hero-photo.hero-cbmf { --hero-img: url(images/b9cc46_6689a7148afa484f957f6b0817503c2f.jpg); }
/* The tile is ~2.7:1 but the photo is 1.5:1, so `cover` crops ~45% of its
   height. Centred, that clipped the top of the hat — bias the crop upward. */
.fest-card.cbmf.has-photo {
  background-image: url(images/b9cc46_7bb6a298663f42eb8174f50006ba9954.jpg);
  background-position: 50% 18%;
}
/* single-tile layout (used while a festival is parked) */
.fest-grid-single { grid-template-columns: 1fr; }
.fest-grid-single .fest-card { min-height: 380px; }
.fest-grid-single .fest-body { max-width: 620px; }
.fest-grid-single .fest-card h3 { font-size: 2.3rem; }
.fest-body { position: relative; z-index: 1; padding: 30px 30px 28px; }
.fest-tag { font-family: var(--hand); font-size: 1.25rem; color: rgba(255,255,255,0.92); display: block; margin-bottom: 6px; }
.fest-card h3 { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; line-height: 1.06; margin: 0 0 12px; color: #fff; }
.fest-card p { margin: 0 0 14px; color: rgba(255,255,255,0.9); font-size: 1rem; max-width: 42ch; }
.fest-card .read { color: #fff; font-weight: 700; font-size: 0.95rem; }

/* ---------- Stats band (dark strip) ---------- */
.stats-band { background: var(--ink); color: #f4ead6; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 46px 0; text-align: center; }
.stats .stat { position: relative; padding: 6px 10px; }
.stats .stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 18%; height: 64%; width: 2px;
  background: repeating-linear-gradient(rgba(244,234,214,0.22) 0 6px, transparent 6px 12px);
}
.stats .num { font-family: var(--serif); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.1rem); line-height: 1; color: #fff; }
.stats .num .pick { color: var(--gold); margin-left: 4px; }
.stats .lab { font-family: var(--hand); font-size: 1.3rem; color: var(--gold); margin-top: 6px; }
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; gap: 26px; }
  .stats .stat + .stat::before { display: none; }
}

/* ---------- Signature sign-off ---------- */
.signoff { margin-top: 26px; }
.signoff .line { font-family: var(--hand); font-size: 1.5rem; color: var(--ink-soft); }
.signoff .sig { font-family: var(--hand); font-weight: 700; font-size: 2.4rem; color: var(--accent); line-height: 0.9; margin-top: 2px; }
.signoff .sig .pick { color: var(--accent); font-size: 0.7em; margin-right: 6px; }

/* ---------- Photo-count pill ---------- */
.count-pill { color: var(--gold-dk); font-weight: 700; }
.count-pill .pick { color: var(--accent); font-size: 0.8em; margin-right: 3px; }

/* ---------- Filter chips ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.chip {
  font-family: var(--sans); font-size: 0.92rem; font-weight: 700;
  padding: 8px 18px; border-radius: 999px; border: 2px solid var(--line);
  color: var(--ink-soft); background: var(--surface); transition: .12s;
}
.chip:hover { border-color: var(--gold); color: var(--ink); text-decoration: none; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.active:hover { color: #fff; }

/* ---------- Post grid / cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.card {
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); text-decoration: none; }
.card-cover { aspect-ratio: 3 / 2; background-size: cover; background-position: center; background-color: var(--ink); position: relative; transition: transform .45s ease; }
.card:hover .card-cover { transform: scale(1.05); }
.card-cover.placeholder {
  background: linear-gradient(135deg, var(--pine), var(--ink) 55%, var(--accent-dk));
  display: flex; align-items: center; justify-content: center;
}
.card-cover.placeholder span { font-family: var(--serif); color: rgba(255,255,255,0.9); font-size: 1.5rem; padding: 0 20px; text-align: center; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-meta { font-family: var(--hand); font-size: 1.15rem; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.card-meta .dot { color: var(--gold); margin: 0 7px; }
.card-meta .date { color: var(--muted); }
.card h3 { font-family: var(--serif); font-weight: 700; font-size: 1.42rem; margin: 0 0 10px; color: var(--ink); line-height: 1.22; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.99rem; }
.card .read { margin-top: auto; padding-top: 16px; color: var(--accent-dk); font-weight: 700; font-size: 0.92rem; }

/* ---------- Single post view ---------- */
.article { max-width: 760px; margin: 0 auto; }
.article .back { display: inline-block; margin-bottom: 26px; font-weight: 700; font-size: 0.95rem; }
.article-meta { font-family: var(--hand); font-size: 1.25rem; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.article-meta .date { color: var(--muted); }
.article-meta .byline { color: var(--ink-soft); }
.article h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.12; margin: 0 0 28px; letter-spacing: -0.005em; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin: 0 0 34px; box-shadow: var(--shadow); border: 2px solid var(--line); }
.article-body p { font-size: 1.14rem; line-height: 1.78; margin: 0 0 22px; color: #43342a; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 36px 0; }
.gallery img { border-radius: 8px; cursor: zoom-in; box-shadow: var(--shadow); border: 2px solid var(--line); }

/* ---------- About / info blocks ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.about-grid p { font-size: 1.1rem; color: var(--ink-soft); }
.info-card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.info-card h3 { font-family: var(--serif); margin: 0 0 14px; font-size: 1.4rem; }
.info-card ul { list-style: none; padding: 0; margin: 0; }
.info-card li { padding: 9px 0; border-bottom: 1px dashed var(--line); color: var(--ink-soft); }
.info-card li:last-child { border-bottom: 0; }

/* ---------- Newsletter / CTA ---------- */
.cta { text-align: center; }
.cta h2 { font-family: var(--serif); font-size: 2.2rem; margin: 0 0 8px; }
.cta .kicker { display: inline-block; margin: 0 0 6px; }
.cta p { color: var(--ink-soft); max-width: 540px; margin: 0 auto 26px; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { font-family: var(--serif); color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e4d4b8; padding: 54px 0 40px; margin-top: 20px; }
.site-footer a { color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: start; }
.footer-brand { font-family: var(--serif); font-size: 1.5rem; color: #fff; margin: 0 0 8px; }
/* logo on dark surface — per brand guidance: ink→cream, clay brightened */
.footer-logo { margin: 0 0 10px; }
.footer-logo .logo-lockup { --dm-ink: #F6F0E4; --dm-clay: #C8502E; width: 220px; }
.footer-socials { display: flex; gap: 16px; margin-top: 10px; }
.footer-socials a { color: #e4d4b8; font-weight: 700; font-size: 0.92rem; }
.footer-col h4 { font-family: var(--hand); font-size: 1.3rem; color: var(--gold); margin: 0 0 8px; }
.footer-col a { display: block; color: #e4d4b8; padding: 4px 0; font-size: 0.96rem; }
.copyright { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.85rem; color: #b7a486; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(30,20,12,0.92); display: none; align-items: center; justify-content: center; z-index: 100; padding: 30px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { height: 82px; }
  .logo-lockup { width: 182px; }   /* stays above the 180px minimum */
  .nav-links {
    position: absolute; top: 82px; left: 0; right: 0;
    background: var(--bg); border-bottom: 2px solid var(--line);
    flex-direction: column; gap: 0; padding: 8px 24px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .fest-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero { padding: 58px 0 46px; }
  /* On tall/narrow screens the hero photo crops to a vertical slice.
     Shorten it and shift the crop so the performer stays in frame. */
  .hero-photo { padding: 80px 0 64px; background-position: center, center, 36% center; }
  .section { padding: 52px 0; }
}
