/* ==========================================================================
   CASA DO MONTE — hoja de estilos
   Estudio: Kosta · Proyecto conceptual de portfolio
   ========================================================================== */

:root {
  --ivory: #f6f2ea;
  --paper: #fbf9f5;
  --forest: #445940;
  --forest-deep: #374a34;
  --stone: #8d8a82;
  --clay: #b9a78f;
  --ink: #33312c;
  --ink-soft: #6f6b62;
  --line: rgba(51, 49, 44, 0.14);
  --line-light: rgba(251, 249, 245, 0.32);

  --font-display: "Cormorant Garamond", "Iowan Old Style", serif;
  --font-body: "Manrope", "Helvetica Neue", sans-serif;

  --container: 1280px;
  --gutter: clamp(22px, 5vw, 76px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  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(--font-display);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.005em;
}
.italic { font-style: italic; font-weight: 400; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }

.demo-flag {
  position: fixed;
  bottom: 14px;
  left: 14px;
  z-index: 500;
  font-size: 11px;
  color: var(--paper);
  background: rgba(51, 49, 44, 0.82);
  padding: 6px 12px;
  border-radius: 3px;
  pointer-events: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.btn-solid { background: var(--forest); color: var(--paper); }
.btn-solid:hover { background: var(--forest-deep); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--paper); border-color: var(--line-light); }
.btn-ghost:hover { background: rgba(251,249,245,0.14); border-color: var(--paper); }

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

.btn-outline-light { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn-outline-light:hover { background: var(--paper); color: var(--ink); }

.reveal-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(246, 242, 234, 0.94);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--gutter);
  display: flex;
  align-items: center;
  gap: 34px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 21px;
  font-style: italic;
  color: var(--paper);
  margin-right: auto;
  transition: color 0.4s var(--ease);
}
.site-header.is-scrolled .wordmark { color: var(--ink); }

.main-nav { display: flex; gap: 30px; }
.main-nav a {
  font-size: 13.5px;
  color: rgba(251,249,245,0.88);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.4s var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.site-header.is-scrolled .main-nav a { color: var(--ink); }

.header-cta { padding: 10px 22px; font-size: 13px; color: var(--paper); border-color: var(--line-light); }
.site-header.is-scrolled .header-cta { color: var(--ink); border-color: var(--ink); }
.site-header.is-scrolled .header-cta:hover { background: var(--ink); color: var(--paper); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 310;
}
.menu-toggle span { width: 22px; height: 1.5px; background: var(--paper); transition: background-color 0.4s var(--ease), transform 0.3s var(--ease); }
.site-header.is-scrolled .menu-toggle span { background: var(--ink); }
.menu-toggle.is-open span { background: var(--ink); }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--ivory);
  z-index: 290;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 var(--gutter);
  gap: 46px;
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease);
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav nav { display: flex; flex-direction: column; gap: 20px; }
.mobile-nav a { font-family: var(--font-display); font-size: clamp(30px, 8vw, 44px); font-style: italic; color: var(--ink); }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-media { position: absolute; inset: -6% 0; z-index: 0; will-change: transform; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,28,24,0.28) 0%, rgba(30,28,24,0.08) 34%, rgba(30,28,24,0.6) 100%); }

.hero-tag {
  position: absolute;
  top: 130px;
  right: var(--gutter);
  z-index: 1;
  color: rgba(251,249,245,0.85);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--gutter) 110px;
  color: var(--paper);
}
.hero-kicker { font-size: 14px; letter-spacing: 0.04em; color: rgba(251,249,245,0.85); margin-bottom: 18px; font-style: italic; font-family: var(--font-display); }
.hero-title { font-size: clamp(44px, 7.4vw, 96px); max-width: 15ch; }
.reveal-line { display: block; overflow: hidden; }
.reveal-line span { display: block; transform: translateY(105%); animation: lineUp 0.9s var(--ease) forwards; }
.reveal-line:nth-child(2) span { animation-delay: 0.14s; }
@keyframes lineUp { to { transform: translateY(0); } }
.hero-sub { font-size: 18px; margin-top: 22px; color: rgba(251,249,245,0.92); }
.hero-actions { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; }

/* ==========================================================================
   SECTION SHARED
   ========================================================================== */

main > section { padding: clamp(80px, 11vw, 150px) var(--gutter); }
.section-head { max-width: var(--container); margin: 0 auto clamp(44px, 6vw, 76px); }
.section-head h2 { font-size: clamp(34px, 4.6vw, 52px); }

/* ==========================================================================
   INTRO
   ========================================================================== */

.intro { background: var(--ivory); }
.intro-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1fr 1.1fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.intro-text h2 { font-size: clamp(40px, 5.4vw, 66px); }
.intro-copy .lead { font-size: 19px; color: var(--ink); }
.intro-copy p:not(.lead) { color: var(--ink-soft); font-size: 15.5px; max-width: 36ch; }
.intro-image img { width: 100%; height: clamp(360px, 44vw, 560px); object-fit: cover; border-radius: 2px; }

/* ==========================================================================
   LA CASA
   ========================================================================== */

