/* ==========================================================================
   Eat (EatFitSN) — Landing page
   Valores tomados del Figma "Eat-UI" → página "Landing Page"
   ([WEB] 1280px y [MOBILE] 390px).

   1. Tokens (variables del Figma)
   2. Reset / base
   3. Tipografía y utilidades
   4. Componentes (botones, tags, media, hotspot, loader)
   5. Layout (header, footer)
   6. Secciones (hero, conoce, análisis, nosotros, divider, contacto)
   7. Animaciones / movimiento reducido
   ========================================================================== */

/* 1. Tokens
   ========================================================================== */
:root {
  /* Marca */
  --primary: #8ea65b;
  --secondary: #3c591e;
  --accent: #d58481;            /* Flor */
  --accent-ink: #a8524f;        /* Flor oscura para texto sobre fondo claro: 4.83:1 sobre #f5f5f5 (issue #141, QA A-21) */

  /* Escala de grises (Figma: gray-scale/*) */
  --dark: #0d0d0d;
  --gray-700: #616161;
  --gray-500: #9e9e9e;
  --gray-300: #e0e0e0;
  --gray-100: #f5f5f5;
  --light: #fafafa;

  /* Tags (Figma: neutrals/*) */
  --tag-gold: #a69c5b;
  --tag-pink: #a65b88;
  --tag-blue: #5b6ea6;
  --tag-brown: #a6795b;

  /* Tipografía (Figma: Headers / Body) */
  --ff-headers: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ff-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-h1: clamp(1.75rem, 1.6rem + 0.5vw, 2rem);      /* 32 */
  --fs-h2: clamp(1.5rem, 1.4rem + 0.4vw, 1.75rem);    /* 28 */
  --fs-h3: clamp(1.25rem, 1.15rem + 0.35vw, 1.5rem);  /* 24 */
  --fs-button: 1.125rem;                              /* 18 */
  --fs-body: 1rem;                                    /* 16 */
  --fs-caption: 0.875rem;                             /* 14 */

  /* Espaciado (múltiplos de 8 como en Figma) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-6: 3rem;
  --s-9: 4.5rem;
  --gutter: clamp(1.5rem, 10.55vw - 0.5rem, 8.4375rem);  /* 24px móvil → 135px escritorio */

  /* Efectos (Figma) */
  --shadow-drop: 0 4px 4px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 4px 4px rgb(0 0 0 / 0.25);
  --text-shadow: 0 4px 4px rgb(0 0 0 / 0.25);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-pill: 50px;

  --container: 63.125rem;   /* 1010px */
  --header-h: 6.1875rem;    /* 99px */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* 2. Reset / base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  min-height: 100vh;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: 1.4;
  color: var(--dark);
  background-color: var(--gray-100);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

p {
  text-wrap: pretty;
}

ul[role="list"] {
  list-style: none;
  padding: 0;
}

:focus-visible {
  /* Flor oscura: 4.8:1 sobre el header claro y 3.7:1 sobre negro (antes 2.59:1; issue #127, QA A-06) */
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}

/* 3. Tipografía y utilidades
   ========================================================================== */
.h1,
.h2,
.h3 {
  font-family: var(--ff-headers);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }

.container {
  width: min(100% - 3rem, var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: var(--s-1);
  left: var(--s-1);
  z-index: 200;
  padding: var(--s-1) var(--s-2);
  background: var(--light);
  color: var(--dark);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: none;
}

/* 4. Componentes
   ========================================================================== */

/* Botones (Figma: PrimaryBtn / SecondaryBtn — Active, Hover, OnPressed, Disabled) */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  padding: 1rem 1.5rem;
  font-family: var(--ff-body);
  font-size: var(--fs-button);
  font-weight: 600;
  line-height: 1.36;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: var(--text-shadow);
  color: var(--dark);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-drop);
  overflow: hidden;
  transition: box-shadow 0.2s, border-width 0.15s, transform 0.2s var(--ease-out);
}

.btn svg {
  flex: none;
  filter: drop-shadow(var(--text-shadow));
}

/* Capa negra para los estados Hover (20 %) y OnPressed (40 %), igual que en Figma */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #000;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover::after { opacity: 0.2; }

.btn:active {
  box-shadow: var(--shadow-inner);
  text-shadow: none;
  transform: translateY(1px);
}

.btn:active::after { opacity: 0.4; }

.btn--primary {
  min-width: 11.625rem; /* 186px */
  background-color: var(--primary);
}

.btn--secondary {
  border-color: var(--secondary);
  background-color: transparent;
}

.btn--secondary:hover {
  border-width: 3px;
  padding: calc(1rem - 1px) calc(1.5rem - 1px);
}

