/* House Buyer Dan — styles for sections the preview build did not include:
   the mobile nav drawer, breadcrumbs, county/city pages, blog, FAQ, projects.

   Every value below is expressed in the preview's own custom properties
   (--paper, --barn, --spruce, --gold, --ink, --line, --radius, --shadow-card,
   --font-display, --font-body). Nothing here introduces a new colour or
   typeface, so generated pages sit inside the approved design rather than
   beside it. */

/* ---------- mobile nav drawer (not in the preview; see site.mjs MOBILE_NAV) ---------- */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  content: '';
  position: relative;
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after  { position: absolute; top: 6px; }

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(36, 50, 64, 0.55);
  display: flex;
  justify-content: flex-end;
}
.nav-drawer[hidden] { display: none; }
.nav-drawer-panel {
  background: var(--paper);
  width: min(340px, 86vw);
  height: 100%;
  overflow-y: auto;
  padding: 1.2rem 1.3rem 6rem;
  box-shadow: var(--shadow-lift);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.nav-drawer-close {
  align-self: flex-end;
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}
.nav-drawer nav { display: grid; gap: 0.1rem; margin-bottom: 1rem; }
.nav-drawer nav a {
  display: block;
  padding: 0.75rem 0.4rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.nav-drawer nav a:hover { color: var(--barn); }
.nav-drawer-phone { text-align: center; color: var(--ink-soft); margin: 0.8rem 0 0; }
.btn-block { display: flex; width: 100%; }

/* ---------- breadcrumbs ---------- */
.crumbs {
  font-size: 0.86rem;
  color: var(--ink-soft);
  padding-top: 1.4rem;
}
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--barn); }
.crumb-sep { padding: 0 0.5em; opacity: 0.55; }

/* ---------- shared layout helpers ---------- */
.wrap.narrow { max-width: 820px; }
.cta-or { color: var(--ink-soft); margin-top: 0.9rem; }
.section-tight { padding-block: clamp(2rem, 5vw, 3rem); }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
  margin-top: 1.8rem;
}
.grid-cards .card { padding: 1.3rem; }
.grid-cards .card h3 { margin-bottom: 0.35rem; font-size: 1.15rem; }
.grid-cards .card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.grid-cards a.card { text-decoration: none; color: inherit; display: block; transition: transform .12s ease, box-shadow .12s ease; }
.grid-cards a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.grid-cards a.card h3 { color: var(--barn); }

/* ---------- location pages ---------- */
.loc-hero { padding-block: clamp(2.2rem, 5vw, 3.4rem) 0; }
.loc-hero h1 { margin-bottom: 0.4rem; }
.loc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.loc-meta strong { color: var(--ink); }

.town-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.town-list li {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35em 0.85em;
  font-size: 0.9rem;
}
.town-list li a { text-decoration: none; color: var(--barn); font-weight: 600; }

.region-group { margin-top: 2.4rem; }
.region-group > h2 {
  font-size: 1.4rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.4rem;
}
.county-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.55rem 1.2rem;
}
.county-links a { text-decoration: none; font-weight: 600; }
.county-links span { display: block; font-size: 0.84rem; color: var(--ink-soft); font-weight: 400; }

/* ---------- prose (blog posts, long-form sections) ---------- */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; font-size: 1.2rem; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: 0.45rem; }
.prose blockquote {
  margin: 1.8rem 0;
  padding: 1rem 1.3rem;
  border-left: 4px solid var(--gold);
  background: var(--paper-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote p { margin: 0; }
.callout {
  border-left: 4px solid var(--spruce);
  background: #fffdf8;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.3rem;
  margin: 1.8rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- blog index ---------- */
.post-meta { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 0.5rem; }
.post-card-date { font-size: 0.8rem; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; font-weight: 700; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 1.6rem; display: grid; gap: 0.6rem; }
.faq-item {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 0.2rem 1.1rem;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.9rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--barn);
  flex: none;
}
.faq-item[open] summary::after { content: '–'; }
.faq-answer { padding-bottom: 1rem; color: var(--ink-soft); }
.faq-answer p:first-child { margin-top: 0; }
.faq-answer a { font-weight: 600; }

/* ---------- projects (scaffolded; see content/projects.mjs) ---------- */
.proj-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
  margin: 1.6rem 0;
}
.proj-gallery figure { margin: 0; }
.proj-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.proj-gallery figcaption { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.35rem; }
.ba-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}
.ba-before { background: var(--paper-deep); color: var(--ink-soft); border: 1px solid var(--line); }
.ba-after  { background: var(--spruce); color: #fff; }

/* ---------- empty-state (projects before real photos arrive) ---------- */
.empty-state {
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) 1rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

@media (max-width: 700px) {
  .county-links { grid-template-columns: 1fr; }
}

/* ---------- homepage "where we buy" band ----------
   The band is dark navy over a map photo with white text. Base.css colours all
   links --barn (red), which fails contrast badly on that background, so links
   added inside the band are re-styled here. */
.where-band a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.45); text-underline-offset: 3px; }
.where-band a:hover { text-decoration-color: #fff; }
.where-band .where-regions li a { font-weight: 600; }

/* ---------- header dropdowns ----------
   Base.css lays .site-nav out as a flex row of <a>. A .nav-group wraps a parent
   link plus its menu, so it has to behave like one of those <a> children. */
.nav-group { position: relative; display: inline-flex; align-items: center; }
.nav-caret { font-size: .7em; margin-left: .3em; opacity: .7; }
.nav-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 230px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: .45rem;
  display: grid;
  gap: .1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 60;
}
.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
/* Bridges the gap between the header row and the panel so the pointer can
   travel into the menu without it closing. */