.la-casa { background: var(--paper); display: flex; flex-direction: column; gap: clamp(60px, 8vw, 110px); }

.casa-block {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.casa-block-b { grid-template-columns: 1fr 1.3fr; }
.casa-block-b .casa-text { order: -1; }

.casa-media { overflow: hidden; border-radius: 2px; }
.casa-media img { width: 100%; height: clamp(320px, 34vw, 480px); object-fit: cover; transition: transform 1.2s var(--ease); }

.casa-eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  color: var(--forest);
  margin-bottom: 14px;
}
.casa-text p:not(.casa-eyebrow) { color: var(--ink-soft); max-width: 34ch; font-size: 15.5px; }

/* ==========================================================================
   HABITACIONES
   ========================================================================== */

.habitaciones { background: var(--ivory); }

.room-list {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 7vw, 90px);
}

.room {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
.room-reverse { grid-template-columns: 0.9fr 1.1fr; }
.room-reverse .room-media { order: 2; }

.room-media { overflow: hidden; border-radius: 2px; }
.room-media img { width: 100%; height: clamp(320px, 32vw, 440px); object-fit: cover; }

.room-eyebrow { font-size: 13px; letter-spacing: 0.04em; color: var(--stone); text-transform: uppercase; margin-bottom: 10px; }
.room-info h3 { font-size: clamp(30px, 3.6vw, 42px); margin-bottom: 14px; }
.room-desc { color: var(--ink-soft); font-size: 15.5px; max-width: 38ch; }

.room-features {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.room-features li {
  font-size: 13.5px;
  color: var(--ink-soft);
  position: relative;
  padding-left: 16px;
}
.room-features li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 1px;
  background: var(--forest);
}

.room-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; flex-wrap: wrap; }
.room-price { font-size: 15px; color: var(--ink); }
.room-price span { font-family: var(--font-display); font-size: 22px; font-style: italic; color: var(--forest); }

/* ==========================================================================
   EXPERIENCIA
   ========================================================================== */

.experiencia { background: var(--paper); }
.exp-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.exp-media { overflow: hidden; border-radius: 2px; margin-bottom: 20px; }
.exp-media img { width: 100%; height: 260px; object-fit: cover; transition: transform 0.7s var(--ease); }
.exp-item:hover .exp-media img { transform: scale(1.04); }
.exp-item h3 { font-size: 22px; font-style: italic; font-weight: 400; margin-bottom: 8px; }
.exp-item p { color: var(--ink-soft); font-size: 14.5px; }

/* ==========================================================================
   GALERÍA
   ========================================================================== */

.galeria { background: var(--ivory); }
.gallery-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 140px;
  gap: 14px;
}
.gallery-item { position: relative; padding: 0; border: none; background: none; cursor: pointer; overflow: hidden; border-radius: 2px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery-item:hover img { transform: scale(1.045); }

.g-a { grid-column: span 3; grid-row: span 3; }
.g-b { grid-column: span 3; grid-row: span 2; }
.g-c { grid-column: span 2; grid-row: span 2; }
.g-d { grid-column: span 1; grid-row: span 2; }
.g-e { grid-column: span 2; grid-row: span 2; }
.g-f { grid-column: span 3; grid-row: span 2; }
.g-g { grid-column: span 3; grid-row: span 2; }

/* ==========================================================================
   RESERVAS
   ========================================================================== */

.reservas { background: var(--forest); color: var(--paper); }
.reservas-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.reservas-inner h2 { color: var(--paper); font-size: clamp(36px, 5vw, 56px); margin-bottom: 44px; }

.reservas-form { text-align: left; }
.form-row-triple { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 22px; }

label { display: block; font-size: 13px; color: rgba(251,249,245,0.75); margin-bottom: 7px; }
input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--paper);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-light);
  padding: 9px 2px;
  transition: border-color 0.3s var(--ease);
}
input:focus { outline: none; border-color: var(--paper); }
input::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.7; }

.form-submit { width: 100%; margin-top: 10px; }
.form-note { margin-top: 14px; font-size: 12.5px; color: rgba(251,249,245,0.6); text-align: center; }

.form-success {
  margin-top: 22px;
  padding: 16px 18px;
  background: rgba(251,249,245,0.1);
  border-left: 2px solid var(--clay);
  font-size: 14px;
  text-align: left;
}

.reservas-alt { margin-top: 40px; font-size: 14.5px; color: rgba(251,249,245,0.8); }
.reservas-inner .btn-line { color: var(--paper); border-color: var(--line-light); margin-top: 14px; }
.reservas-inner .btn-line:hover { background: var(--paper); color: var(--forest-deep); border-color: var(--paper); }

/* ==========================================================================
   UBICACIÓN
   ========================================================================== */

.ubicacion { background: var(--ivory); }
.ubicacion-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
.ubicacion-map { width: 100%; height: clamp(380px, 36vw, 500px); border-radius: 2px; overflow: hidden; border: 1px solid var(--line); }
.ubicacion-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.2) contrast(1.02); }

