/* Bellbrook & Vale — first-party estate-agency template (S112).
   All imagery is authored CSS. No media, fonts, icons, embeds, CDNs, analytics or tracking. */

:root {
  --ink: #17251f;
  --pine: #24473a;
  --pine-deep: #1b3529;
  --cream: #f7f4ec;
  --card: #fffdf8;
  --line: #d9d2c0;
  --brass: #8a6128;
  --brass-bright: #b8863c;
  --status: #4a6156;
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; }
a { color: inherit; }
ul, ol { list-style: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 10;
  background: var(--ink); color: var(--cream); padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius); text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 3px solid var(--brass-bright); outline-offset: 2px; }

/* ---------- Header + navigation ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1.25rem; background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.wordmark {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 700;
  text-decoration: none; color: var(--pine-deep); white-space: nowrap;
}
.nav-disclosure summary {
  list-style: none; cursor: pointer; user-select: none;
  font-weight: 600; padding: 0.5rem 1rem;
  border: 1.5px solid var(--pine); border-radius: var(--radius); color: var(--pine-deep);
}
.nav-disclosure summary::-webkit-details-marker { display: none; }
.nav-disclosure[open] summary { background: var(--pine); color: var(--cream); }
.nav-disclosure nav {
  position: absolute; right: 1rem; left: 1rem; top: calc(100% + 0.4rem); z-index: 9;
  display: flex; flex-direction: column; gap: 0.25rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem; box-shadow: 0 10px 24px rgba(23, 37, 31, 0.14);
}
.nav-disclosure nav a:not(.button) {
  text-decoration: none; font-weight: 600; padding: 0.55rem 0.75rem; border-radius: 8px;
}
.nav-disclosure nav a:not(.button):hover { background: var(--cream); }

/* Desktop inline nav is OPTED INTO by main.js (matchMedia adds .nav-inline and sets [open]).
   A closed <details> does not render its children, so pure CSS cannot inline this menu at
   desktop widths — without JavaScript the summary button stays visible and usable instead. */
.nav-disclosure.nav-inline summary { display: none; }
.nav-disclosure.nav-inline nav {
  position: static; flex-direction: row; align-items: center; gap: 0.35rem;
  background: none; border: 0; padding: 0; box-shadow: none;
}
.nav-disclosure.nav-inline nav a { padding: 0.45rem 0.7rem; }

