/* =============================================================
   IGUANAS RANAS · estilos
   Mariscos frescos: arena, espuma de mar y olas, con el verde,
   amarillo y rojo del logo.
   ============================================================= */

/* ── 1. Tokens ─────────────────────────────────────────────── */
:root {
  --arena:     #FFF8EC;
  --espuma:    #E3F4EF;
  --papel:     #FFFFFF;
  --mar:       #0E6E73;
  --mar-2:     #0A5459;
  --selva:     #14361F;   /* texto principal, el verde oscuro del contorno del logo */
  --tinta-2:   #4A5D50;
  --tinta-3:   #7C8B80;
  --lima:      #A4CC1E;
  --sol:       #FFD43B;
  --chile:     #D21F2B;
  --chile-2:   #B0141F;
  --wa:        #25D366;
  --linea:     rgba(20, 54, 31, .12);
  --linea-2:   rgba(20, 54, 31, .07);

  --display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --sans:    "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mano:    "Caveat", "Comic Sans MS", cursive;

  --r-s: 12px;
  --r:   22px;
  --r-full: 999px;
  --borde: clamp(1.1rem, 4vw, 3rem);
  --hueco: clamp(3.5rem, 8vw, 6rem);
  --max:   1200px;
  --sombra: 0 18px 40px -24px rgba(14, 60, 50, .45);
  --ease:  cubic-bezier(.16, 1, .3, 1);
}

/* ── 2. Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--arena); color: var(--selva);
  font-family: var(--sans); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.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; }
.salto { position: fixed; top: -100px; left: 1rem; z-index: 999; background: var(--selva); color: #fff; padding: .6rem 1rem; border-radius: var(--r-s); }
.salto:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--sol); outline-offset: 2px; }

.cont { max-width: var(--max); margin-inline: auto; padding-inline: var(--borde); }
.bloque { position: relative; padding-block: var(--hueco); }
.eyebrow { font-family: var(--mano); font-size: 1.6rem; line-height: 1; color: var(--chile); transform: rotate(-2deg); display: inline-block; }
.sec-cab { max-width: 640px; margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.sec-cab h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); margin: .3rem 0 .6rem; }
.sec-cab h2 em, .visitanos h2 em { font-style: normal; color: var(--mar); }
.lead { color: var(--tinta-2); font-size: 1.05rem; }

/* ── 3. Botones ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.35rem; border-radius: var(--r-full); border: 2px solid transparent;
  font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: .01em;
  cursor: pointer; transition: transform .25s var(--ease), background .2s, color .2s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-chile { background: var(--chile); color: #fff; box-shadow: 0 10px 22px -12px rgba(210, 31, 43, .7); }
.btn-chile:hover { background: var(--chile-2); }
.btn-linea { border-color: var(--selva); color: var(--selva); background: transparent; }
.btn-linea:hover { background: var(--selva); color: var(--arena); }
.btn-wa { background: var(--wa); color: #06301a; }
.btn-wa:hover { background: #1fbe5a; }
.btn-grande { padding: .95rem 1.7rem; font-size: 1.08rem; }
.btn-bloque { width: 100%; }

/* ── 4. Menú ───────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 248, 236, .97);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.nav.is-pegado { border-color: var(--linea); box-shadow: 0 8px 24px -20px rgba(20, 54, 31, .6); }
.nav-in { max-width: var(--max); margin-inline: auto; padding: .45rem var(--borde); display: flex; align-items: center; gap: 1.6rem; }
.marca { margin-right: auto; }
.marca img { height: 58px; width: auto; }
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a { font-family: var(--display); font-weight: 600; font-size: 1.02rem; color: var(--selva); transition: color .2s; }
.nav-links a:hover, .nav-links a.is-activo { color: var(--mar); }
.menu-btn { display: none; }

/* ── 5. Portada ────────────────────────────────────────────── */
.hero { position: relative; padding-top: clamp(2rem, 5vw, 3.5rem); overflow: hidden; }
.hero-in {
  max-width: var(--max); margin-inline: auto; padding: 0 var(--borde) clamp(4rem, 9vw, 6.5rem);
  display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center;
}
.hero-kicker { font-family: var(--mano); font-size: 1.75rem; line-height: 1; color: var(--chile); transform: rotate(-2deg); display: inline-block; margin-bottom: .6rem; }
.hero h1 { font-size: clamp(2.7rem, 1.6rem + 5vw, 5rem); font-weight: 700; letter-spacing: -.01em; }
.hero h1 em {
  font-style: normal; color: var(--mar);
  background: linear-gradient(transparent 64%, var(--sol) 64%, var(--sol) 90%, transparent 90%);
  padding: 0 .08em;
}
.hero-sub { margin-top: 1.1rem; max-width: 34rem; font-size: 1.1rem; color: var(--tinta-2); }
.hero-acciones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.7rem; }
.hero-datos { list-style: none; padding: 0; margin: 2.1rem 0 0; display: flex; flex-wrap: wrap; gap: 1.2rem 2.2rem; }
.hero-datos li { display: grid; line-height: 1.2; }
.hero-datos strong { font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: var(--mar); }
.hero-datos span { font-size: .86rem; color: var(--tinta-3); }