.nav-group::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 10px; }
.nav-menu a {
  display: block;
  padding: .55rem .7rem;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav-menu a:hover { background: var(--paper-deep); color: var(--barn); }

/* ---------- the CTA card that replaced the inline form on interior pages ---------- */
.cta-card-sub { color: var(--ink-soft); margin: 0 0 1.1rem; font-size: .96rem; }
.cta-card-note { color: var(--ink-soft); font-size: .9rem; margin: .9rem 0 0; }
.cta-card .btn { width: 100%; }

/* ---------- homepage address bar ---------- */
.offer-bar { display: grid; gap: .55rem; }
.offer-bar-head { font-weight: 700; margin: 0; }
.offer-bar .field {
  width: 100%;
  font: inherit;
  padding: .8em .9em;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.offer-bar .field::placeholder { color: #9b9486; }
.offer-bar-note { font-size: .86rem; color: var(--ink-soft); margin: .1rem 0 0; text-align: center; }
.offer-bar .field.shake { animation: hbd-shake .35s; border-color: var(--barn); }
@keyframes hbd-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ---------- the offer popup ---------- */
.offer-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(36, 50, 64, .62);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(.6rem, 4vh, 3rem) 1rem;
  overflow-y: auto;
}
.offer-overlay[hidden] { display: none; }
.offer-modal {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  width: min(560px, 100%);
  padding: 1.6rem clamp(1.1rem, 4vw, 2rem) 1.8rem;
  margin: auto;
}
.offer-modal-close {
  position: absolute;
  top: .5rem;
  right: .7rem;
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: 0;
  color: var(--ink-soft);
  cursor: pointer;
  padding: .1rem .4rem;
}
.offer-modal-close:hover { color: var(--barn); }
.offer-modal-badge { display: block; margin: 0 auto .6rem; }
.offer-modal h2 { text-align: center; font-size: clamp(1.35rem, 3.4vw, 1.7rem); margin: 0 0 .4rem; }
.offer-modal-sub { text-align: center; color: var(--ink-soft); margin: 0 0 1.3rem; font-size: .96rem; }
.offer-fields { display: grid; gap: .15rem; }
.offer-fg { display: grid; gap: .25rem; margin-bottom: .7rem; }
.offer-fg label { font-weight: 700; font-size: .88rem; }
.offer-fg .optional { font-weight: 400; color: var(--ink-soft); }
.offer-fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.offer-modal .field {
  width: 100%;
  font: inherit;
  padding: .7em .8em;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.offer-modal .field:focus-visible { border-color: var(--barn); outline-offset: 0; }
.offer-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.offer-error {
  background: #fdecec;
  border: 1px solid var(--barn);
  color: var(--barn-deep);
  border-radius: var(--radius);
  padding: .6rem .8rem;
  font-size: .9rem;
  margin: .3rem 0 .8rem;
  font-weight: 600;
}
.offer-error[hidden] { display: none; }
.offer-secure { text-align: center; font-size: .84rem; color: var(--ink-soft); margin: .8rem 0 0; }
.offer-tick {
  width: 62px; height: 62px;
  margin: .4rem auto 1rem;
  border-radius: 50%;
  background: var(--spruce);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
}
#offer-step-done { text-align: center; }
#offer-step-done .btn { margin-top: .6rem; }

@media (max-width: 520px) {
  .offer-fg-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- major cities on a county page ---------- */
.major-city-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.4rem 2rem;
  margin: 1.8rem 0 0;
}
.major-city h3 { font-size: 1.12rem; margin-bottom: .3rem; }
.major-city h3 a { text-decoration: none; }
.major-city p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.major-city-list + p { margin-top: 1.6rem; }
.town-list-head {
  margin-top: 2.4rem;
  font-size: .78rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 700;
}

/* ---------- FAQ hub ---------- */
.faq-index-head {
  font-size: .78rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: .8rem;
}
.faq-index {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: .4rem 1.4rem;
}
.faq-index a { text-decoration: none; font-weight: 600; font-size: .95rem; }
.faq-index a span { color: var(--ink-soft); font-weight: 400; }
.faq-source { margin: -.4rem 0 0; font-size: .92rem; }
.faq-source a { font-weight: 600; }
/* Offset anchor targets so a jump-link doesn't hide the heading under the
   sticky header. */
.faq-index + * , section[id^="county-"], section[id^="situation-"], #general { scroll-margin-top: 90px; }
