/* El Cortijo Cafetería. Rótulo de pastelería (Shrikhand) + texto limpio (Outfit).
   Café oscuro como tinta, mango como único color de acento.
   Formas: botones en píldora, fotos y tarjetas 20px, campos 12px. */

:root {
  --fondo: #fdfcfa;
  --superficie: #f5efe6;
  --tarjeta: #ffffff;
  --tinta: #2b1a12;
  --tinta-suave: #6b5a4e;
  --borde: #e6ddd0;
  --acento: #f5b301;
  --acento-suave: color-mix(in oklab, var(--acento) 16%, var(--fondo));
  --sobre-acento: #2b1a12;
  --abierto: #3fd07a;
  --error: #c2261d;
  --radio: 20px;
  --sombra: 0 18px 40px -20px rgb(43 26 18 / .35);
  --display: "Shrikhand", "Georgia", serif;
  --texto: "Outfit", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fondo: #16100c;
    --superficie: #211812;
    --tarjeta: #2a1f18;
    --tinta: #f7efe5;
    --tinta-suave: #c6b5a6;
    --borde: #3b2e25;
    --acento-suave: color-mix(in oklab, var(--acento) 10%, var(--fondo));
    --error: #ff8a80;
    --sombra: 0 18px 40px -20px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fondo: #16100c;
  --superficie: #211812;
  --tarjeta: #2a1f18;
  --tinta: #f7efe5;
  --tinta-suave: #c6b5a6;
  --borde: #3b2e25;
  --acento-suave: color-mix(in oklab, var(--acento) 10%, var(--fondo));
  --error: #ff8a80;
  --sombra: 0 18px 40px -20px rgb(0 0 0 / .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: 400 1.0625rem/1.6 var(--texto); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font: 400 clamp(2.2rem, 5vw, 3.4rem)/1.15 var(--display); padding-bottom: .1em; margin-bottom: 1.75rem; }
.contenedor { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }
@media (max-width: 480px) { .contenedor { padding-inline: 16px; } }
section { padding-block: clamp(4rem, 9vw, 7rem); }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .95rem 1.6rem; border-radius: 999px; border: 2px solid var(--tinta);
  background: var(--tinta); color: var(--fondo);
  font: 600 1.02rem/1 var(--texto); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .2s cubic-bezier(.16,1,.3,1), background .2s, color .2s;
}
.boton i { font-size: 1.3rem; }
.boton:active { transform: scale(.97); }
.boton-acento { background: var(--acento); border-color: var(--acento); color: var(--sobre-acento); }
.boton-acento:hover { background: color-mix(in oklab, var(--acento) 88%, white); }
.boton-claro { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .75); color: #fff; backdrop-filter: blur(6px); }
.boton-claro:hover { background: rgb(255 255 255 / .18); }
.boton-pequeno { padding: .6rem 1.1rem; font-size: .95rem; }
.boton-ancho { width: 100%; }

/* ---------- Aviso y navegación ---------- */
.aviso { margin: 0; padding: .55rem 16px; text-align: center; font-size: .88rem; font-weight: 500; background: var(--acento); color: var(--sobre-acento); }
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in oklab, var(--fondo) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--borde);
}
.nav-dentro { height: 68px; display: flex; align-items: center; gap: 2rem; }
.marca { font: 400 1.45rem/1 var(--display); text-decoration: none; margin: 0; white-space: nowrap; }
.marca small { font: 600 .8rem/1 var(--texto); letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-suave); margin-left: .2rem; }
.nav-enlaces { display: flex; gap: 1.75rem; margin-left: auto; }
.nav-enlaces a { text-decoration: none; font-weight: 500; color: var(--tinta-suave); }
.nav-enlaces a:hover { color: var(--tinta); }
@media (max-width: 820px) {
  .nav-enlaces { display: none; }
  .nav-dentro .boton { margin-left: auto; }
}
@media (max-width: 480px) {
  .nav-dentro { gap: 1rem; }
  .marca small { display: none; }
}

