/* Fern property page by DapsStudioCo
   Colors for each theme are at the top. Change a hex value to recolor everything that uses it. */

:root,
[data-theme="fern"] {
  --page: #f7f5ef;
  --ink: #1e2a22;
  --muted: #5f6b62;
  --line: #ddd8ca;
  --soft: #eceee3;
  --accent: #2f5a43;       /* main buttons */
  --accent-ink: #f7f5ef;
  --band: #22342a;         /* agent footer */
  --band-ink: #f2efe6;
  --badge: #f7f5ef;
  --badge-ink: #22342a;
  --focus: #2f5a43;
  color-scheme: light;
}
[data-theme="stone"] {
  --page: #f4f3f0;
  --ink: #1b1d21;
  --muted: #61656d;
  --line: #d9d8d3;
  --soft: #e8e7e3;
  --accent: #1b1d21;
  --accent-ink: #f4f3f0;
  --band: #1b1d21;
  --band-ink: #f4f3f0;
  --badge: #1b1d21;
  --badge-ink: #f4f3f0;
  --focus: #1b1d21;
  color-scheme: light;
}
[data-theme="dusk"] {
  --page: #131619;
  --ink: #ecebe5;
  --muted: #a3a8a1;
  --line: #2c3236;
  --soft: #1c2125;
  --accent: #c9d9ae;
  --accent-ink: #131619;
  --band: #0d1012;
  --band-ink: #ecebe5;
  --badge: #c9d9ae;
  --badge-ink: #131619;
  --focus: #c9d9ae;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.has-sticky { padding-bottom: 92px; }
h1, h2, h3 { font-family: "Newsreader", Georgia, "Times New Roman", serif; font-weight: 500; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: 8px; z-index: 60; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }
.wrap.narrow { max-width: 820px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  border: 1.5px solid transparent; background: none; color: inherit;
  font: 600 1rem/1.2 "Hanken Grotesk", system-ui, sans-serif; text-decoration: none; cursor: pointer;
  transition: filter .15s ease, background .15s ease;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ghost { border-color: currentColor; }
.btn.ghost:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.btn.small { min-height: 42px; padding: 0 18px; font-size: .95rem; }

/* ---------- Hero ---------- */
.hero { padding-top: env(safe-area-inset-top); }
.hero-photo { position: relative; margin: 0; background: var(--soft); }
.hero-photo img { width: 100%; height: min(76vh, 760px); object-fit: cover; }
.hero-photo.missing img { visibility: hidden; height: 42vh; }
.status {
  position: absolute; left: max(22px, env(safe-area-inset-left)); top: 22px;
  padding: 8px 16px; border-radius: 999px; background: var(--badge); color: var(--badge-ink);
  font-weight: 700; font-size: .92rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.status[data-status="sold"] { background: #a6362c; color: #fff; }
.status[data-status="pending"] { background: #c98a1f; color: #1d1405; }
.hero-count {
  position: absolute; right: max(22px, env(safe-area-inset-right)); bottom: 22px;
  padding: 10px 18px; border-radius: 999px; border: 0; background: rgba(15, 18, 16, .72); color: #fff;
  font: 600 .95rem/1 "Hanken Grotesk", system-ui, sans-serif; cursor: pointer; backdrop-filter: blur(6px);
}
.hero-body { padding-top: 40px; padding-bottom: 56px; }
.eyebrow { color: var(--muted); font-weight: 500; font-size: 1.05rem; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); line-height: 1.02; letter-spacing: -.015em; margin-top: 6px; font-variation-settings: "opsz" 72; }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: 18px; }
.price { font-family: "Newsreader", Georgia, serif; font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 500; }
.price-note { color: var(--muted); }

/* The spec strip: drawn like a dimension line on an architect's plan */
.specs { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; row-gap: 22px; }
.specs li { position: relative; padding: 16px 28px 0 0; border-top: 1.5px solid var(--ink); display: flex; flex-direction: column; min-width: 96px; }
.specs li::before, .specs li:last-child::after { content: ""; position: absolute; top: -7px; width: 1.5px; height: 13px; background: var(--ink); }
.specs li::before { left: 0; }
.specs li:last-child::after { right: 0; }
.specs li:last-child { padding-right: 0; flex-grow: 1; }
.specs b { font-family: "Newsreader", Georgia, serif; font-weight: 500; font-size: 1.9rem; line-height: 1.1; }
.specs span { color: var(--muted); font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* ---------- Sections ---------- */
.section { padding: clamp(52px, 8vw, 92px) 0; border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.08; letter-spacing: -.01em; margin-bottom: 28px; }

.oh-list { display: grid; gap: 14px; max-width: 820px; }
.oh { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 20px; background: var(--soft); border-radius: 18px; }
.oh-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 76px; border-radius: 14px; background: var(--page); border: 1px solid var(--line); }
.oh-date span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.oh-date b { font-family: "Newsreader", Georgia, serif; font-weight: 500; font-size: 2rem; line-height: 1; }
.oh-day { font-weight: 600; font-size: 1.08rem; }
.oh-time { color: var(--muted); }
.cal { position: relative; }
.cal-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; min-width: 220px; padding: 6px; background: var(--page); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .45); }
.cal-menu a, .cal-menu button { display: block; width: 100%; padding: 11px 14px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: 500 .98rem/1.3 "Hanken Grotesk", system-ui, sans-serif; text-align: left; text-decoration: none; cursor: pointer; }
.cal-menu a:hover, .cal-menu button:hover { background: var(--soft); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 240px; gap: 12px; }
.tile { position: relative; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--soft); cursor: zoom-in; }
.tile.wide { grid-column: span 2; grid-row: span 2; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.03); }
.tile.missing img { visibility: hidden; }
.tile-cap { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(15, 18, 16, .66); color: #fff; font-size: .88rem; font-weight: 600; }

.about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.prose p { font-size: 1.15rem; line-height: 1.7; max-width: 62ch; }
.prose p + p { margin-top: 1em; }
.highlights { border-top: 1.5px solid var(--ink); padding-top: 18px; }
.highlights h3 { font-size: 1.45rem; margin-bottom: 10px; }
.highlights ul { list-style: none; margin: 0; padding: 0; }
.highlights li { padding: 11px 0 11px 30px; border-bottom: 1px solid var(--line); position: relative; }
.highlights li::before { content: ""; position: absolute; left: 2px; top: 22px; width: 16px; height: 2px; border-radius: 2px; background: var(--accent); }

.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.facts div { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

.plan-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.plan-tabs button { min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: none; color: var(--ink); font: 600 .95rem/1 "Hanken Grotesk", system-ui, sans-serif; cursor: pointer; }
.plan-tabs button[aria-selected="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }
.plan { margin: 0; padding: clamp(16px, 4vw, 36px); background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.plan img { width: 100%; height: auto; max-height: 620px; object-fit: contain; }

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; padding: clamp(22px, 4vw, 36px); background: var(--soft); border-radius: 22px; }
.calc-out { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.calc-out span { color: var(--muted); }
.calc-out strong { font-family: "Newsreader", Georgia, serif; font-weight: 500; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; }
.calc-out small { color: var(--muted); font-size: .88rem; max-width: 30ch; }
.calc-in { display: grid; gap: 20px; }
.calc-in label { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-weight: 600; }
.calc-in output { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.calc-in input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); height: 28px; }

.loc-address { font-size: 1.2rem; font-weight: 600; margin-bottom: 14px; }
.nearby { list-style: none; margin: 0 0 24px; padding: 0; }
.nearby li { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.nearby b { font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ---------- Agent footer ---------- */
.agent-wrap { background: var(--band); color: var(--band-ink); padding: 64px 0 calc(64px + env(safe-area-inset-bottom)); }
.agent { display: flex; align-items: center; gap: 24px; }
.agent-photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.agent-kicker { opacity: .7; }
.agent-name { font-family: "Newsreader", Georgia, serif; font-size: 2.1rem; font-weight: 500; line-height: 1.15; }
.agent-role { opacity: .78; }
.agent-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.agent-wrap .btn.primary { background: var(--band-ink); color: var(--band); }
.fineprint { margin-top: 36px; font-size: .85rem; opacity: .6; max-width: 70ch; }
.theme-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 30px; font-size: .92rem; }
.theme-picker button { min-height: 36px; padding: 0 14px; border: 1.5px solid currentColor; border-radius: 999px; background: none; color: inherit; font: 600 .9rem/1 "Hanken Grotesk", system-ui, sans-serif; cursor: pointer; }
.theme-picker button[aria-pressed="true"] { background: var(--band-ink); color: var(--band); }

/* ---------- Sticky bar ---------- */
.sticky {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 560px; margin: 0 auto; padding: 10px 10px 10px 20px;
  background: var(--page); color: var(--ink); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .5);
}
.sticky div { display: flex; flex-direction: column; min-width: 0; }
.sticky strong { font-family: "Newsreader", Georgia, serif; font-weight: 500; font-size: 1.3rem; line-height: 1.1; }
.sticky span { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky .btn { flex-shrink: 0; }

@media (min-width: 861px) { .sticky { display: none !important; } body.has-sticky { padding-bottom: 0; } }

/* ---------- Lightbox ---------- */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 10, 9, .96); color: #fff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox img { max-width: 94vw; max-height: 82vh; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.lb-cap { position: absolute; left: 0; right: 0; bottom: calc(22px + env(safe-area-inset-bottom)); text-align: center; font-size: .95rem; opacity: .85; }
.lb-btn, .lb-close { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 18px; top: calc(18px + env(safe-area-inset-top)); font-size: 1.8rem; }

/* ---------- Phones ---------- */
@media (max-width: 860px) {
  .about, .calc { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; }
}
@media (max-width: 520px) {
  body { font-size: 1rem; }
  .hero-photo img { height: 62vh; min-height: 300px; }
  .hero-body { padding-top: 28px; padding-bottom: 44px; }
  .specs li { padding-right: 18px; min-width: 84px; }
  .specs b { font-size: 1.55rem; }
  .actions .btn { flex: 1 1 100%; }
  .oh { grid-template-columns: 62px minmax(0, 1fr); }
  .oh-date { height: 62px; }
  .oh .cal { grid-column: 1 / -1; }
  .oh .cal .btn { width: 100%; }
  .cal-menu { left: 0; right: 0; }
  .agent-photo { width: 84px; height: 84px; }
  .agent-name { font-size: 1.7rem; }
  .agent-actions .btn { flex: 1 1 100%; }
  .lb-btn { display: none; }
}
@media print {
  .sticky, .theme-picker, .actions, .agent-actions, .hero-count, .skip, .lightbox { display: none !important; }
}
