/* Cartego — web comercial.
   Misma paleta que el producto: la landing y la carta son la misma casa.
   Tipografía: Poppins para el logotipo y los titulares (la 'C' geométrica del
   logo pide una geométrica), Literata para el texto — una serif cálida hace que
   la sección de funcionalidades se lea de verdad como una carta.
   Las fuentes se sirven desde aquí: un salto a Google Fonts retrasa el LCP. */

@font-face {
  font-family: 'Poppins';
  src: url('/fonts/Poppins-600.woff2') format('woff2');
  font-weight: 600;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/Poppins-700.woff2') format('woff2');
  font-weight: 700;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Literata';
  src: url('/fonts/Literata.woff2') format('woff2');
  font-weight: 400;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}

:root {
  --bg: #0f1216;
  --bg-2: #141920;
  --card: #1a1f26;
  --ink: #f2efe9;
  --muted: #9aa2ae;
  --accent: #e4572e;        /* naranja de marca: logo, acentos, detalles */
  /* Sobre el naranja de marca, el texto blanco da 3,68:1 y la WCAG pide 4,5:1.
     Los botones usan un tono más oscuro del MISMO naranja (4,88:1). El de marca
     se reserva para el hover, ahí con texto oscuro (5,09:1). */
  --accent-btn: #c9431d;
  --accent-soft: #ff8a6b;
  --line: #262e39;
  --max: 1120px;
  --display: 'Poppins', system-ui, sans-serif;
  --body: 'Literata', Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, .display { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; }
a { color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.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;
}

/* ---------- Cabecera ---------- */
header.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 11px; text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em;
  flex: none;
}
.brand img { height: 36px; width: auto; display: block; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.navlink { color: var(--muted); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 15px; }
.navlink:hover { color: var(--ink); }
.langs { display: inline-flex; gap: 6px; font-family: var(--display); font-size: 13px; font-weight: 600; }
.langs a { color: var(--muted); text-decoration: none; padding: 3px 6px; border-radius: 6px; }
.langs a[aria-current='true'] { color: var(--ink); background: var(--card); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 999px;
  background: var(--accent-btn); color: #fff; text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: 15px;
  border: 1px solid var(--accent-btn); white-space: nowrap; line-height: 1;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #1a1005; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: transparent; color: var(--ink); border-color: var(--muted); }
.top .btn { padding: 10px 18px; font-size: 14px; }

/* ---------- Portada ---------- */
.hero { padding: 76px 0 64px; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.kicker {
  font-family: var(--display); font-weight: 600; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-soft);
  margin: 0 0 18px;
}
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.04; margin: 0 0 20px; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 30ch; margin: 0 0 30px; }
.cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cta-note { color: var(--muted); font-size: 14px; }

/* ---------- El móvil de la portada ---------- */
/* Réplica 1:1 de apps/comensal-web. Se maqueta a 390 px —el ancho real— y se
   escala: así las proporciones son EXACTAMENTE las del producto. Las medidas
   salen del DOM real (2026-08-24), no de mirar una captura. */
/* La portada en obra: el móvil lleva un pie que dice que es el producto. */
.phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone-note { color: var(--muted); font-size: 14px; text-align: center; max-width: 30ch; margin: 0; }
.hero.obra .lead { max-width: 44ch; }
.phone {
  width: 100%; max-width: 300px;
  border: 1px solid var(--line); border-radius: 36px; background: #05070a;
  padding: 9px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.9);
}
.screen {
  border-radius: 28px; overflow: hidden; background: #0f1216;
  /* 390 × 720 escalado a 282 de ancho: 282/390 = 0,7231 */
  width: 100%; aspect-ratio: 390 / 720; position: relative;
}
.dw {
  position: absolute; top: 0; left: 0;
  width: 390px; height: 720px;
  transform: scale(0.7231); transform-origin: top left;
  background: #0f1216; color: #f2efe9;
  font-family: var(--display); font-size: 16px; line-height: 1.4;
}
@media (max-width: 980px) { .phone { max-width: 320px; } }

