/* ==========================================================================
   Casa Boquerón — Carr. 103 km 10.7, Bo. Boquerón, Cabo Rojo PR
   Palette pulled from the house: cream walls, terracotta tile, white
   railings, deep green of the mango trees.
   ========================================================================== */

:root {
  --crema: #fbf8f1;          /* warm cream base */
  --crema-oscura: #f3ecdd;   /* alternating sections */
  --terracota: #b8552f;      /* floor tile — accent, buttons */
  --terracota-suave: #d9865f;
  --verde: #1f4d3a;          /* mango-tree green — headings, dark bands */
  --verde-claro: #e6eee7;    /* pale green */
  --tinta: #26302b;          /* body ink */
  --linea: #ddd6c6;          /* hairline */
  --oro: #ffd27a;            /* board minutes */
  --wa: #1fa855;             /* WhatsApp green */

  --sans: "Avenir Next", Avenir, Futura, "Century Gothic", "Segoe UI", "Trebuchet MS", sans-serif;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;

  --wrap: 70rem;
  --radius: 6px;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

section[id] { scroll-margin-top: 4.5rem; }

body {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--tinta);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, .eyebrow, .chips, .btn, .wordmark, .board, .facts, .persona strong, .level-tag {
  font-family: var(--sans);
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  font-weight: 600;
  color: var(--verde);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--verde);
  margin-bottom: 0.3rem;
}

a { color: var(--terracota); }

/* --- Language toggle: html[data-lang] shows/hides .es/.en --------------- */
html[data-lang="es"] .en { display: none; }
html[data-lang="en"] .es { display: none; }
html[data-lang="es"] .lang-en { display: none; }
html[data-lang="en"] .lang-es { display: none; }

/* --- Layout helpers ----------------------------------------------------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.wrap.narrow { max-width: 46rem; }

.section { padding: 4.5rem 0; }
.section.alt { background: var(--crema-oscura); }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--terracota);
  margin-bottom: 0.75rem;
}

.section-head { max-width: 42rem; margin-bottom: 2.25rem; }
.section-head p:not(.eyebrow) { color: #56635c; }

/* --- Top bar ------------------------------------------------------------ */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
}

.wordmark {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.45);
  white-space: nowrap;
}

.topnav { display: none; }

@media (min-width: 900px) {
  .topnav { display: flex; gap: 1.6rem; }
  .topnav a {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    padding: 0.2rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
  }
  .topnav a:hover { border-bottom-color: currentColor; }

  body.past-hero .topbar {
    position: fixed;
    background: rgba(251, 248, 241, 0.94);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--linea);
    padding: 0.75rem 1.5rem;
    animation: navDrop 0.3s ease both;
  }
  body.past-hero .wordmark { color: var(--verde); text-shadow: none; }
  body.past-hero .topnav a { color: var(--tinta); text-shadow: none; }
  body.past-hero .topnav a:hover { color: var(--terracota); }
  body.past-hero .topnav .nav-cta { color: var(--terracota); }
  body.past-hero .lang-toggle {
    color: var(--verde);
    background: transparent;
    border-color: var(--verde);
  }
}

@keyframes navDrop {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  body.past-hero .topbar { animation: none; }
}

.lang-toggle {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 99px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.lang-toggle:hover { background: rgba(0,0,0,0.45); }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 90svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--verde);
}

.hero picture, .hero picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero picture img { object-fit: cover; object-position: center 40%; }

@media (prefers-reduced-motion: no-preference) {
  .hero picture img { animation: heroSettle 6s ease-out both; }
  .hero-content > * { animation: fadeUp 0.7s ease both; }
  .hero-content > :nth-child(1) { animation-delay: 0.15s; }
  .hero-content > :nth-child(2) { animation-delay: 0.25s; }
  .hero-content > :nth-child(3) { animation-delay: 0.35s; }
  .hero-content > :nth-child(4) { animation-delay: 0.45s; }
  .hero-content > :nth-child(5) { animation-delay: 0.55s; }
}

