/*
  Pointwell Stays
  Palette: pine + cool bone, one persimmon accent. Light and dark follow the system setting.
  Radius rule: buttons and chips are pills, tiles/cards/dialog are 14px, inputs are 10px.
  Z-index scale: nav 10, dialog uses the browser top layer.
*/
:root {
  --bg: #eef1ec;
  --tint: #e2e8df;
  --ink: #13211b;
  --muted: #4a5850;
  --line: #c6cfc5;
  --accent: #b93f24;
  --accent-hover: #a23520;
  --accent-ink: #fffdfa;
  --accent-text: #a23520;
  --field: #f8faf6;
  --shadow: 0 18px 40px -22px rgba(19, 49, 38, .45);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --r-card: 14px;
  --r-field: 10px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1613;
    --tint: #141f1a;
    --ink: #e7ece6;
    --muted: #a5b2a9;
    --line: #2a3a31;
    --accent-text: #f08d6f;
    --field: #18241e;
    --shadow: 0 18px 40px -22px rgba(0, 0, 0, .8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

h1, h2, h3, .brand { font-family: var(--display); letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 4.4rem); line-height: 1.02; font-weight: 600; }
h1 span { display: block; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.75rem); line-height: 1.1; font-weight: 600; }
h3 { font-size: 1.2rem; line-height: 1.25; font-weight: 600; }

