/* Concepto: dos puertas con el techo del logo llevan a dos espacios independientes. */
:root {
  --cream: #FAF3EC;
  --paper: #FFFBF6;
  --sand: #EBDDCB;
  --ink: #2E2824;
  --soft: #65594F;
  --bronze: #7F5F41;
  --forest: #1F3A2E;
  --sage: #D5DED0;
  --line: #D9C8B4;

  --display: "Jost", "Century Gothic", "Avenir Next", sans-serif;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --h1: clamp(2.75rem, 6vw, 5.25rem);
  --h2: clamp(2rem, 3.8vw, 3.25rem);
  --gap: clamp(1.5rem, 4vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 4.75rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
svg, img { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; line-height: 1.08; text-wrap: balance; }
h1 { font-size: var(--h1); letter-spacing: -.02em; }
h1 span { display: block; }
h2 { font-size: var(--h2); letter-spacing: -.01em; }
h3 { font-size: 1.375rem; font-weight: 400; line-height: 1.25; }
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 4px; }

.sprite { position: absolute; }
.wrap { width: 100%; max-width: 78rem; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }
.section-head { display: grid; gap: 1rem; max-width: 42rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { color: var(--soft); font-size: 1.125rem; max-width: 36rem; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 20; padding: .75rem 1rem; background: var(--forest); color: var(--paper); }
.skip:focus { top: 1rem; }

/* Logo */
.logo-roof, .logo-letters { fill: none; stroke-miterlimit: 10; }
.logo-roof { stroke: #8A6A4B; stroke-width: 6; }
.logo-letters { stroke: var(--ink); stroke-width: 8.5; }
/* En el encabezado, el texto es más grande y no lleva líneas para que se pueda leer. */
.logo { width: 11rem; height: auto; }
.logo text { font: 500 52px var(--display); fill: var(--ink); }
.logo-mark { display: none; width: auto; height: 3rem; }
.logo-full { width: 15rem; height: auto; }
.logo-full text { font: 400 31px var(--display); fill: var(--ink); }
.logo-rule { stroke: #8A6A4B; stroke-width: 4; }

/* Encabezado */
.header { position: sticky; top: 0; z-index: 10; background: var(--cream); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 1.5rem; min-height: 4.75rem; }
.brand { flex: none; }
.switch { display: flex; border: 1px solid var(--forest); }
.switch a { padding: .5rem .875rem; color: var(--forest); font-size: .9375rem; font-weight: 500; text-align: center; text-decoration: none; }
.switch a:hover { background: var(--sage); }
.switch a[aria-current] { background: var(--forest); color: var(--paper); }
.nav { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--bronze); text-decoration-thickness: 2px; text-underline-offset: .4em; }
.nav .nav-cta[aria-current] { background: var(--forest); color: var(--paper); text-decoration: none; }
.nav a { padding-block: .625rem; text-decoration: none; font-weight: 500; font-size: 1rem; }
.nav a:hover { color: var(--bronze); }
.nav .nav-cta { padding: .625rem 1.25rem; border: 1px solid var(--forest); color: var(--forest); }
.nav .nav-cta:hover { background: var(--forest); color: var(--paper); }
.menu-btn { display: none; margin-left: auto; min-height: 2.75rem; padding: .5rem 1rem; border: 1px solid var(--line); background: none; color: var(--ink); font: 500 1rem var(--body); cursor: pointer; }

/* Vistas: cada opción del menú muestra solo su contenido. Sin JavaScript se ven todas. */
.js .view:not(.is-active) { display: none; }
.view { min-height: calc(100svh - 4.75rem); }
main:focus, .view :is(h1, h2):focus { outline: none; }
.next { display: flex; flex-direction: column; width: fit-content; margin-top: clamp(2.5rem, 5vw, 4rem); margin-left: auto; padding-bottom: .375rem; border-bottom: 1px solid currentColor; color: var(--forest); font: 400 1.5rem/1.3 var(--display); text-align: right; text-decoration: none; }
.next span { color: var(--soft); font: 500 .9375rem/1.5 var(--body); }
.next:hover { color: var(--bronze); }

/* Entrada */
.entry { display: flex; flex-direction: column; min-height: 100svh; }
.entry-main { display: grid; flex: 1; align-content: center; gap: clamp(1rem, 3svh, 2rem); padding: clamp(1.25rem, 3svh, 2.5rem) clamp(1.25rem, 4vw, 3rem) 1rem; }
.entry-head { display: grid; justify-items: center; gap: clamp(.75rem, 2svh, 1.25rem); text-align: center; }
.entry-head h1 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); letter-spacing: -.01em; }
.entry-logo { width: min(100%, 18rem); }
.entry-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 30rem)); justify-content: center; gap: clamp(1.5rem, 6vw, 6rem); }
.entry-door { display: grid; justify-items: center; align-content: start; gap: 1rem; min-width: 0; text-align: center; text-decoration: none; }
.entry-door .house { justify-self: center; width: min(100%, clamp(15rem, 46svh, 31rem)); height: auto; overflow: visible; }
.entry-copy { display: grid; gap: .125rem; }
.entry-title { width: fit-content; margin-inline: auto; border-bottom: 1px solid currentColor; font: 400 clamp(1.375rem, 2.2vw, 1.875rem)/1.3 var(--display); }
.entry-guest .entry-title { color: #955330; }
.entry-owner .entry-title { color: var(--forest); }
.entry-text { color: var(--soft); }
.entry-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 2rem; padding: .75rem clamp(1.25rem, 4vw, 3rem) 1.25rem; color: var(--soft); font-size: .9375rem; }
small { font-size: .8125rem; }