.btn[aria-disabled="true"],
.btn:disabled {
  pointer-events: none;
  color: var(--gray-700);
  text-shadow: none;
}

.btn--primary[aria-disabled="true"],
.btn--primary:disabled {
  background-color: var(--gray-500);
}

.btn--secondary[aria-disabled="true"],
.btn--secondary:disabled {
  border-color: var(--gray-500);
}

/* Tags (Figma: Tag) */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.tag {
  padding: 0.25rem 1rem;
  font-size: var(--fs-caption);
  border-radius: var(--radius-sm);
}

.tag--gold  { background-color: var(--tag-gold);  color: var(--dark); }
.tag--pink  { background-color: var(--tag-pink);  color: var(--light); }
.tag--blue  { background-color: var(--tag-blue);  color: var(--light); }
.tag--brown { background-color: var(--tag-brown); color: var(--dark); }

/* Media + placeholder (patrón de cuadros, como en Figma) mientras faltan fotos */
.media {
  position: relative;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media.is-missing {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, var(--gray-300) 25%, transparent 25%),
    linear-gradient(-45deg, var(--gray-300) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--gray-300) 75%),
    linear-gradient(-45deg, transparent 75%, var(--gray-300) 75%);
  background-size: 32px 32px;
  background-position: 0 0, 0 16px, 16px -16px, -16px 0;
}

.media.is-missing img {
  visibility: hidden;
}

/* Hotspot: el círculo blanco (Figma: Ellipse 1 / 2) que revela un dato curioso
   (Figma: "Dato" / "DatoChamp") al hacer scroll, al pasar el cursor o al tocarlo. */
.hotspot {
  position: absolute;
  z-index: 3;
  --ring: 5.125rem;    /* 82px */
  --line-w: 15.0625rem;/* 241px */
  --line-h: 1.375rem;  /* 22px */
  --fact-w: 19rem;     /* 304px */
  --draw: 0.7s;
}

.hotspot__ring {
  position: relative;
  display: block;
  width: var(--ring);
  aspect-ratio: 1;
  padding: 0;
  background: transparent;
  border: 2px solid var(--gray-100);
  border-radius: 50%;
  transition: transform 0.4s var(--ease-out), background-color 0.4s;
}

/* Punto central que "se enciende" */
.hotspot__ring::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18%;
  aspect-ratio: 1;
  background: var(--gray-100);
  border-radius: 50%;
  scale: 0;
  transition: scale 0.4s var(--ease-out);
}

/* Onda que late mientras el dato está oculto: invita a interactuar */
.hotspot__ring::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid var(--gray-100);
  border-radius: 50%;
  opacity: 0;
  /* 2 latidos (≈5 s) y se detiene: sin movimiento infinito (issue #148, QA A-31; WCAG 2.2.2) */
  animation: ripple 2.4s var(--ease-out) 2;
}

.hotspot__ring:hover {
  transform: scale(1.06);
}

.hotspot__line {
  position: absolute;
  pointer-events: none;
}

.hotspot__line::after {
  /* Punto final de la línea (Figma: Vector 1 termina en un círculo) */
  content: "";
  position: absolute;
  width: 0.6875rem;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 50%;
}

.hotspot__fact {
  position: absolute;
  width: var(--fact-w);
  font-size: var(--fs-caption);
  line-height: 1.36;
  color: #fff;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.6);
  pointer-events: none;
}

/* Papa: línea en "L" hacia la derecha y el texto a su lado */
.hotspot--potato .hotspot__line {
  left: calc(var(--ring) - 2px);
  top: calc(var(--ring) / 2 - var(--line-h));
  width: var(--line-w);
  height: var(--line-h);
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom-left-radius: 0;
  clip-path: inset(0 100% 0 0);
}

.hotspot--potato .hotspot__line::after {
  right: -0.3rem;
  bottom: -0.4rem;
}

.hotspot--potato .hotspot__fact {
  left: calc(var(--ring) + var(--line-w) + 0.6rem);
  top: calc(var(--ring) / 2 - var(--line-h) - 0.25rem);
}

/* Champiñón: línea vertical hacia abajo y el texto centrado debajo */
.hotspot--mushroom {
  --ring: 3rem;        /* 48px */
  --line-h: 4.625rem;  /* 74px */
}

.hotspot--mushroom .hotspot__line {
  left: 50%;
  top: var(--ring);
  width: 2px;
  height: var(--line-h);
  translate: -50% 0;
  background: #fff;
  clip-path: inset(0 0 100% 0);
}

.hotspot--mushroom .hotspot__line::after {
  left: 50%;
  bottom: -0.3rem;
  translate: -50% 0;
}