@keyframes heroSettle {
  from { transform: scale(1.05); }
  to { transform: scale(1); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.hero-overlay {
  position: relative;
  width: 100%;
  padding: 7rem 1.5rem 3rem;
  background: linear-gradient(to top, rgba(18, 38, 30, 0.86) 0%, rgba(18, 38, 30, 0.5) 50%, rgba(18, 38, 30, 0) 100%);
}

.hero-content { max-width: var(--wrap); margin: 0 auto; color: #fff; }

.hero-content .eyebrow { color: var(--oro); }

.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
  max-width: 18ch;
}

.hero-price {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 600;
  margin: 0.5rem 0 1rem;
}
.hero-price .per { font-size: 0.55em; font-weight: 500; opacity: 0.85; margin-left: 0.4rem; }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.chips li {
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 99px;
  padding: 0.3rem 0.85rem;
  backdrop-filter: blur(3px);
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 0.85rem 1.6rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--terracota); outline-offset: 2px; }

.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 4px 14px rgba(31,168,85,0.35); }
.btn-solid { background: var(--terracota); color: #fff; }
.btn-ghost { background: transparent; color: var(--verde); border: 1.5px solid var(--verde); }
.btn-light { background: rgba(255,255,255,0.14); color: #fff; border: 1.5px solid rgba(255,255,255,0.7); backdrop-filter: blur(4px); }

/* --- Quick facts bar ---------------------------------------------------- */
.facts { background: var(--verde); color: #fff; }

.facts ul {
  list-style: none;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.6rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
  text-align: center;
}

.facts li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #c6dccf;
}
.facts svg { width: 30px; height: 30px; color: var(--oro); margin-bottom: 0.25rem; }
.facts strong { color: #fff; font-size: 1.05rem; }

/* --- Personas (para quién es) ------------------------------------------ */
.personas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 52rem;
  gap: 1.25rem;
  margin-top: 2rem;
}
.persona {
  background: #fff;
  border: 1px solid var(--linea);
  border-top: 4px solid var(--terracota);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.persona:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(31,77,58,0.10); }
.persona:nth-child(2) { border-top-color: var(--verde); }
.persona:nth-child(3) { border-top-color: var(--oro); }
.persona svg { width: 34px; height: 34px; color: var(--verde); margin-bottom: 0.75rem; }
.persona strong { display: block; font-size: 1.05rem; color: var(--verde); margin-bottom: 0.4rem; }
.persona p { font-size: 0.95rem; color: #46534c; }

/* --- Level tag ---------------------------------------------------------- */
.level-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--verde);
  border-radius: 99px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 0.9rem;
}
.level-tag.t { background: var(--terracota); }

/* --- Split layouts (photo + text) --------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.split.rev { grid-template-columns: 1fr 1.2fr; }
.split.rev > figure:first-child { order: 2; }

figure a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
}
figure img {
  border-radius: var(--radius);
  transition: transform 0.4s ease;
}
figure a:hover img, figure a:focus-visible img { transform: scale(1.025); }
figure a:focus-visible { outline: 3px solid var(--terracota); outline-offset: 2px; }

figcaption {
  font-size: 0.85rem;
  color: #66736c;
  padding-top: 0.5rem;
  line-height: 1.5;
}

.split-text > p { margin-bottom: 1.5rem; }
.split-text figure { margin-top: 0.5rem; }

.extras {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  background: var(--verde-claro);
  border-left: 3px solid var(--verde);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

/* --- Rooms: one block per bedroom with its own photo set ---------------- */
.room { padding: 2rem 0; border-top: 1px solid var(--linea); }
.room:first-of-type { border-top: none; padding-top: 0.5rem; }
.room-num {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracota);
  margin-bottom: 0.4rem;
}
.room h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: 0.6rem; }
.room-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}
.room-thumbs a { display: block; overflow: hidden; border-radius: var(--radius); }
.room-thumbs img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; transition: transform 0.35s ease; }
.room-thumbs a:hover img { transform: scale(1.04); }
.room-thumbs a:focus-visible { outline: 3px solid var(--terracota); outline-offset: 2px; }
.room-count { font-family: var(--sans); font-size: 0.82rem; color: #66736c; }

/* --- Cards (bathrooms, service rooms) ----------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.cards.four { grid-template-columns: repeat(4, 1fr); }
.card { transition: transform 0.25s ease; }
.card:hover { transform: translateY(-4px); }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card figcaption strong {
  display: block;
  font-family: var(--sans);
  color: var(--verde);
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}

/* --- Ubicación: distance board ------------------------------------------ */
.ubicacion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.board {
  background: var(--verde);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
}

.board-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9cc4ad;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

.board ul { list-style: none; flex: 1; }
.board li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px dashed rgba(255,255,255,0.14);
  font-size: 0.95rem;
  transition: background 0.2s ease, padding-left 0.2s ease;
}
.board li:last-child { border-bottom: none; }
.board li:hover { background: rgba(255,255,255,0.06); padding-left: 0.4rem; }
.board .min {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--oro);
  white-space: nowrap;
  text-align: right;
}
.board .min small { display: block; font-weight: 400; color: #c6dccf; font-size: 0.78rem; }
.board-foot { font-size: 0.78rem; color: #9cc4ad; padding-top: 0.75rem; font-family: var(--sans); }

.map { border-radius: var(--radius); overflow: hidden; min-height: 320px; }
.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* --- Gallery grid ------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}
.grid a { display: block; overflow: hidden; border-radius: var(--radius); background: var(--crema-oscura); }
.grid img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
  transition: transform 0.35s ease;
}
.grid a:hover img { transform: scale(1.04); }
.grid a:focus-visible { outline: 3px solid var(--terracota); outline-offset: 2px; }

