/* ==========================================================================
   Blueberry Loop — design system
   Palette baseline: Birch Landing Art Fair banner (birch / aqua / gold).
   ========================================================================== */

:root {
  --bl-sky:       #A9D4DB;  /* light aqua */
  --bl-sky-deep:  #7FB8C2;  /* deeper aqua */
  --bl-teal:      #24666E;  /* headings, links, script accent */
  --bl-teal-dark: #1A4A50;
  --bl-ink:       #2A2A2A;  /* body text + display headline */
  --bl-birch:     #F6F3EA;  /* cream/birch-white card surfaces */
  --bl-white:     #FFFFFF;
  --bl-gold:      #C9A24B;  /* accent / buttons */
  --bl-gold-dark: #A9843A;
  --bl-sage:      #A7B78A;  /* soft green */
  --bl-coral:     #E0A48B;  /* peach accent, sparing */
  --bl-blueberry: #4A5691;  /* optional event tie-in accent */
  --bl-muted:     #5c6b6d;

  --wrap: 1120px;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(26,74,80,.08);
  --shadow-md: 0 8px 28px rgba(26,74,80,.14);

  --font-display: "Chelsea Market", "Segoe UI", system-ui, sans-serif;
  --font-script:  "Kaushan Script", "Segoe Script", cursive;
  --font-body:    "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--bl-ink);
  line-height: 1.6;
  background: var(--bl-birch);
  background-image:
    linear-gradient(180deg, rgba(169,212,219,.35), rgba(246,243,234,0) 320px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bl-teal); text-decoration: none; }
a:hover { color: var(--bl-teal-dark); text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; color: var(--bl-ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-tint { background: var(--bl-white); }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--bl-muted); }

.display { font-family: var(--font-display); letter-spacing: .5px; }
.script  { font-family: var(--font-script); color: var(--bl-teal); font-weight: 400; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: .78rem;
  font-weight: 700; color: var(--bl-gold-dark); margin: 0 0 .4rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 12px 24px; border-radius: 999px; text-decoration: none;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold  { background: var(--bl-gold); color: #2a2109; box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: var(--bl-gold-dark); color: #fff; }
.btn-teal  { background: var(--bl-teal); color: #fff; }
.btn-teal:hover { background: var(--bl-teal-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--bl-teal); border: 2px solid var(--bl-teal); }
.btn-ghost:hover { background: var(--bl-teal); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,243,234,.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid rgba(36,102,110,.15);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; }
.brand { display: flex; flex-direction: column; line-height: 1; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-main { font-family: var(--font-display); font-size: 1.5rem; color: var(--bl-ink); }
.brand-sub  { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bl-teal); margin-top: 3px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem;
  color: var(--bl-ink);
}
.site-nav a:hover { background: rgba(36,102,110,.10); text-decoration: none; }
.site-nav a.active { color: var(--bl-teal); background: rgba(36,102,110,.12); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--bl-teal); }

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--bl-sky) 0%, var(--bl-sky-deep) 55%, #6aa9b4 100%);
  color: #10373c;
  padding: 80px 0 88px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.5) 0 3px, rgba(255,255,255,0) 3px 46px),
    repeating-linear-gradient(90deg, rgba(42,42,42,.05) 0 1px, rgba(0,0,0,0) 1px 90px);
  mix-blend-mode: soft-light;
}
.hero .wrap { position: relative; z-index: 1; max-width: 820px; }
.hero h1 { font-family: var(--font-display); color: #10373c; margin-bottom: .15em; }
.hero .script { color: var(--bl-teal-dark); font-size: clamp(1.8rem,4.5vw,2.8rem); display: block; margin-bottom: .3em; }
.hero p { font-size: 1.2rem; color: #164a50; max-width: 640px; }
.hero .btn-row { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Stats ("By the Numbers") ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  background: var(--bl-white); border-radius: var(--radius); padding: 26px 16px;
  text-align: center; box-shadow: var(--shadow-sm); border-top: 4px solid var(--bl-gold);
}
.stat-num { font-family: var(--font-display); font-size: 2.4rem; color: var(--bl-teal); display: block; }
.stat-label { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--bl-muted); }

/* ---- The 4-column feature row (Ely / Babbitt / Tower / Facebook) ---- */
.four-col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start; }
.town-card {
  background: var(--bl-white); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm); border-bottom: 4px solid var(--bl-sage); min-height: 220px;
}
.town-card h3 { font-family: var(--font-display); color: var(--bl-teal); }
.town-card.babbitt { border-bottom-color: var(--bl-gold); }
.town-card.tower   { border-bottom-color: var(--bl-coral); }
.fb-col {
  background: var(--bl-white); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-sm); border-bottom: 4px solid var(--bl-blueberry);
  overflow: hidden;
}
.fb-col h3 { font-size: 1rem; color: var(--bl-blueberry); margin-bottom: 10px; }
.fb-col .fb-page, .fb-col iframe { width: 100% !important; }

