/* =========================================================
   Herrera Oria Living — hoja de estilos
   Paleta: verde jardín + arena cálida + blanco roto
   Tipos: Fraunces (titulares) + Inter (texto)
   ========================================================= */

:root {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --ink: #232a20;
  --muted: #5f6657;
  --green: #2f5d4a;
  --green-dark: #224537;
  --green-soft: #e7efe9;
  --sand: #efe9dc;
  --sand-deep: #e4dccb;
  --gold: #ad8a52;
  --line: #e7e2d6;
  --wa: #25d366;
  --shadow-sm: 0 2px 10px rgba(34, 53, 42, .06);
  --shadow: 0 14px 40px rgba(34, 53, 42, .12);
  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1160px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--green); text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { scroll-margin-top: 78px; }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .76rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 .9rem;
}

.lead { font-size: 1.18rem; color: var(--muted); max-width: 62ch; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  padding: .82em 1.5em; border-radius: 100px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-dark); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-outline { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #1ebe5b; }
.btn svg { width: 1.15em; height: 1.15em; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
  padding: 18px 0;
}
.site-header.scrolled { background: rgba(251,250,246,.92); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); padding: 10px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 600; font-size: 1.28rem; color: #fff; letter-spacing: -.01em; }
.brand .leaf { width: 30px; height: 30px; flex: none; }
.scrolled .brand { color: var(--ink); }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; opacity: .8; margin-top: -2px; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a.navlink { color: rgba(255,255,255,.92); font-weight: 500; font-size: .96rem; position: relative; white-space: nowrap; }
.nav a.navlink::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; background: var(--gold); transition: width .25s ease; }
.nav a.navlink:hover::after { width: 100%; }
.scrolled .nav a.navlink { color: var(--ink); }

.header-cta { display: flex; align-items: center; gap: .8rem; }
.lang-switch { display: flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 600; }
.lang-switch a { color: rgba(255,255,255,.7); padding: 2px 4px; }
.lang-switch a.active { color: #fff; border-bottom: 2px solid var(--gold); }
.scrolled .lang-switch a { color: var(--muted); }
.scrolled .lang-switch a.active { color: var(--ink); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; border-radius: 2px; }
.scrolled .nav-toggle span { background: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  color: #fff; text-align: center;
  background: linear-gradient(180deg, rgba(20,38,28,.55) 0%, rgba(20,38,28,.35) 40%, rgba(20,38,28,.65) 100%), url("../img/hero.jpg") center/cover no-repeat;
}
.hero-inner { max-width: 820px; margin: 0 auto; padding: 120px 24px 90px; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.3rem); margin-bottom: .35em; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.hero p.tagline { font-size: clamp(1.05rem, 2.3vw, 1.4rem); color: rgba(255,255,255,.95); margin: 0 auto 2rem; max-width: 36ch; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 1.6rem; justify-content: center; flex-wrap: wrap; margin-top: 2.8rem; }
.hero-badges div { font-size: .9rem; opacity: .95; }
.hero-badges strong { display: block; font-family: var(--font-head); font-size: 1.7rem; }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.6); border-radius: 14px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; background: #fff; border-radius: 2px; transform: translateX(-50%); animation: cue 1.6s infinite; }
@keyframes cue { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 20px; } 100% { opacity: 0; } }

/* ---------- Secciones genéricas ---------- */
.section { padding: 6rem 0; }
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.bg-soft { background: var(--green-soft); }
.bg-sand { background: var(--sand); }

/* ---------- Intro / texto + stats ---------- */
.intro-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 1.6rem 1.4rem; }
.stat strong { font-family: var(--font-head); font-size: 2rem; color: var(--green); display: block; line-height: 1; }
.stat span { font-size: .92rem; color: var(--muted); }