.wrap { width: min(1240px, 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.tint { background: var(--tint); }
.sub { color: var(--muted); max-width: 60ch; margin-top: .75rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: .5rem; top: .5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.5rem;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-sm { min-height: 44px; padding: .5rem 1.15rem; font-size: .95rem; }
.text-link { font-weight: 600; text-underline-offset: 4px; }
.text-link:hover { color: var(--accent-text); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }
.brand { font-size: 1.3rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav-links { display: none; gap: 2rem; }
.nav-links a { text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--accent-text); }
@media (min-width: 900px) { .nav-links { display: flex; } }

/* Hero */
.hero-in { display: grid; gap: 2.5rem; padding-block: 2.5rem 3.5rem; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin-top: 1.4rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-art { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.hero-art .ph:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
@media (max-width: 899px) { .hero-art .ph:not(:first-child) .ph-hood { display: none; } }
@media (min-width: 900px) {
  .hero-in {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center; gap: 4rem;
    min-height: calc(100dvh - 69px); padding-block: 3rem;
  }
  .hero-art { grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 1rem; height: min(68dvh, 560px); }
  .hero-art .ph { aspect-ratio: auto; height: 100%; }
  .hero-art .ph:first-child { grid-column: 1; grid-row: 1 / -1; aspect-ratio: auto; }
}

/* Photo slot with placeholder fallback */
.ph {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 4 / 3; padding: 1.1rem 1.2rem; overflow: hidden;
  border-radius: var(--r-card); color: #f2f5ef; text-decoration: none;
  background:
    radial-gradient(110% 85% at var(--gx, 85%) var(--gy, 8%), rgba(232, 118, 78, .6), transparent 58%),
    linear-gradient(var(--ang, 160deg), var(--c1, #1c4536), var(--c2, #0c1d22));
}
.ph-name { font: 600 clamp(1.15rem, 2.2vw, 1.6rem)/1.1 var(--display); letter-spacing: -.02em; max-width: 14ch; }
.ph-hood { font-size: .85rem; margin-top: .35rem; color: #dbe3da; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph.has-img .ph-name, .ph.has-img .ph-hood { display: none; }
a.ph { transition: transform .5s var(--ease); }
a.ph:hover { transform: translateY(-4px); }

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.chip {
  min-height: 44px; padding: .45rem 1.1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; font-weight: 500; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Property grid */
.grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem 1.5rem; margin-top: 2rem; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; }
.card[hidden] { display: none; }
.card h3 { margin-top: 1rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--accent-text); }
.card-hood, .card-facts { color: var(--muted); font-size: .95rem; }
.card-hood { margin-top: .25rem; }
.card-facts { margin-top: .15rem; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: 1rem; }
.price { font-size: .95rem; color: var(--muted); }
.price strong { font: 600 1.35rem/1 var(--display); color: var(--ink); }

/* Why direct */
.direct { display: grid; gap: 2rem; }
.direct-list li { padding-block: 1.5rem; border-top: 1px solid var(--line); }
.direct-list p { color: var(--muted); margin-top: .4rem; max-width: 52ch; }
@media (min-width: 900px) {
  .direct { grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: start; }
  .direct h2 { position: sticky; top: 110px; }
  .direct-list li:first-child { padding-top: 0; border-top: 0; }
}

/* Steps */
.steps { display: grid; gap: 2rem; margin-top: 2.5rem; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block; font: 600 3.5rem/1 var(--display); color: var(--accent-text); margin-bottom: .75rem;
}
.steps p { color: var(--muted); margin-top: .4rem; max-width: 34ch; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }

/* Neighborhood band */
.area {
  border-radius: var(--r-card); padding: clamp(2rem, 6vw, 4.5rem); color: #f2f5ef;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(232, 118, 78, .5), transparent 60%),
    linear-gradient(150deg, #1c4536, #0c1d22);
}
.area p { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 56ch; margin-top: 1rem; }
.area .area-note { font-size: .95rem; color: #dbe3da; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: 3rem; }
.footer-in { display: grid; gap: 1.5rem; }
.footer p { color: var(--muted); max-width: 46ch; margin-top: .5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-links a { text-decoration: none; font-weight: 500; padding-block: .5rem; }
.footer-links a:hover { color: var(--accent-text); }
.footer .fine { font-size: .875rem; margin-top: 0; max-width: none; }
@media (min-width: 768px) {
  .footer-in { grid-template-columns: 1fr auto; }
  .footer .fine { grid-column: 1 / -1; }
}

/* Property detail page */
.detail { padding-block: 2rem 5rem; min-height: 60dvh; }
.detail-grid { display: grid; gap: 2rem; margin-top: 1.5rem; }
.detail .ph { aspect-ratio: 4 / 3; }
.detail .ph-name { font-size: clamp(1.6rem, 4vw, 2.6rem); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: .75rem; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-card); }
.detail h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.06; }
.detail-hood { color: var(--muted); font-size: 1.1rem; margin-top: .6rem; }
.facts { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin-top: 1.5rem; padding-block: 1.25rem; border-block: 1px solid var(--line); }
.facts dt { font-size: .85rem; color: var(--muted); }
.facts dd { font: 600 1.25rem/1.2 var(--display); }
.detail-desc { margin-top: 1.5rem; max-width: 58ch; font-size: 1.08rem; }
.included { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem 1.5rem; margin-top: 1.25rem; color: var(--muted); max-width: 30rem; }
.book-box { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.book-box .price strong { font-size: 1.9rem; }
.detail .note { color: var(--muted); font-size: .9rem; margin-top: .9rem; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: start; } }

/* Booking dialog */
dialog.book {
  width: min(680px, 100% - 1.5rem); max-height: calc(100dvh - 1.5rem);
  padding: 0; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--bg); color: var(--ink); box-shadow: var(--shadow); overflow: auto;
}
dialog.book::backdrop { background: rgba(8, 16, 13, .62); }
.book-in { padding: clamp(1.25rem, 4vw, 2.25rem); }
.book-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.book-head h2 { font-size: 1.7rem; }
.close { min-width: 44px; min-height: 44px; padding: 0 .9rem; border: 1.5px solid var(--line); border-radius: 999px; background: transparent; font-weight: 500; cursor: pointer; }
.close:hover { border-color: var(--ink); }
.fields { display: grid; grid-template-columns: 1fr; gap: 1.1rem; margin-top: 1.5rem; }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .65rem .85rem;
  border: 1.5px solid var(--line); border-radius: var(--r-field); background: var(--field);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--accent-text); }
.field [aria-invalid="true"] { border-color: var(--accent-text); }
.hint { font-size: .85rem; color: var(--muted); }
.err { font-size: .875rem; font-weight: 600; color: var(--accent-text); }
.err:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.5rem; }
@media (min-width: 560px) {
  .fields { grid-template-columns: 1fr 1fr; }
  .field.full { grid-column: 1 / -1; }
}
.summary {
  margin-top: 1.25rem; padding: 1rem 1.15rem; border-radius: var(--r-field);
  background: var(--tint); font: inherit; font-size: .95rem; white-space: pre-wrap; overflow-wrap: anywhere;
}

/* Scroll reveal: only when JS is running and motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ---------- availability calendar ---------- */
.cal { margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 1.75rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cal-head h2 { font-size: 1.5rem; }
.cal-nav { display: flex; gap: .5rem; }
.cal-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.cal-arrow:hover:not(:disabled) { border-color: var(--ink); }
.cal-arrow:disabled { opacity: .35; cursor: default; }
.cal-months { display: grid; gap: 1.75rem; margin-top: 1.25rem; }
@media (min-width: 560px) { .cal-months { grid-template-columns: 1fr 1fr; } }
.cal-month h3, .cal-month h4 { font-size: 1rem; margin-bottom: .6rem; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow span { font-size: .75rem; color: var(--muted); text-align: center; padding-bottom: .3rem; }
.cal-day { aspect-ratio: 1; min-height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: .9rem; font-variant-numeric: tabular-nums; cursor: pointer; }
.cal-day:hover:not(:disabled) { background: var(--tint); box-shadow: inset 0 0 0 1px var(--ink); }
.cal-day:disabled { cursor: default; color: var(--muted); }
.cal-day.is-past { opacity: .35; }
.cal-day.is-booked { text-decoration: line-through; opacity: .5; background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line) 5px 6px); }
.cal-day.is-today { font-weight: 700; }
.cal-day.is-sel { background: var(--tint); color: var(--ink); border-radius: 0; }
.cal-day.is-end { background: var(--accent); color: var(--accent-ink); border-radius: 8px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.cal-legend i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); }
.cal-legend .lg-booked { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--line) 3px 4px); }
.cal-legend .lg-sel { background: var(--accent); border-color: var(--accent); }
.cal-status { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.consent { margin-top: .9rem; font-size: .82rem; color: var(--muted); max-width: 60ch; }

/* ---------- legal pages ---------- */
.legal { padding-block: 3rem 5rem; max-width: 76ch; }
.legal h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.06; }
.legal-meta { color: var(--muted); margin-top: .75rem; }
.legal-toc { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin-top: 1.5rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--r-card); }
.legal-toc a { font-weight: 500; text-underline-offset: 4px; }
.legal section { margin-top: 2.5rem; scroll-margin-top: 90px; }
.legal h2 { font-size: 1.35rem; margin-bottom: .75rem; }
.legal p { margin-top: .75rem; }
.legal ul { margin-top: .75rem; padding-left: 1.25rem; list-style: disc; }
.legal li { margin-top: .45rem; }
.legal-table { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.legal-tr { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: .8rem 1.1rem; border-top: 1px solid var(--line); }
.legal-tr:first-child { border-top: 0; }
.legal-th { background: var(--tint); font-weight: 600; }
button.text-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* calendar inside the booking dialog */
.cal.cal-form { margin-top: 0; border-top: 0; padding-top: 0; }
.cal.cal-form:focus { outline: none; }
.cal-form .cal-head h3 { font-size: 1.1rem; }
.cal-form .cal-arrow { width: 38px; height: 38px; }

/* contact form */
.contact-form { margin-top: 2rem; max-width: 720px; }
.contact-form .fields { margin-top: 0; }
#ct-done { margin-top: 2rem; font-size: 1.15rem; }
