/* Las tipografías se cargan con <link> en el <head> (mejor rendimiento que @import). */

/* =============================================================
   ORIGINALS CAFÉ — styles.css
   Paleta: azul cobalto + crema + terracota de brasa, tomada de
   la carta impresa y el azulejo andaluz. Fondo claro y luminoso.
   Tipos: Fraunces (serif de titulares) + Manrope (sans de texto).
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Color */
  --cream: #f7f0e1;
  --cream-soft: #fbf6ec;
  --paper: #fdfaf3;
  --cobalt: #173f86;
  --cobalt-deep: #0f2b5e;
  --azulejo: #2c63ae;
  --brasa: #c1552b;
  --brasa-soft: #d98a5e;
  --ink: #1b2537;
  --muted: #5c6373;
  --line: rgba(15, 43, 94, 0.14);
  --line-soft: rgba(15, 43, 94, 0.08);

  /* Semantic */
  --bg: var(--cream);
  --text: var(--ink);
  --heading: var(--cobalt-deep);
  --accent: var(--brasa);

  /* Type */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --gutter: clamp(1.15rem, 5vw, 4.5rem);
  --maxw: 1200px;
  --radius: 14px;

  /* Easings */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Azulejo cenefa (data-uri, cobalto sobre transparente) */
  --cenefa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='none' stroke='%23173f86' stroke-width='1.4' opacity='.55'%3E%3Cpath d='M0 12h48'/%3E%3Cpath d='M12 4l4 4-4 4 4 4-4 4M36 4l-4 4 4 4-4 4 4 4'/%3E%3Ccircle cx='24' cy='12' r='4'/%3E%3Ccircle cx='0' cy='12' r='2'/%3E%3Ccircle cx='48' cy='12' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--heading);
  font-weight: 600;
  text-wrap: balance;
  line-height: 1.02;
  letter-spacing: -0.015em;
}

::selection { background: var(--cobalt); color: var(--cream); }

@view-transition { navigation: auto; }

/* Custom cursor hides the native one only where it works */
@media (hover: hover) and (pointer: fine) {
  body.cursor-on, body.cursor-on a, body.cursor-on button { cursor: none; }
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 10000;
  padding: .65rem 1.1rem; background: var(--cobalt); color: var(--cream);
  border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--brasa);
  outline-offset: 3px;
  border-radius: 4px;
}

.cenefa {
  height: 24px;
  background-image: var(--cenefa);
  background-repeat: repeat-x;
  background-position: center;
  opacity: .8;
}

.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--sans);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--brasa);
}
.kicker::before {
  content: ""; width: 26px; height: 1px; background: var(--brasa); opacity: .7;
}

.section { padding-block: clamp(3.5rem, 9vw, 7rem); position: relative; }
.section-head { max-width: 46ch; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-head h2 {
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  margin-top: .7rem;
}

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  --b: var(--cobalt);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  letter-spacing: .01em;
  background: var(--b); color: var(--cream);
  position: relative; overflow: hidden;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), background-color .35s var(--ease-out);
  box-shadow: 0 6px 22px -12px rgba(15, 43, 94, .8);
  will-change: transform;
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.28), transparent 70%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease-out);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -16px rgba(15,43,94,.9); }
.btn:hover::after { transform: translateX(120%); }
.btn-brasa { --b: var(--brasa); box-shadow: 0 6px 22px -12px rgba(193,85,43,.85); }
.btn-ghost {
  background: transparent; color: var(--cobalt-deep);
  border: 1.5px solid var(--line); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--cobalt); background: rgba(23,63,134,.05); }
.btn-lg { padding: 1.1rem 2rem; font-size: 1.02rem; }

