/* ============================================================
   Hotel Cal Naudí — redesign 2026
   Warm Mediterranean editorial: ivory, terracotta, sea, ink.
   ============================================================ */

:root {
  --ivory: #faf6ef;
  --sand: #f1e9dc;
  --ink: #211d17;
  --ink-soft: #6b6154;
  --terracotta: #a9542f;
  --terracotta-deep: #8a4123;
  --sea: #2f6b87;
  --cream: #f5efe4;
  --dark: #1e1a14;
  --dark-2: #282219;
  --line: rgba(33, 29, 23, 0.14);
  --line-light: rgba(245, 239, 228, 0.16);
  --shadow-soft: 0 20px 60px -24px rgba(60, 42, 24, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --header-h: 76px;
  --pad-x: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 420;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 em,
h2 em {
  font-style: italic;
  font-weight: 380;
  color: inherit;
}

p {
  margin: 0 0 1em;
}

.container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

section {
  padding-block: var(--section-y);
}

/* ---------- shared atoms ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section-title {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  max-width: 18em;
  margin-bottom: 1.2rem;
}

.lead {
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 42em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.25s ease;
}

.btn svg {
  flex: none;
}

.btn-primary {
  background: var(--terracotta);
  color: #fff;
}

.btn-primary:hover {
  background: var(--terracotta-deep);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
}

.btn-dark {
  background: var(--ink);
  color: var(--cream);
}

.btn-dark:hover {
  background: #000;
  transform: translateY(-2px);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(20, 16, 11, 0.5), rgba(20, 16, 11, 0));
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.site-header.scrolled {
  background: rgba(24, 20, 14, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-light);
}

.header-inner {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: none;
}

.brand img {
  height: 30px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: clamp(1rem, 2vw, 1.8rem);
  margin-inline: auto;
}

.main-nav a {
  color: rgba(245, 239, 228, 0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  border-bottom-color: var(--terracotta);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: none;
}

.lang-switch {
  position: relative;
  display: flex;
  gap: 0.15rem;
  border: 1px solid rgba(245, 239, 228, 0.3);
  border-radius: 999px;
  padding: 0.2rem;
}

/* sliding marker that glides to the active language */
.lang-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  background: var(--cream);
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
}

.lang-switch.lang-anim .lang-thumb {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-switch button {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(245, 239, 228, 0.7);
  font: 600 0.72rem/1 var(--font-body);
  letter-spacing: 0.08em;
  padding: 0.42rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lang-switch button:hover {
  color: #fff;
}

.lang-switch button[aria-pressed="true"] {
  color: var(--ink);
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--terracotta);
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.62rem 1.15rem;
  border-radius: 999px;
  transition: background 0.25s ease;
  white-space: nowrap;
}

.header-phone:hover {
  background: var(--terracotta-deep);
}

.nav-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
  z-index: 70;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  background: var(--cream);
  transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;
}

.nav-toggle span {
  top: 21px;
}

.nav-toggle span::before {
  left: 0;
  top: -7px;
}

.nav-toggle span::after {
  left: 0;
  top: 7px;
}

body.nav-open .nav-toggle span {
  background: transparent;
}

body.nav-open .nav-toggle span::before {
  top: 0;
  transform: rotate(45deg);
}

body.nav-open .nav-toggle span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0;
  overflow: hidden;
  color: #fff;
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  object-position: center 62%;
  animation: hero-drift 22s ease-out both;
}

@keyframes hero-drift {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(18, 14, 10, 0.52) 0%,
    rgba(18, 14, 10, 0.12) 38%,
    rgba(18, 14, 10, 0.16) 62%,
    rgba(18, 14, 10, 0.66) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding: 0 var(--pad-x) clamp(4rem, 9vh, 6.5rem);
}

.hero .eyebrow {
  color: #e8c9a8;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.8rem);
  max-width: 12em;
  margin-bottom: 1.1rem;
  text-wrap: balance;
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 36em;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.4rem;
}

.hero-note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.scroll-cue {
  position: absolute;
  right: clamp(1.25rem, 4vw, 3rem);
  bottom: 2rem;
  z-index: 2;
  width: 1px;
  height: 64px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.scroll-cue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: top;
  animation: cue 2.2s ease-in-out infinite;
}