.hero-visual { position: relative; width: min(100%, 520px); aspect-ratio: 1; margin-inline: auto; }
.blob {
  position: absolute; inset: 7%;
  background: radial-gradient(circle at 30% 30%, #D8EE7A 0%, var(--lima) 55%, #7FAE12 100%);
  border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
  will-change: transform;
  animation: blobGira 16s ease-in-out infinite alternate;   /* solo gira: no repinta */
}
@keyframes blobGira { from { transform: rotate(-6deg) scale(1); } to { transform: rotate(10deg) scale(1.04); } }
.hero-plato {
  position: absolute; margin: 0; border-radius: 50%; overflow: hidden;
  border: 7px solid var(--papel); box-shadow: 0 24px 40px -22px rgba(14, 60, 50, .6);
  will-change: transform;
  animation: flota 6s ease-in-out infinite;
}
.hero-plato img { width: 100%; height: 100%; object-fit: cover; }
.hero-plato-1 { width: 66%; aspect-ratio: 1; left: 17%; top: 16%; }
.hero-plato-2 { width: 32%; aspect-ratio: 1; right: 0; top: 2%; animation-delay: -2s; }
.hero-plato-3 { width: 30%; aspect-ratio: 1; left: 0; bottom: 4%; animation-delay: -4s; }
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero-nota {
  position: absolute; right: 4%; bottom: 10%;
  font-family: var(--mano); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--chile);
  background: var(--sol); padding: .1rem .8rem .25rem; border-radius: var(--r-full);
  transform: rotate(-8deg); box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .4);
}

/* ── 6. Olas ───────────────────────────────────────────────── */
.ola {
  position: absolute; left: -4%; bottom: -1px; width: 108%; height: clamp(46px, 7vw, 96px); display: block;
  will-change: transform; animation: olaVaiven 8s ease-in-out infinite alternate;   /* se mueve la ola entera: suave */
}
.ola-a { opacity: .55; }
@keyframes olaVaiven { from { transform: translateX(-2.5%); } to { transform: translateX(2.5%); } }
.ola-espuma path { fill: var(--espuma); }
.ola-arriba { top: -1px; bottom: auto; rotate: x 180deg; }
.ola-pie { position: relative; bottom: auto; margin-bottom: -1px; }
.hero, .pedido, .pie { overflow-x: clip; }
.ola-pie path { fill: var(--mar); }

