:root {
  --crema: #f5f1e8;
  --bosque: #2f4538;
  --bosque-2: #3b5647;
  --madera: #a67b5b;
  --madera-dark: #8a6244;
  --ink: #26302a;
  --muted: #616b62;
  --bg: #fffdf8;
  --card: #ffffff;
  --line: #e7e0d1;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(47, 69, 56, 0.1);
  --shadow-lg: 0 24px 60px rgba(47, 69, 56, 0.18);
  --serif: "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* --- Banner de demo (convención del portfolio) --- */
.demo-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  background: #1c241f; color: #e7e0d1; font-size: 0.8rem; padding: 7px 16px; text-align: center;
}
.demo-banner__tag {
  background: var(--madera); color: #1c241f; font-weight: 700; letter-spacing: 0.08em;
  font-size: 0.68rem; padding: 2px 8px; border-radius: 6px;
}

/* --- Cabecera --- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__row { display: flex; align-items: center; gap: 16px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand__mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  background: var(--bosque); color: var(--crema); flex: none;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 1.28rem; color: var(--bosque); }
.brand__tag { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.02em; }

.topnav { display: none; gap: 22px; }
.topnav a { color: var(--ink); font-size: 0.94rem; font-weight: 500; opacity: 0.85; }
.topnav a:hover { opacity: 1; color: var(--bosque); }

.topbar__actions { display: flex; align-items: center; gap: 10px; }
.langswitch {
  display: inline-grid; place-items: center; min-width: 40px; height: 36px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 9px; font-weight: 600; font-size: 0.82rem; color: var(--bosque);
}
.langswitch:hover { background: var(--crema); }

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bosque); color: #fff; font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: 12px 22px; border-radius: 11px; border: 0; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--bosque-2); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(47, 69, 56, 0.22); }
.btn--sm { padding: 9px 16px; font-size: 0.9rem; border-radius: 9px; }
.btn--block { width: 100%; }
.btn--light { background: var(--crema); color: var(--bosque); }
.btn--light:hover { background: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--crema); box-shadow: none; }

/* --- Franja de reserva directa --- */
.promo {
  display: flex; align-items: center; justify-content: center; gap: 9px; flex-wrap: wrap;
  background: var(--madera); color: #fff2e4; font-size: 0.9rem; font-weight: 600;
  padding: 9px 16px; text-align: center;
}
.promo__icon { filter: saturate(1.4); }

/* --- Hero --- */
.hero { position: relative; min-height: 84vh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28, 36, 31, 0.25) 0%, rgba(28, 36, 31, 0.15) 40%, rgba(28, 36, 31, 0.82) 100%);
}
.hero__inner { position: relative; padding: 40px 20px 40px; }
.hero__kicker { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem; font-weight: 600; opacity: 0.9; margin-bottom: 12px; }
.hero__title { font-size: clamp(2.4rem, 7vw, 4.3rem); max-width: 16ch; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3); }
.hero__title em { font-style: italic; color: #f0d9bf; }
.hero__lead { max-width: 52ch; margin-top: 16px; font-size: 1.06rem; opacity: 0.95; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); }

/* --- Buscador --- */
.search {
  margin-top: 26px; background: rgba(255, 253, 248, 0.96); color: var(--ink);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-lg); max-width: 720px;
}
.search__title { font-weight: 700; color: var(--bosque); margin-bottom: 12px; }
.search__fields { display: grid; gap: 12px; }
.search__btn { width: 100%; margin-top: 2px; }
.search__note { margin-top: 12px; font-size: 0.84rem; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--bosque); box-shadow: 0 0 0 3px rgba(47, 69, 56, 0.12);
}
.field textarea { resize: vertical; }

/* --- Secciones --- */
.section { padding: 62px 0; }
.section--tint { background: var(--crema); }
.section__title { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--bosque); }
.section__sub { color: var(--muted); margin-top: 6px; margin-bottom: 30px; font-size: 1.05rem; }

/* --- La casa --- */
.stats { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow);
}
.stat__icon { font-size: 1.5rem; }
.stat__value { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; color: var(--bosque); line-height: 1; }
.stat__label { font-size: 0.85rem; color: var(--muted); }
.house__intro { max-width: 68ch; font-size: 1.08rem; }
.house__amenities-title { font-family: var(--serif); font-size: 1.4rem; color: var(--bosque); margin: 28px 0 14px; }
.amenities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.amenity { display: flex; align-items: center; gap: 10px; font-size: 0.98rem; }

/* --- Galería --- */
.gallery { display: grid; grid-template-columns: 1fr; gap: 12px; }
.gallery__item { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery__item img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.5s ease; }
.gallery__item:hover img { transform: scale(1.05); }

/* --- Tarjetas del entorno --- */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card__icon { font-size: 1.7rem; }
.card__title { font-size: 1.28rem; color: var(--bosque); margin: 8px 0 6px; }
.card__text { color: var(--muted); }