@keyframes cue {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  45% {
    transform: scaleY(1);
    transform-origin: top;
  }
  55% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ---------- stats strip ---------- */

.stats {
  padding-block: clamp(2.5rem, 5vw, 3.8rem);
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat {
  text-align: left;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
}

.stat-num sup {
  font-size: 0.45em;
}

.stat-label {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- la casa ---------- */

.casa-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.casa-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.8rem;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
}

.chip svg {
  color: var(--terracotta);
  flex: none;
}

.casa-collage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 52px;
  gap: 1rem;
}

.casa-collage figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.casa-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.casa-collage figure:hover img {
  transform: scale(1.045);
}

.collage-a {
  grid-column: 1 / 9;
  grid-row: 1 / 6;
}

.collage-b {
  grid-column: 9 / 13;
  grid-row: 2 / 5;
}

.collage-c {
  grid-column: 3 / 8;
  grid-row: 6 / 9;
}

.collage-d {
  grid-column: 8 / 12;
  grid-row: 5 / 9;
}

/* ---------- habitaciones ---------- */

.rooms {
  background: var(--sand);
}

.rooms-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.rooms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.room-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.room-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.room-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.room-card:hover .room-media img {
  transform: scale(1.05);
}

.room-count {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(24, 20, 14, 0.72);
  color: var(--cream);
  backdrop-filter: blur(6px);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
}

.room-body {
  padding: clamp(1.4rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1;
}

.room-body h3 {
  font-size: 1.55rem;
}

.room-body p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

.room-foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.room-price {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.room-price small {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: block;
}

.room-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--terracotta);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.room-link:hover {
  color: var(--terracotta-deep);
}

.amenities {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 2rem;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.amenity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.9rem;
  color: var(--ink);
}

.amenity svg {
  color: var(--terracotta);
  flex: none;
}

/* ---------- restaurante band ---------- */

.dining {
  position: relative;
  padding: 0;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--cream);
}

.dining-media,
.dining-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dining-media img {
  object-fit: cover;
}

.dining::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(18, 14, 10, 0.78) 0%,
    rgba(18, 14, 10, 0.45) 46%,
    rgba(18, 14, 10, 0.1) 75%
  );
}

.dining-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 7rem) var(--pad-x);
}

.dining-card {
  max-width: 520px;
}

.dining .eyebrow {
  color: #e8c9a8;
}

.dining h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  margin-bottom: 1.1rem;
}

.dining p {
  color: rgba(245, 239, 228, 0.88);
}

.dining-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.dining-facts .chip {
  background: rgba(245, 239, 228, 0.12);
  border-color: rgba(245, 239, 228, 0.28);
  color: var(--cream);
  backdrop-filter: blur(4px);
}

.dining-facts .chip svg {
  color: #e8c9a8;
}

/* ---------- finca ---------- */

.finca-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.finca-grid > figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.finca-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.6s ease;
}

.finca-grid figure:hover img {
  transform: scale(1.04);
}