/* ── 7. Carta ──────────────────────────────────────────────── */
.carta { background: var(--espuma); padding-bottom: calc(var(--hueco) + 2rem); }
.mas-demo {
  display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; vertical-align: .05em;
  border-radius: 50%; background: var(--sol); color: var(--selva); font-size: .8em; line-height: 1;
}
.chips-cat {
  position: sticky; top: 72px; z-index: 40;
  display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--borde) * -1) 1.6rem; padding: .7rem var(--borde);
  background: linear-gradient(var(--espuma) 78%, rgba(227, 244, 239, 0));
}
.chips-cat::-webkit-scrollbar { display: none; }
.chip-cat {
  flex: none; padding: .5rem 1.05rem; border-radius: var(--r-full);
  background: var(--papel); border: 2px solid var(--linea);
  font-family: var(--display); font-weight: 600; font-size: .98rem; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.chip-cat:hover { border-color: var(--mar); }
.chip-cat.is-on { background: var(--mar); border-color: var(--mar); color: #fff; }

.cat + .cat { margin-top: clamp(2.6rem, 6vw, 3.8rem); }
.cat-cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin-bottom: 1.2rem; }
.cat-cab h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); }
.cat-cab p { color: var(--tinta-2); }

.platos { display: grid; gap: clamp(.8rem, 2vw, 1.3rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plato {
  display: flex; flex-direction: column; gap: .55rem;
  background: var(--papel); border-radius: var(--r); padding: .65rem .65rem .8rem;
  box-shadow: 0 1px 0 var(--linea-2);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.plato:hover { transform: translateY(-4px); box-shadow: var(--sombra); }
.plato-foto { margin: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 1; background: var(--espuma); }
.plato-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.plato:hover .plato-foto img { transform: scale(1.06); }
.plato-txt { padding: 0 .3rem; }
.plato-nom { font-size: 1.08rem; font-weight: 600; }
.plato-desc { margin-top: .25rem; font-size: .86rem; line-height: 1.45; color: var(--tinta-2); }
.plato-elige { margin-top: .35rem; font-family: var(--mano); font-size: 1.2rem; line-height: 1; color: var(--chile); }
.plato-pie { margin-top: auto; padding: .2rem .3rem 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.plato-precio { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--chile); }
.add {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--sol); color: var(--selva); font-family: var(--display); font-size: 1.6rem; font-weight: 700; line-height: 1;
  display: grid; place-items: center; box-shadow: 0 6px 14px -8px rgba(120, 90, 0, .8);
  transition: transform .2s var(--ease), background .2s;
}
.add:hover { transform: scale(1.1) rotate(90deg); background: #FFC800; }
.plato.is-agregado { animation: agregado .6s var(--ease); }
@keyframes agregado { 0% { box-shadow: 0 0 0 0 rgba(164, 204, 30, .9); } 100% { box-shadow: 0 0 0 14px rgba(164, 204, 30, 0); } }
.plato-sin-foto { border: 2px dashed var(--linea); background: rgba(255, 255, 255, .7); }
.platos-chicos { max-width: 620px; }

/* ── 8. Pedido ─────────────────────────────────────────────── */
.pedido { padding-top: calc(var(--hueco) + 2rem); }
.pedido-grid { display: grid; gap: clamp(1.4rem, 4vw, 2.4rem); align-items: start; }
.carrito-caja, .form-pedido { background: var(--papel); border-radius: var(--r); padding: clamp(1.2rem, 3vw, 1.8rem); box-shadow: var(--sombra); }
.carrito-caja h3 { font-size: 1.4rem; margin-bottom: .8rem; }
.carrito-vacio { color: var(--tinta-2); }
.carrito { list-style: none; margin: 0; padding: 0; }
.linea-item { padding: .8rem 0; border-top: 1px solid var(--linea-2); }
.linea-item:first-child { border-top: 0; }
.li-cab { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; }
.li-precio { font-family: var(--display); color: var(--chile); white-space: nowrap; }
.li-detalle { margin-top: .2rem; font-size: .86rem; color: var(--tinta-2); }
.li-fila { margin-top: .45rem; display: flex; align-items: center; justify-content: space-between; }
.li-cant { display: inline-flex; align-items: center; gap: .55rem; }
.li-cant button {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--linea); background: var(--arena);
  cursor: pointer; font-size: 1.1rem; line-height: 1; display: grid; place-items: center;
}
.li-cant output { min-width: 1.4em; text-align: center; font-weight: 700; }
.li-quitar { border: 0; background: none; color: var(--tinta-3); cursor: pointer; text-decoration: underline; font-size: .88rem; }
.carrito-total { margin-top: .9rem; padding-top: .9rem; border-top: 2px dashed var(--linea); display: flex; justify-content: space-between; font-size: 1.1rem; }
.carrito-total strong { font-family: var(--display); font-size: 1.5rem; color: var(--chile); }

.form-pedido { display: grid; gap: 1rem; }
.entrega { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.entrega legend { font-weight: 600; margin-bottom: .5rem; padding: 0; }
.opcion { position: relative; cursor: pointer; }
.opcion input { position: absolute; opacity: 0; }
.opcion span {
  display: inline-block; padding: .55rem 1.1rem; border-radius: var(--r-full); border: 2px solid var(--linea);
  font-family: var(--display); font-weight: 600; transition: background .2s, color .2s, border-color .2s;
}
.opcion input:checked + span { background: var(--mar); border-color: var(--mar); color: #fff; }
.opcion input:focus-visible + span { outline: 3px solid var(--sol); outline-offset: 2px; }
.campo { display: grid; gap: .35rem; }
.campo span { font-weight: 600; font-size: .95rem; }
.campo em { font-style: normal; font-weight: 400; color: var(--tinta-3); }
.campo input, .campo textarea {
  width: 100%; padding: .75rem .9rem; border-radius: var(--r-s);
  border: 2px solid var(--linea); background: var(--arena); transition: border-color .2s;
}
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--mar); }
.campo .is-mal, .is-mal { border-color: var(--chile) !important; }
.nota-domicilio { margin-top: -.5rem; font-size: .86rem; color: var(--tinta-2); }
.form-error { color: var(--chile-2); font-weight: 600; }

/* ── 9. Horario y ubicación ────────────────────────────────── */
.visitanos { background: var(--arena); }
.visitanos-grid { display: grid; gap: clamp(1.6rem, 4vw, 2.8rem); align-items: center; }
.visitanos h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); margin: .3rem 0 .8rem; }
.direccion { font-size: 1.12rem; }
.estado-hoy {
  display: inline-block; margin: 1rem 0 .4rem; padding: .35rem .9rem; border-radius: var(--r-full);
  background: var(--espuma); color: var(--mar-2); font-weight: 600; font-size: .95rem;
}
.estado-hoy.is-abierto { background: #E5F5C2; color: #3E5A07; }
.estado-hoy.is-cerrado { background: #FDE2E2; color: var(--chile-2); }
.horario { list-style: none; padding: 0; margin: .4rem 0 1.4rem; max-width: 360px; }
.horario li { display: flex; justify-content: space-between; padding: .38rem .2rem; border-bottom: 1px dashed var(--linea); }
.horario li.is-hoy { font-weight: 700; color: var(--mar); }
.mapa { border-radius: var(--r); overflow: hidden; box-shadow: var(--sombra); background: var(--espuma); }
.mapa iframe { display: block; width: 100%; height: clamp(300px, 42vw, 420px); border: 0; }

/* ── 10. Pie ───────────────────────────────────────────────── */
.pie { position: relative; margin-top: clamp(1rem, 3vw, 2rem); color: #EAF6F3; }
.pie-in { background: var(--mar); padding: 1.4rem var(--borde) 2.6rem; text-align: center; display: grid; justify-items: center; gap: .6rem; }
.pie-logo { width: 140px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.pie-mini { font-size: .85rem; opacity: .75; }

/* ── 11. Flotantes, barra, hoja y aviso ────────────────────── */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 80;
  width: 58px; height: 58px; border-radius: 50%; background: var(--wa);
  display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .45);
  transition: transform .25s var(--ease), bottom .3s var(--ease);
}
.wa-float:hover { transform: translateY(-3px) scale(1.05); }
body.tiene-pedido .wa-float { bottom: 84px; }

.barra-pedido {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 85;
  background: rgba(20, 54, 31, .97); color: #fff; padding-bottom: env(safe-area-inset-bottom);
  animation: sube .35s var(--ease);
}
@keyframes sube { from { transform: translateY(100%); } to { transform: none; } }
.barra-in {
  max-width: var(--max); margin-inline: auto; padding: .7rem var(--borde);
  padding-right: calc(var(--borde) + 70px);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.barra-info { display: grid; line-height: 1.2; }
.barra-info strong { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.barra-info span { color: var(--sol); font-weight: 700; }

.hoja { position: fixed; inset: 0; z-index: 120; display: grid; place-items: end center; }
.hoja-fondo { position: absolute; inset: 0; background: rgba(10, 30, 20, .6); }
.hoja-caja {
  position: relative; width: min(100%, 520px); background: var(--papel);
  border-radius: 24px 24px 0 0; padding: 1.6rem 1.4rem calc(1.4rem + env(safe-area-inset-bottom));
  display: grid; gap: 1rem; animation: sube .3s var(--ease);
}
.hoja-x { position: absolute; right: .9rem; top: .7rem; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--arena); font-size: 1.5rem; cursor: pointer; }
.hoja-eti { font-family: var(--mano); font-size: 1.4rem; color: var(--chile); line-height: 1; }
.hoja-caja h3 { font-size: 1.5rem; margin-top: -.5rem; }

.aviso {
  position: fixed; left: 50%; bottom: 96px; z-index: 110; translate: -50% 0;
  background: var(--selva); color: #fff; padding: .6rem 1.1rem; border-radius: var(--r-full);
  font-weight: 600; font-size: .95rem; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
  animation: sube .3s var(--ease); max-width: calc(100% - 2rem); text-align: center;
}

/* ── 12. Aparición al bajar (solo con JS) ──────────────────── */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ── 13. Tamaños ───────────────────────────────────────────── */
@media (min-width: 640px) {
  .platos { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .platos-chicos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 860px) {
  .hero-in { grid-template-columns: 1.05fr .95fr; }
  .pedido-grid { grid-template-columns: 1fr 1fr; }
  .visitanos-grid { grid-template-columns: .9fr 1.1fr; }
}
@media (max-width: 859px) {
  .js .menu-btn {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 46px; height: 46px; padding: 0 11px; border: 0; background: none; cursor: pointer; margin-right: -8px;
  }
  .js .menu-btn span { display: block; height: 2.5px; border-radius: 2px; background: var(--selva); transition: transform .3s, opacity .2s; }
  .js .nav.is-abierto .menu-btn span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .js .nav.is-abierto .menu-btn span:nth-child(2) { opacity: 0; }
  .js .nav.is-abierto .menu-btn span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .nav-in { flex-wrap: wrap; gap: .4rem .9rem; }
  .js .nav-links { display: none; order: 5; flex-basis: 100%; flex-direction: column; gap: 0; padding-bottom: .6rem; }
  .js .nav.is-abierto .nav-links { display: flex; }
  .js .nav-links a { padding: .8rem 0; border-top: 1px solid var(--linea); font-size: 1.1rem; }
  .nav-cta { padding: .55rem 1rem; font-size: .95rem; }
  .marca img { height: 48px; }
  .chips-cat { top: 62px; }
  html { scroll-padding-top: 128px; }
}
@media (max-width: 420px) {
  .nav-cta { display: none; }
  .plato { padding: .5rem .5rem .65rem; border-radius: 18px; }
  .plato-nom { font-size: .98rem; }
  .plato-desc { font-size: .8rem; }
  .plato-precio { font-size: 1.12rem; }
  .add { width: 38px; height: 38px; font-size: 1.4rem; }
  .hero-datos { gap: 1rem 1.6rem; }
  .hero-datos strong { font-size: 1.35rem; }
}

/* ── 14. Menos movimiento: se apaga solo lo que se mueve solo ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .hero-plato, .ola { animation: none; }
}