.hotspot--mushroom .hotspot__fact {
  left: 50%;
  top: calc(var(--ring) + var(--line-h) + 0.625rem);
  translate: -50% 0;
  text-align: center;
}

/* Estado oculto (solo con JS; sin JS el dato se ve siempre) */
.js .hotspot__fact {
  opacity: 0;
  transform: translateY(0.5rem);
  filter: blur(4px);
  transition: opacity 0.5s, transform 0.6s var(--ease-out), filter 0.5s;
}

.js .hotspot__line {
  transition: clip-path var(--draw) var(--ease-out);
}

html:not(.js) .hotspot__line { clip-path: none; }

/* Estado activo */
.hotspot.is-active .hotspot__ring::before { scale: 1; }
.hotspot.is-active .hotspot__ring::after { animation: none; }
.hotspot.is-active .hotspot__ring { background-color: rgb(255 255 255 / 0.08); }
.hotspot.is-active .hotspot__line { clip-path: inset(0 -1rem -1rem 0); }

.hotspot.is-active .hotspot__fact {
  opacity: 1;
  transform: none;
  filter: none;
  transition-delay: calc(var(--draw) * 0.6);
}

/* Pantalla de carga (Figma: Loading 1–4) */
.loader {
  display: none;
}

.js .loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--dark);
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

.loader__flor {
  width: clamp(8rem, 20vw, 15.75rem);
  animation: breathe 1.6s ease-in-out infinite;
}

.is-loaded .loader {
  opacity: 0;
  visibility: hidden;
}

/* 5. Layout
   ========================================================================== */

/* Header (Figma: TopMenu) ---------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

.site-header.is-scrolled {
  background-color: rgb(245 245 245 / 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.06), 0 8px 24px -16px rgb(0 0 0 / 0.4);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: var(--header-h);
  padding: 1.3125rem 2rem;
  transition: min-height 0.3s var(--ease-out), padding 0.3s var(--ease-out);
}

.is-scrolled .site-header__inner {
  min-height: 4.5rem;
  padding-block: 0.5rem;
}

.site-header__brand img {
  width: 3.3125rem; /* 53px */
  transition: transform 0.3s var(--ease-out);
}

.site-header__brand:hover img {
  transform: rotate(-8deg) scale(1.06);
}

.site-nav__logo {
  display: none;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

/* Figma: Section (Default / Selected) */
.site-nav__link {
  position: relative;
  display: block;
  padding: 0.5rem 1rem;
  font-size: var(--fs-button);
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dark);
  transition: color 0.2s, background-color 0.2s;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-out);
}

.site-nav__link:hover,
.site-nav__link[aria-current="true"] {
  /* El rosa original (#d58481) daba 2.59:1 sobre el fondo claro del menú; la línea de abajo sigue en rosa */
  color: var(--accent-ink);
}

.site-nav__link:hover::after,
.site-nav__link[aria-current="true"]::after {
  transform: scaleX(1);
}

.site-nav__link,
.site-nav .btn {
  white-space: nowrap;
}

/* Tablet / laptop chica: el menú se compacta para que quepan los 4 enlaces */
@media (min-width: 48rem) and (max-width: 75rem) {
  .site-header__inner { padding-inline: 1.5rem; }
  .site-nav__list { gap: 0.25rem; }
  .site-nav__link { font-size: 0.875rem; padding-inline: 0.5rem; }
  .site-nav .btn { font-size: 0.875rem; padding: 0.625rem 1rem; }
  .site-nav .btn--secondary:hover { padding: calc(0.625rem - 1px) calc(1rem - 1px); }
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.375rem;
  padding: 0;
  background: none;
  border: 0;
  color: #1c1b1f;
}

.nav-toggle__close { display: none; }

