/* Hallmark · macrostructure: Marquee Hero · tone: editorial-cinematic · anchor hue: warm terracotta
 * theme: custom "Ocaso Cántabro" · paper oklch(96.5% 0.012 85) light · accent oklch(63% 0.15 45) warm
 * display: Instrument Serif · body: Inter · pre-emit critique: P5 H4 E5 S4 R4 V5
 */

/* ============ Tokens ============ */
:root {
  /* paper & ink */
  --paper:      oklch(96.5% 0.012 85);
  --paper-2:    oklch(93%   0.016 80);
  --card:       oklch(99%   0.006 85);
  --ink:        oklch(23%   0.018 60);
  --ink-soft:   oklch(45%   0.02  60);
  --line:       oklch(88%   0.014 75);

  /* accents */
  --accent:     oklch(63%   0.15  45);   /* terracota atardecer */
  --accent-ink: oklch(98%   0.01  85);
  --sea:        oklch(46%   0.055 215);  /* mar cántabro */
  --night:      oklch(24%   0.035 220);  /* base oscuro del hero */

  /* type */
  --display: "Instrument Serif", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --text-hero:  clamp(3.4rem, 11vw, 9rem);
  --text-h2:    clamp(2.2rem, 5.2vw, 4.2rem);
  --text-h3:    clamp(1.5rem, 2.6vw, 2rem);
  --text-lede:  clamp(1.05rem, 1.6vw, 1.3rem);

  /* space (4pt) */
  --space-xs: 8px; --space-sm: 16px; --space-md: 24px;
  --space-lg: 48px; --space-xl: 80px; --space-2xl: 120px; --space-3xl: 168px;

  /* motion */
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur: .7s;

  --maxw: 1160px;
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  overflow-x: clip;
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ Nav ============ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md);
  padding: 22px clamp(20px, 4vw, 56px);
  color: var(--paper);
  transition: background .4s var(--ease-out), color .4s var(--ease-out),
              padding .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  color: var(--ink);
  padding-top: 14px; padding-bottom: 14px;
  border-bottom-color: var(--line);
}
.nav__brand {
  font-family: var(--display); font-size: 1.35rem; letter-spacing: .02em;
  color: inherit; text-decoration: none; white-space: nowrap;
}
.nav__links { display: flex; gap: clamp(18px, 2.4vw, 34px); }
.nav__links a {
  color: inherit; text-decoration: none; font-size: .92rem; font-weight: 500;
  opacity: .85; position: relative; padding: 4px 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: currentColor; transition: width .3s var(--ease-out);
}
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  color: inherit; text-decoration: none; font-size: .9rem; font-weight: 600;
  border: 1px solid currentColor; padding: 9px 20px; border-radius: 999px;
  white-space: nowrap; transition: background .25s, color .25s;
}
.nav.is-stuck .nav__cta:hover { background: var(--ink); color: var(--paper); }
.nav:not(.is-stuck) .nav__cta:hover { background: var(--paper); color: var(--night); }
@media (max-width: 780px) { .nav__links { display: none; } }