.ubicacion-info h2 { font-size: clamp(30px, 3.8vw, 42px); margin-bottom: 18px; }
.ubicacion-info p { color: var(--ink-soft); }
.ubicacion-hours { display: flex; gap: 36px; margin: 26px 0; }
.detail-title { font-family: var(--font-display); font-style: italic; color: var(--forest); font-size: 16px; margin-bottom: 4px; }
.ubicacion-hours p:not(.detail-title) { color: var(--ink); }

/* ==========================================================================
   ENTORNO
   ========================================================================== */

.entorno { background: var(--paper); }
.entorno-list {
  max-width: var(--container);
  margin: 0 auto;
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
}
.entorno-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
}
.entorno-name { font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); font-style: italic; color: var(--ink); }
.entorno-desc { color: var(--ink-soft); font-size: 14.5px; text-align: right; }

/* ==========================================================================
   CTA FINAL
   ========================================================================== */

.cta-final { position: relative; min-height: 72vh; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0 var(--gutter); }
.cta-media { position: absolute; inset: -6% 0; z-index: 0; will-change: transform; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; }
.cta-veil { position: absolute; inset: 0; background: rgba(30,28,24,0.4); }
.cta-final-inner { position: relative; z-index: 1; text-align: center; color: var(--paper); }
.cta-final-inner h2 { color: var(--paper); font-size: clamp(42px, 7vw, 76px); margin-bottom: 40px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer { background: var(--ink); color: rgba(251,249,245,0.8); padding: 60px var(--gutter) 30px; }
.footer-grid { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; padding-bottom: 36px; border-bottom: 1px solid rgba(251,249,245,0.16); }
.footer-wordmark { font-family: var(--font-display); font-style: italic; color: var(--paper); font-size: 21px; margin-bottom: 10px; }
.footer-links, .footer-legal { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-links a:hover, .footer-legal a:hover { color: var(--paper); }
.footer-note { max-width: var(--container); margin: 22px auto 0; font-size: 12.5px; color: rgba(251,249,245,0.5); text-align: center; }

/* ==========================================================================
   MODAL HABITACIONES
   ========================================================================== */

.room-modal {
  position: fixed; inset: 0; z-index: 420;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.room-modal.is-open { opacity: 1; visibility: visible; }
.room-modal-backdrop { position: absolute; inset: 0; background: rgba(30,28,24,0.72); }

.room-modal-panel {
  position: relative;
  background: var(--paper);
  max-width: 880px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 3px;
  transform: translateY(16px);
  transition: transform 0.4s var(--ease);
}
.room-modal.is-open .room-modal-panel { transform: translateY(0); }

.room-modal-media { height: 100%; min-height: 280px; overflow: hidden; }
.room-modal-media img { width: 100%; height: 100%; object-fit: cover; }
.room-modal-body { padding: clamp(28px, 4vw, 44px); }
.room-modal-body h3 { font-size: clamp(28px, 3vw, 36px); margin-bottom: 14px; }
.room-modal-body .room-price { margin: 22px 0 24px; }

.room-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--paper); border: none; border-radius: 50%;
  width: 36px; height: 36px; font-size: 22px; line-height: 1;
  cursor: pointer; z-index: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* ==========================================================================
   LIGHTBOX GALERÍA
   ========================================================================== */

.lightbox {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(20, 18, 15, 0.96);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 84%; max-height: 88%; border-radius: 2px; }
.lightbox-close { position: absolute; top: 26px; right: 34px; background: none; border: none; color: var(--paper); font-size: 34px; line-height: 1; cursor: pointer; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--paper);
  font-size: 42px; line-height: 1; cursor: pointer; padding: 10px 16px;
  transition: opacity 0.3s var(--ease);
}
.lightbox-nav:hover { opacity: 0.65; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 980px) {
  .main-nav, .header-cta { display: none; }
  .menu-toggle { display: flex; }

  .intro-grid { grid-template-columns: 1fr; }
  .intro-image { order: -1; }
  .intro-image img { height: 320px; }

  .casa-block, .casa-block-b { grid-template-columns: 1fr; }
  .casa-block-b .casa-text { order: 0; }
  .casa-media img { height: 300px; }

  .room, .room-reverse { grid-template-columns: 1fr; }
  .room-reverse .room-media { order: 0; }
  .room-media img { height: 280px; }

  .exp-grid { grid-template-columns: repeat(2, 1fr); }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .g-a, .g-b, .g-c, .g-d, .g-e, .g-f, .g-g { grid-column: span 1; grid-row: span 1; }
  .g-a { grid-column: span 2; grid-row: span 2; }

  .form-row-triple { grid-template-columns: 1fr; }

  .ubicacion-grid { grid-template-columns: 1fr; }
  .ubicacion-map { order: -1; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .room-modal-panel { grid-template-columns: 1fr; }
  .room-modal-media { min-height: 200px; }
}

@media (max-width: 560px) {
  .hero-tag { display: none; }
  .entorno-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .entorno-desc { text-align: left; }
  .demo-flag { font-size: 10px; padding: 5px 10px; }
}