/* --- Opiniones --- */
.reviews { display: grid; grid-template-columns: 1fr; gap: 16px; }
.review { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.review__stars { color: var(--madera); letter-spacing: 2px; font-size: 1rem; }
.review__stars-off { color: #d9d0bd; }
.review__text { font-family: var(--serif); font-size: 1.25rem; line-height: 1.4; margin: 10px 0 14px; color: var(--ink); }
.review__by { font-size: 0.9rem; font-weight: 600; }
.review__by span { color: var(--muted); font-weight: 400; }

/* --- Cómo llegar --- */
.location { display: grid; grid-template-columns: 1fr; gap: 20px; }
.location__card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.location__address { font-weight: 600; color: var(--bosque); margin-bottom: 14px; }
.location__block { margin-top: 14px; }
.location__block h3 { font-family: var(--sans); font-size: 1rem; margin-bottom: 2px; }
.location__block p { color: var(--muted); }
.location__points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; align-content: start; }
.location__points li {
  background: var(--crema); border-left: 3px solid var(--madera); border-radius: 8px;
  padding: 12px 16px; font-weight: 600;
}
.section--tint .location__points li { background: #fff; }

/* --- FAQ --- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq__item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 18px; }
.faq__item summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; color: var(--bosque); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; float: right; font-size: 1.3rem; color: var(--madera); line-height: 1; }
.faq__item[open] summary::after { content: "–"; }
.faq__item p { color: var(--muted); padding: 0 0 16px; margin: 0; }

/* --- CTA --- */
.cta { background: var(--bosque); color: var(--crema); padding: 60px 0; text-align: center; }
.cta__inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta__inner h2 em { font-style: italic; color: #f0d9bf; }
.cta__inner p { margin: 12px auto 24px; opacity: 0.9; max-width: 52ch; }

/* --- Footer --- */
.footer { background: #1c241f; color: #cbd3c9; padding: 40px 0; }
.footer__grid { display: grid; gap: 22px; }
.footer__brand { font-family: var(--serif); font-size: 1.4rem; color: #fff; }
.footer__muted { color: #98a397; font-size: 0.88rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer__links a { color: #cbd3c9; font-size: 0.94rem; }
.footer__links a:hover { color: #fff; }
.footer__credit { font-size: 0.9rem; color: #98a397; }
.footer__credit a { color: #f0d9bf; text-decoration: underline; text-underline-offset: 2px; }

/* --- Página de reserva --- */
.book { padding: 30px 0 70px; }
.back { display: inline-block; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.back:hover { color: var(--bosque); }
.book__title { font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--bosque); }
.book__sub { color: var(--muted); margin: 6px 0 22px; }
.book__grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.book__step { font-family: var(--serif); font-size: 1.4rem; color: var(--bosque); margin: 22px 0 12px; }
.book__step:first-child { margin-top: 0; }
.datesform { display: grid; gap: 12px; }
.fields { display: grid; gap: 12px; }
.book__note { font-size: 0.82rem; color: var(--muted); margin-top: 12px; }

.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 600; margin-bottom: 16px; }
.alert--error { background: #fbeae5; color: #a8321c; border: 1px solid #f2c7bb; }

/* --- Calendario --- */
.cal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin: 6px 0 4px; }
.cal__nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cal__range { font-family: var(--serif); font-weight: 700; color: var(--bosque); font-size: 1.05rem; }
.cal__navbtn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--bosque); font-size: 1.2rem; cursor: pointer;
}
.cal__navbtn:hover { background: var(--crema); }
.cal__navbtn:disabled { opacity: 0.35; cursor: not-allowed; }
.cal__months { display: grid; gap: 18px; }
.cal__monthlabel { text-align: center; font-family: var(--serif); font-weight: 700; color: var(--bosque); margin-bottom: 8px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { text-align: center; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding-bottom: 4px; }
.cal__cell {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1;
  border-radius: 8px; border: 1px solid transparent; background: transparent;
  font-family: var(--sans); font-size: 0.86rem; color: var(--ink); padding: 0;
}
.cal__cell--empty { background: transparent; }
.cal__cell.is-free { background: rgba(47, 69, 56, 0.06); cursor: pointer; }
.cal__cell.is-free:hover { background: rgba(47, 69, 56, 0.16); }
.cal__cell.is-blocked { background: repeating-linear-gradient(-45deg, #efe8da, #efe8da 3px, #e6ddca 3px, #e6ddca 6px); color: #b3a98f; text-decoration: line-through; cursor: not-allowed; }
.cal__cell.is-high { box-shadow: inset 0 -3px 0 var(--madera); }
.cal__cell.is-range { background: rgba(47, 69, 56, 0.22); border-radius: 0; }
.cal__cell.is-selected { background: var(--bosque); color: #fff; font-weight: 700; }
.cal__cell.is-past { opacity: 0.4; }
.cal--panel { max-width: 420px; }
.cal__legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 0.8rem; color: var(--muted); }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.legend__dot--free { background: rgba(47, 69, 56, 0.16); }
.legend__dot--booked { background: repeating-linear-gradient(-45deg, #efe8da, #efe8da 2px, #d8ceb6 2px, #d8ceb6 4px); }
.legend__dot--high { box-shadow: inset 0 -3px 0 var(--madera); background: rgba(47, 69, 56, 0.06); }

/* --- Presupuesto --- */
.quote { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.quote__hint, .quote__error { color: var(--muted); }
.quote__error { color: #a8321c; font-weight: 600; }
.quote__badge { display: inline-block; background: rgba(47, 69, 56, 0.1); color: var(--bosque); font-weight: 700; font-size: 0.82rem; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.quote__lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.quote__lines li { display: flex; justify-content: space-between; gap: 14px; font-size: 0.95rem; }
.quote__lines li > span:first-child { color: var(--muted); }
.quote__rate { color: #a49a83; font-size: 0.85rem; }
.quote__total { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.quote__total span { font-size: 0.9rem; color: var(--muted); max-width: 60%; }
.quote__total strong { font-family: var(--serif); font-size: 1.8rem; color: var(--bosque); }
.quote__saving { margin-top: 12px; background: #fff2e4; color: var(--madera-dark); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.92rem; }
.quote__saving strong { color: var(--madera-dark); }

/* --- Confirmación --- */
.confirm { max-width: 620px; margin: 10px auto; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 26px; box-shadow: var(--shadow-lg); }
.confirm__badge { width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%; background: var(--bosque); color: #fff; display: grid; place-items: center; font-size: 1.8rem; }
.confirm__title { font-size: 2rem; color: var(--bosque); }
.confirm__text { color: var(--muted); margin-top: 6px; }
.confirm__ref { margin: 18px auto; display: inline-block; background: var(--crema); border-radius: 999px; padding: 8px 18px; font-size: 0.95rem; }
.confirm__summary { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; text-align: left; }
.confirm__summary li { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.confirm__summary span { color: var(--muted); }
.email-mock { text-align: left; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 22px; }
.email-mock__title { background: var(--crema); padding: 10px 14px; font-weight: 700; font-size: 0.85rem; color: var(--bosque); }
.email-mock__meta { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 0; font-size: 0.82rem; color: var(--muted); }
.email-mock__subject { font-weight: 600; color: var(--ink); }
.email-mock__body { padding: 8px 14px 14px; font-size: 0.9rem; }

/* --- Panel --- */
.panel { padding: 30px 0 70px; }
.panel__title { font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--bosque); }
.panel__sub { color: var(--muted); margin: 6px 0 22px; }
.panel__h2 { font-family: var(--serif); font-size: 1.5rem; color: var(--bosque); margin: 34px 0 14px; }
.lock { max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.lock__text { font-weight: 600; margin-bottom: 14px; }
.lock__row { display: flex; gap: 10px; }
.lock__row input { flex: 1; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 1rem; }
.lock__row input:focus { outline: none; border-color: var(--bosque); box-shadow: 0 0 0 3px rgba(47, 69, 56, 0.12); }
.lock__hint { margin-top: 14px; font-size: 0.86rem; color: var(--muted); }
.lock__hint code { background: var(--crema); padding: 2px 8px; border-radius: 6px; font-weight: 700; color: var(--bosque); }

.panel__bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.panel__monthnav { display: flex; align-items: center; gap: 12px; }
.panel__month { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--bosque); min-width: 9ch; text-align: center; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 20px 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.kpi__label { display: block; font-size: 0.82rem; color: var(--muted); }
.kpi__value { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.9rem; color: var(--bosque); margin-top: 4px; }

.ota { background: linear-gradient(135deg, var(--bosque), var(--bosque-2)); color: var(--crema); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.ota__title { font-weight: 700; }
.ota__sub { margin-top: 6px; opacity: 0.95; }
.ota__amount { font-family: var(--serif); font-size: 1.7rem; color: #f0d9bf; }
.ota__saving { margin-top: 8px; font-size: 0.9rem; opacity: 0.85; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.bookings { width: 100%; border-collapse: collapse; font-size: 0.92rem; background: var(--card); }
.bookings th, .bookings td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bookings thead th { background: var(--crema); color: var(--bosque); font-weight: 700; }
.bookings tbody tr:last-child td { border-bottom: 0; }
.bookings .num { text-align: right; }
.bookings .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-weight: 600; color: var(--bosque); }
.bookings__empty { text-align: center; color: var(--muted); padding: 24px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
  .gallery__item img { transition: none; }
}

/* --- Responsive --- */
@media (min-width: 560px) {
  .search__fields { grid-template-columns: 1fr 1fr; }
  .search__btn { grid-column: 1 / -1; }
  .cal__months { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .fields { grid-template-columns: 1fr 1fr; }
  .field--wide { grid-column: 1 / -1; }
  .datesform { grid-template-columns: 1fr 1fr; }
  .datesform .field:nth-child(3) { grid-column: 1 / -1; }
}
@media (min-width: 760px) {
  .topnav { display: flex; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .hero__inner { padding-bottom: 56px; }
  .search__fields { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; }
  .search__btn { grid-column: auto; }
}
@media (min-width: 1000px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .location { grid-template-columns: 2fr 1fr; }
  .book__grid { grid-template-columns: 1.6fr 1fr; align-items: start; }
  .book__aside { position: sticky; top: 84px; }
}