/* ============ Hero ============ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(28px, 6vw, 88px);
  padding-bottom: clamp(48px, 8vw, 104px);
  color: var(--paper);
  overflow: hidden;
  background: var(--night);
}
.hero__media {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 70% 15%, oklch(55% 0.09 55 / .45), transparent 60%),
    linear-gradient(180deg, oklch(30% 0.04 220) 0%, oklch(20% 0.03 230) 100%);
  background-size: cover; background-position: center;
  transform: scale(1.06);
  animation: heroDrift 18s ease-in-out infinite alternate;
}
.hero__media.has-img { background-image: var(--hero-img); }
@keyframes heroDrift { to { transform: scale(1.12) translateY(-1.5%); } }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, oklch(15% 0.03 230 / .45) 0%, transparent 32%,
              oklch(14% 0.03 230 / .12) 55%, oklch(12% 0.03 235 / .82) 100%);
}
.hero__inner { position: relative; max-width: var(--maxw); width: 100%; margin: 0 auto; }
.hero__eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: oklch(90% 0.04 60); margin-bottom: var(--space-md);
}
.hero__title {
  font-family: var(--display); font-weight: 400;
  font-size: var(--text-hero); line-height: .94; letter-spacing: -0.015em;
  overflow-wrap: anywhere; min-width: 0;
}
.hero__title span { display: block; }
.hero__title-em { font-style: italic; color: oklch(86% 0.09 55); }
.hero__lede {
  margin-top: var(--space-lg); max-width: 46ch;
  font-size: var(--text-lede); color: oklch(92% 0.01 85 / .9);
}
/* stagger */
.hero__eyebrow[data-reveal] { transition-delay: .05s; }
.hero__title span:nth-child(1)[data-reveal] { transition-delay: .12s; }
.hero__title span:nth-child(2)[data-reveal] { transition-delay: .22s; }
.hero__title span:nth-child(3)[data-reveal] { transition-delay: .32s; }
.hero__lede[data-reveal] { transition-delay: .44s; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid oklch(92% 0.01 85 / .5);
  border-radius: 14px; display: grid; place-items: start center; padding-top: 8px;
}
.hero__scroll span {
  width: 3px; height: 8px; border-radius: 2px; background: var(--paper);
  animation: scrollDot 1.8s var(--ease-out) infinite;
}
@keyframes scrollDot { 0%{opacity:0;transform:translateY(0)} 30%{opacity:1} 70%{opacity:1} 100%{opacity:0;transform:translateY(12px)} }

/* ============ Intro ============ */
.intro {
  max-width: 980px; margin: 0 auto;
  padding: clamp(72px, 12vw, 180px) clamp(20px, 5vw, 40px);
}
.intro__text {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem); line-height: 1.28; letter-spacing: -0.01em;
  text-wrap: balance;
}
.intro__text em { font-style: italic; color: var(--accent); }

/* ============ Section head ============ */
.section-head { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.section-head__title {
  font-family: var(--display); font-weight: 400; font-size: var(--text-h2);
  line-height: 1.02; letter-spacing: -0.015em;
}
.section-head__note { margin-top: var(--space-sm); color: var(--ink-soft); max-width: 48ch; }
.section-head--center { text-align: center; }
.section-head--center .section-head__note { margin-inline: auto; }

/* ============ Las casas ============ */
.homes { padding: var(--space-lg) 0 var(--space-3xl); }
.home {
  max-width: var(--maxw); margin: var(--space-2xl) auto 0;
  padding: 0 clamp(20px, 5vw, 40px);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.home--flip .home__frame { order: 2; }
.home__frame { position: relative; }
.home__photo {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius);
  overflow: hidden; display: grid; place-items: center;
  box-shadow: 0 30px 70px -40px oklch(23% 0.03 60 / .55);
}
.home__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, transparent 40%, oklch(20% 0.03 60 / .25));
}
.home__photo--akiver {
  background: linear-gradient(155deg, oklch(80% 0.07 60) 0%, oklch(66% 0.11 45) 60%, oklch(52% 0.09 35) 100%);
}
.home__photo--iveka {
  background: linear-gradient(155deg, oklch(82% 0.05 200) 0%, oklch(63% 0.07 215) 60%, oklch(46% 0.06 225) 100%);
}
.home__photo.has-img { background-size: cover; background-position: center; }
.home__photo.has-img .home__placeholder { display: none; }

/* Foto principal como botón de galería */
button.home__photo {
  width: 100%; border: none; padding: 0; cursor: pointer;
  font-family: var(--body); transition: filter .3s var(--ease-out);
}
button.home__photo:hover { filter: brightness(1.04); }
.home__zoom {
  position: relative; z-index: 2; align-self: end; justify-self: start;
  margin: 0 0 16px 16px;
  background: color-mix(in oklch, var(--card) 92%, transparent);
  color: var(--ink); font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  padding: 8px 16px; border-radius: 999px; backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
button.home__photo { display: grid; place-items: stretch; }
button.home__photo:hover .home__zoom,
button.home__photo:focus-visible .home__zoom { opacity: 1; transform: none; }

/* Tira de miniaturas */
.home__thumbs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px; margin-top: 8px;
}
.home__thumbs img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 6px; cursor: pointer;
  transition: filter .25s var(--ease-out), transform .25s var(--ease-out);
}
.home__thumbs img:hover { filter: brightness(1.08); transform: translateY(-2px); }