@media (max-width: 47.99rem) {
  .site-header__inner {
    justify-content: flex-start;
    min-height: 5rem;
    padding: 1.5rem;
  }

  .is-scrolled .site-header__inner {
    min-height: 4rem;
  }

  .nav-toggle {
    position: relative;
    z-index: 2;
    display: grid;
  }

  .site-header__brand {
    position: relative;
    z-index: 2;
  }

  .site-header__brand img {
    width: 2.9375rem; /* 47px */
  }

  /* Figma: [MOBILE] Menu — capa oscura a pantalla completa */
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: var(--s-6);
    padding: 6rem 1.5rem 3rem;
    background-color: rgb(13 13 13 / 0.9);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .site-nav__logo {
    display: block;
    width: min(100%, 21.375rem);
    opacity: 0.85;
    filter: brightness(0.8);
  }

  .site-nav__list {
    flex-direction: column;
    gap: var(--s-3);
  }

  .site-nav__link {
    color: var(--gray-100);
    font-size: 1.25rem;
  }

  /* Menú de celular (fondo negro): ahí el rosa original sí contrasta (6.89:1) */
  .site-nav__link:hover,
  .site-nav__link[aria-current="true"] {
    color: var(--accent);
  }

  .site-nav .btn--secondary {
    color: var(--gray-100);
    border-color: var(--primary);
  }

  .site-nav li {
    opacity: 0;
    translate: 0 0.75rem;
    transition: opacity 0.4s, translate 0.4s var(--ease-out);
  }

  .site-nav.is-open li {
    opacity: 1;
    translate: none;
  }

  .site-nav.is-open li:nth-child(2) { transition-delay: 0.05s; }
  .site-nav.is-open li:nth-child(3) { transition-delay: 0.1s; }
  .site-nav.is-open li:nth-child(4) { transition-delay: 0.15s; }

  .is-menu-open .nav-toggle { color: var(--gray-100); }
  .is-menu-open .nav-toggle__open { display: none; }
  .is-menu-open .nav-toggle__close { display: block; }
  .is-menu-open.site-header { background: none; box-shadow: none; backdrop-filter: none; }

  /* Sin JS, el menú queda visible como lista normal */
  html:not(.js) .site-nav {
    position: static;
    opacity: 1;
    visibility: visible;
    background: none;
    padding: 0;
  }

  html:not(.js) .site-nav li { opacity: 1; translate: none; }
  html:not(.js) .site-nav__logo { display: none; }
}

/* Footer --------------------------------------------------------------- */
.site-footer {
  display: grid;
  justify-items: center;
  gap: var(--s-4);
  padding: 3rem 2rem 1.875rem;
  background-color: var(--dark);
  color: var(--light);
  text-align: center;
}

.site-footer__brand img {
  width: 4.9375rem; /* 79px */
}

.site-footer__tagline {
  max-width: 37.375rem;
}

.site-footer__bottom {
  justify-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  margin-top: 3rem;
  font-size: var(--fs-caption);
}

.site-footer__social {
  display: flex;
  gap: var(--s-2);
}

.site-footer__social a {
  /* Área de toque de 44×44 aunque el ícono mida 24 (issue #94, QA R-20) */
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--light);
  transition: color 0.2s, transform 0.2s var(--ease-out);
}

.site-footer__social a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

@media (max-width: 47.99rem) {
  .site-footer {
    gap: var(--s-3);
    padding: 3.875rem 1.5rem 1.5rem;
  }

  .site-footer__brand img {
    width: 2.6875rem;
  }

  .site-footer__bottom {
    flex-direction: column-reverse;
    margin-top: 0;
  }
}

/* 6. Secciones
   ========================================================================== */

/* Fondos fotográficos compartidos */
.hero__bg,
.conoce__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__bg img,
.conoce__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  height: clamp(40rem, 85.78vw, 75rem);   /* 1098 / 1280 */
  overflow: hidden;
  background: #2a2117;
}

.hero::after {
  /* Figma: degradado 72.5 % → negro 80 % */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, transparent 72.5%, rgb(0 0 0 / 0.8));
  pointer-events: none;
}

.hero__title {
  position: absolute;
  top: 14.3%;          /* 157 / 1098 */
  inset-inline: 0;
  display: flex;
  justify-content: center;
}

.hero__logo {
  width: clamp(16.5rem, 32.8vw, 30rem); /* 420px a 1280 */
}

.hero__potato {
  position: absolute;
  left: 14.14%;        /* 181 / 1280 */
  top: 65.75%;         /* 722 / 1098 */
  width: clamp(10rem, 23.44vw, 21rem); /* 300px */
}

.hero__potato img {
  width: 100%;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0.75rem 1.25rem rgb(0 0 0 / 0.45));
}

.hotspot--potato {
  left: 108.7%;        /* (507 − 181) / 300 */
  top: 36.3%;          /* (831 − 722) / 300 */
  /* En tablet el dato se salía por la derecha (768 px: hasta 939; 1024 px: hasta 1040) y no se
     podía leer (issue #144, QA A-25). El anillo queda en ≈39 % del ancho, así que la línea se acorta
     y, si aún no cabe, el texto se angosta. En escritorio (≥ 1280 px) queda igual que en Figma. */
  --line-w: clamp(2.5rem, 60vw - 26rem, 15.0625rem);
  --fact-w: min(19rem, 60vw - 7rem - var(--line-w));
}

