/* Artfork: página de lista de espera. Mismos colores y tipografías que la app. */
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("assets/fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #f2e8d6;
  --paper: #ffffff;
  --ink: #2b241d;
  --ink-dim: #665d51;
  --line: #e9e1d3;
  --tomato: #c1440e;
  --tomato-ink: #b03c09;
  --sage: #5c6b3f;
  --sage-ink: #4f5d34;
  --sage-bg: #eef0e4;
  --error-bg: #fcebe1;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Como la app, la página es siempre clara por defecto (no sigue el tema del sistema). */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: var(--tomato-ink); }

:focus-visible {
  outline: 2px solid var(--tomato-ink);
  outline-offset: 2px;
}

.contenedor {
  width: min(100% - 32px, 980px);
  margin-inline: auto;
}

.cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 20px;
}

.marca {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
}

.marca img { width: 36px; height: 36px; }

.idiomas {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.idiomas a {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.idiomas a[aria-current="page"] {
  background: var(--tomato);
  color: #fff7ef;
}

.heroe {
  position: relative;
  display: grid;
  gap: 40px;
  padding-block: 28px 56px;
}

.heroe::before {
  content: "";
  position: absolute;
  inset: -40px -10% auto auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(193, 68, 14, 0.18), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.heroe > * { position: relative; z-index: 1; }

.etiqueta {
  margin: 0 0 8px;
  color: var(--tomato-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 7vw, 56px);
  line-height: 1.05;
}

.subtitulo {
  margin: 0 0 24px;
  max-width: 34rem;
  color: var(--ink-dim);
  font-size: 18px;
}

.formulario {
  display: grid;
  gap: 12px;
  max-width: 30rem;
}

.formulario label.campo {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.formulario input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.formulario input::placeholder { color: var(--ink-dim); opacity: 1; }

.consentimiento {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-dim);
}

.consentimiento input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--tomato);
}

.boton {
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--tomato);
  color: #fff7ef;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(193, 68, 14, 0.6);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), opacity 160ms var(--ease-out);
}

.boton:active { transform: scale(0.98); }
.boton:disabled { opacity: 0.6; cursor: default; }

@media (hover: hover) and (pointer: fine) {
  .boton:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -10px rgba(193, 68, 14, 0.65);
  }
}

.estado {
  min-height: 1.5em;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.estado[data-tipo="ok"] { color: var(--sage-ink); }
.estado[data-tipo="error"] { color: var(--tomato-ink); }

.nota { margin: 0; font-size: 13px; color: var(--ink-dim); }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Tarjeta de ejemplo que flota suavemente */
.vitrina { display: grid; place-items: center; }

.ficha {
  width: min(100%, 340px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 30px 60px -24px rgba(43, 36, 29, 0.35), 0 4px 10px rgba(43, 36, 29, 0.06);
  transform: rotate(-2deg);
  animation: flotar 6s ease-in-out infinite alternate;
}

@keyframes flotar {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-8px) rotate(-1deg); }
}

.ficha-panel {
  display: grid;
  place-items: center;
  height: 96px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--sage-bg);
  font-size: 44px;
}

.ficha h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
}

.kcal {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: var(--sage-bg);
  color: var(--sage-ink);
  font-variant-numeric: tabular-nums lining-nums;
}

.kcal strong { font-size: 32px; line-height: 1; }
.kcal span { font-size: 13px; font-weight: 700; color: var(--ink-dim); }

.macros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.macros div {
  padding: 8px 4px;
  border-radius: 10px;
  background: var(--sage-bg);
  text-align: center;
  font-variant-numeric: tabular-nums lining-nums;
}

.macros strong { display: block; font-size: 18px; color: var(--sage-ink); }
.macros span { font-size: 12px; color: var(--ink-dim); }

.ejemplo {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  text-align: center;
  color: var(--ink-dim);
}

.ventajas {
  display: grid;
  gap: 16px;
  padding-block: 8px 56px;
}

.ventaja {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 10px 24px -16px rgba(43, 36, 29, 0.3);
}

.ventaja h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
}

.ventaja p { margin: 0; color: var(--ink-dim); }

.pie {
  padding-block: 24px 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 13px;
}

.pie a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-dim);
}

/* Página de privacidad */
.texto { max-width: 42rem; padding-block: 16px 56px; }
.texto h1 { font-size: clamp(30px, 6vw, 42px); }
.texto h2 { margin: 28px 0 8px; font-family: var(--serif); font-weight: 600; font-size: 22px; }
.texto p, .texto li { color: var(--ink); }

.aviso {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--error-bg);
  color: var(--tomato-ink);
  font-weight: 600;
}

.pendiente {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--error-bg);
  color: var(--tomato-ink);
  font-weight: 700;
}

@media (min-width: 860px) {
  .heroe { grid-template-columns: 1.1fr 0.9fr; align-items: center; padding-block: 48px 72px; }
  .ventajas { grid-template-columns: repeat(3, 1fr); }
}

/* Entrada escalonada y flotación: solo transform y opacidad, nada que recalcule el diseño. */
@keyframes sube {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes entra {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.heroe > div:first-child > * { animation: sube 700ms var(--ease-out) both; }
.heroe > div:first-child > :nth-child(2) { animation-delay: 80ms; }
.heroe > div:first-child > :nth-child(3) { animation-delay: 160ms; }
.heroe > div:first-child > :nth-child(4) { animation-delay: 240ms; }

.vitrina { position: relative; animation: entra 900ms var(--ease-out) 200ms both; }

/* Sombra en el suelo que se encoge cuando la tarjeta sube. */
.vitrina::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: -26px;
  height: 18px;
  border-radius: 50%;
  background: rgba(43, 36, 29, 0.28);
  filter: blur(10px);
  animation: suelo 6s ease-in-out infinite alternate;
}

@keyframes suelo {
  from { transform: scaleX(1); opacity: 0.9; }
  to { transform: scaleX(0.82); opacity: 0.55; }
}

/* Dos etiquetas que flotan alrededor de la tarjeta, a otro ritmo para que no se muevan a la vez. */
.chip {
  position: absolute;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--sage-ink);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 12px 24px -14px rgba(43, 36, 29, 0.4);
  animation: flota-chip 5s ease-in-out infinite alternate;
}
.chip-a { top: 2%; right: 0; }
.chip-b { bottom: 8%; left: 0; animation-duration: 7s; animation-delay: -2s; }

@keyframes flota-chip {
  from { transform: translateY(0); }
  to { transform: translateY(-9px); }
}

.ventaja { animation: sube 700ms var(--ease-out) both; transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.ventaja:nth-child(1) { animation-delay: 420ms; }
.ventaja:nth-child(2) { animation-delay: 520ms; }
.ventaja:nth-child(3) { animation-delay: 620ms; }

@media (hover: hover) and (pointer: fine) {
  .ventaja:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 30px -16px rgba(43, 36, 29, 0.4);
  }
}

@media (max-width: 420px) {
  .chip-a { top: -4%; }
  .chip-b { bottom: 2%; }
}

@media (prefers-reduced-motion: reduce) {
  .ficha, .chip, .vitrina, .vitrina::after, .ventaja, .heroe > div:first-child > * { animation: none; }
  .boton, .ventaja { transition: none; }
}