/* --- FAQ ----------------------------------------------------------------- */
.faq-list { display: grid; gap: 0.75rem; }

.faq-list details {
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-list summary {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--verde);
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 3rem;
  transition: background 0.2s ease;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { background: var(--verde-claro); }
.faq-list summary:focus-visible { outline: 3px solid var(--terracota); outline-offset: -3px; }

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--terracota);
  transition: transform 0.25s ease;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-list details p {
  padding: 0 1.25rem 1.15rem;
  color: #46534c;
}

/* --- Contact ------------------------------------------------------------ */
.contacto { background: var(--crema-oscura); }
.contacto .section-head { text-align: center; max-width: none; }
.agent { font-family: var(--sans); font-size: 0.95rem; color: #56635c; }
.agent a { color: var(--verde); font-weight: 600; text-decoration: none; }
.agent a:hover { text-decoration: underline; }

.agent-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.5rem auto 1.75rem;
  font-family: var(--sans);
}
.agent-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--verde);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.agent-card div { text-align: left; line-height: 1.35; }
.agent-card strong { display: block; color: var(--verde); font-size: 1.05rem; }
.agent-card span { font-size: 0.85rem; color: #56635c; }

.cta-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.form {
  background: var(--crema);
  border: 1px solid var(--linea);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: grid;
  gap: 1.1rem;
}

.field { display: grid; gap: 0.3rem; }
.field label {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--verde);
}
.field input, .field textarea, .field select {
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--linea);
  border-radius: var(--radius);
  background: #fff;
  width: 100%;
  color: var(--tinta);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--terracota);
  outline-offset: 0;
  border-color: var(--terracota);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-intro {
  text-align: center;
  max-width: 34rem;
  margin: 0 auto 1.5rem;
  color: #56635c;
}

