/*
 * Nevaria landing. Layout and aesthetic follow the current site (animated
 * hero gradient, translucent fixed bar, raised cards); colours are the
 * canonical brand values measured from the logo (docs/brand/design-tokens.md
 * section 1), never the stock palette the old page approximated them with.
 * System font stack: the old page loaded no font, and this one loads nothing
 * from a third party.
 */

:root {
  --negro: #000000;
  --dorado: #8C5A1E;
  --rosa: #F05AAA;
  --cian: #1EAABE;
  --azul: #1464AA;
  --amarillo: #FAC80A;
  --gris: #464646;
  /* White on #177A42 is 5.39:1 (WCAG AA); the lighter #1F8F4E was 4.12:1. */
  --verde-whatsapp: #177A42;
  --fondo-gris: #F5F6F7;
  --borde: #D0D4D8;
  --texto: #1F2328;
  --radio: 12px;
  --sombra: 0 10px 25px rgba(0, 0, 0, 0.08);
  --ancho: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

/* `hidden` always wins: without this, `.boton { display: inline-block }`
 * would show the hidden Reintentar and Consultar sin importe buttons. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--texto);
  line-height: 1.6;
  background: #FFFFFF;
}

img { max-width: 100%; height: auto; }

a { color: var(--azul); }

:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 3px;
}

.solo-lectores {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.saltar { position: absolute; left: -9999px; }
.saltar:focus { left: 16px; top: 16px; z-index: 100; background: #FFFFFF; padding: 8px 16px; }

/* Fixed, translucent bar, as on the current site. */
.barra {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.barra-interior {
  max-width: var(--ancho); margin: 0 auto; padding: 0 16px;
  height: 80px; display: flex; align-items: center; justify-content: space-between;
}
.barra-logo img { height: 64px; width: auto; display: block; }

.menu { list-style: none; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; }
.menu a { display: inline-block; padding: 8px 16px; border-radius: 8px; color: var(--texto); font-weight: 500; text-decoration: none; }
.menu a:hover { background: rgba(30, 170, 190, 0.1); color: var(--azul); }
.menu .boton-rosa { margin-left: 16px; }

.menu-boton { display: none; background: none; border: 0; padding: 12px; cursor: pointer; }
.menu-icono, .menu-icono::before, .menu-icono::after {
  display: block; width: 24px; height: 2px; background: var(--texto); position: relative;
}
.menu-icono::before, .menu-icono::after { content: ""; position: absolute; left: 0; }
.menu-icono::before { top: -7px; }
.menu-icono::after { top: 7px; }

/* Buttons. Text on the brand pink is black: white on #F05AAA stays under the
 * WCAG contrast minimum. */
.boton {
  display: inline-block; border: 2px solid transparent; border-radius: 10px;
  padding: 12px 24px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.boton-rosa { background: var(--rosa); color: var(--negro); }
.boton-rosa:hover { filter: brightness(0.95); }
.boton-blanco { background: #FFFFFF; color: var(--negro); border-radius: 999px; padding: 16px 32px; font-size: 1.125rem; box-shadow: var(--sombra); }
.boton-borde { background: #FFFFFF; color: var(--texto); border-color: var(--gris); }
.boton-verde { background: var(--verde-whatsapp); color: #FFFFFF; }
.menu .boton-rosa { color: var(--negro); }

/* Hero: the current site's animated gradient, in the brush colours. */
.hero {
  min-height: 100vh; padding: 112px 16px 64px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(135deg, var(--cian) 0%, var(--azul) 25%, var(--amarillo) 50%, var(--rosa) 75%, var(--cian) 100%);
  background-size: 400% 400%;
  animation: degradado 8s ease-in-out infinite;
}
@keyframes degradado {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
/* A dark scrim behind the hero text keeps the gradient around it while white
 * text stays readable: black at 0.45 over the lightest stop (amarillo
 * #FAC80A) gives 4.87:1, the worst case; cian 7.43, rosa 8.08, azul 12.19. */
.hero-interior {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 24px; padding: 32px 24px; max-width: 900px;
}
/* The current site's shimmer over the badge, drawn as a circle. The old one
 * swept a square box and showed as a square glow. Here the glint is the
 * background of a circle laid over the badge's disc, so it can never show
 * outside it, and the badge itself is never clipped: its brush strokes reach
 * past the disc. The disc, measured on the 2000px asset, is centred at
 * (978, 1019) with radius 936; the box below sits just inside it. */
.hero-insignia-marco { position: relative; display: block; width: 224px; max-width: 100%; margin: 0 auto 32px; }
.hero-insignia { width: 100%; height: auto; display: block; }
.hero-insignia-marco::after {
  content: ""; position: absolute; top: 4.45%; right: 4.6%; bottom: 2.55%; left: 2.4%;
  border-radius: 50%; pointer-events: none;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
  background-size: 300% 300%;
  opacity: 0;
}
/* The shimmer starts only once src/insignia.mjs marks the badge as loaded. */
.hero-insignia-marco.cargada::after { opacity: 1; animation: brillo 3s ease-in-out infinite; }
@keyframes brillo {
  from { background-position: 0% 100%; }
  to { background-position: 100% 0%; }
}
.hero h1 {
  margin: 0 0 24px; color: #FFFFFF; font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.hero-bajada { color: #FFFFFF; font-size: clamp(1.25rem, 3vw, 1.5rem); margin: 0 0 32px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45); }

/* Sections and cards. */
.seccion { padding: 80px 16px; }
.seccion > * { max-width: var(--ancho); margin-left: auto; margin-right: auto; }
.seccion-gris { background: var(--fondo-gris); }
.seccion h2 { font-size: 2.25rem; text-align: center; margin-top: 0; margin-bottom: 16px; }
.bajada { text-align: center; font-weight: 600; margin-bottom: 48px; }
.subtitulo { font-size: 2rem; text-align: center; margin: 64px auto 16px; }

.grilla { display: grid; gap: 32px; }
.grilla-2 { grid-template-columns: repeat(2, 1fr); }
.grilla-3 { grid-template-columns: repeat(3, 1fr); }

.tarjeta {
  background: #FFFFFF; border-radius: var(--radio); padding: 32px; box-shadow: var(--sombra);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tarjeta h3 { font-size: 1.5rem; margin: 0 0 16px; }
.tarjeta-cian { border-top: 6px solid var(--cian); }
.tarjeta-rosa { border-top: 6px solid var(--rosa); }
.tarjeta-amarilla { border-top: 6px solid var(--amarillo); }
.grilla-3 .tarjeta:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(30, 170, 190, 0.3); }
.grilla-3 .tarjeta-rosa:hover { box-shadow: 0 20px 40px rgba(240, 90, 170, 0.4); }
.grilla-3 .tarjeta-amarilla:hover { box-shadow: 0 20px 40px rgba(250, 200, 10, 0.4); }
.tarjeta-centro { text-align: center; }
.tarjeta-ancha { text-align: center; }
.tarjeta-ancha h2 { font-size: 1.875rem; }

.lista-check { list-style: none; padding: 0; margin: 0 0 16px; }
.lista-check li::before { content: "✓"; color: var(--cian); font-weight: 700; margin-right: 8px; }
.enlace-tarjeta { font-weight: 700; }
.proximamente {
  display: inline-block; margin: 0 0 16px; padding: 4px 16px; border-radius: 999px;
  background: var(--rosa); color: var(--negro); font-weight: 700;
}

/* Social links: one raised card per network, as on the current site. */
.redes { list-style: none; padding: 0; margin-bottom: 0; }
.red {
  display: flex; flex-direction: column; align-items: center; gap: 12px; height: 100%;
  color: var(--texto); font-size: 1.25rem; font-weight: 700; text-decoration: none;
}
.red svg { width: 64px; height: 64px; }
.red-instagram svg { color: var(--rosa); }
.red-tiktok svg { color: var(--negro); }
.red-youtube svg { color: #FF0000; }

/* Order form. */
.formulario { max-width: 768px; background: var(--fondo-gris); border-radius: var(--radio); padding: 32px; box-shadow: var(--sombra); }
.campo { margin-bottom: 24px; }
.campo label, legend { display: block; font-weight: 600; margin-bottom: 8px; }
input, textarea {
  width: 100%; font: inherit; padding: 12px 16px; border: 1px solid var(--borde); border-radius: 8px; background: #FFFFFF;
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #B00020; }
.productos-pedido { border: 1px solid var(--borde); border-radius: var(--radio); padding: 16px 24px; margin: 0 0 24px; }
.fila-producto { display: grid; grid-template-columns: 1fr 140px; gap: 16px; align-items: center; margin-bottom: 12px; }
.fila-producto label { font-weight: 500; }
.error { color: #B00020; font-weight: 600; margin: 8px 0 0; }
.nota { color: var(--gris); }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.estado:not(:empty) { border-left: 4px solid var(--azul); background: #FFFFFF; padding: 12px 16px; margin-bottom: 16px; }
.resumen { background: #FFFFFF; border-radius: var(--radio); padding: 24px; margin-bottom: 16px; }
.resumen table { width: 100%; border-collapse: collapse; }
.resumen th, .resumen td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--borde); }
.resumen .importe { text-align: right; white-space: nowrap; }
/* The restock-notice box: a native checkbox beside its label, never stretched
 * to the full width the text inputs take. */
.casilla { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.casilla input { flex: none; width: 24px; height: 24px; margin: 0; padding: 0; }
.casilla label { font-weight: 500; }
.aviso { font-size: 0.9375rem; background: #FFFFFF; border: 1px solid var(--borde); border-radius: 8px; padding: 12px 16px; }

/* Footer. The black layer at 0.35 keeps white text readable across the
 * gradient: 5.91:1 over cian (the worst case), 10.51:1 over azul. */
.pie {
  background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
    linear-gradient(135deg, var(--cian) 0%, var(--azul) 100%);
  color: #FFFFFF; padding: 48px 16px;
}
.pie-interior { max-width: var(--ancho); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.pie-interior img { height: 64px; width: auto; background: #FFFFFF; border-radius: 8px; padding: 4px 8px; }
.pie p { margin: 0 0 8px; text-align: right; }
.nota-pie { font-size: 0.875rem; }
.pie a { color: #FFFFFF; text-decoration: underline; }

.whatsapp-flotante {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--verde-whatsapp); color: #FFFFFF; box-shadow: var(--sombra);
  animation: latido 2s infinite;
}
@keyframes latido {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Without JavaScript the catalogue never loads: no "Cargando productos…". */
html:not(.con-js) #catalogo-estado { display: none; }

/* Single column below tablet width; the menu collapses behind its button
 * only when JavaScript is running (`con-js`), so it never becomes unreachable.
 * Without JavaScript the bar scrolls with the page and the menu is a plain
 * list inside it, so it never covers the content. */
@media (max-width: 768px) {
  .grilla-2, .grilla-3 { grid-template-columns: 1fr; }
  .con-js .menu-boton { display: block; }
  .menu { flex-direction: column; align-items: stretch; }
  .con-js .menu { position: absolute; top: 80px; left: 0; right: 0; background: #FFFFFF; padding: 8px 16px 16px; box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08); }
  .con-js .menu:not(.abierto) { display: none; }
  html:not(.con-js) .barra { position: static; }
  html:not(.con-js) .barra-interior { height: auto; flex-wrap: wrap; padding-bottom: 16px; }
  html:not(.con-js) .menu { width: 100%; }
  html:not(.con-js) .hero { padding-top: 64px; }
  .menu .boton-rosa { margin-left: 0; text-align: center; }
  .barra-interior { position: relative; }
  .seccion { padding: 56px 16px; }
  .formulario { padding: 20px; }
  .fila-producto { grid-template-columns: 1fr 110px; }
  .pie-interior { flex-direction: column; text-align: center; }
  .pie p { text-align: center; }
}

/* Visitors who ask for less motion get a still hero and a still button. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero, .whatsapp-flotante { animation: none; }
  .hero-insignia-marco::after { animation: none; display: none; }
  .hero-insignia-marco.cargada::after { animation: none; display: none; }
  .tarjeta { transition: none; }
  .grilla-3 .tarjeta:hover { transform: none; }
}