/* =============================================================
   5. Header / nav
   ============================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .85rem var(--gutter);
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), padding .4s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(247, 240, 225, .86);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line-soft), 0 10px 30px -24px rgba(15,43,94,.6);
  padding-block: .6rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--serif); font-weight: 600; font-size: 1.28rem;
  color: var(--cobalt-deep); letter-spacing: -.01em;
}
.brand img { width: 30px; height: 30px; }
.brand span b { color: var(--brasa); font-weight: 600; }

.nav { display: none; align-items: center; gap: .3rem; }
.nav a {
  padding: .5rem .85rem; border-radius: 999px;
  font-weight: 600; font-size: .93rem; color: var(--cobalt-deep);
  position: relative; transition: color .3s var(--ease-out);
}
.nav a::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .28rem;
  height: 1.5px; background: var(--brasa); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: .5rem; }

/* Language switcher */
.lang {
  position: relative;
}
.lang-toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .55rem; border-radius: 999px;
  border: 1.5px solid var(--line);
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out);
}
.lang-toggle:hover { border-color: var(--cobalt); }
.lang-toggle .flag { width: 22px; height: 15px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-soft); }
.lang-toggle .chev { width: 12px; height: 12px; transition: transform .3s var(--ease-out); color: var(--muted); }
.lang.is-open .lang-toggle .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + .5rem); right: 0;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: .35rem; min-width: 150px;
  box-shadow: 0 18px 40px -20px rgba(15,43,94,.5);
  display: grid; gap: .15rem;
  opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none;
  transition: opacity .28s var(--ease-out), transform .28s var(--ease-out);
}
.lang.is-open .lang-menu { opacity: 1; transform: none; pointer-events: auto; }
.lang-menu button {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .6rem; border-radius: 8px; width: 100%;
  font-weight: 600; font-size: .9rem; color: var(--cobalt-deep);
  transition: background-color .25s var(--ease-out);
}
.lang-menu button:hover { background: rgba(23,63,134,.07); }
.lang-menu .flag { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px var(--line-soft); }

/* Mobile menu button */
.menu-btn {
  display: inline-flex; flex-direction: column; gap: 5px;
  padding: .55rem; border-radius: 10px; border: 1.5px solid var(--line);
}
.menu-btn span { width: 20px; height: 2px; background: var(--cobalt-deep); border-radius: 2px; transition: transform .35s var(--ease-out), opacity .25s; }
.mobile-nav.is-open ~ .site-header .menu-btn span:nth-child(1) {}
.menu-btn.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.is-active span:nth-child(2) { opacity: 0; }
.menu-btn.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  position: fixed; inset: 0; z-index: 890;
  background: var(--cream);
  display: grid; align-content: center; justify-items: center; gap: 1.1rem;
  padding: 2rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-out);
}
.mobile-nav.is-open { clip-path: inset(0 0 0 0); }
.mobile-nav a {
  font-family: var(--serif); font-size: clamp(1.8rem, 8vw, 2.6rem);
  color: var(--cobalt-deep); font-weight: 600;
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.mobile-nav.is-open a { opacity: 1; transform: none; }
.mobile-nav.is-open a:nth-child(1) { transition-delay: .12s; }
.mobile-nav.is-open a:nth-child(2) { transition-delay: .18s; }
.mobile-nav.is-open a:nth-child(3) { transition-delay: .24s; }
.mobile-nav.is-open a:nth-child(4) { transition-delay: .30s; }
.mobile-nav.is-open a:nth-child(5) { transition-delay: .36s; }

/* =============================================================
   6. Custom cursor
   ============================================================= */
.cursor { position: fixed; top: 0; left: 0; z-index: 9998; pointer-events: none;
  opacity: 0; transition: opacity .3s var(--ease-out); mix-blend-mode: multiply; }
.cursor.is-ready { opacity: 1; }
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brasa); transform: translate(-50%, -50%);
}
.cursor-ring {
  position: fixed; top: 0; left: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgba(23,63,134,.55); transform: translate(-50%, -50%);
  transition: width .3s var(--ease-out), height .3s var(--ease-out), background-color .3s var(--ease-out), border-color .3s;
}
.cursor.is-hover .cursor-ring { width: 54px; height: 54px; background: rgba(193,85,43,.1); border-color: var(--brasa); }

/* =============================================================
   7. Reveal system
   ============================================================= */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
/* DEFENSIVO: elementos con split-text nunca quedan invisibles */
.reveal[data-split] { opacity: 1; transform: none; }