/* ---------- Lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: clamp(8px, 2vw, 24px); padding: clamp(16px, 4vw, 48px);
  background: oklch(14% 0.02 230 / .94);
  backdrop-filter: blur(8px);
  animation: lbIn .25s var(--ease-out);
}
.lb[hidden] { display: none; }
@keyframes lbIn { from { opacity: 0 } to { opacity: 1 } }

.lb__img {
  grid-column: 2; justify-self: center;
  max-width: 100%; max-height: 84vh;
  object-fit: contain; border-radius: 6px;
  box-shadow: 0 30px 80px -30px oklch(0% 0 0 / .8);
}
.lb__nav, .lb__close {
  background: oklch(96% 0.01 85 / .12); color: var(--paper);
  border: 1px solid oklch(96% 0.01 85 / .25);
  width: 46px; height: 46px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer; display: grid; place-items: center;
  transition: background .2s, transform .12s;
}
.lb__nav:hover, .lb__close:hover { background: oklch(96% 0.01 85 / .25); }
.lb__nav:active { transform: scale(.94); }
.lb__nav--prev { grid-column: 1; }
.lb__nav--next { grid-column: 3; }
.lb__close { position: absolute; top: clamp(12px, 3vw, 28px); right: clamp(12px, 3vw, 28px); font-size: 1.5rem; }
.lb__count {
  position: absolute; bottom: clamp(12px, 3vw, 28px); left: 50%; transform: translateX(-50%);
  color: oklch(92% 0.01 85 / .8); font-size: .85rem; letter-spacing: .06em;
}
@media (max-width: 620px) {
  .lb { grid-template-columns: 1fr; }
  .lb__img { grid-column: 1; }
  .lb__nav { position: absolute; bottom: 54px; }
  .lb__nav--prev { left: 22%; }
  .lb__nav--next { right: 22%; }
}
.home__placeholder {
  position: relative; z-index: 1; color: oklch(100% 0 0 / .85);
  font-size: .82rem; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; border: 1px solid oklch(100% 0 0 / .4);
  padding: 8px 16px; border-radius: 999px; backdrop-filter: blur(2px);
}
.home__index {
  position: absolute; top: -22px; left: -14px; z-index: 2;
  font-family: var(--display); font-size: clamp(3rem, 6vw, 5rem);
  font-style: italic; color: var(--accent); line-height: 1;
  text-shadow: 0 2px 20px oklch(96% 0.01 85);
}
.home--flip .home__index { left: auto; right: -14px; }

.home__place {
  font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sea); margin-bottom: var(--space-sm);
}
.home__name {
  font-family: var(--display); font-weight: 400; font-size: var(--text-h3);
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.02; letter-spacing: -0.01em;
}
.home__desc { margin-top: var(--space-md); color: var(--ink-soft); max-width: 42ch; }
.home__feats {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  margin: var(--space-lg) 0;
}
.home__feats li {
  font-size: .82rem; font-weight: 500; color: var(--ink);
  border: 1px solid var(--line); background: var(--card);
  padding: 6px 14px; border-radius: 999px;
}
.home__cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: .98rem; color: var(--ink); text-decoration: none;
  padding-bottom: 4px; border-bottom: 1.5px solid var(--ink);
  transition: gap .25s var(--ease-out), color .25s, border-color .25s;
}
.home__cta svg { transition: transform .25s var(--ease-out); }
.home__cta:hover { color: var(--accent); border-color: var(--accent); gap: 16px; }
.home__cta:hover svg { transform: translateX(3px); }

@media (max-width: 760px) {
  .home { grid-template-columns: 1fr; gap: var(--space-lg); }
  .home--flip .home__frame { order: 0; }
  .home__photo { aspect-ratio: 3 / 2; }
  .home--flip .home__index { left: -14px; right: auto; }
}

/* ============ El lugar ============ */
.place {
  position: relative; min-height: 78svh; display: grid; place-items: center;
  padding: var(--space-2xl) clamp(20px, 5vw, 40px); overflow: hidden;
  color: var(--paper); background: var(--night); text-align: center;
}
.place__media {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  background: linear-gradient(150deg, oklch(52% 0.07 200), oklch(30% 0.05 150) 70%);
  transform: scale(1.04);
}
.place__media.has-img { background-image: var(--place-img); }
.place__scrim { position: absolute; inset: 0; background: oklch(18% 0.03 210 / .5); }
.place__inner { position: relative; max-width: 720px; }
.place__title {
  font-family: var(--display); font-weight: 400; font-size: var(--text-h2);
  line-height: 1; letter-spacing: -0.015em;
}
.place__text { margin-top: var(--space-md); font-size: var(--text-lede); color: oklch(94% 0.01 85 / .92); }