/* ---------- Tarjetas de característica ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin-bottom: 1rem; }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.feature p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- Habitaciones ---------- */
.rooms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.room-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.room-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.room-body { padding: 1.8rem; display: flex; flex-direction: column; flex: 1; }
.room-body h3 { font-size: 1.5rem; margin-bottom: .2rem; }
.room-tag { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
.room-feats { list-style: none; padding: 0; margin: 1rem 0 1.4rem; }
.room-feats li { padding: .4rem 0; border-bottom: 1px dashed var(--line); display: flex; align-items: center; gap: .6rem; font-size: .96rem; color: var(--muted); }
.room-feats li svg { width: 18px; height: 18px; color: var(--green); flex: none; }
.room-price { margin-top: auto; font-family: var(--font-head); font-size: 1.3rem; color: var(--ink); }
.room-price span { font-family: var(--font-body); font-size: .9rem; color: var(--muted); }

/* ---------- Incluye / opcional ---------- */
.includes { display: grid; grid-template-columns: 1.3fr .7fr; gap: 2rem; }
.include-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); }
.include-box h3 { font-size: 1.3rem; display: flex; align-items: center; gap: .5rem; }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0 0; columns: 2; column-gap: 1.6rem; }
.include-box.opt .check-list { columns: 1; }
.check-list li { break-inside: avoid; padding: .5rem 0 .5rem 1.9rem; position: relative; color: var(--ink); font-size: .98rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .62rem; width: 18px; height: 18px; background: var(--green-soft); border-radius: 50%; }
.check-list li::after { content: ""; position: absolute; left: 6px; top: .85rem; width: 6px; height: 3px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.include-box.opt { background: var(--sand); border: 0; }
.include-box.opt li::before { background: #fff; }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gallery button { padding: 0; border: 0; cursor: pointer; border-radius: 12px; overflow: hidden; background: var(--sand); aspect-ratio: 4/3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery button:hover img { transform: scale(1.07); }
.gallery button:nth-child(1) { grid-column: span 2; grid-row: span 2; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(18,28,22,.92); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-btn { position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.lb-btn:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 3vw; } .lb-next { right: 3vw; }
.lb-close { top: 3vh; right: 3vw; }
.lb-count { position: absolute; bottom: 3vh; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.8); font-size: .9rem; }

/* ---------- Ubicación ---------- */
.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.loc-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.loc-list li { display: flex; gap: .9rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.loc-list li svg { width: 22px; height: 22px; color: var(--green); flex: none; margin-top: 2px; }
.loc-list strong { display: block; font-size: .98rem; }
.loc-list span { font-size: .9rem; color: var(--muted); }
.transport { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0; }
.chip { background: var(--green-soft); color: var(--green-dark); border-radius: 100px; padding: .35em .9em; font-size: .85rem; font-weight: 600; }
.map-frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 6px solid #fff; }
.map-frame iframe { display: block; width: 100%; height: 420px; border: 0; }

/* ---------- Normas ---------- */
.rules-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.rule-chips { display: flex; flex-wrap: wrap; gap: .7rem; }
.rule-chip { display: inline-flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 100px; padding: .55em 1.1em; font-size: .92rem; font-weight: 500; box-shadow: var(--shadow-sm); }
.rule-chip svg { width: 18px; height: 18px; color: var(--green); }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; }
.contact-methods { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.contact-methods li { display: flex; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.contact-methods .ci { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.12); display: grid; place-items: center; flex: none; }
.contact-methods .ci svg { width: 22px; height: 22px; color: #fff; }
.contact-methods a, .contact-methods span { color: #fff; }
.contact-methods small { display: block; opacity: .7; font-size: .82rem; }
.form { background: var(--surface); border-radius: var(--radius-lg); padding: 2.2rem; box-shadow: var(--shadow); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 1rem; background: var(--bg); color: var(--ink); transition: border .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--green); }
.field textarea { resize: vertical; min-height: 110px; }
.form .btn { width: 100%; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-dark); color: rgba(255,255,255,.82); padding: 4rem 0 1.6rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 1.1rem; }
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .6rem; }
.footer-brand .brand { color: #fff; margin-bottom: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.6rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .85rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 60px; height: 60px; border-radius: 50%; background: var(--wa); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(37,211,102,.5); transition: transform .2s; }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; color: #fff; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--wa); animation: pulse 2.2s infinite; z-index: -1; }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- Animación de aparición (progressive enhancement) ----------
   Sin JS el contenido SIEMPRE es visible. Solo si <html> tiene .js se
   oculta para animar al entrar en pantalla. Protege SEO y no-JS. */
.reveal { transition: opacity .7s ease, transform .7s ease; }
html.js .reveal { opacity: 0; transform: translateY(26px); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  /* La cabecera con backdrop-filter creaba un contexto que recortaba el menú fijo: lo anulamos en móvil */
  .site-header.scrolled { background: rgba(251,250,246,.97); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav { position: fixed; top: 0; right: 0; height: 100dvh; width: min(80vw, 320px); background: var(--surface); flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 90px 28px; gap: 1.4rem; transform: translateX(100%); transition: transform .3s ease; box-shadow: var(--shadow); overflow-y: auto; }
  .nav.open { transform: none; }
  .nav a.navlink { color: var(--ink); font-size: 1.1rem; }
  .nav .lang-switch { margin-top: 1rem; }
  .nav .lang-switch a { color: var(--muted); }
  .nav-toggle { display: block; z-index: 110; }
  .header-cta .btn-wa { display: none; }
  .intro-grid, .includes, .loc-grid, .rules-wrap, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .rooms { grid-template-columns: 1fr; }
  .gallery button:nth-child(1) { grid-column: span 1; grid-row: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 4rem 0; }
  .check-list { columns: 1; }
  .form .row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-badges { gap: 1.1rem; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ====================== PÁGINAS LEGALES ====================== */
.legal-topbar { position: sticky; top: 0; z-index: 100; background: rgba(251,250,246,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 12px 0; }
.legal-topbar .header-inner { display: flex; align-items: center; justify-content: space-between; }
.legal-topbar .brand { color: var(--ink); font-size: 1.15rem; }
.legal-topbar .brand small { color: var(--muted); }
.legal-back { font-weight: 600; font-size: .92rem; }
.legal-wrap { max-width: 820px; margin: 0 auto; padding: 48px 24px 70px; }
.legal-wrap h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal-wrap h2 { font-size: 1.25rem; color: var(--green); margin-top: 2.2rem; }
.legal-wrap h3 { font-size: 1.05rem; margin-top: 1.4rem; }
.legal-wrap p, .legal-wrap li { color: var(--ink); }
.legal-wrap ul { padding-left: 1.2rem; }
.legal-wrap li { margin-bottom: .4rem; }
.legal-wrap a { color: var(--green); text-decoration: underline; }
.legal-wrap .updated { color: var(--muted); font-size: .9rem; }
.legal-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; font-size: .94rem; vertical-align: top; }
.legal-table th { background: var(--green-soft); color: var(--green-dark); }
.placeholder { background: #fff3cd; color: #7a5d00; padding: 0 .35em; border-radius: 3px; font-weight: 600; }

/* ====================== BANNER DE COOKIES ====================== */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 1.2rem 1.4rem; max-width: 720px; margin: 0 auto; display: none; }
.cookie-banner.show { display: block; }
.cookie-banner strong { font-family: var(--font-head); font-size: 1.05rem; color: var(--ink); }
.cookie-banner p { margin: .4rem 0 1rem; font-size: .92rem; color: var(--muted); }
.cookie-banner p a { color: var(--green); }
.cb-actions { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.cb-actions .btn { padding: .6em 1.2em; font-size: .9rem; }
.cb-link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .88rem; }

/* ===== Contenido bloqueado hasta consentimiento (mapa) ===== */
.consent-ph { width: 100%; height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; text-align: center; background: var(--green-soft); padding: 1.5rem; }
.consent-ph p { margin: 0; color: var(--muted); max-width: 38ch; }
.consent-ext { font-size: .9rem; }

/* ===== Checkbox de privacidad en el formulario ===== */
.field-check { display: flex; gap: .55rem; align-items: flex-start; font-size: .86rem; color: var(--muted); margin-bottom: 1rem; }
.field-check input { width: auto; margin-top: .25rem; flex: none; }
.field-check a { color: var(--green); }

/* ===== Enlaces legales en el footer ===== */
.footer-legal { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.footer-legal a, .footer-legal button { color: rgba(255,255,255,.82); font-size: .85rem; background: none; border: 0; cursor: pointer; font-family: inherit; text-decoration: none; padding: 0; }
.footer-legal a:hover, .footer-legal button:hover { color: #fff; }
@media (max-width: 560px) { .consent-ph, .map-frame iframe { height: 320px; } }