/* ---------- Portada ---------- */
.hero { position: relative; isolation: isolate; min-height: min(86dvh, 820px); display: flex; align-items: flex-end; padding-block: 6rem 3.5rem; color: #fff; overflow: hidden; }
.hero-foto { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; background: #3b2a20; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(22 14 9 / .15) 0%, rgb(22 14 9 / .35) 45%, rgb(22 14 9 / .88) 100%),
              linear-gradient(90deg, rgb(22 14 9 / .55) 0%, transparent 70%);
}
.estado { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1rem; font-weight: 600; font-size: .98rem; text-shadow: 0 1px 8px rgb(0 0 0 / .4); }
.estado::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #d9cfc6; }
.estado.abierto::before { background: var(--abierto); box-shadow: 0 0 0 4px rgb(63 208 122 / .25); }
.hero-titulo { display: grid; gap: .35rem; }
.hero-nombre { font: 400 clamp(3.6rem, 11vw, 8rem)/1.05 var(--display); padding-bottom: .08em; text-shadow: 0 4px 30px rgb(0 0 0 / .3); }
.hero-frase { font: 600 clamp(1.4rem, 3vw, 2rem)/1.2 var(--texto); color: var(--acento); }
.hero-eslogan { max-width: 38ch; font-size: 1.15rem; margin: 1rem 0 2rem; color: rgb(255 255 255 / .88); }
.hero-botones { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero-foto { animation: acercar 1.6s cubic-bezier(.16,1,.3,1) both; }
  .hero-dentro > * { animation: subir .9s cubic-bezier(.16,1,.3,1) both; }
  .hero-dentro > :nth-child(2) { animation-delay: .08s; }
  .hero-dentro > :nth-child(3) { animation-delay: .16s; }
  .hero-dentro > :nth-child(4) { animation-delay: .24s; }
}
@keyframes acercar { from { transform: scale(1.06); } }
@keyframes subir { from { opacity: 0; transform: translateY(20px); } }

/* ---------- Franja de datos ---------- */
.datos { padding-block: 0; border-bottom: 1px solid var(--borde); }
.datos-fila { display: grid; grid-template-columns: repeat(4, 1fr); }
.dato { display: grid; gap: .15rem; padding: 1.5rem 1.25rem; text-decoration: none; border-left: 1px solid var(--borde); }
.dato:first-child { border-left: 0; padding-left: 0; }
.dato strong { font-size: 1.2rem; font-weight: 700; display: inline-flex; align-items: center; gap: .3rem; }
.dato strong i { color: var(--acento); }
.dato span { color: var(--tinta-suave); font-size: .95rem; }
.dato:hover strong { text-decoration: underline; text-decoration-color: var(--acento); text-underline-offset: 4px; }
@media (max-width: 820px) {
  .datos-fila { grid-template-columns: 1fr 1fr; }
  .dato { padding: 1.1rem .9rem; }
  .dato:nth-child(odd) { border-left: 0; padding-left: 0; }
  .dato:nth-child(n+3) { border-top: 1px solid var(--borde); }
}

/* ---------- Especialidades (mosaico) ---------- */
.bento { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(190px, 21vw, 270px); }
.tile { position: relative; border-radius: var(--radio); overflow: hidden; margin: 0; display: flex; align-items: flex-end; }
.tile-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.16,1,.3,1); background: var(--superficie); }
.tile-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgb(22 14 9 / .82) 100%); }
.tile-foto:hover img { transform: scale(1.04); }
.tile-texto-dentro { position: relative; z-index: 1; padding: 1.4rem; }
.tile-foto .tile-texto-dentro { color: #fff; }
.tile h3 { font: 400 clamp(1.5rem, 2.4vw, 2.1rem)/1.15 var(--display); padding-bottom: .1em; }
.tile p { margin: .3rem 0 0; font-size: 1rem; max-width: 30ch; }
.tile-foto p { color: rgb(255 255 255 / .85); }
.tile-texto { background: var(--acento); color: var(--sobre-acento); }
.tile-texto p { color: color-mix(in oklab, var(--sobre-acento) 80%, transparent); }
.tile:first-child { grid-column: span 2; grid-row: span 2; }
.tile:first-child h3 { font-size: clamp(2rem, 4vw, 3.2rem); }
.bento[data-n="4"] .tile:nth-child(2) { grid-row: span 2; }
.bento[data-n="3"] { grid-template-columns: 2fr 1fr; }
.bento[data-n="3"] .tile:first-child { grid-column: auto; }
@media (max-width: 760px) {
  .bento, .bento[data-n="3"] { grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(200px, auto); }
  .bento .tile, .bento[data-n="4"] .tile:nth-child(2) { grid-column: auto; grid-row: auto; }
  .bento .tile:first-child { grid-column: 1 / -1; grid-row: span 1; min-height: 300px; }
  .bento[data-n="4"] .tile:last-child, .bento[data-n="2"] .tile:last-child { grid-column: 1 / -1; }
  .tile-texto-dentro { padding: 1rem .9rem; }
  .tile h3 { font-size: clamp(1.1rem, 5vw, 1.6rem); }
  .tile p { font-size: .93rem; }
}

/* ---------- Reseñas ---------- */
.resenas { background: var(--superficie); }
.resenas-dentro { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.resena-grande { margin: 0; }
.resena-grande blockquote { margin: 0; font: 500 clamp(1.6rem, 3.2vw, 2.5rem)/1.3 var(--texto); letter-spacing: -0.01em; }
.resena-grande figcaption { margin-top: 1.25rem; font-weight: 600; color: var(--tinta-suave); }
.nota { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .1rem 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--borde); }
.nota-numero { grid-row: span 2; font: 400 4.2rem/1 var(--display); }
.nota-estrellas { color: var(--acento); font-size: 1.2rem; display: flex; gap: 2px; }
.nota-texto { color: var(--tinta-suave); font-weight: 500; }
.resena-pequena { margin: 0; padding-block: 1.25rem; }
.resena-pequena + .resena-pequena { border-top: 1px solid var(--borde); }
.resena-pequena blockquote { margin: 0 0 .5rem; }
.resena-pequena figcaption { font-weight: 600; font-size: .95rem; color: var(--tinta-suave); }
@media (max-width: 820px) { .resenas-dentro { grid-template-columns: 1fr; } }

/* ---------- Encargos ---------- */
.encargos { background: var(--acento-suave); }
.encargos-dentro { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.encargos-texto p { color: var(--tinta-suave); font-size: 1.15rem; max-width: 40ch; margin: 0 0 2rem; }
.encargos-foto { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radio); background: var(--superficie); }
.formulario { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--sombra); display: grid; gap: 1.1rem; }
.campo { display: grid; gap: .4rem; min-width: 0; }
.campo-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { font-weight: 600; font-size: .95rem; }
.opcional { font-weight: 400; color: var(--tinta-suave); }
input, select, textarea { width: 100%; padding: .8rem .95rem; border: 1.5px solid var(--borde); border-radius: 12px; background: var(--fondo); color: var(--tinta); font: 400 1rem/1.4 var(--texto); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--tinta-suave); opacity: .8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--tinta); box-shadow: 0 0 0 3px color-mix(in oklab, var(--acento) 45%, transparent); }
select:disabled { opacity: .6; }
[aria-invalid="true"] { border-color: var(--error); }
.error { margin: 0; color: var(--error); font-size: .9rem; font-weight: 500; }
.error:empty { display: none; }
.nota-form { margin: 0; font-size: .9rem; color: var(--tinta-suave); text-align: center; }
.encargo-ok { text-align: center; padding: 1.5rem .5rem; }
.encargo-ok i { font-size: 3rem; color: var(--acento); }
.encargo-ok h3 { font: 400 1.9rem/1.2 var(--display); margin: .5rem 0; }
.encargo-ok p { color: var(--tinta-suave); margin: 0 0 1.25rem; }
@media (max-width: 860px) {
  .encargos-dentro { grid-template-columns: 1fr; }
  .encargos-foto { aspect-ratio: 16 / 9; }
}
@media (max-width: 420px) { .campo-fila { grid-template-columns: 1fr; } }

