/* ============================================================
   La Casica Vieja — Stylesheet
   Archetype: Editorial Light Cream (adapted rural)
   Version: 20260604
   ============================================================ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #f5f0e8;   /* warm cream */
  --bg-2:     #ece5d8;
  --bg-dark:  #1c1a16;
  --ink:      #1a1714;
  --ink-soft: #3a342e;
  --ink-mute: #6e6358;
  --accent:   #4a7c59;   /* sage green — rural, naturaleza */
  --accent-2: #c0864a;   /* terracota suave */
  --white:    #ffffff;
  --line:     rgba(26,23,20,0.12);

  --ff-display: 'Italiana', Georgia, serif;
  --ff-body:    'Inter', system-ui, sans-serif;

  --r-sm:  8px;
  --r-md: 16px;
  --r-lg: 24px;

  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

html {
  font-size: 16px;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
}

/* ── Typography ── */
.section-kicker {
  font-family: var(--ff-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}
.section-kicker.light { color: rgba(255,255,255,0.7); }

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
.section-title em {
  font-style: italic;
  color: var(--accent);
}

.section-sub {
  font-size: 1rem;
  color: var(--ink-mute);
  max-width: 55ch;
  line-height: 1.7;
}

.section-header {
  margin-bottom: 3rem;
  max-width: 600px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover { background: #3d6b4a; box-shadow: 0 8px 24px rgba(74,124,89,0.3); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--ink); color: var(--white); }

/* Booking brand button */
.btn-booking {
  background: #003b95;
  color: #fff;
  border-color: #003b95;
}
.btn-booking:hover { background: #00256e; box-shadow: 0 8px 24px rgba(0,59,149,0.4); }

/* Airbnb brand button */
.btn-airbnb {
  background: #ff385c;
  color: #fff;
  border-color: #ff385c;
}
.btn-airbnb:hover { background: #d93050; box-shadow: 0 8px 24px rgba(255,56,92,0.4); }

/* Ghost on dark backgrounds (hero) */
.hero .btn-ghost {
  color: #f5f0e8;
  border-color: rgba(245,240,232,0.5);
}
.hero .btn-ghost:hover {
  background: rgba(245,240,232,0.15);
  border-color: #f5f0e8;
  color: #fff;
}

.btn-white {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}
.btn-white:hover { background: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Safety for split+reveal conflict (gotcha A.4.5) */
.reveal[data-split] { opacity: 1; transform: none; }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), padding 0.35s;
}
.nav.is-scrolled {
  background: rgba(245, 240, 232, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
  padding: 0.85rem 0;
}

.nav-inner {
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-img { width: 36px; height: 36px; object-fit: contain; }
.nav-logo-text {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  color: #f5f0e8;
  transition: color 0.3s;
}
.nav.is-scrolled .nav-logo-text { color: var(--ink); }

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(245,240,232,0.85);
  position: relative;
  transition: color 0.2s;
}
.nav.is-scrolled .nav-links a { color: var(--ink-soft); }
.nav.is-scrolled .nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s var(--ease-out);
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 100px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: #f5f0e8;
  letter-spacing: 0.05em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.lang-toggle:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}
.nav.is-scrolled .lang-toggle {
  background: var(--bg-2);
  border-color: var(--line);
  color: var(--ink);
}
.nav.is-scrolled .lang-toggle:hover {
  background: var(--ink);
  color: var(--white);
}
.lang-flag { font-size: 1rem; line-height: 1; }

.nav-cta { margin-left: 0.5rem; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #f5f0e8;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}
.nav.is-scrolled .nav-hamburger span { background: var(--ink); }
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  background: rgba(245,240,232,0.97);
  backdrop-filter: blur(12px);
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--line);
}
.nav-mobile.is-open { display: flex; }
.nav-mobile a {
  padding: 0.8rem 0;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.nav-mobile a:last-child { border: none; margin-top: 0.5rem; }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 6rem;
  overflow: hidden;
}

.hero-img-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  transform: scale(1.05);
  transition: transform 8s ease-out;
  will-change: transform;
}
.hero-img.loaded { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26,23,20,0.6) 0%, rgba(26,23,20,0.4) 30%, rgba(26,23,20,0.45) 60%, rgba(26,23,20,0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(800px, 100% - 3rem);
  margin-inline: auto;
  padding-inline: 1.5rem;
  margin-bottom: 2rem;
}

.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.7);
  margin-bottom: 1rem;
  display: block;
}

.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 1.05;
  color: #f5f0e8;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
.hero-title em {
  font-style: italic;
  color: #a8d5b5;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(245,240,232,0.82);
  max-width: 48ch;
  line-height: 1.65;
  margin-bottom: 2rem;
}

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

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(245,240,232,0.5);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, rgba(245,240,232,0.5), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(0.6); transform-origin: top; }
}

/* ── STATS ── */
.stats {
  background: var(--bg-dark);
  padding: 2rem 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 3rem;
  text-align: center;
}
.stat-num {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: #f5f0e8;
  line-height: 1;
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.45);
  margin-top: 0.4rem;
}
.stat-sep {
  width: 1px;
  height: 40px;
  background: rgba(245,240,232,0.15);
}

