/* ===========================================================================
   oldfarmter.us — structural stylesheet

   Layout and rhythm only: enough that the skeleton reads as a page, not a
   design. Colours come from tokens.css; nothing here hard-codes one.

   Class names that are NOT free to rename — availability-calendar.js looks
   for them when it walks out from a calendar to find the booking widget it
   should drive:

     .booking-split      wraps a calendar and its booking widget together
     .booking-panel      the dark surface the booking widget sits on
     .property-detail    alternative scope, for a per-property page
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

h1, h2, h3 {
  font-family: var(--font-display), Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  color: var(--brand-deep);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: 1.125rem; }

p { margin: 0 0 1rem; max-width: var(--measure); }

a { color: var(--brand); }
a:focus-visible,
button:focus-visible,
.ac-day:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

img { max-width: 100%; height: auto; display: block; }

/* --- skip link ----------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--brand-deep);
  padding: 0.75rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* --- shell --------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

/* A stacked lockup — illustration over wordmark — so it needs real height to
   stay legible: below roughly 56px the "FARMHOUSE RETREAT" line stops reading.
   Height drives the size and width follows from the intrinsic width/height on
   the <img>, which also reserves the space before the file loads. */
.brandmark {
  display: flex;
  align-items: center;
  line-height: 0; /* no descender gap beneath an inline image */
}

.brandmark img {
  display: block;
  height: 80px;
  width: auto;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-nav a { color: var(--text-light); text-decoration: none; font-size: 0.9375rem; }
.site-nav a:hover { color: var(--brand); }

.section { padding-block: var(--section-y); }
.section-alt { background: var(--surface-warm); }
.section > .wrap > :first-child { margin-top: 0; }

.site-footer {
  background: var(--brand-deep);
  color: var(--text-invert);
  padding-block: 2.5rem;
}
.site-footer a { color: var(--text-invert); }

/* --- booking: calendar beside the OwnerRez widget ------------------------ */

.booking-split {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .booking-split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .brandmark img { height: 56px; }
}

/* Dark on purpose. One widget id serves every placement and gets one CSS box,
   so the booking widget's labels are a single colour everywhere on the site —
   widget-css/booking-inquiry.css assumes they sit on a dark surface. Making
   this light means inverting that stylesheet too (docs/setup.md, step 6). */
.booking-panel {
  background: var(--brand-deep);
  border-radius: var(--radius);
  padding: 1.25rem;
  min-height: 320px;
}

/* --- reviews (rendered from /api/reviews as indexable markup) ------------ */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.review {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.review p { margin-bottom: 0.5rem; }
.review footer { color: var(--text-light); font-size: 0.875rem; }

.rating-summary { font-size: 1.0625rem; }
.rating-summary strong { color: var(--brand-deep); }

/* --- placeholder scaffolding (delete once the design lands) -------------- */

.placeholder {
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-light);
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.9375rem;
}
