/* Tipografías alojadas en /fonts (sin Google Fonts) */
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(../../../fonts/dm-sans-400-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(../../../fonts/dm-sans-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(../../../fonts/young-serif-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(../../../fonts/ibm-plex-mono-400-normal.woff2) format("woff2"); }

/* Layout: hero corten a sangre con anillo de texto → lienzo sandstone de 1200px; una imagen, una idea, mucho aire */
:root {
  --color-corten: #b84b30;
  --color-bordeaux: #5f1d1a;
  --color-sandstone: #f8f4e9;
  --color-driftwood: #e5e7eb;
  --color-charcoal: #000000;
  --color-bone: #ffffff;
  --color-smoke: #666666;
  --color-ash: #999999;
  --color-espresso: #3e3d3a;

  --font-riposte: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-wordmark: "Young Serif", Georgia, "Times New Roman", serif;
  --font-apercu-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-longform: ui-serif, Georgia, "Times New Roman", serif;

  --text-caption: 10px;
  --text-body: 16px;
  --text-subheading: 20px;
  --text-heading-sm: 24px;
  --text-heading: 36px;

  --page-max-width: 1200px;
  --section-gap: 80px;
  --card-padding: 24px;
  --element-gap: 20px;
  --radius-cards: 14px;
  --radius-full: 9999px;

  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --overlap: clamp(72px, 10vw, 128px);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-sandstone);
  color: var(--color-charcoal);
  font-family: var(--font-riposte);
  font-size: var(--text-body);
  line-height: 1.35;
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  max-width: calc(var(--page-max-width) + 32px);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* ---------- Line-art ---------- */
.lineart { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hero-svg .lineart { stroke-width: 3.2; }
.visit-art.lineart { stroke-width: 3.6; }
.lineart--bordeaux { stroke: var(--color-bordeaux); }
.lineart--ink { stroke: var(--color-charcoal); }
.occlude { fill: var(--color-corten); }

/* ---------- Navegación ---------- */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-block: 24px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.nav-link {
  justify-self: start;
  font-family: var(--font-riposte);
  font-weight: 400;
  font-size: clamp(12px, 0.95vw, 14px);
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-sandstone);
  border: 0;
  padding: 8px 0 6px;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat;
  transition: background-size 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav-link--end { justify-self: end; background-position: 100% 100%; }
.nav-link:hover, .nav-link:focus-visible { background-size: 100% 1px; }
.wordmark {
  font-family: var(--font-wordmark);
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1;
  letter-spacing: 0;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--color-sandstone);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--color-corten);
  color: var(--color-sandstone);
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-bottom: calc(var(--overlap) + 28px);
}
.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.hero-art { margin: 0; width: min(560px, 84vw); }
@supports (height: 1svh) {
  .hero-art { width: max(260px, min(560px, 84vw, calc(100svh - 300px))); }
}
.hero-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ring { transform-box: view-box; transform-origin: 50% 50%; animation: spin 90s linear infinite; }
.ring-text { font-family: var(--font-riposte); font-weight: 600; font-size: 24px; fill: var(--color-sandstone); }
@keyframes spin { to { transform: rotate(360deg); } }

.meta {
  margin: 0;
  font-family: var(--font-apercu-mono);
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.scroll-hint {
  margin: 0;
  padding-top: 24px;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  font-family: var(--font-apercu-mono);
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  text-align: center;
}

/* ---------- Imagen principal ---------- */
.lead { margin-top: calc(-1 * var(--overlap)); position: relative; }
.lead img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- Secciones ---------- */
.section { padding-block: var(--section-gap); }
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.eyebrow {
  margin: 0;
  font-size: clamp(17px, 4.2vw, 24px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-corten);
}
.display {
  margin: 0;
  max-width: 940px;
  font-size: clamp(24px, 6vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-corten);
  text-wrap: balance;
}
.longform {
  margin: 0;
  max-width: 58ch;
  font-family: var(--font-longform);
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--color-charcoal);
  text-wrap: pretty;
}
.quiet { margin: 0; max-width: 46ch; color: var(--color-smoke); }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border: 1.5px solid var(--color-corten);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-corten);
  font-family: var(--font-riposte);
  font-weight: 400;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: letter-spacing 0.25s ease;
}
.pill:hover { letter-spacing: 0.12em; }
.pill--light { border-color: var(--color-sandstone); color: var(--color-sandstone); }