.split-word { display: inline-block; }
[data-split] .split-word {
  opacity: 0; transform: translateY(0.5em) rotate(2deg);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
[data-split].is-visible .split-word { opacity: 1; transform: none; }

/* =============================================================
   8. Hero
   ============================================================= */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12); animation: heroZoom 22s var(--ease-soft) infinite alternate;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,43,94,.28) 0%, rgba(15,43,94,.05) 30%, rgba(15,43,94,.22) 62%, rgba(15,25,50,.72) 100%);
}
.hero-inner { padding: 0 var(--gutter) clamp(3rem, 8vw, 5.5rem); z-index: 1; width: 100%; max-width: var(--maxw); margin-inline: auto; }
.hero .kicker { color: #ffd9b8; }
.hero .kicker::before { background: #ffd9b8; }
.hero h1 {
  color: var(--cream);
  font-size: clamp(2.7rem, 8.5vw, 6.4rem);
  line-height: 0.98;
  margin: 1rem 0 1.2rem;
  max-width: 16ch;
  text-shadow: 0 2px 30px rgba(10,20,45,.35);
}
.hero-sub {
  color: rgba(255,255,255,.92); max-width: 52ch; font-size: clamp(1rem, 2.2vw, 1.2rem);
  text-shadow: 0 1px 14px rgba(10,20,45,.4);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem;
  margin-top: 2.2rem; color: var(--cream);
}
.rating { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; }
.rating .stars { color: #ffce54; letter-spacing: .05em; font-size: 1.05rem; }
.rating small { color: rgba(255,255,255,.8); font-weight: 500; }
.scroll-cue {
  position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  display: grid; justify-items: center; gap: .5rem; color: rgba(255,255,255,.85);
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; z-index: 1;
}
.scroll-cue .line { width: 1px; height: 40px; background: rgba(255,255,255,.6); position: relative; overflow: hidden; }
.scroll-cue .line::after { content: ""; position: absolute; inset: 0; background: #ffd9b8; transform: translateY(-100%); animation: cueDrop 2.2s var(--ease-soft) infinite; }
@keyframes cueDrop { 0% { transform: translateY(-100%);} 55%,100% { transform: translateY(100%);} }

/* =============================================================
   9. La casa (historia)
   ============================================================= */
.house { background: var(--cream-soft); }
.house-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.house-figure { position: relative; border-radius: var(--radius); overflow: hidden; }
.house-figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; will-change: transform; }
.house-figure::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(15,43,94,.25));
}
.house-copy h2 { font-size: clamp(1.9rem, 5vw, 3.2rem); margin: .7rem 0 1.2rem; }
.house-copy p { color: var(--muted); margin-bottom: 1rem; font-size: 1.06rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.8rem; }
.stat { border-top: 2px solid var(--line); padding-top: .8rem; }
.stat .v { font-family: var(--serif); font-size: clamp(1.3rem, 3.4vw, 1.9rem); color: var(--cobalt-deep); font-weight: 600; line-height: 1.1; }
.stat .l { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: .25rem; }
.stat .stars { color: #e6a935; }

/* =============================================================
   10. Destacados
   ============================================================= */
.highlights { position: relative; }
.hl-grid { display: grid; gap: 1.3rem; }
.hl-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 300px; display: flex; align-items: flex-end;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 20px 50px -34px rgba(15,43,94,.5);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out), border-color .6s;
  isolation: isolate;
}
/* Franja superior de azulejo + acento de brasa */
.hl-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 26px;
  background-image: var(--cenefa); background-repeat: repeat-x; background-position: left center;
  opacity: .5;
}
.hl-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 80% at 100% 100%, rgba(193,85,43,.08), transparent 60%);
}
.hl-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -34px rgba(15,43,94,.6); border-color: rgba(193,85,43,.4); }
.hl-body { padding: 2.4rem 1.7rem 1.9rem; }
.hl-body .n {
  font-family: var(--serif); font-size: 2.6rem; font-weight: 600;
  color: var(--brasa); line-height: 1; display: block; margin-bottom: .6rem;
  opacity: .9;
}
.hl-body h3 { color: var(--cobalt-deep); font-size: 1.7rem; margin: 0 0 .5rem; }
.hl-body p { color: var(--muted); font-size: .98rem; max-width: 34ch; }