.header-call { display: none; }
@media (max-width: 799px) {
  .site-header { gap: 0.6rem; }
  .header-call { display: inline-block; margin-left: auto; }
}
/* Three nowrap items must fit a 360px viewport: scale the row down, never clip the menu. */
@media (max-width: 479px) {
  .site-header { padding: 0.8rem 0.9rem; gap: 0.45rem; }
  .wordmark { font-size: 1.05rem; }
  .header-call { font-size: 0.9rem; }
  .nav-disclosure summary { padding: 0.42rem 0.75rem; font-size: 0.95rem; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block; text-decoration: none; text-align: center;
  font-weight: 700; font-family: var(--sans); font-size: 1rem;
  background: var(--pine); color: var(--cream);
  border: 1.5px solid var(--pine); border-radius: var(--radius);
  padding: 0.8rem 1.4rem; cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.button:hover { background: var(--pine-deep); transform: translateY(-1px); }
.button-small { padding: 0.5rem 0.9rem; font-size: 0.95rem; }
.button-ghost { background: transparent; color: var(--pine-deep); }
.button-ghost:hover { background: rgba(36, 71, 58, 0.08); }
.button-light { background: var(--cream); color: var(--pine-deep); border-color: var(--cream); }
.button-light:hover { background: #fff; }
.call-link { font-weight: 700; color: var(--brass); text-decoration: none; white-space: nowrap; }
.call-link:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding: 3rem 1.25rem 2.25rem; max-width: 68rem; margin: 0 auto; }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); max-width: 21ch; }
.hero-sub { margin-top: 1rem; font-size: 1.15rem; max-width: 46ch; color: #33443c; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero-trust { margin-top: 1rem; font-size: 0.92rem; color: var(--status); font-weight: 600; }

/* ---------- Search strip ---------- */
.search-strip {
  background: var(--pine-deep); padding: 1.25rem;
}
.search-form {
  max-width: 68rem; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 0.75rem; align-items: end;
}
@media (min-width: 700px) { .search-form { grid-template-columns: 1fr 1fr 1fr auto; } }
.search-form .field label { color: var(--cream); font-size: 0.85rem; font-weight: 600; }
.search-form select {
  width: 100%; margin-top: 0.3rem; padding: 0.65rem 0.7rem;
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px;
}
.search-form .button { border-color: var(--brass-bright); background: var(--brass-bright); color: var(--ink); }
.search-form .button:hover { background: #c8974e; }

/* ---------- Listings ---------- */
.listings { max-width: 68rem; margin: 0 auto; padding: 2.5rem 1.25rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-head h2, .why h2, .similar h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.listing-count { color: var(--status); font-weight: 600; }
.listing-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.5rem;
}
@media (min-width: 620px) { .listing-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .listing-grid { grid-template-columns: 1fr 1fr 1fr; } }
.listing-grid-narrow { max-width: 44rem; }
@media (min-width: 960px) { .listing-grid-narrow { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(23, 37, 31, 0.12); }
.card-link { display: block; text-decoration: none; padding-bottom: 1.1rem; }
.card-status {
  display: inline-block; margin: 0.9rem 1.1rem 0;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--status);
}
.card-status-new { color: var(--brass); }
.card-status-offer { color: #7a4a2a; }
.card-price { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; margin: 0.15rem 1.1rem 0; }
.card-address { margin: 0.1rem 1.1rem 0; font-weight: 600; }
.card-meta { margin: 0.2rem 1.1rem 0; font-size: 0.92rem; color: var(--status); }
.listing-empty { margin-top: 1.5rem; padding: 1.25rem; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- CSS artwork (all imagery is authored gradients) ---------- */
.card-art { height: 170px; background-color: #e7e0cf; background-repeat: no-repeat; display: block; width: 100%; object-fit: cover;}
.gallery-main.card-art { height: 300px; }
/* ---------- Why / landlords / valuation band ---------- */
.why { max-width: 68rem; margin: 0 auto; padding: 1rem 1.25rem 2.5rem; }
.why-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.5rem; }
@media (min-width: 700px) { .why-grid { grid-template-columns: 1fr 1fr 1fr; } }
.why-grid li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.why-grid h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }

.landlords {
  max-width: 68rem; margin: 0 auto 2.5rem; padding: 1.6rem 1.25rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
}
.landlords h2 { font-size: 1.4rem; }
.landlords p { max-width: 52ch; margin-top: 0.3rem; }

.valuation-band {
  background: var(--pine-deep); color: var(--cream);
  padding: 3rem 1.25rem; text-align: center;
}
.valuation-band h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.valuation-band p { max-width: 52ch; margin: 0.75rem auto 1.4rem; color: #d8e2da; }

/* ---------- Property page ---------- */
.property-page, .valuation-page { max-width: 68rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.breadcrumb a { font-weight: 600; text-decoration: none; color: var(--pine-deep); }
.breadcrumb a:hover { text-decoration: underline; }
.gallery { margin-top: 1.25rem; display: grid; gap: 0.75rem; }
.gallery-main { border-radius: var(--radius); }
.gallery-thumbs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
.gallery-thumbs .card-art { height: 110px; border-radius: 8px; }

.property-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem;
  margin-top: 1.75rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line);
}
.property-head h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-top: 0.3rem; }
.property-head .card-status { margin: 0; }
.property-price { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--pine-deep); margin-top: 0.3rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.chip-row li {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.3rem 0.85rem; font-size: 0.9rem; font-weight: 600;
}
.property-cta { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }

.property-body { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 1.75rem; }
@media (min-width: 860px) { .property-body { grid-template-columns: 1.6fr 1fr; } }
.property-body h2 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.property-body h3 { font-size: 1.15rem; margin: 1.2rem 0 0.4rem; }
.property-body p + p { margin-top: 0.75rem; }
.feature-list li { padding-left: 1.2rem; position: relative; margin-top: 0.35rem; }
.feature-list li::before { content: "·"; position: absolute; left: 0.2rem; color: var(--brass); font-weight: 700; }

.details-table { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 1.2rem; }
.details-table div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.details-table div:last-child { border-bottom: 0; }
.details-table dt { color: var(--status); font-weight: 600; }
.details-table dd { font-weight: 700; }

/* ---------- Forms (preview-safe) ---------- */
.inquiry { margin-top: 2.5rem; padding: 1.75rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.inquiry > p { max-width: 56ch; margin-top: 0.4rem; }
.inquiry-form { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.25rem; }
@media (min-width: 700px) { .inquiry-form { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; font-size: 0.95rem; }
.label-optional { font-weight: 400; color: var(--status); }
.field input, .field textarea {
  width: 100%; margin-top: 0.35rem; padding: 0.7rem 0.75rem;
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 8px;
}
.inquiry-form .button { justify-self: start; }
.form-status { grid-column: 1 / -1; font-weight: 600; color: var(--pine-deep); min-height: 1.4em; }

.similar { margin-top: 2.5rem; }

/* ---------- Valuation page ---------- */
.valuation-hero { padding: 1.5rem 0 1rem; }
.valuation-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.valuation-body { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 1.5rem; }
@media (min-width: 860px) { .valuation-body { grid-template-columns: 1.5fr 1fr; } }
.valuation-body .inquiry-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-top: 0; align-self: start; }
.valuation-steps h2 { font-size: 1.4rem; }
.steps { counter-reset: step; margin-top: 1rem; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.2rem 3rem; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0.1rem;
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--brass);
}
.steps h3 { font-size: 1.1rem; }

/* ---------- Footer ---------- */
footer {
  background: var(--ink); color: #cfd8d0;
  padding: 2.25rem 1.25rem; margin-top: 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem;
}
.wordmark-footer { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--cream); }
footer .call-link { color: var(--brass-bright); }
.footer-truth { max-width: 34ch; font-size: 0.88rem; color: #9aa89e; align-self: end; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .button:hover, .card:hover { transform: none; }
}

/* Build credit — carried by every template in this library, matching the deployed demos.
   Colour is inherited rather than fixed so this single rule works on every footer palette. */
.footer-powered { margin-top: 0.9rem; font-size: 0.85rem; opacity: 0.8; }
.footer-powered a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-powered a:hover { opacity: 0.85; }

/* --- Touch targets ------------------------------------------------ S116
   A standalone control needs 44x44 CSS px (Apple HIG; WCAG 2.5.5 AAA, and 2.5.8 AA
   sets a 24px floor). The S116 polish pass measured the header phone link at 23px
   and the Menu button at 35px on a 390px viewport, on every template in the library.
   On a trades site the phone number IS the conversion — it was rendering at half the
   required size at exactly the width most visitors arrive on.

   Layout only, no colour, so this block is copy-paste identical across every palette
   in the library. Inline links inside prose are deliberately NOT touched: both WCAG
   target-size rules exempt them, and padding them out would wreck the body copy. */
@media (max-width: 799px) {
  .header-call,
  .nav-disclosure summary,
  .nav-disclosure nav .call-link,
  .button,
  .button-small,
  button[type="submit"] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* A call link sitting beside a button is a standalone tap target, not prose (S116). */
@media (max-width: 799px) {
  .property-cta .call-link { min-height: 44px; display: inline-flex; align-items: center; }
}