/* ---------- Parejas foto + ilustración ---------- */
.pairs { display: flex; flex-direction: column; gap: var(--section-gap); padding-bottom: var(--section-gap); }
.pair {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--element-gap);
  align-items: center;
}
.pair--reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.pair--reverse .pair-photo { order: 2; }
.pair-photo { margin: 0; overflow: clip; }
.pair-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pair-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: var(--card-padding);
  text-align: center;
}
.pair-art svg { width: min(300px, 100%); height: auto; }
.pair-title {
  margin: 0;
  font-size: var(--text-subheading);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-corten);
}

/* ---------- Carta ---------- */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--element-gap);
  margin-top: 48px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: var(--card-padding);
  border: 1px solid var(--color-driftwood);
  border-radius: var(--radius-cards);
}
.card-title {
  margin: 0;
  font-size: var(--text-subheading);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-corten);
}
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-block: 12px;
  border-top: 1px solid var(--color-driftwood);
}
.item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.price {
  font-family: var(--font-apercu-mono);
  font-size: 15px;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--color-smoke);
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-espresso);
  color: var(--color-bone);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.note {
  margin: 32px 0 0;
  font-family: var(--font-apercu-mono);
  font-size: 13px;
  letter-spacing: -0.025em;
  color: var(--color-smoke);
  text-align: center;
}

/* ---------- Galería ---------- */
.carousel { margin-top: 48px; }
.viewport { overflow: hidden; touch-action: pan-y; }
.track { display: flex; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.slide { flex: 0 0 100%; margin: 0; overflow: clip; }
.slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.carousel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: var(--element-gap);
}
.circle {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--color-corten);
  border-radius: 50%;
  background: transparent;
  color: var(--color-corten);
  cursor: pointer;
}
.circle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.circle--prev:hover svg { transform: translateX(-2px); }
.circle--next:hover svg { transform: translateX(2px); }
.caption {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-apercu-mono);
  font-size: 15px;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-smoke);
}
.caption b { font-weight: 400; color: var(--color-corten); font-variant-numeric: tabular-nums; }

/* ---------- Reservas ---------- */
.booking-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--element-gap);
  max-width: 760px;
  margin: 48px auto 0;
}
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; grid-column: span 2; }
.field--half { grid-column: span 3; }
.field label {
  padding-left: 20px;
  font-family: var(--font-apercu-mono);
  font-size: 12px;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--color-smoke);
}
.input {
  width: 100%;
  min-width: 0;
  padding: 14px 20px;
  border: 1px solid var(--color-driftwood);
  border-radius: var(--radius-full);
  background: var(--color-sandstone);
  color: var(--color-charcoal);
  font-family: var(--font-apercu-mono);
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: var(--color-ash); }
.input:focus-visible { outline: 2px solid var(--color-corten); outline-offset: 2px; }
select.input {
  padding-right: 44px;
  /* flecha con las variables de color: cambia con la paleta */
  background-image: linear-gradient(45deg, transparent 50%, var(--color-corten) 50%), linear-gradient(135deg, var(--color-corten) 50%, transparent 50%);
  background-position: calc(100% - 25px) 50%, calc(100% - 19px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}
.form-status {
  margin: 0;
  max-width: 52ch;
  min-height: 1.35em;
  font-family: var(--font-apercu-mono);
  font-size: 14px;
  letter-spacing: -0.025em;
  text-align: center;
  color: var(--color-smoke);
}
.form-status.is-error { color: var(--color-corten); }

/* ---------- Visita ---------- */
.visit-art { width: 168px; height: auto; }
.data {
  display: grid;
  grid-template-columns: auto auto;
  gap: 14px 40px;
  margin: 16px 0 0;
  text-align: left;
  font-family: var(--font-apercu-mono);
  font-size: 15px;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.data dt { font-size: 12px; text-transform: uppercase; color: var(--color-smoke); padding-top: 2px; }
.data dd { margin: 0; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ---------- Pie ---------- */
.footer { background: var(--color-corten); color: var(--color-sandstone); padding-block: 72px 32px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }
.footer-mark {
  font-family: var(--font-wordmark);
  font-weight: 400;
  font-size: clamp(72px, 16vw, 168px);
  line-height: 0.9;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--color-sandstone);
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; list-style: none; margin: 0; padding: 0; }
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  width: 100%;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--color-sandstone) 55%, transparent);
  font-family: var(--font-apercu-mono);
  font-size: 13px;
  letter-spacing: -0.025em;
}
.footer-meta p { margin: 0; }