/* =============================================================
   11. Galería
   ============================================================= */
.gallery { background: var(--cream-soft); }
.gal-grid { display: grid; gap: .8rem; grid-template-columns: 1fr; }
.gal-item { position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 3 / 2; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.gal-item:hover img { transform: scale(1.07); }
.gal-item::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg,transparent 60%, rgba(15,43,94,.18)); opacity:0; transition:opacity .5s; }
.gal-item:hover::after { opacity: 1; }

/* =============================================================
   12. Horario + mapa
   ============================================================= */
.find-grid { display: grid; gap: clamp(1.6rem, 4vw, 2.6rem); }
.find-info .info-block { padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
.find-info .info-block:first-of-type { padding-top: 0; }
.info-block h3 { font-family: var(--sans); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brasa); margin-bottom: .5rem; }
.info-block p { color: var(--cobalt-deep); font-size: 1.08rem; font-weight: 500; }
.info-block .muted { color: var(--muted); font-weight: 400; font-size: .98rem; }
.map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px -34px rgba(15,43,94,.7); min-height: 320px; background: var(--cream); }
.map-wrap iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; filter: saturate(1.05); }
.map-cta { margin-top: 1.2rem; }

/* =============================================================
   13. Reserva / formulario
   ============================================================= */
.reserve { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-soft) 100%); }
.reserve-grid { display: grid; gap: clamp(1.8rem, 4vw, 3rem); align-items: start; }
.reserve-aside .kicker { margin-bottom: .8rem; }
.reserve-aside h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
.reserve-aside > p { color: var(--muted); font-size: 1.06rem; max-width: 40ch; }
.notes { display: grid; gap: .7rem; margin-top: 1.8rem; }
.note {
  display: flex; gap: .7rem; align-items: flex-start;
  font-size: .92rem; color: var(--cobalt-deep);
  padding: .7rem .9rem; background: rgba(23,63,134,.05); border-radius: 10px;
  border-left: 3px solid var(--cobalt);
}
.note.warn { border-left-color: var(--brasa); background: rgba(193,85,43,.07); }
.note svg { flex: none; width: 18px; height: 18px; color: var(--brasa); margin-top: 2px; }

.form-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.4rem, 4vw, 2.2rem);
  box-shadow: 0 30px 70px -44px rgba(15,43,94,.6);
}
.rice-alert {
  display: flex; gap: .7rem; align-items: flex-start;
  background: rgba(193,85,43,.09); border: 1px solid rgba(193,85,43,.25);
  border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1.4rem;
  font-size: .9rem; color: #8a3c1c;
}
.rice-alert svg { flex: none; width: 20px; height: 20px; color: var(--brasa); }
.field { margin-bottom: 1.05rem; }
.field-row { display: grid; gap: 1.05rem; grid-template-columns: 1fr 1fr; }
.field label { display: block; font-weight: 600; font-size: .86rem; color: var(--cobalt-deep); margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .9rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--cream-soft);
  font: inherit; color: var(--ink);
  transition: border-color .3s var(--ease-out), box-shadow .3s var(--ease-out), background-color .3s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cobalt); background: #fff;
  box-shadow: 0 0 0 4px rgba(23,63,134,.1);
}
.field input:user-invalid, .field select:user-invalid { border-color: var(--brasa); }
.field textarea { resize: vertical; min-height: 80px; }

