/* ============================================================
   FLOORPLANS — collection + detail pages
   Builds on base.css tokens (--accent, --font-display, spacing…).
   Reusable: brand look comes from base.css custom properties.
   ============================================================ */

/* .top-nav and .text-accent live in base.css (shared across all pages). */

/* Sibling of .btn-primary — matched height, type size, radius & letter-spacing
   so the two read as one button system when placed side by side. */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: rgba(45,154,111,0.04); }

/* CanIBuild "see it on your lot" link inside the dark CTA banner */
.cta-canibuild { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; white-space: nowrap; }
.cta-canibuild:hover { color: var(--accent-dark); }

/* picture wrappers must be block + fill their media box so img object-fit works */
.fp-card-media picture, .fp-gallery-main picture, .fp-hero-bg picture, .fp-thumb picture {
  display: block; width: 100%; height: 100%;
}
.fp-card-media img, .fp-gallery-main img, .fp-hero-bg img, .fp-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ============================================================
   COLLECTION — HERO
   ============================================================ */
.fp-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  margin-top: 52px; /* clear fixed top-bar */
  overflow: hidden;
}
.fp-hero-bg { position: absolute; inset: 0; z-index: 0; }
.fp-hero-bg picture, .fp-hero-img {
  width: 100%; height: 100%; object-fit: cover;
}
.fp-hero-img { transform: scaleX(-1); }
.fp-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(8,16,12,0.92) 0%, rgba(8,16,12,0.8) 30%, rgba(8,16,12,0.45) 60%, rgba(8,16,12,0.12) 100%);
}
.fp-hero-inner {
  position: relative; z-index: 2;
  max-width: 1100px; width: 100%;
  margin: 0 auto;
  padding: 0 20px var(--space-2xl);
  color: #fff;
}
.fp-hero-eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.78rem; font-weight: 600;
  color: #6fe0ad; margin-bottom: var(--space-md);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}
.fp-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600; line-height: 1.05;
  max-width: 16ch; margin-bottom: var(--space-md);
  text-wrap: balance;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
}
/* On the dark photo, swap the textured gradient clip for a solid bright accent —
   the gradient's dark stop muddies against the overlay and drops legibility. */
.fp-hero h1 .text-accent {
  background: none;
  color: #6fe0ad;
  -webkit-text-fill-color: #6fe0ad;
}
.fp-hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 56ch; color: rgba(255,255,255,0.92);
  margin-bottom: var(--space-lg);
  text-wrap: pretty;
}
.fp-hero-cta-row { display: flex; align-items: center; gap: var(--space-lg); flex-wrap: wrap; }
.fp-hero-trust { font-size: 0.85rem; color: rgba(255,255,255,0.8); }

/* ============================================================
   PROCESS STRIP
   ============================================================ */