/* Conoce --------------------------------------------------------------- */
.conoce {
  position: relative;
  isolation: isolate;
  height: clamp(42rem, 84.45vw, 74rem);   /* 1081 / 1280 */
  overflow: hidden;
  color: var(--gray-100);
  background: var(--dark);
}

.conoce::before {
  /* Figma: negro 80 % → transparente al 8.8 % (continúa el fundido del hero) */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgb(0 0 0 / 0.8), transparent 8.8%);
  pointer-events: none;
}

.conoce__inner {
  position: relative;
  height: 100%;
}

.conoce__text {
  position: absolute;
  left: var(--gutter);
  top: 38.6%;          /* 417 / 1081 */
  width: min(24.5rem, 40vw);  /* 392px */
}

.conoce__text .h1 {
  color: #fff;
  margin-bottom: var(--s-4);
}

.conoce__text p {
  text-align: justify;
}

.conoce__mushroom {
  position: absolute;
  left: 69.06%;        /* 884 / 1280 */
  top: 34.7%;          /* 375 / 1081 */
  width: clamp(8rem, 19.22vw, 17rem); /* 246px */
}

.conoce__mushroom img {
  width: 100%;
  mix-blend-mode: screen;
}

.hotspot--mushroom {
  left: 50%;
  top: 95%;            /* (1762 − 1473) / 304 */
  translate: -50% 0;
}

/* Análisis de datos ---------------------------------------------------- */
.analisis {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: 7.875rem 8rem;  /* 126px arriba */
  text-align: center;
  background-color: #eef1ee;
}

.analisis__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleY(-1); /* Figma: Rectangle 10 está volteado */
}

.analisis::after {
  /* Figma: Rectangle 11 — fundido hacia el gris de Nosotros */
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 6.125rem;
  background: linear-gradient(to bottom, rgb(255 255 255 / 0), var(--gray-100) 45%);
}

.analisis__body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Orden visual del diseño: intro → carrusel → encabezado */
.analisis__intro  { order: 1; }
.carousel         { order: 2; }
.analisis__header { order: 3; }

.analisis__intro {
  display: grid;
  justify-items: center;
  gap: 3.5rem;
  width: min(100% - 3rem, 41.1875rem); /* 659px */
}

.analisis__lead {
  font-style: italic;
}

/* Mientras el carrusel está oculto, más aire entre el botón y el título */
.analisis__body:has(.carousel[hidden]) .analisis__header {
  margin-top: 5rem;
}

.analisis__header {
  display: grid;
  gap: var(--s-4);
  width: min(100% - 3rem, 37.375rem); /* 598px */
  margin-top: 2.75rem;
}

/* Carrusel (centro 598×435, laterales 463×337 — Figma) ------------------ */
.carousel {
  position: relative;
  width: 100%;
  margin-top: 3.5rem;
}

.carousel__track {
  --slide-w: min(46.72vw, 37.375rem);   /* 598px */
  --side-scale: 0.7742;                 /* 463 / 598 */
  --gap: 1.25rem;
  display: flex;
  gap: var(--gap);
  padding-block: var(--s-2);
  padding-inline: calc((100% - var(--slide-w)) / 2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__slide {
  flex: 0 0 var(--slide-w);
  scroll-snap-align: center;
}

/* La escala va en el contenido (no en la diapositiva) para no alterar el scroll-snap */
.carousel__slide .media {
  aspect-ratio: 598 / 435;
  overflow: hidden;
  background-color: var(--gray-300);
  transform: scale(var(--side-scale));
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s;
}

/* Las laterales se pegan al centro (como en el diseño) */
.carousel__slide.is-prev .media { transform-origin: right center; }
.carousel__slide.is-next .media { transform-origin: left center; }
.carousel__slide.is-active .media { transform: none; }

.carousel__slide.is-active .media {
  box-shadow: var(--shadow-drop);
}

.carousel__controls {
  display: flex;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-2);
}

/* Figma: SecondaryBtn XS (botón circular) */
.carousel__btn {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: rgb(245 245 245 / 0.6);
  border: 2px solid var(--secondary);
  border-radius: 50%;
  box-shadow: var(--shadow-drop);
  overflow: hidden;
  transition: opacity 0.2s;
}

.carousel__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #000;
  opacity: 0;
  transition: opacity 0.2s;
}

.carousel__btn:hover::after { opacity: 0.2; }
.carousel__btn:active { box-shadow: var(--shadow-inner); }
.carousel__btn:active::after { opacity: 0.4; }

