/* ─── Print stylesheet ───────────────────────────────────────────────────
   When the user prints the page (Cmd/Ctrl+P or "Save as PDF"), the website
   should become a readable, exposé-style PDF dossier. We hide interactive
   chrome, flatten dark sections to printer-friendly tones, force tasteful
   page breaks, and stamp every page with a confidential header/footer.
   ────────────────────────────────────────────────────────────────────── */

@page {
  size: A4 portrait;
  margin: 18mm 16mm 22mm 16mm;
}

@page :first {
  margin-top: 14mm;
}

/* ── Base ────────────────────────────────────────────────────────────── */
html, body {
  background: #ffffff !important;
  color: #1B211F !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body { font-size: 10.5pt; line-height: 1.45; }

/* Don't print grain overlay or any backdrop blurs */
body::after { display: none !important; }

/* Use serif for body in print — feels more like a printed exposé */
body, p, .body, .lede, li, td {
  font-family: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
}
.eyebrow, .mono, .num, .idx, .km .sup, .stamp, .corner,
form.inquiry .lk, .scenario-tabs button, .mp-tabs button {
  font-family: "Helvetica", "Arial", sans-serif !important;
  font-size: 8pt !important;
  letter-spacing: 0.16em;
  color: #6E746F !important;
}
h1, h2, h3, h4, .pullquote, .glance-list .v, .hero-meta .v,
.facts-grid .cell .v, .location-points .km, .invest-list .h,
.scenario-card h4, .legal-list h4, .contact-meta .block .v,
.mp-card .meta h3, .subhead, .section-head .num {
  font-family: "Cormorant Garamond", "Georgia", "Times New Roman", serif !important;
  color: #1B211F !important;
}

/* ── Hide non-content chrome ─────────────────────────────────────────── */
.nav, .nav-cta, .lang, .marquee, .hero-cta,
form.inquiry, .contact-card .links,
.legal-callout .btn, .scenario-tabs,
.mp-tabs, .pkg .btn, .pkg-list .btn,
.hero-media .stamp, .hero-media .corner,
button, a[href="#contact"].btn, a.btn {
  display: none !important;
}

/* Show wordmark only as a print-only header replacement */
.wordmark { display: none !important; }

/* ── Print-only running header ───────────────────────────────────────── */
@page {
  @top-left {
    content: "COSTA SERENA";
    font-family: "Cormorant Garamond", "Georgia", serif;
    font-size: 9pt;
    letter-spacing: 0.32em;
    color: #6E746F;
  }
  @top-right {
    content: "Private listing · By inquiry";
    font-family: "Helvetica", "Arial", sans-serif;
    font-size: 7.5pt;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6E746F;
  }
  @bottom-left {
    content: "terrasamana.org  ·  info@terrasamana.org";
    font-family: "Helvetica", "Arial", sans-serif;
    font-size: 7.5pt;
    letter-spacing: 0.06em;
    color: #6E746F;
  }
  @bottom-right {
    content: counter(page) " / " counter(pages);
    font-family: "Helvetica", "Arial", sans-serif;
    font-size: 7.5pt;
    color: #6E746F;
  }
}

/* ── Layout flattening ───────────────────────────────────────────────── */
.shell { max-width: none !important; padding: 0 !important; }

section {
  padding: 0 0 8mm !important;
  background: #ffffff !important;
  color: #1B211F !important;
  border: 0 !important;
  break-inside: auto;
}

/* Force section break before each major section so it starts on a new page */
section:not(:first-of-type) { break-before: page; }
#property { break-before: avoid; } /* keep at-a-glance with hero */

/* Inside dark sections, recolor everything to printer-friendly */
.facts, .process, .legal-callout, footer {
  background: #ffffff !important;
  color: #1B211F !important;
  border: 1pt solid #C9B998 !important;
}
.facts h2, .facts .num, .facts-grid .cell .v,
.process h2, .process .lede, .process-grid .step h4, .process-grid .step p,
.legal-callout h3, .legal-callout p, .legal-callout .seal,
footer, footer a, footer .brand p, footer .brand .wm {
  color: #1B211F !important;
}
.process-grid .step,
.facts-grid .cell {
  border-color: #C9B998 !important;
}
.process .section-head .num,
.process .section-head .label { color: #1B211F !important; }
.process .section-head .label { border-left-color: #C9B998 !important; }

/* Section heads — bring back the editorial split, no border-bottom on print */
.section-head {
  page-break-after: avoid;
  break-after: avoid;
  margin-bottom: 6mm !important;
  padding-bottom: 4mm !important;
  border-bottom: 0.5pt solid #C9B998 !important;
  grid-template-columns: 60mm 1fr !important;
  gap: 8mm !important;
}
.section-head .num { font-size: 28pt !important; line-height: 1 !important; }
.section-head h2 { font-size: 18pt !important; }
.section-head .lede { font-size: 11pt !important; line-height: 1.4 !important; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { padding: 0 0 6mm !important; }
.hero-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8mm !important;
  direction: ltr !important;
}
.hero-grid > * { direction: ltr !important; }
.hero-media {
  aspect-ratio: 4 / 5 !important;
  break-inside: avoid;
}
.hero-media img { filter: none !important; }
.hero-text h1 { font-size: 28pt !important; margin-top: 2mm !important; }
.hero-text .hero-sub { font-size: 11pt !important; }
.hero-meta { margin-top: 6mm !important; padding-top: 3mm !important; }
.hero-meta .cell .v { font-size: 18pt !important; }
.hero-meta .cell .k { font-size: 8pt !important; }

/* ── At a glance ─────────────────────────────────────────────────────── */
.glance { border-block: 0 !important; }
.glance-grid { grid-template-columns: 1fr 1fr !important; gap: 8mm !important; }
.glance-list li {
  grid-template-columns: 50mm 1fr !important;
  padding: 2.5mm 0 !important;
  break-inside: avoid;
}
.glance-list .v { font-size: 11pt !important; }
.glance-list .k { font-size: 8pt !important; }

/* ── Estate ──────────────────────────────────────────────────────────── */
.estate-grid {
  grid-template-columns: 1fr 1fr !important;
  gap: 8mm !important;
}
.estate-media { aspect-ratio: 1 / 1 !important; }
.estate-media .img img { filter: none !important; }
.pullquote { font-size: 13pt !important; margin-top: 5mm !important; padding-left: 4mm !important; }

/* ── Facts / KPI grid ────────────────────────────────────────────────── */
.facts-grid, .kpi-grid {
  grid-template-columns: repeat(4, 1fr) !important;
  break-inside: avoid;
}
.facts-grid .cell, .kpi {
  padding: 4mm !important;
  border-right: 0.5pt solid #C9B998 !important;
  break-inside: avoid;
}
.facts-grid .cell .v, .kpi .v { font-size: 18pt !important; }
.facts-grid .cell .u, .kpi .k { font-size: 8pt !important; }
.facts-grid .cell .d { font-size: 9pt !important; }
.kpi .s { font-size: 7pt !important; }

/* ── Location ────────────────────────────────────────────────────────── */
.location-grid { grid-template-columns: 1fr 1fr !important; gap: 8mm !important; }
.location-map { aspect-ratio: 5 / 4 !important; }
.location-points li {
  grid-template-columns: 22mm 1fr auto !important;
  padding: 2.5mm 0 !important;
  break-inside: avoid;
}
.location-points .km { font-size: 13pt !important; }
.location-points .name { font-size: 10pt !important; }
.location-points .kind { font-size: 8pt !important; }
.location-points .mode { font-size: 7pt !important; }

/* ── Nature cards ────────────────────────────────────────────────────── */
.adv-grid {
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 4mm !important;
}
.adv-card { break-inside: avoid; border: 0.5pt solid #C9B998 !important; }
.adv-card .img img { filter: none !important; }
.adv-card h3 { font-size: 13pt !important; }
.adv-card p { font-size: 9.5pt !important; }
.adv-card .body { padding: 4mm !important; }

/* ── Market ──────────────────────────────────────────────────────────── */
.neighbor-list { grid-template-columns: 1fr 1fr !important; }
.neighbor-list li { padding: 2.5mm 0 !important; break-inside: avoid; }
.neighbor-list .hn { font-size: 11pt !important; }
.neighbor-list .hd { font-size: 9pt !important; }
.connect-text { font-size: 9.5pt !important; }
.subhead { font-size: 13pt !important; }

/* ── Investment ──────────────────────────────────────────────────────── */
.invest-grid { grid-template-columns: 1.1fr 1fr !important; gap: 8mm !important; }
.invest-list li { padding: 3mm 0 !important; break-inside: avoid; }
.invest-list .h { font-size: 12pt !important; }
.invest-list .d { font-size: 9.5pt !important; }
.fit-card {
  padding: 5mm !important;
  border: 0.5pt solid #C9B998 !important;
  break-inside: avoid;
}
.fit-card h4 { font-size: 12pt !important; }
.fit-card li { padding: 1.5mm 0 1.5mm 4mm !important; font-size: 9.5pt !important; }

/* ── Master plan ─────────────────────────────────────────────────────── */
.mp-grid { gap: 5mm !important; }
.mp-card {
  grid-template-columns: 1.6fr 1fr !important;
  border: 0.5pt solid #C9B998 !important;
  break-inside: avoid;
}
.mp-card .svg-wrap { padding: 2mm !important; }
.mp-card .meta { padding: 4mm !important; }
.mp-card .meta h3 { font-size: 13pt !important; }
.mp-card .meta p { font-size: 9.5pt !important; }
.mp-disclaimer { font-size: 8pt !important; margin-top: 4mm !important; }
.mp-stamp { font-size: 8pt !important; padding: 2mm 3mm !important; }

/* ── Process ─────────────────────────────────────────────────────────── */
.process-grid { grid-template-columns: repeat(4, 1fr) !important; }
.process-grid .step {
  padding: 4mm !important;
  break-inside: avoid;
}
.process-grid .step .n { font-size: 18pt !important; color: #B88A4A !important; }
.process-grid .step h4 { font-size: 11pt !important; }
.process-grid .step p { font-size: 9pt !important; }

/* ── Package ─────────────────────────────────────────────────────────── */
.pkg-grid { grid-template-columns: 1fr 1fr !important; gap: 8mm !important; }
.pkg-list li { padding: 2.5mm 0 2.5mm 8mm !important; font-size: 10pt !important; break-inside: avoid; }

/* ── Legal ───────────────────────────────────────────────────────────── */
.legal-grid { grid-template-columns: 1fr 1fr !important; gap: 8mm !important; }
.legal-list li {
  padding: 3mm 0 3mm 8mm !important;
  break-inside: avoid;
}
.legal-list h4 { font-size: 11pt !important; }
.legal-list p { font-size: 9.5pt !important; }
.legal-callout { padding: 5mm !important; break-inside: avoid; }
.legal-callout h3 { font-size: 14pt !important; }
.legal-callout p { font-size: 9.5pt !important; }
.legal-callout .seal::before { display: none !important; }

/* ── Gallery ─────────────────────────────────────────────────────────── */
.gallery-grid {
  grid-auto-rows: 32mm !important;
  gap: 2mm !important;
}
.gallery-grid .g img { filter: none !important; }
.gallery-grid .g .cap { display: none !important; }

/* ── Contact ─────────────────────────────────────────────────────────── */
.contact-grid { grid-template-columns: 1fr !important; }
.contact-card {
  grid-template-columns: 24mm 1fr !important;
  border: 0.5pt solid #C9B998 !important;
  break-inside: avoid;
  padding: 5mm !important;
}
.contact-card .portrait { width: 24mm !important; height: 24mm !important; }
.contact-card .name { font-size: 14pt !important; }
.contact-card .role { font-size: 8pt !important; }
.contact-meta .block { break-inside: avoid; }
.contact-meta .block .v { font-size: 11pt !important; }
.contact-meta .block .sub { font-size: 9pt !important; }

/* Re-show mailto link in contact card for print */
@media print {
  .contact-card .links { display: flex !important; }
  .contact-card .links a {
    color: #1B211F !important;
    border-bottom: none !important;
    text-decoration: none !important;
    font-size: 10pt !important;
  }
  .contact-card .links a::after {
    content: "  →";
    color: #B88A4A;
  }
}

/* ── Footer ──────────────────────────────────────────────────────────── */
footer { padding: 6mm 0 !important; border-top: 0.5pt solid #C9B998 !important; }
footer .foot-grid { display: none !important; }
footer .foot-bottom {
  border-top: 0 !important; padding-top: 0 !important;
  font-size: 8pt !important; color: #6E746F !important;
}

/* ── Final disclaimer block, always at the end ───────────────────────── */
footer .foot-bottom::after {
  content: "Information shared through this website is preliminary and non-binding. Any transaction should be reviewed by the buyer's independent legal, tax, technical and planning advisors.";
  display: block;
  margin-top: 4mm;
  padding-top: 3mm;
  border-top: 0.3pt solid #C9B998;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-style: italic;
  font-size: 8.5pt;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
  color: #6E746F;
  max-width: none;
}
