/* ====================================================================
   Cucina di Marce — estilos globales
   Paleta tomada del logo: lavanda #AB98B7 · lavanda profundo #6E5B85 ·
   crema #FBF6EE · chocolate #7A4A34 · salvia #6B7F52 · berenjena #33272E
   Tipografías: Fraunces SemiBold (títulos) · Nunito Sans (texto)
   ==================================================================== */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/fraunces-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/nunito-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/nunito-700.woff2') format('woff2');
}

:root {
  --lavanda: #AB98B7;
  --lavanda-profundo: #6E5B85;
  --lavanda-oscuro: #57466B;
  --crema: #FBF6EE;
  --crema-honda: #F2E8DA;
  --chocolate: #7A4A34;
  --salvia: #6B7F52;
  --berenjena: #33272E;
  --tenue: #6E6169;
  /* Verde de WhatsApp bajado un punto: mantiene la familia de color que la gente
     reconoce, pero el blanco encima se lee bastante mejor que sobre el #25D366
     original (2,6:1 frente a 2,0:1). */
  --verde-wa: #1DB954;
  --verde-wa-oscuro: #17A247;
  --radio: 16px;
  --sombra: 0 6px 24px rgba(51, 39, 46, .10);
  --sombra-alta: 0 14px 40px rgba(51, 39, 46, .16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* La cabecera es sticky: sin este margen, al pulsar un enlace del menú el
   título de la sección queda escondido justo debajo de ella. */
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
  font-family: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--berenjena);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 4.2vw, 2.3rem); margin-bottom: .4em; }
h3 { font-size: 1.2rem; }

p { margin-bottom: 1em; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lavanda-profundo); }