.carousel__btn:disabled {
  border-color: var(--gray-500);
  color: var(--gray-700);
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 47.99rem) {
  .analisis {
    padding-block: 6rem 6rem;
  }

  .analisis__intro {
    gap: var(--s-3);
  }

  .carousel {
    margin-top: 3rem;
  }

  .carousel__track {
    --slide-w: min(63vw, 15.375rem);  /* 246px */
    --side-scale: 0.78;
    --gap: 1.75rem;
  }

  .carousel__slide .media {
    aspect-ratio: 246 / 430;
  }

  .analisis__header {
    margin-top: 2.5rem;
  }
}

/* Nosotros ------------------------------------------------------------- */
.nosotros {
  padding-bottom: 4rem;
  background-color: var(--gray-100);
}

.foods[role="list"] {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  padding: 0 8.75vw 0 10.3vw;  /* avocado en x=132, huevo termina en x=1168 */
  margin-top: -3rem;   /* se superpone al fundido como en Figma */
  margin-bottom: 4.75rem;
}

.foods__item {
  width: min(100%, 15rem);
  display: grid;
  justify-items: center;
  gap: var(--s-2);
}

.foods__item--almond { justify-self: center; }
.foods__item--egg    { justify-self: end; }

/* Mismo alto para las tres imágenes → las fichas quedan alineadas */
.foods__media {
  display: grid;
  place-items: center;
  height: 16.625rem;  /* 266px */
}

.foods__media img {
  mix-blend-mode: darken;
  /* Flota solo mientras la persona pasa el cursor o el foco por el alimento (issue #148, WCAG 2.2.2) */
  animation: float 6s ease-in-out infinite;
  animation-play-state: paused;
}

.foods__item:hover .foods__media img,
.foods__item:focus-within .foods__media img {
  animation-play-state: running;
}

.foods__item--avocado .foods__media img,
.foods__item--egg .foods__media img { width: 13.0625rem; }      /* 209px */
.foods__item--almond .foods__media img { width: 7.125rem; animation-delay: -2s; } /* 114px */
.foods__item--egg .foods__media img { animation-delay: -4s; }

/* Ficha nutricional */
.food-card {
  display: grid;
  justify-items: center;
  gap: 0.375rem;
  width: 100%;
  text-align: center;
}

.food-card__name {
  font-family: var(--ff-headers);
  font-size: var(--fs-body);
  font-weight: 600;
}

.food-card__kcal {
  font-family: var(--ff-headers);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.1;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}

.food-card__kcal span {
  display: inline-block;
  min-width: 3ch;
  text-align: right;
}

.macro-bar {
  display: flex;
  gap: 2px;
  width: 100%;
  height: 0.5rem;
  margin-block: 0.375rem 0.125rem;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--gray-300);
}

.macro-bar__seg {
  flex: var(--v) 0 0;
  transform-origin: left;
}

.macro-bar__seg--p, .foods__key--p::before { background: var(--tag-pink); }
.macro-bar__seg--g, .foods__key--g::before { background: var(--tag-gold); }
.macro-bar__seg--c, .foods__key--c::before { background: var(--tag-blue); }

.food-card__macros {
  display: flex;
  justify-content: center;
  gap: var(--s-2);
  font-size: 0.75rem;
  color: var(--gray-700);
}

.food-card__macros dd {
  margin: 0;
  font-weight: 600;
  color: var(--dark);
}

.food-card__fact {
  max-width: 15rem;
  margin-top: 0.25rem;
  font-size: var(--fs-caption);
  color: var(--gray-700);
}

.foods__note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--s-1) var(--s-3);
  padding-inline: 1.5rem;
  margin: -2.25rem auto 4.75rem;
  font-size: 0.75rem;
  color: var(--gray-700);
}