/* ============ Reserva directa ============ */
.direct { padding: var(--space-3xl) 0; }
.direct__grid {
  max-width: var(--maxw); margin: var(--space-xl) auto 0;
  padding: 0 clamp(20px, 5vw, 40px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px);
}
.value { border-top: 1px solid var(--ink); padding-top: var(--space-md); }
.value__num {
  font-family: var(--display); font-style: italic; font-size: 1.6rem; color: var(--accent);
}
.value h3 {
  font-family: var(--display); font-weight: 400; font-size: 1.5rem;
  margin: var(--space-sm) 0 8px; letter-spacing: -0.01em;
}
.value p { color: var(--ink-soft); font-size: .96rem; }
@media (max-width: 720px) { .direct__grid { grid-template-columns: 1fr; } }

/* ============ CTA ============ */
.cta {
  max-width: var(--maxw); margin: 0 auto var(--space-3xl);
  padding: clamp(56px, 8vw, 100px) clamp(28px, 5vw, 72px);
  background: var(--night); color: var(--paper); border-radius: var(--radius);
  text-align: center; position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(90% 120% at 50% -10%, oklch(60% 0.12 50 / .35), transparent 60%);
}
.cta__title {
  position: relative; font-family: var(--display); font-weight: 400;
  font-size: var(--text-h2); line-height: 1; letter-spacing: -0.015em;
}
.cta__actions {
  position: relative; margin-top: var(--space-lg);
  display: flex; gap: var(--space-sm); justify-content: center; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  padding: 15px 30px; border-radius: 999px; transition: transform .15s var(--ease-out), filter .2s, background .25s, color .25s;
}
.btn:active { transform: scale(.98); }
.btn--solid { background: var(--accent); color: var(--accent-ink); }
.btn--solid:hover { filter: brightness(1.08); }
.btn--ghost { border: 1px solid oklch(92% 0.01 85 / .5); color: var(--paper); }
.btn--ghost:hover { background: oklch(96% 0.01 85 / .12); }

/* ============ Footer ============ */
.footer {
  text-align: center; padding: var(--space-2xl) var(--space-md) var(--space-xl);
  border-top: 1px solid var(--line);
}
.footer__mark { font-family: var(--display); font-size: 2rem; letter-spacing: .01em; }
.footer__line { margin-top: var(--space-sm); color: var(--ink); font-weight: 500; }
.footer__fine { margin-top: 6px; color: var(--ink-soft); font-size: .85rem; }
.footer__legal {
  margin-top: var(--space-md);
  display: flex; gap: var(--space-md); justify-content: center; flex-wrap: wrap;
}
.footer__legal a {
  color: var(--ink-soft); font-size: .85rem; text-decoration: none;
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.footer__legal a:hover { color: var(--accent); border-color: var(--accent); }

/* focus */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