.contenedor { width: min(1120px, 92%); margin: 0 auto; }
.estrecho { max-width: 660px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: 'Nunito Sans', sans-serif; font-weight: 700;
  font-size: .95rem; text-decoration: none; white-space: nowrap;
  padding: .78rem 1.3rem; border-radius: 999px;
  border: 0; cursor: pointer;
  transition: background .16s ease, transform .1s ease, box-shadow .16s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--wa { background: var(--verde-wa); color: #fff; }
.btn--wa:hover { background: var(--verde-wa-oscuro); }
.btn--lavanda { background: var(--lavanda-profundo); color: #fff; }
.btn--lavanda:hover { background: var(--lavanda-oscuro); }
.btn--claro { background: rgba(255,255,255,.92); color: var(--berenjena); }
.btn--claro:hover { background: #fff; }
/* El borde es lo ÚNICO que dibuja este botón: con el lavanda claro daba 2,2:1
   y no se distinguía del fondo. Con el profundo pasa de 5:1. */
.btn--borde { background: transparent; color: var(--berenjena); box-shadow: inset 0 0 0 1.5px var(--lavanda-profundo); }
.btn--borde:hover { background: rgba(171,152,183,.16); }
.btn--grande { font-size: 1.05rem; padding: .95rem 1.7rem; }

/* Botón circular de solo icono (Instagram, y WhatsApp en móvil).
   min-width/height fuerza los 44 px que pide la guía de áreas táctiles: con
   sólo el padding se quedaba en 41 y en un móvil eso se falla al tocar. */
.btn--icono { padding: .68rem; border-radius: 50%; min-width: 44px; min-height: 44px; }
.btn--ig { background: rgba(171,152,183,.20); color: var(--lavanda-oscuro); }
.btn--ig:hover { background: rgba(171,152,183,.36); }

/* ---------- Cabecera ---------- */
/* Fondo opaco a propósito. Con `backdrop-filter` la cabecera queda preciosa,
   pero al ser sticky obliga a recomponer la franja en cada scroll y en varias
   GPU deja estelas del contenido que pasa por debajo: se ve como si la página
   estuviera duplicada y superpuesta. El desenfoque no compensa ese riesgo. */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: var(--crema);
  border-bottom: 1px solid rgba(171,152,183,.28);
}
.cabecera__fila {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .55rem 0;
}
.cabecera__logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.cabecera__logo img { width: 46px; height: 46px; border-radius: 50%; }
.cabecera__logo b {
  font-family: 'Fraunces', Georgia, serif; font-weight: 600;
  font-size: 1.12rem; line-height: 1.1; letter-spacing: -.01em;
}
.cabecera__acciones { display: flex; align-items: center; gap: .5rem; }

/* En móvil el encabezado se apretaba: el texto del botón se va y queda
   logo + Instagram + WhatsApp + menú, todo con aire. */
@media (max-width: 680px) {
  .cabecera__acciones { gap: .3rem; }
  .cabecera .btn__texto { display: none; }
  .cabecera .btn--wa { padding: .68rem; border-radius: 50%; min-width: 44px; min-height: 44px; }
  .cabecera__logo img { width: 40px; height: 40px; }
  .cabecera__logo b { font-size: .98rem; }
  .cabecera__logo { gap: .5rem; }
}

/* Menú móvil con `:target`, no con el truco del checkbox.
   El checkbox tenía dos defectos: no se desmarcaba solo al pulsar un enlace, así
   que el menú quedaba abierto tapando la sección a la que acababas de saltar —y
   como la cabecera es sticky, tampoco se iba con el scroll—; y su indicador de
   foco no se dibujaba en ninguna parte en escritorio.
   Con `:target` se cierra solo: al ir a #tortas, #menu deja de estar apuntado.
   Y al ser un enlace de verdad, teclado y lectores de pantalla lo entienden. */
.nav-burger {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; cursor: pointer;
  min-width: 44px; min-height: 44px;   /* área táctil mínima */
}
.nav-burger span {
  width: 24px; height: 2.5px; border-radius: 2px; background: var(--berenjena);
  transition: transform .18s ease, opacity .18s ease;
}
.nav-burger--cerrar { display: none; }
.cabecera:has(.nav:target) .nav-burger--abrir { display: none; }
.cabecera:has(.nav:target) .nav-burger--cerrar { display: flex; }
.nav-burger--cerrar span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-burger--cerrar span:nth-child(2) { opacity: 0; }
.nav-burger--cerrar span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Foco visible para todo lo enfocable. */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--lavanda-profundo);
  outline-offset: 3px;
  border-radius: 6px;
}
.seccion--lavanda a:focus-visible, .mesa a:focus-visible, .pie a:focus-visible, .heroe a:focus-visible {
  outline-color: #fff;
}
.nav { display: none; padding-bottom: .7rem; }
.nav:target { display: block; }
.nav a {
  display: block; padding: .6rem .2rem; color: var(--berenjena);
  text-decoration: none; font-weight: 700;
  border-bottom: 1px solid rgba(171,152,183,.25);
}
.nav a[aria-current="page"] { color: var(--lavanda-profundo); }

@media (min-width: 900px) {
  .nav-burger { display: none; }
  .nav { display: flex !important; gap: 1.5rem; padding: 0; }
  .nav a { border: 0; padding: .3rem 0; font-weight: 400; }
  .nav a:hover { color: var(--lavanda-profundo); }
}

/* ---------- Héroe ---------- */
.heroe { position: relative; background: var(--berenjena); color: #fff; overflow: hidden; }
/* `contents` evita que el <picture> cree una caja: la foto se posiciona
   absoluta contra .heroe, igual que cuando era un <img> suelto. */
.heroe picture { display: contents; }
.heroe__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .46;
}
.heroe::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(51,39,46,.86) 0%, rgba(87,70,107,.62) 52%, rgba(51,39,46,.28) 100%);
}
.heroe__contenido { position: relative; z-index: 2; padding: 4.2rem 0 3.6rem; max-width: 640px; }
/* Aclarado respecto del lavanda del logo: va sobre una foto, cuyo brillo no
   controlamos, y con el tono original bajaba a 2:1 en las zonas claras. */