.form-note { font-size: 0.82rem; color: #66736c; font-family: var(--sans); }
.form .btn { justify-self: start; }
.hidden-field { position: absolute; left: -9999px; }

/* --- Footer ------------------------------------------------------------- */
.footer {
  background: var(--verde);
  color: #c6dccf;
  padding: 2.5rem 0;
  font-size: 0.88rem;
  text-align: center;
}
.footer .wrap { display: grid; gap: 0.9rem; justify-items: center; }
.footer a { color: var(--oro); }
.eho {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  max-width: 38rem;
  text-align: left;
  line-height: 1.5;
}
.eho svg { flex-shrink: 0; margin-top: 0.1rem; }

/* --- Sticky mobile CTA -------------------------------------------------- */
.sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  display: none;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(251, 248, 241, 0.96);
  border-top: 1px solid var(--linea);
  backdrop-filter: blur(8px);
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.sticky-cta .btn { flex: 1; justify-content: center; padding: 0.75rem 1rem; }
body.past-hero .sticky-cta { transform: translateY(0); }

/* --- Lightbox ----------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 22, 17, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .lightbox:not([hidden]) { animation: lbFade 0.25s ease both; }
  .lightbox:not([hidden]) img { animation: lbZoom 0.3s ease both; }
}

@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbZoom { from { transform: scale(0.96); } to { transform: scale(1); } }

.lb-cap {
  position: absolute;
  bottom: 2.6rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 85vw;
  text-align: center;
  color: rgba(255,255,255,0.92);
  font-family: var(--sans);
  font-size: 0.9rem;
}

.lightbox button {
  position: absolute;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox button:hover { background: rgba(255,255,255,0.25); }
.lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.75rem; top: 50%; transform: translateY(-50%); }

.lb-count {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

/* --- Scroll reveal ------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.in { opacity: 1; transform: none; }

  .stagger > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .stagger.in > * { opacity: 1; transform: none; }
  .stagger.in > :nth-child(6n+1) { transition-delay: 0.02s; }
  .stagger.in > :nth-child(6n+2) { transition-delay: 0.1s; }
  .stagger.in > :nth-child(6n+3) { transition-delay: 0.18s; }
  .stagger.in > :nth-child(6n+4) { transition-delay: 0.26s; }
  .stagger.in > :nth-child(6n+5) { transition-delay: 0.34s; }
  .stagger.in > :nth-child(6n)   { transition-delay: 0.42s; }
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .facts ul { grid-template-columns: repeat(3, 1fr); }
  .split, .split.rev { grid-template-columns: 1fr; gap: 1.75rem; }
  .split.rev > figure:first-child { order: 0; }
  .cards, .cards.four { grid-template-columns: 1fr 1fr; }
  .personas { grid-template-columns: 1fr; }
  .ubicacion-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .section { padding: 3rem 0; }
  .hero { min-height: 86svh; }
  .hero-overlay { padding: 5rem 1.25rem 2.25rem; }
  .hero h1 { max-width: none; }
  .facts ul { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .cards, .cards.four { grid-template-columns: 1fr; }
  .sticky-cta { display: flex; }
  .form { padding: 1.25rem; }
  .form .btn { justify-self: stretch; justify-content: center; }
  .agent-card { flex-direction: column; text-align: center; }
  .agent-card div { text-align: center; }
}

/* ==========================================================================
   Herramientas: video, planos, calculadora, agenda
   ========================================================================== */

/* --- Vista aérea (fotos con dron) --------------------------------------- */
.aerial-grid:empty { display: none; }
.aerial-soon {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--verde);
  color: #fff;
}
.aerial-soon > img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; opacity: 0.75; }
.aerial-soon-text { padding: 2rem 2rem 2rem 2.25rem; display: grid; gap: 0.6rem; justify-items: start; }
.aerial-soon-text p { color: #dfe9e2; }
.aerial-soon-text strong { color: #fff; font-family: var(--sans); font-size: 1.15rem; }
.aerial-soon-text .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.7); margin-top: 0.4rem; }
@media (max-width: 900px) { .aerial-soon { grid-template-columns: 1fr; } .aerial-soon > img { min-height: 200px; } }