.fp-process { background: var(--accent-dark); color: #fff; margin-top: var(--space-xl); }
.fp-process-inner {
  max-width: 1100px; margin: 0 auto;
  padding: var(--space-lg) 20px;
  display: grid; grid-template-columns: 1fr; gap: var(--space-md);
}
.fp-step { display: flex; align-items: center; gap: var(--space-md); }
.fp-step-num {
  flex: none;
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.16);
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.7rem; line-height: 1;
  font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; /* uniform cap-height digits */
  padding-top: 2px; /* optical-center the lining numeral in the circle */
}
.fp-step strong { display: block; font-size: 0.98rem; }
.fp-step span { font-size: 0.85rem; color: rgba(255,255,255,0.82); }
@media (min-width: 760px) {
  .fp-process-inner { grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
}

/* ============================================================
   FILTER CHIPS
   ============================================================ */
.fp-filter-wrap {
  position: sticky; top: 52px; z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.fp-filter {
  max-width: 1100px; margin: 0 auto;
  padding: var(--space-md) 20px;
  display: flex; gap: var(--space-sm);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fp-filter::-webkit-scrollbar { display: none; }
.fp-chip {
  flex: none;
  min-height: 44px; /* comfortable touch target */
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff;
  font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.fp-chip:hover { border-color: var(--accent); color: var(--accent); }
.fp-chip.active,
.fp-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   MODEL GRID + CARDS
   ============================================================ */
.fp-cat-section { padding-top: var(--space-2xl); padding-bottom: var(--space-md); }
.fp-cat-head { margin-bottom: var(--space-xl); }
.fp-grid {
  display: grid; gap: var(--space-lg);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .fp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .fp-grid { grid-template-columns: repeat(3, 1fr); } }

.fp-card {
  display: flex; flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  color: var(--text);
}
.fp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.10);
  border-color: rgba(45,154,111,0.4);
}
.fp-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.fp-card-media picture, .fp-card-img { width: 100%; height: 100%; }
.fp-card-img img, .fp-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.fp-card:hover .fp-card-media img { transform: scale(1.05); }
.fp-card-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--accent); color: #fff;
  font-size: 0.72rem; font-weight: 600;
  padding: 5px 10px; border-radius: 999px;
}
.fp-card-source {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(255,255,255,0.92); color: var(--text);
  font-size: 0.72rem; font-weight: 600;
  padding: 5px 10px; border-radius: 999px;
}
/* text-align:left guards against the centered inheritance from .section-inner */
.fp-card-body { padding: var(--space-lg); display: flex; flex-direction: column; flex: 1; text-align: left; }
.fp-card-eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.7rem; font-weight: 600; color: var(--text-muted);
  margin-bottom: 4px;
}
.fp-card-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; line-height: 1.2; margin-bottom: 6px; text-wrap: balance; }
.fp-card-spec { font-size: 0.9rem; color: var(--text-muted); margin-bottom: var(--space-md); }
.fp-card-foot {
  margin-top: auto; padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm);
}
.fp-card-price { font-weight: 700; font-size: 1rem; }
.fp-price-label {
  display: block; font-size: 0.66rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
}
.fp-card-cta { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.fp-card-cta svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.fp-card:hover .fp-card-cta svg { transform: translateX(3px); }
.fp-card[hidden] { display: none; }

/* ============================================================
   DETAIL — breadcrumb + hero
   ============================================================ */
.fp-breadcrumb { border-bottom: 1px solid var(--border); margin-top: 52px; }
.fp-breadcrumb-inner { max-width: 1100px; margin: 0 auto; padding: var(--space-md) 20px; }
.fp-breadcrumb a { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.fp-breadcrumb a:hover { color: var(--accent); }

.fp-detail { padding: var(--space-2xl) 0 var(--space-xl); }
.fp-detail-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1fr; gap: var(--space-2xl);
}
@media (min-width: 880px) { .fp-detail-inner { grid-template-columns: 1.1fr 1fr; align-items: start; } }

/* gallery */
.fp-gallery-main {
  aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-alt); cursor: zoom-in; position: relative;
}
.fp-gallery-main picture, .fp-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
/* shared zoom affordance — gallery main + floor plan figure */
.fp-gallery-zoom, .fp-plan-zoom {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.92); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.fp-gallery-zoom { bottom: 12px; right: 12px; }
.fp-gallery-zoom:hover, .fp-plan-zoom:hover { color: var(--accent); border-color: var(--accent); }
.fp-gallery-zoom svg, .fp-plan-zoom svg { width: 16px; height: 16px; }
.fp-gallery-caption { margin-top: var(--space-sm); font-size: 0.85rem; color: var(--text-light); text-align: center; letter-spacing: 0.02em; }
.fp-thumbs { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); }
.fp-thumb {
  flex: 1; aspect-ratio: 4 / 3; max-width: 110px;
  border-radius: var(--radius-md); overflow: hidden;
  border: 2px solid transparent; padding: 0; background: var(--bg-alt);
  transition: border-color 0.15s ease;
}
.fp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fp-thumb.active { border-color: var(--accent); }

/* info column */
.fp-detail-tags { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-md); }
.fp-tag {
  font-size: 0.74rem; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: var(--bg-alt); color: var(--text-muted); border: 1px solid var(--border);
}
.fp-tag-source { background: rgba(45,154,111,0.10); color: var(--accent-dark); border-color: rgba(45,154,111,0.25); }
.fp-tag-badge { background: var(--accent); color: #fff; border-color: var(--accent); }
.fp-detail-name { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; line-height: 1.05; }
.fp-detail-tagline { font-size: 1.1rem; color: var(--text-muted); margin: var(--space-sm) 0 var(--space-lg); }

.fp-spec-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; margin-bottom: var(--space-lg);
}
@media (min-width: 480px) { .fp-spec-grid { grid-template-columns: repeat(3, 1fr); } }
.fp-spec { background: #fff; padding: var(--space-md); }
.fp-spec dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 3px; }
.fp-spec dd { font-size: 1rem; font-weight: 600; }

.fp-detail-price {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  padding: var(--space-md) 0; margin-bottom: var(--space-md);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.fp-detail-price-value { font-family: var(--font-body); font-size: 1.9rem; font-weight: 600; line-height: 1; letter-spacing: -0.01em; color: var(--accent-dark); margin-top: 2px; }
.fp-detail-cta { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-md); }
.fp-detail-note { font-size: 0.82rem; color: var(--text-light); line-height: 1.5; }