/* ---------- Menú a pantalla completa ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
  overflow: auto;
  background: var(--color-corten);
  color: var(--color-sandstone);
  animation: fade 0.3s ease;
}
@keyframes fade { from { opacity: 0; } }
.overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 24px var(--gutter-r) 24px var(--gutter-l);
}
.overlay-links a {
  font-size: clamp(24px, 6vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.overlay-links a:hover { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1.5px; }

/* ---------- Movimiento ---------- */
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes steam { to { transform: translateY(-6px); opacity: 0.45; } }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }
@keyframes heroRise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(28px); } }
@keyframes widen { from { clip-path: inset(0 6% 0 6%); } }
@keyframes drift { from { transform: scale(1.12) translateY(-3%); } to { transform: scale(1.12) translateY(3%); } }

@media (prefers-reduced-motion: no-preference) {
  /* Entrada del hero: la ilustración se dibuja sola y el vapor sigue respirando */
  .hero .nav { animation: drop 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }
  .draw > * {
    stroke-dasharray: 1 1;
    animation: draw var(--t, 1s) cubic-bezier(0.65, 0, 0.35, 1) var(--d, 0s) both;
  }
  .draw > .steam {
    transform-box: fill-box;
    animation:
      draw var(--t, 1s) cubic-bezier(0.65, 0, 0.35, 1) var(--d, 0s) both,
      steam 2.6s ease-in-out calc(var(--d, 0s) + 1s) infinite alternate;
  }
  .ring-text { animation: fadeIn 1.4s ease 1s both; }
  .hero .meta { animation: heroRise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 1.5s both; }
  .scroll-hint { animation: heroRise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 1.8s both; }

  /* Galería: la foto activa se asienta */
  .slide img { transform: scale(1.06); transition: transform 1.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .slide.is-active img { transform: none; }

  /* Menú a pantalla completa: enlaces escalonados */
  .overlay-links li { animation: heroRise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .overlay-links li:nth-child(2) { animation-delay: 0.06s; }
  .overlay-links li:nth-child(3) { animation-delay: 0.12s; }
  .overlay-links li:nth-child(4) { animation-delay: 0.18s; }
  .overlay-links li:nth-child(5) { animation-delay: 0.24s; }
}

/* Al hacer scroll (solo navegadores con scroll-driven animations; el resto ve la página estática) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section-head > *, .card {
      animation: riseIn linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 85%;
    }
    .card:nth-child(2) { animation-range: entry 15% entry 95%; }
    .card:nth-child(3) { animation-range: entry 25% entry 100%; }

    .lead img { animation: widen linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }

    .pair-photo { view-timeline: --photo block; }
    .pair-photo img { animation: drift linear both; animation-timeline: --photo; animation-range: cover 0% cover 100%; }

    .pair-art, .visit-art { view-timeline: --art block; }
    .scroll-draw > * {
      stroke-dasharray: 1 1;
      animation: draw linear both;
      animation-timeline: --art;
      animation-range: entry 40% cover 50%;
    }
    .scroll-draw > :nth-child(3n + 2) { animation-range: entry 55% cover 55%; }
    .scroll-draw > :nth-child(3n) { animation-range: entry 70% cover 60%; }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .menu-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
}
@media (max-width: 760px) {
  :root { --section-gap: 64px; }
  .hero-stage { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .hero-art { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .meta { font-size: 13px; }
  .meta-left { grid-row: 2; text-align: left; }
  .meta-right { grid-row: 2; text-align: right; }
  .pair, .pair--reverse { grid-template-columns: minmax(0, 1fr); }
  .pair--reverse .pair-photo { order: 0; }
  .pair-art svg { width: 220px; }
  .hero-svg .lineart { stroke-width: 5; }
  .pair-art .lineart { stroke-width: 4; }
  .longform { font-size: 17px; }
}
@media (max-width: 600px) {
  .field, .field--half { grid-column: 1 / -1; }
  .data { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .data dd { margin-bottom: 12px; }
  .caption { font-size: 12px; }
  .footer-meta { flex-direction: column; align-items: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring { animation: none; }
  .track, .pill, .circle svg, .nav-link { transition: none; }
  .overlay { animation: none; }
}

/* ---------- Añadidos de la plantilla de Calma Solutions ---------- */
.defs-svg { position: absolute; }
.form-note { margin: 0; max-width: 52ch; font-family: var(--font-apercu-mono); font-size: 13px; letter-spacing: -0.025em; text-align: center; color: var(--color-smoke); }
.form-note a { color: var(--color-corten); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 20px; width: 100%; list-style: none; margin: 0; padding: 0; }
.footer-legal a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; }
.footer-links .nav-link { display: inline-flex; align-items: center; min-height: 44px; }
.hero { transition: background-color 0.4s ease, color 0.4s ease; }
body, .footer, .overlay { transition: background-color 0.4s ease, color 0.4s ease; }
@media (max-width: 600px) { .footer-legal { justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .hero, body, .footer, .overlay { transition: none; } }