.foods__key {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.foods__key::before {
  content: "";
  width: 0.625rem;
  aspect-ratio: 1;
  border-radius: 2px;
}

/* Animación al entrar en pantalla: la barra crece y las kcal cuentan hacia arriba (main.js) */
.js .foods__item .macro-bar__seg {
  transform: scaleX(0);
  transition: transform 0.9s var(--ease-out);
}

.js .foods__item.is-visible .macro-bar__seg { transform: none; }
.js .foods__item.is-visible .macro-bar__seg--g { transition-delay: 0.15s; }
.js .foods__item.is-visible .macro-bar__seg--c { transition-delay: 0.3s; }
.foods__item--almond.reveal { transition-delay: 0.12s; }
.foods__item--egg.reveal    { transition-delay: 0.24s; }

.nosotros__header {
  margin-bottom: var(--s-4);
}

.nosotros__header .h1 {
  text-align: center;
  margin-bottom: var(--s-4);
}

/* Folder de equipo (Figma: Folder) */
.folder {
  filter: drop-shadow(0 4px 2px rgb(0 0 0 / 0.25));
}

.folder__tabs {
  display: flex;
  padding-left: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.folder__tab {
  position: relative;
  flex: none;
  padding: 0.3125rem 1rem;
  margin-right: -0.4rem;   /* las pestañas se enciman como en Figma */
  font-size: var(--fs-caption);
  color: var(--dark);
  background-color: var(--gray-500);
  border: 0;
  border-top: 1px solid #000;
  border-right: 1px solid #000;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: background-color 0.2s, translate 0.2s var(--ease-out);
}

.folder__tab:hover {
  background-color: #b5b5b5;
  translate: 0 -2px;
}

.folder__tab[aria-selected="true"] {
  z-index: 1;
  background-color: var(--gray-300);
  border-color: transparent;
}

.folder__tab:nth-child(1) { z-index: 4; }
.folder__tab:nth-child(2) { z-index: 3; }
.folder__tab:nth-child(3) { z-index: 2; }
.folder__tab:nth-child(4) { z-index: 1; }
.folder__tab[aria-selected="true"] { z-index: 5; }

.folder__panel {
  display: grid;
  grid-template-columns: minmax(0, 33rem) minmax(10rem, 16.9375rem); /* 528 / 271 */
  justify-content: space-between;
  gap: var(--s-9);
  min-height: 33.6875rem;  /* 539px */
  padding: var(--s-9);
  background-color: var(--gray-300);
  border-radius: var(--radius-md);
}

.folder__panel:first-of-type {
  border-top-left-radius: 0;
}

.folder__panel[hidden] {
  display: none;
}

.folder__panel:not([hidden]) {
  animation: panel-in 0.45s var(--ease-out);
}

.folder__panel:focus-visible {
  outline-offset: -3px;
}

.folder__content {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.folder__bio {
  flex: 1;
  text-align: justify;
}

.folder__photo {
  min-height: 15rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

/* Las fotos del equipo son verticales; se encuadra en la cara */
.folder__photo img {
  object-position: 50% 22%;
}

@media (max-width: 47.99rem) {
  .foods {
    margin-top: -1rem;
    margin-bottom: 3rem;
  }

  .folder__tabs {
    padding-left: 0.5rem;
  }

  .folder__tab {
    min-width: 2.75rem;
    padding-inline: 0.875rem;
  }

  /* En móvil las pestañas inactivas muestran solo el número para que quepan */
  .folder__tab:not([aria-selected="true"]) .folder__tab-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .folder__panel {
    grid-template-columns: 1fr;
    gap: var(--s-4);
    padding: var(--s-3);
    min-height: 0;
  }

  .folder__photo {
    order: -1;
    aspect-ratio: 278 / 222;
    min-height: 0;
  }
}

/* Separador de trigo --------------------------------------------------- */
.divider {
  display: flex;
  justify-content: space-between;
  padding-block: 1.5rem 3rem;
  background-color: var(--gray-100);
  overflow: hidden;
}

.divider__img {
  width: min(41.17%, 32.9375rem);  /* 527px */
}

.divider__img img {
  width: 100%;
  mix-blend-mode: darken;
}

.divider__img--right {
  transform: scaleX(-1);
}

/* Contacto ------------------------------------------------------------- */
.contacto {
  padding-block: 2.5rem 4.25rem;
  text-align: center;
  background-color: var(--gray-100);
}

.contacto .container {
  display: grid;
  justify-items: center;
  gap: var(--s-6);
}

.contacto .h1 {
  margin-bottom: -0.5rem;
}

.contacto .btn {
  margin-top: 1rem;
}

/* ---------------------------------------------------------------------- */
/* Móvil: composición del [MOBILE] Landing Page                           */
/* ---------------------------------------------------------------------- */
@media (max-width: 47.99rem) {
  .hero {
    height: max(100svh, 40rem);
    max-height: 54.25rem;   /* 868px */
  }

  /* La versión móvil ya viene recortada alrededor del 55 % del original (issue #98) */
  .hero__bg img {
    object-position: center;
  }

  .hero__title {
    top: 17.2%;   /* 149 / 868 */
  }

  .hero__logo {
    width: min(67.7vw, 16.5rem); /* 264px */
  }

  .hero__potato {
    left: 8%;
    top: auto;
    bottom: 9%;
    width: 8.5rem;
  }

  .conoce {
    height: auto;
    min-height: 64.625rem;  /* 1034px */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .conoce__inner {
    height: auto;
    position: static;
    padding: 0 1.5rem 9rem;
  }

  .conoce__text {
    position: static;
    width: auto;
  }

  .conoce__text .h1 {
    text-align: center;
  }

  /* El [MOBILE] del Figma no incluye papa, hongo ni alimentos */
  .hero__potato,
  .conoce__mushroom {
    display: none;
  }

  /* Fichas en móvil: una debajo de otra, imagen a la izquierda */
  .foods[role="list"] {
    grid-template-columns: 1fr;
    gap: var(--s-4);
    padding: 0 1.5rem;
    margin-top: 0;
  }

  .foods__item,
  .foods__item--almond,
  .foods__item--egg {
    width: 100%;
    justify-self: stretch;
    grid-template-columns: 6.5rem 1fr;
    align-items: center;
    gap: var(--s-3);
  }

  .foods__media { height: 7rem; }
  .foods__item--avocado .foods__media img,
  .foods__item--egg .foods__media img { width: 5.5rem; }
  .foods__item--almond .foods__media img { width: 3.5rem; }

  .food-card { justify-items: start; text-align: left; }
  .food-card__macros { justify-content: flex-start; gap: var(--s-1) var(--s-2); flex-wrap: wrap; }

  .foods__note { margin: var(--s-4) auto 0; }

  .nosotros {
    padding-top: 2rem;
  }

  .contacto .container {
    gap: var(--s-3);
  }

  .contacto .btn {
    margin-top: 0.75rem;
  }

  .nosotros__header p {
    text-align: justify;
  }
}

/* 7. Animaciones
   ========================================================================== */
@keyframes ripple {
  0%   { opacity: 0.7; scale: 1; }
  80%, 100% { opacity: 0; scale: 1.6; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.55; scale: 0.96; }
  50%      { opacity: 1;    scale: 1; }
}

@keyframes float {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50%      { translate: 0 -0.5rem; rotate: -1.5deg; }
}

@keyframes panel-in {
  from { opacity: 0; translate: 0 0.5rem; }
  to   { opacity: 1; translate: none; }
}

/* Revelado al hacer scroll: solo si hay JS (las clases las pone main.js) */
.js .reveal {
  opacity: 0;
  translate: 0 1.5rem;
  transition: opacity 0.8s var(--ease-out), translate 0.8s var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  translate: none;
}

/* Parallax: main.js escribe --py en cada elemento con data-parallax */
[data-parallax] {
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .js .reveal {
    opacity: 1;
    translate: none;
  }

  [data-parallax] {
    transform: none;
  }

  .hotspot__ring::after {
    display: none;
  }

  .carousel__track {
    scroll-behavior: auto;
  }
}

/* Demo interactivo (sustituye al carrusel de capturas) ----------------- */
.analisis .demo   { order: 2; }

.demo {
  display: grid;
  justify-items: center;
  gap: var(--s-2);
  width: min(100% - 3rem, 56rem);
  margin-top: 3.5rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.demo__frame {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: var(--dark);
  box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.25), var(--shadow-drop);
}

.demo__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding-inline: 0.875rem;
  background: #1f1f1f;
}

.demo__dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--gray-700);
}

.demo__dot:first-child { background: var(--accent); }
.demo__dot:nth-child(2) { background: var(--tag-gold); }
.demo__dot:nth-child(3) { background: var(--primary); }

.demo__url {
  flex: 1;
  margin-inline: 0.75rem 3rem;
  padding: 0.15rem 0.75rem;
  font-size: 0.75rem;
  color: var(--gray-500);
  background: #2b2b2b;
  border-radius: var(--radius-pill);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.demo__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--dark);
}

.demo__screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--light);
}

.demo__poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--s-2);
  padding: var(--s-4);
  color: var(--gray-100);
  background:
    radial-gradient(circle at 80% 15%, rgb(213 132 129 / 0.35), transparent 45%),
    linear-gradient(140deg, var(--secondary), #1b2a0e 70%);
}

.demo__logo {
  width: clamp(8rem, 18vw, 12rem);
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.demo__kicker {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.demo__title {
  color: var(--light);
}

.demo__text {
  max-width: 30rem;
  margin-bottom: var(--s-1);
  color: rgb(245 245 245 / 0.8);
}

.demo__external {
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--secondary);
}

@media (max-width: 47.99rem) {
  /* En celular el demo se abre en otra pestaña: la "pantalla" solo muestra la portada */
  .demo__screen { aspect-ratio: auto; }
  .demo__poster { position: static; padding: var(--s-6) var(--s-3); }
  .demo__url { margin-inline-end: 0; }
}

/* Página 404
   ========================================================================== */
.error-page {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--s-3);
  padding: var(--s-6);
  text-align: center;
  color: var(--gray-100);
  background: var(--dark);
}

.error-page img {
  width: 12rem;
}

.error-page p {
  color: rgb(245 245 245 / 0.7);
  margin-bottom: var(--s-2);
}