/* overview — text-align:left guards against centered inheritance from .section-inner */
.fp-overview { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); text-align: left; }
@media (min-width: 820px) { .fp-overview { grid-template-columns: 1.4fr 1fr; align-items: start; gap: var(--space-2xl); } }
.fp-overview .section-label { margin-bottom: var(--space-sm); }
.fp-overview-text { font-size: 1.15rem; line-height: 1.7; color: var(--text); max-width: 60ch; }
.fp-highlights { list-style: none; display: grid; gap: var(--space-md); }
.fp-highlights li {
  position: relative; padding-left: 30px; font-size: 1rem; color: var(--text-muted);
}
.fp-highlights li::before {
  content: ""; position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(45,154,111,0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%232d9a6f'%3E%3Cpath fill-rule='evenodd' d='M16.7 5.2a.75.75 0 01.1 1l-8 10.5a.75.75 0 01-1.1.1l-4.5-4.5a.75.75 0 011-1.1l3.9 3.9 7.5-9.8a.75.75 0 011-.1z' clip-rule='evenodd'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* floor plan */
.fp-plan-section .section-title { margin-bottom: var(--space-lg); }
.fp-plan-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); max-width: 760px; margin: 0 auto; }
.fp-plan-grid-multi { max-width: 1000px; }
@media (min-width: 760px) { .fp-plan-grid-multi { grid-template-columns: 1fr 1fr; align-items: start; } }
.fp-plan-item { display: flex; flex-direction: column; min-width: 0; }
.fp-plan-label {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 600;
  text-align: center; margin-bottom: var(--space-sm); color: var(--text-muted);
  letter-spacing: 0.01em;
}
.fp-plan-figure {
  position: relative; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-xl); text-align: center; cursor: zoom-in;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.fp-plan-img img { max-width: 100%; max-height: 70vh; margin: 0 auto; }
.fp-plan-zoom { top: 12px; right: 12px; }
.fp-plan-caption { text-align: center; font-size: 0.85rem; color: var(--text-light); margin-top: var(--space-md); max-width: 60ch; margin-left: auto; margin-right: auto; }
.fp-plan-placeholder { cursor: default; background: var(--bg-alt); border-style: dashed; padding: var(--space-3xl) var(--space-lg); }
.fp-plan-placeholder-inner { max-width: 46ch; margin: 0 auto; display: grid; gap: var(--space-sm); justify-items: center; }
.fp-plan-placeholder-inner svg { width: 44px; height: 44px; color: var(--accent); }
.fp-plan-placeholder-inner strong { font-family: var(--font-display); font-size: 1.3rem; }
.fp-plan-placeholder-inner span { color: var(--text-muted); }

/* features — text-align:left guards against centered inheritance from .section-inner */
.fp-features { list-style: none; display: grid; grid-template-columns: 1fr; gap: var(--space-md); text-align: left; max-width: 820px; margin: 0 auto; }
@media (min-width: 640px) { .fp-features { grid-template-columns: repeat(2, 1fr); column-gap: var(--space-xl); } }
.fp-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 1rem; color: var(--text-muted); }
.fp-features svg { flex: none; width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }

.fp-grid-related { margin-top: var(--space-xl); }

/* ============================================================
   FOCUS-VISIBLE — keyboard affordance for custom controls
   ============================================================ */
.fp-chip:focus-visible,
.fp-thumb:focus-visible,
.fp-card:focus-visible,
.fp-gallery-zoom:focus-visible,
.fp-plan-zoom:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.fp-card:focus-visible { border-color: var(--accent); }

/* ============================================================
   DETAIL — mobile refinements
   ============================================================ */
@media (max-width: 879px) {
  /* gallery → info sit closer together when stacked (64px is too airy here) */
  .fp-detail-inner { gap: var(--space-xl); }
}
@media (max-width: 479px) {
  /* full-width, stacked CTAs: bigger targets + clean shared edges */
  .fp-detail-cta { flex-direction: column; align-items: stretch; }
  .fp-detail-cta .btn-primary,
  .fp-detail-cta .btn-secondary { width: 100%; justify-content: center; }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.fp-lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8,12,10,0.92);
  display: none; align-items: center; justify-content: center;
  padding: 4vw; cursor: zoom-out;
}
.fp-lightbox.open { display: flex; }
.fp-lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: var(--radius-md); }
.fp-lightbox-close {
  position: absolute; top: 18px; right: 22px;
  background: none; border: none; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer;
}

/* Custom design/build callout (collection + detail) */
.fp-custom-callout {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-xl); flex-wrap: wrap;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}
.fp-custom-copy { flex: 1; min-width: 280px; }
.fp-custom-copy h2 { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; margin: 6px 0 8px; }
.fp-custom-copy p { color: var(--text-muted); max-width: 60ch; margin: 0; }
.fp-custom-callout .btn-secondary { white-space: nowrap; flex-shrink: 0; }

/* ---- Past-projects gallery (collection page) ---- */
.fp-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}
.fp-project {
  position: relative; margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-alt); border: 1px solid var(--border);
}
.fp-project-img { display: block; width: 100%; height: 100%; }
.fp-project-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.fp-project:hover .fp-project-img img { transform: scale(1.05); }
.fp-project-cap {
  position: absolute; inset: auto 0 0 0;
  padding: 30px 14px 12px;
  color: #fff; font-size: 0.82rem; font-weight: 500;
  background: linear-gradient(to top, rgba(0,0,0,0.66), rgba(0,0,0,0));
}
.fp-projects-cta { margin-top: var(--space-xl); text-align: center; }
.fp-projects-cta p { color: var(--text-muted); max-width: 60ch; margin: 0 auto var(--space-md); }
@media (max-width: 600px) {
  .fp-projects-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-sm); }
  /* hide the hero trust line on mobile */
  .fp-hero-trust { display: none; }
}