/* ── ABOUT ── */
.about { padding: 7rem 0; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-body {
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 1rem;
  max-width: 50ch;
}

.about-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.detail-tag {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.about-img-wrap { border-radius: var(--r-lg); overflow: hidden; }
.about-img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.about-img-wrap:hover .about-img { transform: scale(1.03); }

/* ── AMENITIES ── */
.amenities {
  padding: 7rem 0;
  background: var(--bg-2);
}

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.amenity-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  cursor: default;
}
.amenity-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(26,23,20,0.1);
}

.amenity-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.amenity-card h3 {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.amenity-card p {
  font-size: 0.875rem;
  color: var(--ink-mute);
  line-height: 1.6;
}

.amenities-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* ── GALLERY ── */
.gallery { padding: 7rem 0; background: var(--bg-dark); }
.gallery .section-header { margin-bottom: 3rem; }
.gallery .section-kicker { color: rgba(168,213,181,0.8); }
.gallery .section-title { color: #f5f0e8; }
.gallery .section-title em { color: #a8d5b5; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 6px;
  padding: 0 6px;
}

.gallery-item {
  overflow: hidden;
  background: var(--bg-dark);
}
.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out), filter 0.4s;
  filter: brightness(0.92) saturate(1.05);
}
.gallery-item--wide img { height: 280px; }

.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1) saturate(1.12);
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-item--wide { grid-column: span 2; }
  .gallery-item img,
  .gallery-item--wide img { height: 200px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item--wide { grid-column: span 1; }
  .gallery-item img,
  .gallery-item--wide img { height: 220px; }
}
.amenities-notes span {
  font-size: 0.8rem;
  color: var(--ink-mute);
}

/* ── PLACES ── */
.places { padding: 7rem 0; }

.places-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.place-card {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.place-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(26,23,20,0.12);
}

.place-img-wrap {
  overflow: hidden;
  aspect-ratio: 16/9;
}
.place-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.place-card:hover .place-img-wrap img { transform: scale(1.06); }

.place-body { padding: 1.25rem 1.5rem 1.5rem; }
.place-cat {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.place-body h3 {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.place-body p {
  font-size: 0.8rem;
  color: var(--ink-mute);
  line-height: 1.6;
}

/* ── REVIEWS ── */
.reviews {
  padding: 7rem 0;
  background: var(--bg-2);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem;
}

.review-stars {
  font-size: 1rem;
  color: var(--accent-2);
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
}

.review-text {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 1.25rem;
}

.review-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.review-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
}
.review-score {
  font-size: 0.75rem;
  color: var(--ink-mute);
}

/* ── BOOKING ── */
.booking {
  position: relative;
  padding: 8rem 0;
  text-align: center;
  overflow: hidden;
}

.booking-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.booking-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.booking-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,23,20,0.72);
}

.booking-content {
  position: relative;
  z-index: 2;
}

.booking-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: #f5f0e8;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.booking-title em { font-style: italic; color: #a8d5b5; }

.booking-sub {
  font-size: 1rem;
  color: rgba(245,240,232,0.75);
  max-width: 50ch;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.booking-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── CONTACT ── */
.contact { padding: 7rem 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-list {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.contact-list a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.contact-list a:hover { color: var(--ink); }
.contact-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── FOOTER ── */
.footer {
  background: var(--bg-dark);
  padding: 3.5rem 0 2.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-logo { width: 48px; height: 48px; object-fit: contain; }
.footer-brand p { font-size: 0.8rem; color: rgba(245,240,232,0.45); line-height: 1.6; }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-nav a {
  font-size: 0.85rem;
  color: rgba(245,240,232,0.5);
  transition: color 0.2s;
}
.footer-nav a:hover { color: #f5f0e8; }

.footer-legal {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-legal p { font-size: 0.75rem; color: rgba(245,240,232,0.3); }
.footer-legal a { font-size: 0.75rem; color: rgba(245,240,232,0.4); transition: color 0.2s; }
.footer-legal a:hover { color: rgba(245,240,232,0.8); }
.footer-legal span { color: rgba(245,240,232,0.2); }

/* ── WhatsApp float ── */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37,211,102,0.5);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .amenities-grid,
  .places-grid,
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }

  .about-grid { gap: 3rem; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-legal { text-align: left; grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .lang-toggle { margin-left: auto; margin-right: 0.75rem; }

  .hero-content { padding-inline: 0; }
  .hero-title { font-size: clamp(2.2rem, 9vw, 3.5rem); }

  .about-grid { grid-template-columns: 1fr; }
  .about-img-wrap { order: -1; }
  .about-img { aspect-ratio: 16/9; }

  .amenities-grid,
  .places-grid,
  .reviews-grid { grid-template-columns: 1fr; }

  .stat-item { padding: 1rem 1.5rem; }
  .stat-sep { display: none; }
  .stats-grid { gap: 0; justify-content: start; }

  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-legal { text-align: left; }

  .booking-actions { flex-direction: column; align-items: center; }

  .hero-scroll-hint { display: none; }
}

@media (max-width: 480px) {
  .hero { padding-bottom: 4rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); display: grid; }
  .stat-sep { display: none; }
  .stat-item { padding: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
