/* ============================================
   Nestendo — Jávea/Moraira kopersplatform
   Warm mediterraan-editorial
   ============================================ */

:root {
  --sand: #f6f1e7;          /* achtergrond: zonverbleekt papier */
  --sand-deep: #ede4d3;     /* secundair vlak */
  --ink: #14303e;           /* diep zeeblauw, tekst */
  --ink-soft: #3f5a67;      /* secundaire tekst */
  --terra: #c4552a;         /* terracotta accent */
  --terra-deep: #a03f1c;
  --olive: #6b7f4f;         /* geverifieerd-groen, gedempt */
  --line: #d8ccb6;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", "Segoe UI", sans-serif;

  --text-base: clamp(1.02rem, 0.95rem + 0.35vw, 1.15rem);
  --text-hero: clamp(2.4rem, 1.2rem + 5.2vw, 5.2rem);
  --text-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem);

  --space-section: clamp(4rem, 3rem + 4vw, 8rem);
  --measure: 62ch;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

/* korrel-textuur over alles — subtiel, geeft papiergevoel */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }

a { color: var(--terra); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terra-deep); }

/* ---------- typografie ---------- */

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; }

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-h2); }
h3 { font-size: 1.25em; }

.kicker {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1rem;
}

.lede { font-size: 1.15em; color: var(--ink-soft); max-width: var(--measure); }

/* ---------- layout ---------- */

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }

section { padding-block: var(--space-section); }

/* ---------- header ---------- */

header.site {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.logo em { color: var(--terra); font-style: normal; }

nav.site a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 1.6rem;
  font-size: 0.92rem;
  font-weight: 600;
}
nav.site a:hover { color: var(--terra); }
nav.site a.cta {
  color: var(--sand);
  background: var(--ink);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
}
nav.site a.cta:hover { background: var(--terra); color: var(--sand); }

/* ---------- hero ---------- */

.hero { padding-block: clamp(3.5rem, 6vw, 7rem) var(--space-section); position: relative; overflow: hidden; }

.hero .counter {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--sand-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  margin-bottom: 2rem;
}
.hero .counter .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--terra);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 85, 42, 0.4); }
  50% { box-shadow: 0 0 0 7px rgba(196, 85, 42, 0); }
}

.hero h1 { max-width: 15ch; }
.hero h1 .accent { color: var(--terra); font-style: italic; }

.hero .lede { margin-top: 1.6rem; }

.hero-actions { margin-top: 2.4rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* zon-cirkel, decoratief */
.hero::before {
  content: "";
  position: absolute;
  top: -12%;
  right: -6%;
  width: clamp(260px, 34vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #e8b94a 0%, #dd9a3c 45%, transparent 72%);
  opacity: 0.28;
  pointer-events: none;
}

/* staggered reveal bij laden */
.reveal { opacity: 0; transform: translateY(18px); animation: rise 0.9s var(--ease-out) forwards; }
.reveal:nth-child(2) { animation-delay: 0.12s; }
.reveal:nth-child(3) { animation-delay: 0.24s; }
.reveal:nth-child(4) { animation-delay: 0.36s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- knoppen ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.9rem;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--terra); border-color: var(--terra); color: var(--sand); }
.btn.primary:hover { background: var(--terra-deep); border-color: var(--terra-deep); color: var(--sand); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--sand); }

/* ---------- formulier (zoekprofiel) ---------- */

.form-panel {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.6rem, 3.5vw, 3rem);
  box-shadow: 0 24px 60px -32px rgba(20, 48, 62, 0.28);
  max-width: 680px;
}

.form-panel h2 { margin-bottom: 0.5rem; }
.form-panel .sub { color: var(--ink-soft); margin-bottom: 1.8rem; }

.field { margin-bottom: 1.3rem; }
.field label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 0.4rem; }
.field .hint { font-weight: 400; color: var(--ink-soft); }

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--sand);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(196, 85, 42, 0.15);
}

.choices { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  background: var(--sand);
}
.choices input:checked + label,
.choices label:has(input:checked) {
  background: var(--ink);
  color: var(--sand);
  border-color: var(--ink);
}
.choices label:hover { border-color: var(--terra); }

.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 1rem; }

.form-success {
  display: none;
  background: #eef3e6;
  border: 1.5px solid var(--olive);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
}
.form-success h3 { color: var(--olive); margin-bottom: 0.4rem; }

/* ---------- secties ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.belofte-lijst { list-style: none; margin-top: 2rem; }
.belofte-lijst li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
}
.belofte-lijst li:last-child { border-bottom: 1px solid var(--line); }
.belofte-lijst .num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--terra);
  font-style: italic;
  line-height: 1;
}
.belofte-lijst strong { display: block; margin-bottom: 0.2rem; }
.belofte-lijst p { color: var(--ink-soft); font-size: 0.95em; }

/* ---------- woningkaart op landing ---------- */

