/* Hillside Hideaway — colors pulled from the house illustration */
:root {
  --mint: #e0f8e8;
  --mint-deep: #c4ecd2;
  --cream: #fbf8f1;
  --paper: #fffdf9;
  --ink: #26403f;
  --ink-soft: #536866;
  --cedar: #65390c;
  --rust: #a3570f;
  --rust-dark: #864904;
  --sky: #cfe3f5;
  --line: #e8e0cf;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(38, 64, 63, .06), 0 8px 24px rgba(38, 64, 63, .07);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--rust-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- critters ---------- */
.critter { width: 48px; height: 48px; flex: none; }
.critter { --crest: transparent; --bib: transparent; }
.chickadee { --back:#a9a69c; --wing:#6c6a64; --belly:#f3ead8; --breast:#e6cfa6; --head:#1f2224; --cap:#1f2224; --cheek:#fbfaf6; --bib:#1f2224; --beak:#2a2a2a; }
.bluebird  { --back:#3d6eb4; --wing:#2f5893; --belly:#f4efe4; --breast:#c96f36; --head:#3d6eb4; --cap:#3d6eb4; --cheek:#3d6eb4; --bib:#c96f36; --beak:#2a2a2a; }
.junco     { --back:#56606b; --wing:#454d57; --belly:#f6f4ef; --breast:#56606b; --head:#56606b; --cap:#56606b; --cheek:#56606b; --bib:#56606b; --beak:#efc3b4; }
.flycatcher{ --back:#7a8a3c; --wing:#5f6d2c; --belly:#efe07a; --breast:#e6d35a; --head:#7a8a3c; --cap:#7a8a3c; --cheek:#7a8a3c; --bib:#e6d35a; --beak:#3a3a2a; }
.woodpecker{ --back:#1f2224; --wing:#1f2224; --belly:#1f2224; --breast:#1f2224; --head:#1f2224; --cap:#d0342c; --cheek:#f5f2ea; --bib:#1f2224; --crest:#d0342c; --beak:#5b5b55; }
.bluejay   { --back:#4a7fc1; --wing:#2f5c9e; --belly:#f2f0ea; --breast:#e9e7e1; --head:#4a7fc1; --cap:#4a7fc1; --cheek:#f6f5f0; --bib:#1f2224; --crest:#4a7fc1; --beak:#1f2224; }
.buck { --antler: #cdb48a; }
.flip { transform: scaleX(-1); }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes graze { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2deg); } }
@media (prefers-reduced-motion: no-preference) {
  .bob { animation: bob 3.2s ease-in-out infinite; }
  .graze { animation: graze 5s ease-in-out infinite; transform-origin: 50% 100%; }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 248, 241, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.15rem; white-space: nowrap; position: relative; }
.brand svg { width: 30px; height: 30px; }
.brand .chickadee { position: absolute; width: 22px; height: 22px; left: 14px; top: -11px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.nav-links a:hover { background: var(--mint); color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  padding: 14px 22px; border-radius: 999px; border: 0;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--rust); color: #fff; }
.btn-primary:hover { background: var(--rust-dark); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-sm { padding: 10px 16px; font-size: .9rem; }

@media (max-width: 760px) {
  .nav .wrap { height: auto; flex-wrap: wrap; gap: 0; padding: 10px 0 6px; }
  .nav .btn { margin-left: auto; }
  .nav-links { order: 3; width: 100%; margin: 6px -12px 0; }
}

/* ---------- hero ---------- */
.hero { padding: 56px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rust); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.hero h1 em { font-style: italic; color: var(--cedar); }
.lede { font-size: 1.15rem; color: var(--ink-soft); margin: 20px 0 28px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 32px; padding: 0; list-style: none; color: var(--ink-soft); font-size: .95rem; }
.facts b { color: var(--ink); font-weight: 700; }
.rating { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px 8px 12px; font-size: .92rem; }
.rating .star { color: var(--rust); font-size: 1.1rem; }

.scene { position: relative; border-radius: 28px; background: var(--mint); box-shadow: var(--shadow); }
.scene > img { width: 100%; border-radius: 28px; }
.scene .critter { position: absolute; }
/* positions are percentages of the 960×960 illustration */
.scene .on-roof { width: 9%; height: 9%; left: 53.3%; top: 14.9%; }
.scene .on-rail { width: 9%; height: 9%; left: 58%; top: 35.5%; }
.scene .doe { width: 15%; height: 15%; left: .5%; top: 55.5%; }
.scene .young-buck { width: 12%; height: 12%; left: 13.5%; top: 58.6%; }
.scene .fox { width: 12%; height: 12%; left: 88%; top: 58.4%; }
.scene .squirrel { width: 8%; height: 8%; left: 80%; top: 62.5%; }

@media (max-width: 860px) {
  .hero { padding: 28px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .scene { order: -1; max-width: 480px; margin-inline: auto; width: 100%; }
}

/* ---------- section scaffolding ---------- */
section { padding: 80px 0; }
.section-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 36px; }
.section-head .critter { width: 56px; height: 56px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.section-head p { color: var(--ink-soft); margin-top: 8px; max-width: 40em; }
.band { background: var(--mint); }

/* ---------- the house ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature svg { width: 28px; height: 28px; color: var(--rust); margin-bottom: 14px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 6px; }
.feature p { color: var(--ink-soft); font-size: .95rem; }
.house-notes { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 16px; }
.note-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.note-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.note-card ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.note-card li + li { margin-top: 6px; }
.scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; margin-top: 4px; }
.score span { display: block; font-size: .8rem; color: var(--ink-soft); }
.score b { font-family: var(--serif); font-size: 1.35rem; }
.hosts { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: .95rem; color: var(--ink-soft); }

@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } .house-notes { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }

/* ---------- back 14 ---------- */
.back14 .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.back14 .critter { width: 120px; height: 120px; }
.back14 h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.back14 p { color: var(--ink-soft); margin-top: 10px; max-width: 38em; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--mint); padding: 6px 12px; border-radius: 999px; margin-bottom: 12px; }
@media (max-width: 760px) {
  .back14 .wrap { grid-template-columns: 1fr; gap: 16px; }
  .back14 .critter { width: 84px; height: 84px; }
}

/* ---------- guide ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: thin; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font: 600 .98rem/1 var(--sans); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 16px 8px 8px; cursor: pointer;
}
.tab .critter { width: 28px; height: 28px; }
.tab:hover { border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.tab .count { font-weight: 500; opacity: .6; font-size: .85rem; }

.toolbar { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 500 .88rem/1 var(--sans); color: var(--ink-soft); cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px;
}
.chip:hover { color: var(--ink); border-color: var(--ink-soft); }
.chip[aria-pressed="true"] { background: var(--mint); border-color: var(--mint-deep); color: var(--ink); font-weight: 700; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-row[hidden] { display: none; }
.toolbar .label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.search { position: relative; }
.search input {
  font: 500 .95rem var(--sans); color: var(--ink);
  border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 10px 16px; width: 240px; max-width: 100%;
}
.search input:focus { outline: 2px solid var(--rust); outline-offset: 1px; border-color: transparent; }
@media (max-width: 760px) { .search { margin-left: 0; width: 100%; } .search input { width: 100%; } }

.cat-intro { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); margin: -8px 0 22px; max-width: 50em; }
.cat-intro .critter { width: 52px; height: 52px; }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; grid-auto-flow: dense; gap: 12px; }
.shot { position: relative; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--mint); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.shot:hover img { transform: scale(1.04); }
.shot:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; }
.shot.wide { grid-column: span 2; }
.shot.tall { grid-row: span 2; }
.shot.big { grid-column: span 2; grid-row: span 2; }
.shot-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 10px;
  font-size: .85rem; font-weight: 600; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(20, 32, 31, .7));
  opacity: 0; transition: opacity .2s ease;
}
.shot:hover .shot-cap, .shot:focus-visible .shot-cap { opacity: 1; }
@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 8px; }
  .shot.big { grid-column: span 2; }
  .shot-cap { opacity: 1; font-size: .75rem; padding: 20px 10px 8px; }
}

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(18, 28, 27, .92); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; max-width: min(1100px, 100vw - 120px); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); border-radius: 12px; margin: 0 auto; }
.lightbox figcaption { display: flex; justify-content: space-between; gap: 16px; color: #e6efed; padding: 12px 4px 0; font-size: .95rem; }
.lb-btn { position: fixed; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 999px; width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox figure { max-width: calc(100vw - 32px); }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.drive { font-size: .82rem; font-weight: 700; color: var(--cedar); background: #f6ead9; border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.town { font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.card h3 { font-size: 1.3rem; }
.card .desc { color: var(--ink-soft); font-size: .95rem; }
.card .hours { font-size: .88rem; color: var(--ink); background: var(--mint); border-radius: 10px; padding: 8px 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .76rem; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.card .address { font-size: .88rem; color: var(--ink-soft); }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.card-actions a {
  font: 600 .88rem/1 var(--sans); text-decoration: none; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 14px;
}
.card-actions a:hover { border-color: var(--ink); }
.card.featured { grid-column: span 2; background: var(--ink); color: var(--cream); border-color: var(--ink); }
.card.featured .desc, .card.featured .town, .card.featured .address { color: #c6d6d3; }
.card.featured .drive { background: var(--mint); color: var(--ink); }
.card.featured .tag { color: var(--mint); border-color: #4b6563; }
.card.featured .card-actions a { color: var(--cream); border-color: #4b6563; }
@media (max-width: 600px) { .card.featured { grid-column: auto; } }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 16px; color: var(--ink-soft); }
.empty .critter { width: 64px; height: 64px; margin: 0 auto 12px; }

.guide-note { display: flex; gap: 14px; align-items: flex-start; margin-top: 32px; padding: 18px 20px; border-radius: var(--radius); background: #f6ead9; color: var(--cedar); font-size: .95rem; }
.guide-note .critter { width: 40px; height: 40px; }
.winter-note { margin-top: 16px; background: #e8f0f8; color: var(--ink); border: 1px solid var(--sky); }

/* ---------- book ---------- */
.book { text-align: center; }
.book .critter { width: 90px; height: 90px; margin: 0 auto 10px; }
.book h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
.book p { color: var(--ink-soft); margin: 14px auto 28px; max-width: 32em; font-size: 1.1rem; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--ink-soft); font-size: .9rem; }
footer .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
footer .critter { width: 54px; height: 54px; }
footer .spacer { flex: 1; }