/* --- Planos --------------------------------------------------------------- */
.plan-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.plan-tab {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 99px;
  border: 1.5px solid var(--verde);
  background: transparent;
  color: var(--verde);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.plan-tab:hover { background: var(--verde-claro); }
.plan-tab.is-active { background: var(--verde); color: #fff; }
.plan-tab:focus-visible { outline: 3px solid var(--terracota); outline-offset: 2px; }

.plan-panel { background: #fff; border: 1px solid var(--linea); border-radius: var(--radius); padding: 1rem; }
.plan-panel[hidden] { display: none; }
.plan { width: 100%; height: auto; max-width: 56rem; margin: 0 auto; display: block; font-family: var(--sans); }
.plan .pl-wall { fill: #fbf8f1; stroke: var(--verde); stroke-width: 3; }
.plan .pl-room { fill: #fff; stroke: var(--verde); stroke-width: 1.5; }
.plan .pl-wet { fill: #e6eef7; }
.plan .pl-hall { fill: #f3ecdd; }
.plan .pl-out { fill: #f1e3d6; stroke: var(--verde); stroke-width: 1.5; stroke-dasharray: 5 4; }
.plan .pl-door { stroke: var(--terracota); stroke-width: 5; stroke-linecap: round; }
.plan .pl-stairs line { stroke: #9aa9a0; stroke-width: 1.2; }
.plan .pl-lbl { font-size: 13px; font-weight: 600; fill: var(--verde); text-anchor: middle; }
.plan .pl-big { font-size: 16px; }
.plan .pl-tiny { font-size: 10.5px; fill: #66736c; text-anchor: middle; }
.plan .pl-note { font-size: 10.5px; fill: #66736c; }
.plan .pl-road { fill: #d9d4c7; }
.plan .pl-road-lbl { font-size: 12px; font-weight: 700; fill: #4d5a52; text-anchor: middle; letter-spacing: 0.08em; }
.plan .pl-lot { fill: #eef4ea; stroke: var(--verde); stroke-width: 2.5; }
.plan .pl-back { stroke: none; }
.plan .pl-tree circle { fill: #7fae7b; opacity: 0.85; }
.plan .pl-house { fill: #fff; stroke: var(--verde); stroke-width: 2.5; }
.plan .pl-gate { stroke: var(--terracota); stroke-width: 6; stroke-linecap: round; }
/* language toggle inside SVG */
html[data-lang="es"] .plan tspan.en { display: none; }
html[data-lang="en"] .plan tspan.es { display: none; }

/* --- Calculadora ---------------------------------------------------------- */
.calc {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.calc-form { display: grid; gap: 1.1rem; background: #fff; border: 1px solid var(--linea); border-radius: var(--radius); padding: 1.5rem; }
.input-prefix, .input-suffix { display: flex; align-items: center; border: 1px solid var(--linea); border-radius: var(--radius); background: #fff; overflow: hidden; }
.input-prefix span, .input-suffix span { padding: 0 0.75rem; color: #66736c; font-family: var(--sans); font-weight: 600; }
.input-prefix input, .input-suffix input { border: none !important; border-radius: 0 !important; }
.input-prefix:focus-within, .input-suffix:focus-within { outline: 2px solid var(--terracota); }
.input-prefix input:focus, .input-suffix input:focus { outline: none !important; }
.calc-form input[type="range"] { width: 100%; accent-color: var(--terracota); }
.calc-form output { float: right; font-weight: 700; color: var(--terracota); }
.calc-presets { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }
.calc-presets button {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 99px;
  border: 1px solid var(--linea);
  background: var(--crema);
  color: var(--verde);
  cursor: pointer;
}
.calc-presets button:hover { border-color: var(--verde); }

.calc-result { background: var(--verde); color: #fff; border-radius: var(--radius); padding: 1.6rem 1.6rem 1.4rem; }
.calc-label { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #9cc4ad; }
.calc-total { font-family: var(--sans); font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 700; line-height: 1.1; margin: 0.2rem 0 1rem; font-variant-numeric: tabular-nums; }
.calc-breakdown { list-style: none; border-top: 1px solid rgba(255,255,255,0.18); }
.calc-breakdown li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px dashed rgba(255,255,255,0.14); font-size: 0.95rem; }
.calc-breakdown strong { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.calc-breakdown li[hidden] { display: none; }
.calc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1rem; margin: 1.1rem 0 1.3rem; }
.calc-meta dt { font-family: var(--sans); font-size: 0.75rem; color: #9cc4ad; letter-spacing: 0.04em; }
.calc-meta dd { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.calc-cta { width: 100%; justify-content: center; margin-bottom: 0.9rem; }
.calc-result .form-note { color: #c6dccf; }

/* --- Agenda (form) -------------------------------------------------------- */
.slot { border: 1px solid var(--linea); border-radius: var(--radius); padding: 1rem 1.1rem 1.1rem; background: #fff; display: grid; gap: 1rem; }
.slot legend { font-family: var(--sans); font-weight: 700; color: var(--terracota); padding: 0 0.4rem; font-size: 0.9rem; letter-spacing: 0.04em; }
.form-done { text-align: center; background: #fff; border: 1px solid var(--linea); border-radius: var(--radius); padding: 2rem 1.5rem; display: grid; gap: 0.9rem; justify-items: center; }
.form-done[hidden] { display: none; }
.form-done svg { color: var(--wa); }
.form-done p { color: #46534c; }

@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .calc-form { padding: 1.1rem; }
  .calc-meta { grid-template-columns: 1fr 1fr; }
}

/* --- Cerca de todo (tarjetas de destino) --------------------------------- */
.near-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin-bottom: 1rem; }
.near {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: var(--radius);
  padding: 0.95rem 1.05rem;
  text-decoration: none;
  color: var(--tinta);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.near:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(31,77,58,0.10); border-color: var(--verde); }
.near:focus-visible { outline: 3px solid var(--terracota); outline-offset: 2px; }
.near-ico { color: var(--terracota); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--crema-oscura); }
.near-ico svg { width: 22px; height: 22px; }
.near-body { display: grid; gap: 0.1rem; min-width: 0; }
.near-body strong { font-family: var(--sans); font-size: 0.95rem; color: var(--verde); line-height: 1.25; }
.near-note { font-size: 0.82rem; color: #66736c; line-height: 1.35; }
.near-dist { font-family: var(--sans); font-weight: 700; color: var(--terracota); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; font-size: 1rem; }
.near-dist .approx { display: block; font-size: 0.65rem; font-weight: 500; color: #66736c; letter-spacing: 0.06em; text-transform: uppercase; }
.near-foot { font-family: var(--sans); font-size: 0.82rem; color: #66736c; margin-bottom: 1.5rem; }
.ubicacion .map { min-height: 380px; }
.ubicacion .map iframe { min-height: 380px; }
@media (max-width: 900px) { .near-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .near-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Móvil: menú, planos, galería, toques y rendimiento
   ========================================================================== */
.topbar-right { display: flex; align-items: center; gap: 0.5rem; }
.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(4px);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body.past-hero .menu-toggle { border-color: var(--verde); background: transparent; }
body.past-hero .menu-toggle span { background: var(--verde); }
body.menu-open .menu-toggle { border-color: var(--verde); background: transparent; }
body.menu-open .menu-toggle span { background: var(--verde); }
body.menu-open .wordmark { color: var(--verde); text-shadow: none; }
body.menu-open .lang-toggle { color: var(--verde); background: transparent; border-color: var(--verde); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(251, 248, 241, 0.98);
  padding: 5.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--verde);
  text-decoration: none;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--linea);
  min-height: 48px;
  display: flex; align-items: center;
}
.mobile-menu a.mm-cta { margin-top: 1rem; border: none; background: var(--terracota); color: #fff; border-radius: var(--radius); justify-content: center; }
body.menu-open { overflow: hidden; }
body.menu-open .topbar { position: fixed; }

.plan-hint { display: none; font-family: var(--sans); font-size: 0.85rem; color: #66736c; margin: -0.25rem 0 0.75rem; }
.gallery-more { display: none; text-align: center; margin-top: 1.25rem; }
.gallery-more .btn { min-height: 48px; }

@media (max-width: 899px) {
  .menu-toggle { display: flex; }
  /* planos: el SVG mantiene un ancho legible y se desliza */
  .plan-hint { display: block; }
  .plan-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0.75rem; }
  .plan { min-width: 600px; }
  /* galería: 12 primero, el resto al tocar el botón */
  .grid:not(.expanded) a:nth-child(n+13) { display: none; }
  .gallery-more { display: block; }
  .grid.expanded ~ .gallery-more { display: none; }
}

@media (max-width: 640px) {
  /* rendimiento: sin zoom lento sobre la foto del hero en teléfonos */
  .hero picture img { animation: none; }
  .chips li { backdrop-filter: none; background: rgba(0,0,0,0.25); }
  .hero-ctas .btn { width: 100%; justify-content: center; min-height: 50px; }
  /* áreas de toque de 44 px o más */
  .lang-toggle { min-height: 40px; padding: 0.45rem 1rem; }
  .plan-tab { min-height: 44px; padding: 0.6rem 1.1rem; }
  .calc-presets button { min-height: 40px; padding: 0.5rem 0.85rem; font-size: 0.85rem; }
  .near { padding: 1rem; min-height: 64px; }
  .near-dist .approx { font-size: 0.7rem; }
  .faq-list summary { min-height: 52px; display: flex; align-items: center; }
  .room-thumbs { grid-template-columns: repeat(3, 1fr); }
  .calc-total { font-size: 2.3rem; }
  .agent-card div span { display: block; }
  /* la barra fija de abajo no debe tapar el final del contenido */
  .footer { padding-bottom: calc(2.5rem + 74px + env(safe-area-inset-bottom)); }
  .section-head { margin-bottom: 1.5rem; }
  .split, .split.rev { gap: 1.25rem; }
  h2 { font-size: 1.55rem; }
}

/* --- Vista aérea: 1 grande + 4 --- */
.aerial-grid { grid-template-columns: repeat(4, 1fr); }
.aerial-grid a:first-child { grid-column: span 2; grid-row: span 2; }
.aerial-grid img { aspect-ratio: 4 / 3; }
@media (max-width: 900px) { .aerial-grid { grid-template-columns: 1fr 1fr; } .aerial-grid a:first-child { grid-column: span 2; grid-row: auto; } }

/* --- Planos a escala: cotas y aberturas --- */
.plan .pl-dim { font-size: 10.5px; font-weight: 600; fill: var(--terracota); text-anchor: middle; font-variant-numeric: tabular-nums; }
.plan .pl-open { stroke: #fff; stroke-width: 3.5; stroke-linecap: butt; }

.cards.two { grid-template-columns: repeat(2, 1fr); max-width: 52rem; }
@media (max-width: 640px) { .cards.two { grid-template-columns: 1fr; } }