/* ---------- Carta ---------- */
.carta-columnas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2.5rem 4rem; }
.carta-grupo h3 { font: 700 1.3rem/1.2 var(--texto); padding-bottom: .75rem; margin-bottom: .5rem; border-bottom: 3px solid var(--acento); }
.plato { padding-block: .7rem; }
.plato p { margin: 0; }
.plato-nombre { font-weight: 600; font-size: 1.08rem; display: flex; justify-content: space-between; gap: 1rem; }
.plato-precio { font-variant-numeric: tabular-nums; }
.plato-desc { color: var(--tinta-suave); font-size: .97rem; }

/* ---------- Ven a vernos ---------- */
.visitanos { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 6vw, 5rem); align-items: stretch; padding-top: 0; }
.direccion { display: flex; gap: .5rem; align-items: flex-start; margin: -0.75rem 0 1.5rem; color: var(--tinta-suave); }
.direccion i { margin-top: .25rem; }
.horario { margin: 0 0 1.5rem; }
.horario-dia { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; font-variant-numeric: tabular-nums; }
.horario-dia + .horario-dia { border-top: 1px solid var(--borde); }
.horario dt { font-weight: 600; }
.horario dd { margin: 0; color: var(--tinta-suave); }
.horario-dia.cerrado dd { opacity: .7; }
.horario-dia.hoy { background: var(--acento-suave); margin-inline: -.75rem; padding-inline: .75rem; border-radius: 10px; }
.horario-dia.hoy dt::after { content: " (hoy)"; font-weight: 500; color: var(--tinta-suave); }
.horario-dia.hoy dd { color: var(--tinta); font-weight: 600; }
.horario-dia.hoy + .horario-dia { border-top-color: transparent; }
.enlace { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; text-decoration: underline; text-decoration-color: var(--acento); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.mapa { width: 100%; min-height: 380px; height: 100%; border: 0; border-radius: var(--radio); background: var(--superficie); }
@media (max-width: 860px) { .visitanos { grid-template-columns: 1fr; } .mapa { min-height: 300px; } }

/* ---------- Pie ---------- */
.pie { border-top: 1px solid var(--borde); padding-block: 2.5rem 3rem; color: var(--tinta-suave); }
.pie-dentro { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2rem; align-items: start; }
.pie .marca { color: var(--tinta); margin-bottom: .5rem; }
.pie p { margin: 0; }
.pie-contacto { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.pie-contacto a { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.pie-contacto a:hover { color: var(--tinta); }
.creditos { grid-column: 1 / -1; font-size: .875rem; }
.creditos a { text-decoration: none; }
@media (max-width: 760px) { .pie-dentro { grid-template-columns: 1fr; } }
