/* Styling for the programmatic SEO content pages (GR-1): per-unit detail pages and the
   type/make hub lists generated by scripts/generate-seo.mjs. Deliberately lightweight and
   self-contained (one stylesheet, no JS) so these pages stay fast and fully crawlable —
   they are an indexable surface, not part of the funnel SPA. Brand tokens come from
   tokens.css; this file only adds the page-specific layout. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--pr-bone);
  color: var(--pr-ink);
  font-family: var(--pr-font);
  font-size: 1.05rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pr-forest); }
img { max-width: 100%; display: block; }

/* ---- top bar + footer (match the brand chrome) ------------------------------ */
.seo-bar {
  display: flex; align-items: center; gap: var(--pr-gap);
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: var(--pr-card);
  border-bottom: 1px solid var(--pr-line);
}
.seo-brand {
  font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em;
  color: var(--pr-forest); text-decoration: none;
}
.seo-bar nav { margin-left: auto; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.seo-bar nav a { color: var(--pr-slate); text-decoration: none; font-size: 0.95rem; }
.seo-bar nav a:hover { color: var(--pr-ink); }

.seo-wrap { max-width: 1080px; margin: 0 auto; padding: clamp(1.1rem, 4vw, 2.4rem); }

.seo-crumbs { font-size: 0.85rem; color: var(--pr-slate); margin: 0 0 1.1rem; }
.seo-crumbs a { color: var(--pr-slate); text-decoration: none; }
.seo-crumbs a:hover { text-decoration: underline; }

footer.seo-foot {
  margin-top: 3rem; padding: 1.6rem clamp(1rem, 4vw, 2.5rem);
  background: var(--pr-card); border-top: 1px solid var(--pr-line);
  color: var(--pr-slate); font-size: 0.85rem;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
}
/* padding+negative margin = 44px touch target without moving the visual layout */
footer.seo-foot a { color: var(--pr-slate); display: inline-block; padding: 0.85rem 0.4rem; margin: -0.85rem -0.4rem; }
.seo-foot .leaf { width: 0.95em; height: 0.95em; vertical-align: -0.12em; fill: currentColor; }

/* ---- unit detail page ------------------------------------------------------- */
.unit-head h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); line-height: 1.12; margin: 0 0 0.3rem; }
.unit-sub { color: var(--pr-slate); margin: 0 0 1.2rem; font-size: 1rem; }
.unit-sub .pin { color: var(--pr-danger); }

.unit-grid { display: grid; gap: var(--pr-gap-lg); }
@media (min-width: 880px) { .unit-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }

.gallery .hero {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--pr-radius); box-shadow: var(--pr-shadow); background: var(--pr-card-soft);
}
.gallery .thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 0.6rem; }
.gallery .thumbs img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--pr-radius-sm); background: var(--pr-card-soft); }
.gallery .floorplan { margin-top: 0.6rem; background: #fff; border-radius: var(--pr-radius-sm); padding: 0.6rem; }
.gallery .floorplan img { width: 100%; object-fit: contain; max-height: 360px; margin: 0 auto; }
.gallery figcaption { font-size: 0.8rem; color: var(--pr-slate); margin-top: 0.3rem; text-align: center; }

.unit-card {
  background: var(--pr-card); border-radius: var(--pr-radius); box-shadow: var(--pr-shadow);
  padding: var(--pr-gap);
}
.unit-price { font-size: 1.9rem; font-weight: 800; color: var(--pr-forest); }
.unit-price small { display: block; font-size: 0.8rem; font-weight: 400; color: var(--pr-slate); margin-top: 0.2rem; }
.unit-pay { font-size: 1rem; font-weight: 700; color: var(--pr-ink); margin-top: 0.35rem; }
.unit-cond { display: inline-block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: var(--pr-track-label); color: var(--pr-forest);
  background: var(--pr-card-soft); border-radius: 999px; padding: 0.25rem 0.7rem; margin-bottom: 0.6rem; }

.spec-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 0.5rem 0; border-bottom: 1px solid var(--pr-line); }
.spec-table th { color: var(--pr-slate); font-weight: 500; width: 48%; }
.spec-table td { font-weight: 600; }

.cta-row { display: grid; gap: 0.6rem; margin-top: 1rem; }
.btn {
  display: block; text-align: center; text-decoration: none; font-weight: 700;
  padding: 0.85rem 1rem; border-radius: 999px; font-size: 1rem;
}
.btn-primary { background: var(--pr-forest); color: #fff; }
.btn-secondary { background: var(--pr-card-soft); color: var(--pr-ink); border: 1px solid var(--pr-line); }
.floor-jump { display: block; text-align: center; margin-top: 0.7rem; font-size: 0.9rem; font-weight: 600; }
.amvic { font-size: 0.78rem; color: var(--pr-slate); margin-top: 0.9rem; line-height: 1.45; }

.unit-desc { margin-top: 1.4rem; }
.unit-desc h2 { font-size: 1.2rem; margin: 0 0 0.4rem; }

/* Mobile sticky CTA bar (unit pages only) — the in-card CTAs scroll away once the reader is
   in the description, so the primary action stays pinned. Hidden on desktop where the
   unit-card sidebar keeps the CTAs in view. */
.unit-sticky { display: none; }
@media (max-width: 639px) {
  body.has-sticky { padding-bottom: 4.6rem; }
  .unit-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: flex; align-items: center; gap: 0.8rem;
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--pr-card); border-top: 1px solid var(--pr-line);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
  }
  .unit-sticky-price { font-weight: 800; color: var(--pr-forest); font-size: 1.05rem; white-space: nowrap; }
  .unit-sticky .btn { flex: 1; padding: 0.7rem 1rem; }
}

/* ---- hub list pages --------------------------------------------------------- */
.hub-head h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.1; margin: 0 0 0.5rem; }
.hub-intro { color: var(--pr-slate); max-width: 60ch; margin: 0 0 1.6rem; font-size: 1.05rem; }
.hub-cta { display: inline-block; margin: 0 0 2rem; }

.card-grid { display: grid; gap: var(--pr-gap); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.unit-tile {
  background: var(--pr-card); border-radius: var(--pr-radius); box-shadow: var(--pr-shadow-sm);
  overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: box-shadow 0.18s var(--pr-ease), transform 0.18s var(--pr-ease);
}
.unit-tile:hover { box-shadow: var(--pr-shadow); transform: translateY(-2px); }
.unit-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--pr-card-soft); }
.unit-tile .body { padding: 0.85rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.unit-tile .name { font-weight: 700; line-height: 1.25; }
.unit-tile .meta { font-size: 0.85rem; color: var(--pr-slate); }
.unit-tile .price { margin-top: auto; padding-top: 0.4rem; font-weight: 800; color: var(--pr-forest); }

.hub-links { margin-top: 2.4rem; }
.hub-links h2 { font-size: 1.1rem; margin: 0 0 0.6rem; }
.hub-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hub-links a {
  display: inline-block; background: var(--pr-card); border: 1px solid var(--pr-line);
  border-radius: 999px; padding: 0.4rem 0.9rem; text-decoration: none; color: var(--pr-ink); font-size: 0.9rem;
}
.hub-links a:hover { border-color: var(--pr-forest); color: var(--pr-forest); }