.dw-head { padding: 12px 18px 10px; border-bottom: 1px solid #2a313b; }
.dw-brandrow { display: flex; align-items: center; justify-content: space-between; }
.dw-brand { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 18px; }
.dw-select {
  display: inline-flex; align-items: center; gap: 12px;
  width: 100px; height: 33px; padding: 7px 9px; box-sizing: border-box;
  border: 1px solid #2a313b; border-radius: 10px; color: #8b93a0; font-size: 13px;
}
.dw-select em { font-style: normal; margin-left: auto; }
.dw-place { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin-top: 6px; }

.dw-body { padding: 14px 18px 0; }
.dw-bill {
  border: 1px solid #2a313b; border-radius: 12px; padding: 14px;
  text-align: center; color: #f2efe9; font-size: 16px;
}
.dw-cat {
  margin: 18px 0 10px; font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase; color: #8b93a0;
}
.dw-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 84px; box-sizing: border-box;
  background: #1a1f26; border: 1px solid #2a313b; border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px;
}
.dw-txt { flex: 1; min-width: 0; }
.dw-name { font-size: 16px; font-weight: 700; }
.dw-price { font-size: 15px; color: #8b93a0; margin-top: 2px; }
.dw-plus {
  position: relative; flex: none;
  width: 48px; height: 48px; border-radius: 12px; background: #c9431d;
  color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 600;
}
/* El control de cantidad solo existe cuando hay unidades pedidas. */
.dw-qty { display: flex; align-items: center; gap: 10px; opacity: 0; }
.dw-minus {
  width: 48px; height: 48px; border-radius: 12px; background: #212832;
  color: #f2efe9; display: grid; place-items: center; font-size: 22px;
}
.dw-n { font-size: 18px; font-weight: 700; min-width: 10px; text-align: center; }

/* Barra de pedido: fija abajo, franja translúcida con el botón dentro. */
.dw-cartbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 74px;
  padding: 12px 18px; box-sizing: border-box;
  background: rgba(15, 18, 22, .94); border-top: 1px solid #2a313b;
  transform: translateY(100%);
}
.dw-cta {
  position: absolute; left: 18px; right: 18px; top: 12px;
  height: 49px; border-radius: 12px; background: #c9431d; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 15px; box-sizing: border-box; font-size: 16px; font-weight: 700;
  opacity: 0;
}
.dw-cta.ok { background: #1d6b4c; justify-content: center; }
.tap {
  position: absolute; inset: -6px; border-radius: 16px;
  border: 2px solid #ff8a6b; background: rgba(255,138,107,.28);
  opacity: 0; pointer-events: none;
}

/* Un ciclo de 14 s: mirar, pedir un plato, pedir otro, enviar la ronda. Sin
   JavaScript. Cada barra es COMPLETA y se releva por opacidad: antes había una
   sola con dos textos dentro y el botón se deformaba al cambiar. */
.anim .tap.t1   { animation: tap 14s infinite; animation-delay: 2s; }
.anim .tap.t2   { animation: tap 14s infinite; animation-delay: 5s; }
.anim .dw-qty.q1 { animation: qty 14s infinite; animation-delay: 2.25s; }
.anim .dw-qty.q2 { animation: qty 14s infinite; animation-delay: 5.25s; }
.anim .dw-cartbar { animation: cartbar 14s infinite; }
.anim .dw-cta.b1 { animation: cta1 14s infinite; }
.anim .dw-cta.b2 { animation: cta2 14s infinite; }
.anim .dw-cta.b3 { animation: cta3 14s infinite; }

@keyframes tap {
  0%, 0.5% { opacity: 0; transform: scale(.6); }
  2%       { opacity: 1; transform: scale(1); }
  5%       { opacity: 0; transform: scale(1.35); }
  100%     { opacity: 0; }
}
@keyframes qty {
  0%, 0.5% { opacity: 0; width: 0; }
  2%, 62%  { opacity: 1; width: auto; }
  66%,100% { opacity: 0; width: 0; }
}
@keyframes cartbar {
  0%, 15%  { transform: translateY(100%); }
  18%, 74% { transform: translateY(0); }
  78%,100% { transform: translateY(100%); }
}
@keyframes cta1 { 0%, 15% { opacity: 0; } 18%, 34% { opacity: 1; } 37%, 100% { opacity: 0; } }
@keyframes cta2 { 0%, 36% { opacity: 0; } 39%, 60% { opacity: 1; } 63%, 100% { opacity: 0; } }
@keyframes cta3 { 0%, 62% { opacity: 0; } 65%, 74% { opacity: 1; } 78%, 100% { opacity: 0; } }

/* ---------- Secciones ---------- */
section { padding: 78px 0; border-bottom: 1px solid var(--line); }
.sec-head { max-width: 60ch; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 12px; }
.sec-head p { color: var(--muted); margin: 0; }

/* ---------- "La carta": las funcionalidades servidas como un menú ---------- */
.carta {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 44px);
  max-width: 860px; margin: 0 auto;
}
/* El logo va AL LADO del nombre, como en la portada de una carta de verdad. */
.carta-cabecera { text-align: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.carta-logo { height: 40px; width: auto; flex: none; }
.carta-cabecera .carta-nombre {
  font-family: var(--display); font-weight: 700; font-size: clamp(20px, 3vw, 26px);
  letter-spacing: -0.02em;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.carta-cabecera .carta-sub {
  color: var(--muted); font-size: 14px; margin-top: 4px;
  font-variant: small-caps; letter-spacing: 0.08em;
}
.curso { margin-top: 30px; }
.curso-titulo {
  font-family: var(--display); font-weight: 600; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-soft);
  margin: 0 0 14px;
}
.plato { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.plato:last-child { border-bottom: 0; }
.plato-linea { display: flex; align-items: baseline; gap: 8px; }
.plato-nombre { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
/* Los puntitos de una carta de verdad. Puramente decorativos. */
.plato-puntos {
  flex: 1; border-bottom: 1px dotted #3a444f; transform: translateY(-4px); min-width: 18px;
}
.plato-precio {
  font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--accent-soft);
  white-space: nowrap;
}
.plato-desc { color: var(--muted); font-size: 15px; margin: 3px 0 0; max-width: 62ch; }
/* Lista de una carta: cada línea es un plato, con su viñeta de cubierto. */
.lista-carta { list-style: none; margin: 0; padding: 0; }
.lista-carta li {
  padding: 11px 0 11px 26px; border-bottom: 1px dashed var(--line);
  font-family: var(--display); font-weight: 600; font-size: 16px; position: relative;
}
.lista-carta li:last-child { border-bottom: 0; }
.lista-carta li::before { content: '✓'; position: absolute; left: 0; color: var(--accent-soft); }
.lista-carta.pendiente li { color: var(--muted); font-weight: 400; font-family: var(--body); }
.lista-carta.pendiente li::before { content: '·'; font-size: 22px; line-height: 1; top: 10px; }

.carta-pie {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line);
  text-align: center; color: var(--muted); font-size: 14px;
}

/* ---------- Argumento ---------- */
.why .wrap { max-width: 760px; }
.why h2 { font-size: clamp(23px, 3vw, 31px); margin: 0 0 18px; }
.why p { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.6; margin: 0; }

/* ---------- Precios ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plan {
  border: 1px solid var(--line); border-radius: 16px; padding: 26px;
  display: flex; flex-direction: column; background: var(--bg-2);
}
.plan.featured { background: var(--ink); color: #14181e; border-color: var(--ink); }
.plan.featured .plan-unit, .plan.featured .plan-d { color: #545d6b; }
.plan-name {
  font-family: var(--display); font-weight: 600; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 16px;
}
.plan-price { font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: -0.04em; line-height: 1; }
.plan-unit { color: var(--muted); font-size: 14px; margin: 8px 0 16px; }
.plan-base { opacity: .8; }
.plan-d { color: var(--muted); font-size: 15px; margin: 0 0 24px; flex: 1; }
.plan .btn { width: 100%; }
/* El plan destacado lleva el MISMO botón naranja que los demás. Con el botón
   oscuro sobre la tarjeta clara, el plan que queremos vender era el que menos
   llamaba: jerarquía al revés. */
.plan.featured .btn { background: var(--accent-btn); border-color: var(--accent-btn); color: #fff; }
.plan.featured .btn:hover { background: var(--accent); border-color: var(--accent); color: #1a1005; }
.price-note { color: var(--muted); font-size: 14px; margin-top: 22px; max-width: 62ch; }

/* ---------- Preguntas ---------- */
.faq-list { border-top: 1px solid var(--line); max-width: 800px; }
details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; display: flex; gap: 16px; align-items: baseline;
  font-family: var(--display); font-weight: 600; font-size: 16px; padding: 19px 0;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; margin-left: auto; color: var(--accent); font-size: 21px; line-height: 1; }
details[open] summary::after { content: '\2212'; }
details p { color: var(--muted); margin: -4px 0 19px; max-width: 66ch; }

/* ---------- Cierre ---------- */
.close { text-align: center; }
.close h2 { font-size: clamp(26px, 4vw, 40px); margin: 0 0 12px; }
.close p { color: var(--muted); max-width: 50ch; margin: 0 auto 28px; }
.close .cta-row { justify-content: center; }

footer.bottom { padding: 32px 0; color: var(--muted); font-size: 14px; }
footer.bottom .wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
footer.bottom a { color: var(--muted); text-decoration: none; }
footer.bottom a:hover { color: var(--ink); }
footer.bottom .sep { margin-left: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero .lead { max-width: 46ch; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .navlink { display: none; }
  section { padding: 56px 0; }
  .hero { padding: 44px 0 48px; }
  .wrap { padding: 0 18px; }
  .sec-head { margin-bottom: 32px; }
  .plato-desc { font-size: 14.5px; }
}
@media (max-width: 420px) {
  body { font-size: 16px; }
  .top .wrap { gap: 10px; }
  .top nav { gap: 10px; }
  .brand { font-size: 19px; }
  .brand img { height: 33px; }
  .top .btn { padding: 9px 13px; font-size: 13px; }
  .cta-row { gap: 10px; }
  .cta-note { width: 100%; }
}

/* A 320 px (un iPhone SE) la cabecera se salía 31 px: logo + idiomas + botón no
   caben. El botón se acorta y los idiomas se aprietan; ninguno desaparece,
   porque los dos son la razón de estar de la cabecera. */
@media (max-width: 360px) {
  .wrap { padding: 0 14px; }
  .top .wrap { gap: 8px; }
  .top nav { gap: 8px; }
  .brand { font-size: 18px; gap: 7px; }
  .brand img { height: 30px; }
  .carta-logo { height: 32px; }
  .langs { gap: 2px; font-size: 12px; }
  .langs a { padding: 3px 4px; }
  .top .btn { padding: 9px 11px; font-size: 12px; }
  .hero h1 { font-size: 30px; }
}