.submit-btn {
  width: 100%; margin-top: .4rem;
  min-height: 54px;
}
.submit-btn[data-state="sending"], .submit-btn[data-state="sent"] { pointer-events: none; }
.submit-btn .spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.submit-btn .check { width: 22px; height: 22px; }
.submit-btn .check path { stroke: #fff; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 30; stroke-dashoffset: 30; }
.submit-btn[data-state="sent"] .check path { animation: draw .5s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.form-confirm {
  margin-top: 1.1rem; padding: 1rem 1.1rem; border-radius: 10px;
  background: rgba(23,63,134,.07); border: 1px solid var(--line);
  color: var(--cobalt-deep); font-size: .95rem;
  opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.form-confirm.is-shown { opacity: 1; transform: none; }
.form-confirm strong { color: var(--brasa); }
.call-alt { margin-top: 1rem; text-align: center; font-size: .92rem; color: var(--muted); }
.call-alt a { color: var(--cobalt); font-weight: 700; border-bottom: 1.5px solid transparent; transition: border-color .3s; }
.call-alt a:hover { border-color: var(--cobalt); }

/* =============================================================
   14. Footer
   ============================================================= */
.site-footer { background: var(--cobalt-deep); color: var(--cream); padding-block: clamp(3rem, 7vw, 4.5rem) 2rem; }
.site-footer .cenefa { opacity: .35; filter: brightness(3) saturate(0); margin-bottom: 2.5rem; }
.footer-grid { display: grid; gap: 2rem; }
.footer-brand { font-family: var(--serif); font-size: 1.6rem; margin-bottom: .6rem; }
.footer-brand b { color: var(--brasa-soft); }
.site-footer p, .site-footer li { color: rgba(247,240,225,.78); font-size: .96rem; }
.site-footer h4 { font-family: var(--sans); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brasa-soft); margin-bottom: .8rem; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a, .footer-contact a { transition: color .3s var(--ease-out); }
.footer-links a:hover, .footer-contact a:hover { color: var(--cream); }
.social-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .9rem; border: 1px solid rgba(247,240,225,.25); border-radius: 999px;
  font-weight: 600; transition: background-color .3s, border-color .3s;
}
.social-btn:hover { background: rgba(247,240,225,.1); border-color: rgba(247,240,225,.5); }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(247,240,225,.15);
  display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between;
  font-size: .85rem; color: rgba(247,240,225,.6);
}

/* =============================================================
   15. Splash
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 10001;
  background: var(--cobalt-deep);
  display: grid; place-items: center;
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { animation: splashOut .8s var(--ease-out) forwards; }
@keyframes splashOut { to { opacity: 0; visibility: hidden; clip-path: inset(0 0 100% 0); } }
@keyframes splashSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.splash-logo { display: grid; justify-items: center; gap: 1rem; color: var(--cream); }
.splash-logo img { width: 58px; height: 58px; filter: brightness(0) invert(1); }
.splash-logo .t { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .02em; overflow: hidden; }
.splash-logo .t span { display: inline-block; transform: translateY(110%); animation: splashRise .8s var(--ease-out) .2s forwards; }
@keyframes splashRise { to { transform: none; } }
.splash-bar { width: 120px; height: 2px; background: rgba(247,240,225,.2); overflow: hidden; border-radius: 2px; }
.splash-bar::after { content: ""; display: block; height: 100%; width: 40%; background: var(--brasa-soft); animation: splashLoad 1.6s var(--ease-soft) infinite; }
@keyframes splashLoad { 0% { transform: translateX(-100%);} 100% { transform: translateX(350%);} }

/* Image safety: si una imagen falta, su hueco desaparece */
img.img-failed { display: none; }
.gal-item.img-failed, .hl-card.img-failed { display: none; }

/* =============================================================
   16. CARTA (carta.html)
   ============================================================= */
.menu-hero {
  padding: calc(5.5rem + clamp(1rem,4vw,2rem)) var(--gutter) clamp(1.5rem, 4vw, 2.5rem);
  text-align: center; background: var(--cream-soft);
}
.menu-hero .kicker { justify-content: center; }
.menu-hero .kicker::before { display: none; }
.menu-hero h1 { font-size: clamp(2.6rem, 9vw, 5rem); margin: .5rem 0 .6rem; }
.menu-hero p { color: var(--muted); }

.cat-nav {
  position: sticky; top: 0; z-index: 800;
  background: rgba(247,240,225,.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.cat-nav-inner {
  display: flex; gap: .4rem; overflow-x: auto; overflow-y: hidden;
  padding: .7rem var(--gutter); scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav a {
  flex: none; padding: .5rem .95rem; border-radius: 999px;
  font-weight: 600; font-size: .9rem; white-space: nowrap;
  color: var(--cobalt-deep); border: 1.5px solid transparent;
  transition: background-color .3s var(--ease-out), color .3s, border-color .3s;
}
.cat-nav a:hover { border-color: var(--line); }
.cat-nav a.is-active { background: var(--cobalt); color: var(--cream); }

.menu-body { padding-block: clamp(2.5rem, 6vw, 4rem); }
.menu-cat { margin-bottom: clamp(2.5rem, 6vw, 4rem); scroll-margin-top: 80px; }
.menu-cat-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.4rem; }
.menu-cat-head h2 { font-size: clamp(1.7rem, 4.6vw, 2.6rem); }
.menu-cat-head .rule { flex: 1; height: 1px; background: var(--line); }
.encargo-note {
  font-size: .88rem; color: var(--brasa); font-weight: 600;
  background: rgba(193,85,43,.08); padding: .3rem .7rem; border-radius: 999px;
}
/* --- Tarjetas de plato con miniatura (móvil y PC) --- */
.menu-list { display: grid; gap: .8rem; grid-template-columns: 1fr; }
.dish {
  display: grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: .55rem; overflow: hidden;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .5s var(--ease-out);
}
.dish:hover { transform: translateY(-3px); box-shadow: 0 18px 42px -28px rgba(15,43,94,.55); border-color: rgba(193,85,43,.35); }
.dish-media {
  position: relative; width: 88px; height: 88px; border-radius: 10px; overflow: hidden; flex: none;
  /* Fallback si la foto no carga: azulejo tintado, nunca un hueco roto */
  background:
    var(--cenefa) center/40px repeat,
    linear-gradient(150deg, var(--azulejo), var(--cobalt-deep));
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.dish-img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.dish:hover .dish-img { transform: scale(1.07); }
.dish-text { min-width: 0; }
.dish-top { display: flex; align-items: baseline; gap: .7rem; justify-content: space-between; }
.dish-name { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; color: var(--cobalt-deep); line-height: 1.15; }
.dish-price { font-family: var(--serif); font-weight: 600; font-size: 1.06rem; color: var(--brasa); white-space: nowrap; }
.dish-price .per { font-family: var(--sans); font-size: .68rem; color: var(--muted); font-weight: 500; display: block; text-align: right; }
.dish-desc { color: var(--muted); font-size: .86rem; margin-top: .25rem; text-wrap: pretty; }

/* Tinte de fallback por categoría (solo se ve si falta la foto) */
.dish[data-cat="carnes"] .dish-media,
.dish[data-cat="sugerencias"] .dish-media,
.dish[data-cat="bocadillos"] .dish-media,
.dish[data-cat="roscas"] .dish-media,
.dish[data-cat="hamburguesas"] .dish-media {
  background: var(--cenefa) center/40px repeat, linear-gradient(150deg, var(--brasa-soft), #7a3418);
}
.menu-footnote {
  margin-top: 2rem; padding: 1.2rem 1.4rem; border-radius: var(--radius);
  background: rgba(23,63,134,.06); border: 1px solid var(--line);
  font-family: var(--serif); font-style: italic; color: var(--cobalt-deep);
  text-align: center; font-size: 1.05rem;
}
.menu-back { text-align: center; margin-top: 2rem; }

/* =============================================================
   17. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .gal-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  .hl-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 960px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
  .house-grid { grid-template-columns: 0.9fr 1.1fr; }
  .find-grid { grid-template-columns: 1fr 1.25fr; }
  .reserve-grid { grid-template-columns: 1fr 1.1fr; }
}
@media (min-width: 720px) {
  .menu-list { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .dish { grid-template-columns: 100px 1fr; }
  .dish-media { width: 100px; height: 100px; }
}
@media (min-width: 1280px) {
  .hero h1 { max-width: 15ch; }
  .dish { grid-template-columns: 116px 1fr; }
  .dish-media { width: 116px; height: 116px; }
  .dish-name { font-size: 1.14rem; }
}

/* =============================================================
   18. Reduced-motion — SOLO efectos intrusivos (Windows lo trae ON)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img { animation: none; transform: scale(1.04); }
  .scroll-cue .line::after { animation: none; }
  .splash-bar::after { animation-duration: 2.4s; }
  /* NO desactivamos: reveals, tilt, hovers, botones, cursor */
}