.woning-teaser {
  background: var(--ink);
  color: var(--sand);
  border-radius: 22px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
@media (max-width: 820px) { .woning-teaser { grid-template-columns: 1fr; } }

.woning-teaser .foto {
  min-height: 320px;
  background:
    linear-gradient(160deg, rgba(20,48,62,0.05), rgba(20,48,62,0.4)),
    radial-gradient(ellipse at 30% 20%, #7db0c9 0%, #4a7d9b 40%, #2c5670 100%);
  position: relative;
}
.woning-teaser .foto .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(246, 241, 231, 0.75);
}
.woning-teaser .info { padding: clamp(1.8rem, 3.5vw, 3rem); }
.woning-teaser .prijs { font-family: var(--font-display); font-size: 2rem; margin: 0.6rem 0 1rem; }
.woning-teaser .info p { color: rgba(246, 241, 231, 0.8); }
.woning-teaser .btn { margin-top: 1.6rem; border-color: var(--sand); color: var(--sand); }
.woning-teaser .btn:hover { background: var(--sand); color: var(--ink); }

/* ---------- statusbadge (het emotionele moment) ---------- */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(107, 127, 79, 0.16);
  border: 1.5px solid var(--olive);
  color: #d9e4c7;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
}
.status-badge::before { content: "✓"; font-weight: 900; }

.status-panel {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  overflow: hidden;
  margin-block: 2rem;
}
.status-panel .kop {
  background: var(--sand-deep);
  padding: 1rem 1.5rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.status-panel .kop .datum { font-weight: 400; color: var(--ink-soft); font-size: 0.9rem; }
.status-rij {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
}
.status-rij .icoon { font-size: 1.1rem; width: 1.6rem; text-align: center; }
.status-rij .wat strong { display: block; }
.status-rij .wat span { color: var(--ink-soft); font-size: 0.9em; }
.status-rij .stand { font-size: 0.82rem; font-weight: 700; padding: 0.3rem 0.9rem; border-radius: 999px; white-space: nowrap; }
.stand.ok { background: rgba(107, 127, 79, 0.15); color: var(--olive); border: 1px solid var(--olive); }
.stand.bezig { background: rgba(221, 154, 60, 0.15); color: #9c6b1d; border: 1px solid #d8a54a; }
.stand.niet { background: rgba(20, 48, 62, 0.07); color: var(--ink-soft); border: 1px solid var(--line); }

.disclaimer {
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--sand-deep);
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  border-left: 3px solid var(--terra);
}

/* ---------- woningpagina ---------- */

.woning-hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) 0; }
.woning-hero .terug { font-size: 0.9rem; color: var(--ink-soft); text-decoration: none; }
.woning-hero .terug:hover { color: var(--terra); }

.galerij {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, 220px);
  gap: 0.8rem;
  margin-top: 1.8rem;
  border-radius: 20px;
  overflow: hidden;
}
@media (max-width: 820px) { .galerij { grid-template-columns: 1fr; grid-template-rows: 280px 160px 160px; } }
.galerij .vak { position: relative; }
.galerij .vak:first-child { grid-row: span 2; }
@media (max-width: 820px) { .galerij .vak:first-child { grid-row: auto; } }
.galerij .vak .placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(246, 241, 231, 0.85);
}
.galerij .vak:nth-child(1) { background: radial-gradient(ellipse at 30% 25%, #7db0c9, #35617e 75%); }
.galerij .vak:nth-child(2) { background: radial-gradient(ellipse at 60% 30%, #d9b26a, #a67437 80%); }
.galerij .vak:nth-child(3) { background: radial-gradient(ellipse at 40% 60%, #8ba36e, #5c7345 80%); }

.woning-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); padding-block: 3rem var(--space-section); }
@media (max-width: 900px) { .woning-body { grid-template-columns: 1fr; } }

.specs { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-block: 1.4rem 2rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.specs div strong { font-family: var(--font-display); font-size: 1.35rem; display: block; }
.specs div span { font-size: 0.82rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; }

.zijkolom { position: sticky; top: 2rem; align-self: start; }
.zijkolom .paneel {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.6rem;
  margin-bottom: 1.4rem;
}
.zijkolom .prijs { font-family: var(--font-display); font-size: 2.2rem; }
.zijkolom .btn { width: 100%; text-align: center; margin-top: 1.2rem; }

/* ---------- calculator ---------- */

.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4.5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .calc-grid { grid-template-columns: 1fr; } }

.calc-uitkomst {
  background: var(--ink);
  color: var(--sand);
  border-radius: 20px;
  padding: clamp(1.8rem, 3.5vw, 2.8rem);
  position: sticky;
  top: 2rem;
}
.calc-uitkomst .totaal {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin: 0.4rem 0 1.6rem;
}
.calc-regel {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(246, 241, 231, 0.18);
  font-size: 0.95rem;
}
.calc-regel span:first-child { color: rgba(246, 241, 231, 0.75); }
.calc-regel.som { font-weight: 700; border-top: 2px solid rgba(246, 241, 231, 0.45); }
.calc-uitkomst .voetnoot { font-size: 0.78rem; color: rgba(246, 241, 231, 0.6); margin-top: 1.4rem; }

.range-veld output { font-weight: 700; font-family: var(--font-display); font-size: 1.5rem; display: block; margin-bottom: 0.3rem; }
input[type="range"] { width: 100%; accent-color: var(--terra); }

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--line);
  padding: 2.5rem clamp(1.2rem, 4vw, 3rem);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
footer.site a { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