.heroe__contenido h1 em { font-style: normal; color: #DDD0E8; }
.heroe__sub { font-size: 1.12rem; margin: 1rem 0 1.6rem; opacity: .94; }
.heroe__ctas { display: flex; flex-wrap: wrap; gap: .7rem; }
.heroe__nota { margin-top: 1.1rem; font-size: .9rem; opacity: .8; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.chip {
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.32);
  padding: .32rem .85rem; border-radius: 999px; font-size: .85rem;
}

/* ---------- Secciones ---------- */
.seccion { padding: 3.6rem 0; }
.seccion--honda { background: var(--crema-honda); }
.seccion--lavanda { background: var(--lavanda-profundo); color: #fff; }
/* `:not(.btn)` es imprescindible: sin él esta regla gana por especificidad a
   .btn--claro y el botón "Ver Instagram" queda blanco sobre blanco (1,1:1). */
.seccion--lavanda a:not(.btn) { color: #fff; }
.seccion__intro { max-width: 620px; margin-bottom: 2rem; color: var(--tenue); }
.seccion--lavanda .seccion__intro { color: rgba(255,255,255,.88); }

.cabeza-seccion { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Rejilla de tortas ---------- */
.tortas { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

.torta {
  background: #fff; border-radius: var(--radio); overflow: hidden;
  box-shadow: var(--sombra); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.torta:hover { transform: translateY(-4px); box-shadow: var(--sombra-alta); }
.torta__foto { position: relative; }
/* <picture> es inline por defecto y dejaría una rendija bajo la foto. */
.torta__foto picture, .sobre__foto picture { display: block; }
.torta__foto img { aspect-ratio: 1/1; object-fit: cover; width: 100%; }
.torta__etiqueta {
  position: absolute; left: .8rem; top: .8rem;
  background: rgba(251,246,238,.94); color: var(--lavanda-oscuro);
  font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .28rem .7rem; border-radius: 999px;
}
.torta__cuerpo { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.torta__cuerpo h3 { margin-bottom: .3rem; }
.torta__desc { font-size: .95rem; color: var(--tenue); margin-bottom: .9rem; flex: 1; }
.torta__pie { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.torta__precio { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 1.02rem; }
.torta__precio small { display: block; font-family: 'Nunito Sans', sans-serif; font-weight: 400; font-size: .78rem; color: var(--tenue); }
.torta .btn { padding: .6rem 1rem; font-size: .88rem; }

/* ---------- Pasos ---------- */
.pasos { display: grid; gap: 1.1rem; counter-reset: paso; }
@media (min-width: 760px) { .pasos { grid-template-columns: repeat(3, 1fr); } }
.paso { background: #fff; border-radius: var(--radio); padding: 1.4rem; box-shadow: var(--sombra); }
.paso::before {
  counter-increment: paso; content: counter(paso);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--lavanda-profundo); color: #fff;
  font-family: 'Fraunces', Georgia, serif; font-weight: 600;
  margin-bottom: .7rem;
}
.paso h3 { margin-bottom: .25rem; }
.paso p { margin: 0; font-size: .95rem; color: var(--tenue); }

/* ---------- Sobre Marcela ---------- */
.sobre { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .sobre { grid-template-columns: .85fr 1fr; } }
.sobre__foto img { border-radius: var(--radio); box-shadow: var(--sombra-alta); aspect-ratio: 1/1; object-fit: cover; }
.sobre__firma {
  font-family: 'Fraunces', Georgia, serif; font-size: 1.15rem;
  color: var(--lavanda-profundo); margin-top: .4rem;
}

/* ---------- Lista con check ---------- */
.lista-check { list-style: none; margin: 0 0 1em; }
.lista-check li { padding-left: 1.8rem; position: relative; margin-bottom: .5rem; }
.lista-check li::before {
  content: ""; position: absolute; left: 0; top: .38rem;
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--salvia) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/62% no-repeat;
}

/* ---------- La Mesa de Marce ----------
   Se trata como el héroe, no como una tarjeta: es una invitación a festejar en
   casa de Marce, así que va a sangre, con foto de cumpleaños de fondo y el
   romero del logo dibujado en las esquinas. */
.mesa {
  position: relative; overflow: hidden;
  background: var(--lavanda-oscuro); color: #fff;
  padding: 4rem 0;
}
.mesa picture { display: contents; }
.mesa__fondo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .38;
}
.mesa::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(158deg, rgba(87,70,107,.92) 0%, rgba(87,70,107,.72) 45%, rgba(51,39,46,.82) 100%);
}
.mesa__rama {
  position: absolute; z-index: 2; width: 150px;
  color: rgba(255,255,255,.18); pointer-events: none;
}
.mesa__rama--izq { left: -26px; top: 18px; }
.mesa__rama--der { right: -26px; bottom: 18px; transform: rotate(180deg); }

.mesa__caja {
  position: relative; z-index: 3; text-align: center;
  max-width: 620px; margin: 0 auto;
  /* Reparte las líneas parejas en vez de llenar y cortar: sin esto el gancho
     dejaba "todo" colgando solo en el último renglón. */
  text-wrap: balance;
}
.mesa__logo { border-radius: 50%; margin: 0 auto 1.2rem; box-shadow: 0 6px 20px rgba(0,0,0,.28); }
.mesa h2 { margin-bottom: .12em; font-size: clamp(1.8rem, 5.4vw, 2.6rem); }
.mesa__lema {
  font-family: 'Fraunces', Georgia, serif;
  /* Lavanda aclarado: el #AB98B7 del logo sobre este fondo oscuro se lava.
     En el héroe funciona porque allí es un h1 enorme; aquí es texto corriente. */
  font-size: 1.15rem; color: #EADFF2; margin-bottom: 1.2rem;
}
/* El gancho es la frase que vende: pasa a serif y a primer plano. */
.mesa__gancho {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.18rem, 3.6vw, 1.55rem);
  line-height: 1.35;
  color: rgba(255,255,255,.86);
  margin-bottom: 0;
}
.mesa__gancho em { font-style: normal; color: #fff; }

.mesa__separador { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1.2rem 0 1.3rem; }
.mesa__separador i { height: 1px; width: clamp(40px, 12vw, 74px); background: linear-gradient(90deg, transparent, rgba(255,255,255,.55)); }
.mesa__separador i:last-child { background: linear-gradient(90deg, rgba(255,255,255,.55), transparent); }
.mesa__separador svg { width: 17px; height: 17px; color: rgba(255,255,255,.85); flex: none; }

.mesa__chips { justify-content: center; margin: 1.7rem 0 1.9rem; }
.mesa__cierre {
  font-family: 'Fraunces', Georgia, serif;
  margin: 1.4rem 0 0; font-size: 1.05rem; opacity: .9;
}

/* ---------- FAQ ---------- */
.faq details {
  background: #fff; border-radius: 12px; box-shadow: var(--sombra);
  margin-bottom: .7rem; padding: 1rem 1.2rem;
}
.faq summary { font-family: 'Fraunces', Georgia, serif; font-weight: 600; cursor: pointer; font-size: 1.03rem; }
.faq details p { margin: .7rem 0 0; font-size: .95rem; color: var(--tenue); }

/* ---------- Franja CTA ---------- */
.franja { text-align: center; }
.franja h2 { color: inherit; }
.franja .btn { margin: .35rem .25rem 0; }

/* ---------- Pie ---------- */
.pie { background: var(--berenjena); color: #fff; padding: 3rem 0 5.5rem; }
.pie a { color: #E3D6EC; text-decoration: none; }
.pie a:hover { text-decoration: underline; }
.pie__grid { display: grid; gap: 1.8rem; }
@media (min-width: 760px) { .pie__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.pie__logo { width: 72px; border-radius: 50%; margin-bottom: .8rem; }
.pie h3 { margin-bottom: .7rem; font-size: 1rem; }
.pie ul { list-style: none; }
.pie li { margin-bottom: .45rem; }
.pie p { color: rgba(255,255,255,.82); font-size: .95rem; }
.pie__legal {
  border-top: 1px solid rgba(255,255,255,.16);
  margin-top: 2.2rem; padding-top: 1.1rem; font-size: .85rem; opacity: .75;
}

/* ---------- WhatsApp flotante ---------- */
.wa-flotante {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  width: 3.6rem; height: 3.6rem; border-radius: 50%;
  background: var(--verde-wa); box-shadow: 0 8px 22px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
}
.wa-flotante:hover { background: var(--verde-wa-oscuro); }
.wa-flotante svg { width: 2rem; height: 2rem; }

/* El flotante de WhatsApp caía justo encima del "Encargar" de la tarjeta que
   quedaba abajo a la derecha, y en móvil eso es pulsar el botón equivocado.
   Apilando el pie, el botón ocupa todo el ancho y siempre queda zona tocable
   a la izquierda del flotante. */
@media (max-width: 520px) {
  .torta__pie { flex-direction: column; align-items: stretch; gap: .8rem; }
  .torta__pie .btn { width: 100%; padding: .8rem 1rem; font-size: .95rem; }
  .wa-flotante { width: 3.2rem; height: 3.2rem; box-shadow: 0 6px 18px rgba(0,0,0,.3), 0 0 0 3px var(--crema); }
  .wa-flotante svg { width: 1.75rem; height: 1.75rem; }
}

/* utilidades */
.centro { text-align: center; }
.mt-2 { margin-top: 2rem; }