.finca-strip {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.finca-strip figure {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.finca-strip img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.finca-strip figure:hover img {
  transform: scale(1.05);
}

/* ---------- galería ---------- */

.gallery {
  background: var(--sand);
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0 2.5rem;
}

.filter-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font: 600 0.85rem/1 var(--font-body);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.gallery-item {
  margin: 0;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 3 / 2;
  background: var(--dark-2);
}

.gallery-item.hidden {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.55s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 2.2rem 1rem 0.85rem;
  background: linear-gradient(180deg, transparent, rgba(18, 14, 10, 0.72));
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-item:hover figcaption {
  opacity: 1;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(14, 11, 8, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(1400px, 92vw);
  max-height: 82vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
  position: absolute;
  bottom: clamp(1rem, 3vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.lightbox button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
  position: absolute;
}

.lightbox button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lb-close {
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
}

.lb-prev {
  left: clamp(0.5rem, 2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: clamp(0.5rem, 2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- entorno ---------- */

.entorno {
  background: var(--dark);
  color: var(--cream);
}

.entorno .eyebrow {
  color: #e8c9a8;
}

.entorno .lead {
  color: rgba(245, 239, 228, 0.72);
}

.entorno-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.entorno-card {
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 210px;
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.entorno-card:hover {
  background: var(--dark-2);
  border-color: rgba(232, 201, 168, 0.35);
  transform: translateY(-4px);
}

.entorno-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #e8c9a8;
  letter-spacing: 0.1em;
}

.entorno-card h3 {
  font-size: 1.35rem;
  color: var(--cream);
}

.entorno-card p {
  font-size: 0.9rem;
  color: rgba(245, 239, 228, 0.68);
  margin: 0;
}

.entorno-tag {
  margin-top: auto;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 201, 168, 0.8);
}

/* ---------- tarifas ---------- */

.rates-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-top: 2.5rem;
}

.rate-rows {
  border-top: 1px solid var(--line);
}

.rate-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 0.25rem;
  border-bottom: 1px solid var(--line);
}

.rate-name {
  font-weight: 600;
  font-size: 1rem;
}

.rate-name small {
  display: block;
  font-weight: 400;
  font-size: 0.83rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
  max-width: 34em;
}

.rate-price {
  font-family: var(--font-display);
  font-size: 1.45rem;
  white-space: nowrap;
  color: var(--ink);
}

.rate-price small {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.offer-card {
  background: var(--terracotta);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.offer-card .eyebrow {
  color: rgba(255, 255, 255, 0.85);
}

.offer-card h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  margin-bottom: 0.9rem;
}

.offer-card p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

.offer-card .btn {
  background: #fff;
  color: var(--terracotta-deep);
  margin-top: 0.6rem;
}

.offer-card .btn:hover {
  background: var(--cream);
  transform: translateY(-2px);
}

.policies {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.policy {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.policy svg {
  flex: none;
  color: var(--terracotta);
  margin-top: 0.15rem;
}

.policy strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

/* ---------- contacto ---------- */

.contact {
  background: var(--sand);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  margin-top: 2.5rem;
  align-items: stretch;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--terracotta);
}

.contact-item h3 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

.contact-item a {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.contact-item a:hover {
  color: var(--terracotta);
}

.contact-item p {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  min-height: 420px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--dark);
  color: rgba(245, 239, 228, 0.72);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-light);
}

.footer-brand img {
  height: 28px;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 26em;
}

.site-footer h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e8c9a8;
  margin: 0 0 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.site-footer li a {
  color: rgba(245, 239, 228, 0.72);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.site-footer li a:hover {
  color: #fff;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.8rem;
  font-size: 0.8rem;
  color: rgba(245, 239, 228, 0.45);
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- mobile ---------- */

@media (max-width: 1020px) {
  .main-nav {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 11, 0.97);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
    z-index: 65;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  body.nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    font-size: 1.3rem;
    font-family: var(--font-display);
  }

  .nav-toggle {
    display: block;
  }

  .header-phone span {
    display: none;
  }

  .header-phone {
    padding: 0.62rem 0.75rem;
  }

  .casa-grid,
  .finca-grid,
  .rates-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .offer-card {
    position: static;
  }

  .stats-grid,
  .amenities {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid,
  .entorno-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .policies {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .rooms-grid,
  .gallery-grid,
  .entorno-grid,
  .finca-strip {
    grid-template-columns: 1fr;
  }

  .casa-collage {
    grid-auto-rows: 34px;
  }

  .rate-row {
    flex-direction: column;
    gap: 0.3rem;
  }

  .lang-switch {
    border: 0;
    padding: 0;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .brand img {
    height: 22px;
  }

  .lang-switch button {
    padding: 0.42rem 0.45rem;
  }

  .header-phone {
    display: none;
  }
}

/* ---------- motion & a11y ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-media img {
    animation: none;
  }

  .scroll-cue::after {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- preloader / charging screen ---------- */

body.preloading {
  overflow: hidden;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #16120c;
  color: var(--cream);
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}

.preloader.done {
  transform: translateY(-100%);
}

/* centered wordmark + loading indicator */
.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.1rem;
  opacity: 0;
  animation: pre-fade 0.8s ease 0.1s forwards;
}

.preloader-logo {
  height: 40px;
  width: auto;
}

.preloader-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.95rem;
}

.preloader-track {
  position: relative;
  width: clamp(160px, 40vw, 220px);
  height: 2px;
  background: rgba(245, 239, 228, 0.14);
  border-radius: 2px;
  overflow: hidden;
}

.preloader-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--terracotta);
  transition: width 0.2s ease-out;
}

.preloader-count {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  color: rgba(245, 239, 228, 0.55);
}

@keyframes pre-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .preloader,
  .preloader-inner {
    animation: none;
    transition: none;
  }
}

/* ---------- hero entrance (after preloader reveal) ---------- */

/* armed by JS once the preloader is running; without JS the hero
   simply shows normally. */
body.hero-armed .hero .eyebrow,
body.hero-armed .hero h1,
body.hero-armed .hero-sub,
body.hero-armed .hero-ctas,
body.hero-armed .hero-note {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}

body.hero-in .hero .eyebrow { opacity: 1; transform: none; transition-delay: 0.12s; }
body.hero-in .hero h1 { opacity: 1; transform: none; transition-delay: 0.26s; }
body.hero-in .hero-sub { opacity: 1; transform: none; transition-delay: 0.46s; }
body.hero-in .hero-ctas { opacity: 1; transform: none; transition-delay: 0.62s; }
body.hero-in .hero-note { opacity: 1; transform: none; transition-delay: 0.8s; }

@media (prefers-reduced-motion: reduce) {
  body.hero-armed .hero .eyebrow,
  body.hero-armed .hero h1,
  body.hero-armed .hero-sub,
  body.hero-armed .hero-ctas,
  body.hero-armed .hero-note {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