/* Casa con el techo del logo */
.house { width: 100%; max-width: 35rem; height: auto; justify-self: end; }
.house-photo { transform-box: fill-box; transform-origin: center; transition: transform .7s ease-out; }
.roofline { fill: none; stroke: #8A6A4B; stroke-width: 4; stroke-dasharray: 1; transition: transform .45s ease-out; }
.entry-door:is(:hover, :focus-visible) .house-photo { transform: scale(1.05); }
.entry-door:is(:hover, :focus-visible) .roofline { transform: translateY(-14px); }

/* Inicio de cada página */
.hero { display: grid; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--gap); align-items: end; padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.hero-copy { display: grid; gap: 1.75rem; align-self: center; padding-bottom: clamp(2rem, 5vw, 4rem); }
.hero .house { max-height: calc(100svh - 7rem); }
.lead { max-width: 33rem; color: var(--soft); font-size: clamp(1.125rem, 1.6vw, 1.3rem); }
.superhost, .section-head .superhost { display: flex; align-items: center; gap: .625rem; color: var(--forest); font-size: 1.0625rem; font-weight: 600; }
.superhost svg { flex: none; width: 1.75rem; height: 1.75rem; fill: none; stroke: var(--bronze); stroke-width: 1.5; }
.superhost path { fill: var(--bronze); stroke: none; }
.page-owner .superhost { color: var(--paper); }
.page-owner .superhost svg { stroke: #D3AE82; }
.page-owner .superhost path { fill: #D3AE82; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.page-owner .hero { background: var(--forest); color: var(--paper); }
.page-owner .hero .lead { color: var(--sage); }
.page-owner .hero .roofline { stroke: #D3AE82; }
.page-owner .hero :focus-visible { outline-color: #E6C39A; }
.page-guest .hero { background: linear-gradient(160deg, var(--cream) 45%, #F3D3B8); }

/* Pendientes */
.todo { background: var(--paper); }
.tasks li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 1rem var(--gap); align-items: baseline; padding-block: 1.125rem; border-top: 1px solid var(--line); color: var(--soft); }
.task { font: 300 clamp(1.75rem, 4vw, 3.25rem)/1.15 var(--display); }
.task s { text-decoration-color: #8A6A4B; text-decoration-thickness: 2px; }
.tasks .task-yours { border-top: 2px solid var(--forest); color: var(--forest); font-weight: 600; }
.task-yours .task { font-weight: 400; }

/* Rendimiento */
.yield, .contact { background: var(--forest); color: var(--paper); }
.contact :focus-visible { outline-color: #E6C39A; }
.yield { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1.5rem var(--gap); padding: clamp(1.5rem, 4vw, 3rem); }
.yield h3 { font-size: clamp(1.625rem, 2.6vw, 2.25rem); font-weight: 300; line-height: 1.15; }
.yield-copy { display: grid; gap: 1rem; }
.yield-copy .note { color: #C9D0BF; font-size: .9375rem; }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; margin-bottom: 3rem; counter-reset: step; }
.steps li { display: grid; gap: .75rem; align-content: start; counter-increment: step; }
.steps li::before { content: counter(step); color: var(--bronze); font: 300 2.5rem/1 var(--display); }
.steps p { color: var(--soft); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .75rem 1.5rem; border: 1px solid var(--forest); background: var(--forest); color: var(--paper); font-weight: 600; line-height: 1.3; text-align: center; text-decoration: none; transition: background-color .2s, color .2s; }
.btn:hover { background: #2D5040; }
.btn-line { background: transparent; color: var(--forest); }
.btn-line:hover { background: var(--forest); color: var(--paper); }
.btn-light { border-color: var(--cream); background: var(--cream); color: var(--forest); }
.btn-light:hover { background: var(--sand); }
.btn-ghost { border-color: #8FA598; background: transparent; }

/* Huéspedes */
.stays { background: var(--sage); }
.stays .section-head p { color: #46534A; }
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.door { display: flex; flex-direction: column; min-width: 0; background: var(--paper); }
.door > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.door-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: .875rem; padding: clamp(1.25rem, 2.5vw, 2rem); }
.door-copy .btn { margin-top: auto; }
.door-copy p { color: var(--soft); }
.door-copy .door-place { margin-top: -.625rem; color: #3F6B55; font-weight: 500; }
.door-copy .door-facts { color: var(--ink); font-size: 1rem; font-weight: 500; }
.gallery { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-template-rows: 1.35fr 1fr; gap: 1.5rem; height: clamp(34rem, 56vw, 46rem); }
.shot { display: flex; flex-direction: column; gap: .5rem; min-width: 0; min-height: 0; }
.shot img { flex: 1; width: 100%; min-height: 0; object-fit: cover; }
.shot figcaption { color: #46534A; font-size: .9375rem; line-height: 1.4; }
.shot-tall { grid-row: span 2; }
.shot-wide { grid-column: span 2; }

/* Reseñas */
.reviews { background: var(--paper); }
.reviews-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem var(--gap); }
.carousel { grid-column: 1 / -1; display: grid; gap: 1.5rem; min-width: 0; padding: clamp(1.5rem, 4vw, 3rem); overflow: hidden; background: var(--sage); touch-action: pan-y; }
.slides { display: grid; gap: 2.5rem; min-width: 0; }
.slide { min-width: 0; }
.review { display: grid; align-content: start; gap: 1rem; }
.stars { color: var(--bronze); letter-spacing: .15em; line-height: 1; }
.review-text { margin: 0; color: var(--forest); font: 300 clamp(1.5rem, 3vw, 2.5rem)/1.2 var(--display); text-wrap: balance; }
.review-source { color: #46534A; }
.carousel-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.carousel-controls button { min-width: 2.75rem; min-height: 2.75rem; padding: .5rem .75rem; border: 1px solid var(--forest); background: none; color: var(--forest); font: 500 1rem/1 var(--body); cursor: pointer; }
.carousel-controls button:hover { background: var(--forest); color: var(--paper); }
.carousel-controls .carousel-play { display: grid; place-items: center; width: 2.75rem; padding: 0; border: 0; }
.carousel-controls .carousel-play:hover { background: none; color: var(--bronze); }
.carousel-play svg { width: 1.75rem; height: 1.75rem; fill: currentColor; }
.carousel-play .icon-play, .carousel-play.is-paused .icon-pause { display: none; }
.carousel-play.is-paused .icon-play { display: inline; }

/* Todas las reseñas ocupan el mismo lugar, así la altura no cambia entre una y otra. */
.carousel.is-ready .slide { grid-area: 1 / 1; visibility: hidden; opacity: 0; transform: translateX(2.5rem); transition: opacity .7s ease, transform .7s ease, visibility 0s .7s; }
.carousel.is-ready .slide.is-past { transform: translateX(-2.5rem); }
.carousel.is-ready .slide.is-current { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.rating { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; padding-top: 1.5rem; border-top: 2px solid var(--forest); }
.rating-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; color: var(--soft); }
.rating-score strong { color: var(--forest); font: 300 3.5rem/1 var(--display); }
.rating-label { font-weight: 600; }
.topics { width: 100%; margin-bottom: .5rem; }
.topics li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .5rem; border-bottom: 1px solid var(--line); }
.topics span, .reviews-note { color: var(--soft); }
.reviews-note { margin-top: 2rem; font-size: .9375rem; }

/* Nosotros y preguntas */
.about { background: var(--paper); }
.faq-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.faq-in > div:first-child { display: grid; gap: 1.25rem; }
.faq-in > div:first-child p { max-width: 32rem; color: var(--soft); font-size: 1.125rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { padding-block: 1.125rem; font-weight: 600; cursor: pointer; }
.faq summary::marker { color: var(--bronze); }
.faq details p { padding-bottom: 1.25rem; color: var(--soft); }

/* Contacto */
.contact .wrap { display: grid; gap: 1.5rem; }
.contact-lead { font-size: 1.1875rem; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.mail { font: 300 clamp(1.875rem, 5vw, 4rem)/1.2 var(--display); text-decoration-thickness: 1px; text-underline-offset: .15em; overflow-wrap: anywhere; }
.copy { min-height: 2.75rem; padding: .5rem 1rem; border: 1px solid #8FA598; background: none; color: inherit; font: 500 1rem var(--body); cursor: pointer; }
.copy:hover { background: #2D5040; }
.mail-dialog { width: min(27rem, calc(100% - 2.5rem)); padding: 0; border: 0; background: var(--paper); color: var(--ink); }
.mail-dialog::backdrop { background: rgb(31 58 46 / .65); }
.mail-box { display: grid; gap: .875rem; padding: clamp(1.5rem, 5vw, 2.25rem); }
.mail-box h2 { font-size: 1.875rem; }
.mail-box p { color: var(--soft); }
.mail-box #mail-status:empty { display: none; }
.mail-box button { font-family: var(--body); font-size: inherit; cursor: pointer; }
.mail-close { min-height: 2.75rem; border: 0; background: none; color: var(--soft); text-decoration: underline; }
[hidden] { display: none !important; }
.contact-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .5rem; }

/* Pie de página */
.footer { padding-block: 3rem; }
.footer-in { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 2rem; color: var(--soft); }

@media (max-width: 64rem) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; inset: 100% 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem clamp(1.25rem, 4vw, 3rem) 1.5rem; background: var(--cream); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding-block: .875rem; }
  .nav .nav-cta { margin-top: .75rem; text-align: center; }
}

@media (max-width: 46rem) {
  .hero-in, .yield, .faq-in, .doors, .reviews-in { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-bottom: 0; }
  .hero .house { justify-self: center; }
  .tasks li { grid-template-columns: minmax(0, 1fr); gap: .375rem; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; gap: 1.25rem 1rem; height: auto; }
  .shot img { flex: none; aspect-ratio: 4 / 3; }
  .shot-tall, .shot-wide { grid-row: auto; grid-column: 1 / -1; }
  .shot-tall img { aspect-ratio: 4 / 5; }
}

/* En celular, el cambio entre secciones ocupa su propia fila y siempre queda visible. */
@media (max-width: 36rem) {
  .header-in { flex-wrap: wrap; gap: .625rem 1rem; padding-block: .75rem; }
  .logo { width: 10rem; }
  .switch { order: 3; width: 100%; }
  .switch a { flex: 1; }
  .view { min-height: calc(100svh - 8rem); }
  .entry-doors { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .entry-door { gap: .5rem; }
  .entry-door .house { width: min(100%, clamp(10.5rem, 24svh, 16rem)); }
}

@media (max-width: 30rem) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .contact-links .btn, .actions .btn { width: 100%; }
}

/* En pantallas muy angostas, el encabezado usa el logo pequeño. */
@media (max-width: 19.5rem) {
  .logo { display: none; }
  .logo-mark { display: block; }
}

@media (prefers-reduced-motion: no-preference) {
  .roofline { animation: draw 1.8s ease-out both; }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  .js .view.is-active.is-changing { animation: enter .35s ease-out; }
  @keyframes enter { from { opacity: .4; transform: translateY(10px); } }

  /* La puerta elegida se convierte en la casa de la página siguiente. */
  @view-transition { navigation: auto; }
  .house-guest { view-transition-name: casa-huesped; }
  .house-owner { view-transition-name: casa-propietario; }
  ::view-transition-group(*) { animation-duration: .6s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