/* ---- Generic cards / grids ---- */
.card {
  background: var(--bl-white); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 22px; margin-bottom: 20px;
}
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---- Vendor directory ---- */
.vendor-town { margin-bottom: 40px; }
.vendor-town h2 { font-family: var(--font-display); color: var(--bl-teal); border-bottom: 2px solid var(--bl-sky); padding-bottom: 6px; }
.vendor-card { background: var(--bl-white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.vendor-card .body { padding: 16px; }
.vendor-card h3 { margin-bottom: 4px; }

/* ---- Placeholder / data-needed callout ---- */
.placeholder {
  border: 2px dashed var(--bl-sky-deep); border-radius: var(--radius);
  padding: 28px; text-align: center; color: var(--bl-muted); background: rgba(255,255,255,.5);
}
.data-note {
  background: #fff8e6; border-left: 4px solid var(--bl-gold); padding: 10px 14px;
  border-radius: 6px; font-size: .9rem; color: #6b5416; margin: 12px 0;
}

/* ---- Maps ---- */
.map { height: 460px; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-sm); z-index: 1; }
.map-sm { height: 380px; }

/* ---- Guestbook ---- */
.gb-wall { columns: 3 280px; column-gap: 20px; }
.gb-entry {
  break-inside: avoid; background: var(--bl-white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px; margin: 0 0 20px;
}
.gb-entry .from { font-weight: 700; color: var(--bl-teal); }
.gb-entry .home { font-size: .85rem; color: var(--bl-muted); }
.gb-entry .msg { margin: 8px 0 0; }
.gb-entry img.photo { border-radius: 10px; margin-top: 12px; }
.stars .star { color: #d8d2c2; }
.stars .star.on { color: var(--bl-gold); }

/* ---- Forms ---- */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-field .hint { font-weight: 400; color: var(--bl-muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=password], textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid #cdd7d8; border-radius: 10px;
  font: inherit; color: var(--bl-ink); background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--bl-sky-deep); border-color: var(--bl-sky-deep); }
textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.honeypot { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; font-size: 1.8rem; }
.rating-input input { display: none; }
.rating-input label { color: #d8d2c2; cursor: pointer; }
.rating-input input:checked ~ label,
.rating-input label:hover, .rating-input label:hover ~ label { color: var(--bl-gold); }

/* ---- Flash messages ---- */
.flash { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-weight: 600; }
.flash-ok { background: #e6f4ea; color: #1e5631; border-left: 4px solid #2e7d46; }
.flash-error { background: #fdecea; color: #8a2b22; border-left: 4px solid #c0392b; }

/* ---- Footer ---- */
.site-footer {
  margin-top: 40px; background: var(--bl-teal); color: #d9ecef; padding: 40px 0 28px;
}
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-footer .brand-main { color: #fff; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.2); font-size: .85rem; opacity: .85; }

/* ---- Admin ---- */
.admin-bar { background: var(--bl-teal-dark); color: #fff; padding: 10px 0; }
.admin-bar a { color: #cfe6ea; margin-right: 16px; font-weight: 600; }
.admin-bar .active { color: #fff; text-decoration: underline; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; vertical-align: top; font-size: .92rem; }
.admin-table th { background: var(--bl-sky); color: #10373c; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge-pending { background: #fff3cd; color: #7a5b00; }
.badge-approved { background: #d5efdc; color: #1e5631; }
.badge-rejected, .badge-declined { background: #f5d6d2; color: #8a2b22; }
.badge-new { background: #dbe4ff; color: #29387a; }
.badge-contacted { background: #e3dcf5; color: #4a2f7a; }
.stat-tiles { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat-tile { background: #fff; border-radius: 12px; padding: 18px; box-shadow: var(--shadow-sm); text-align: center; }
.stat-tile .n { font-size: 2rem; font-weight: 800; color: var(--bl-teal); display: block; }
.inline-form { display: inline; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .four-col { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-tiles { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; flex-direction: column; }
  body.nav-open .site-nav { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .four-col, .stats, .grid-3, .grid-2, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .gb-wall { columns: 1; }
  .section { padding: 40px 0; }
}
