/* ==========================================================================
   Agroveterinaria Del Valle — hoja de estilos única
   Capas: reset → tokens → base → layout → components → motion → utilities
   Referencia: design_handoff_agroveterinaria/README.md + Rediseño.dc.html
   Breakpoints: móvil < 820px (base) · escritorio ≥ 820px · contenedor 1240px
   ========================================================================== */
@layer reset, tokens, base, layout, components, motion, utilities;

/* --------------------------------------------------------------------------
   Fuentes (self-hosted, SIL OFL)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/bricolage-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/lexend-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/lexend-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Respaldos con métricas ajustadas: reducen el salto (CLS) durante el swap */
@font-face {
  font-family: "Lexend Fallback";
  src: local("Arial"), local("Helvetica");
  size-adjust: 112%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Bricolage Fallback";
  src: local("Arial Black"), local("Arial Bold"), local("Arial");
  size-adjust: 104%;
  ascent-override: 88%;
  descent-override: 20%;
  line-gap-override: 0%;
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; }
  body { min-height: 100dvh; line-height: 1.5; -webkit-font-smoothing: antialiased; }
  img, svg, iframe, picture { display: block; max-width: 100%; }
  [hidden] { display: none; }
  img { height: auto; }
  button, input { font: inherit; color: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; }
  ul[role="list"] { list-style: none; padding: 0; }
  h1, h2, h3, h4, h5 { line-height: 1.15; text-wrap: balance; overflow-wrap: break-word; }
  p { text-wrap: pretty; }
  address { font-style: normal; }
  figure { margin: 0; }
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
@layer tokens {
  :root {
    /* Color */
    --verde-900: #14312a;
    --verde-800: #0f2620;   /* fondo profundo */
    --verde-700: #25503f;
    --verde-600: #35652d;
    --verde-950: #0a1c17;   /* footer */
    --verde-tienda: #1d3d33; /* placeholder de tarjeta */
    --lima: #c7e84c;
    --crema: #f2f7ec;
    --borde: #e3e9dd;
    --divisor: #d5e0cd;
    --texto-sec: #3d5248;
    --texto-inv: #cbdac9;
    --texto-claro: #e3ebe0;
    --inactivo: #5c7368;
    --inactivo-icono: #93a89b;
    --footer-sec: #8fa79a;
    --chip-borde: #4d6b5f;
    --polvo: #e9f5c0;
    --blanco: #fff;
    --link-hover: #2a5124;

    /* Radios */
    --r-12: 12px; --r-16: 16px; --r-18: 18px; --r-20: 20px; --r-22: 22px; --r-26: 26px;
    --r-pill: 999px;

    /* Sombras */
    --sh-panel: 0 40px 80px -40px rgb(20 49 42 / .5);
    --sh-nav: 0 12px 32px -12px rgb(0 0 0 / .55);
    --sh-fab: 0 16px 32px -12px rgb(0 0 0 / .6);

    /* Layout */
    --container: 1240px;
    --gutter: clamp(20px, 4vw, 56px);
    --seccion: clamp(64px, 9vw, 128px);
    --nav-top: max(12px, env(safe-area-inset-top, 0px) + 44px);
    --hero-pad-top: 120px;

    /* Tipografía */
    --font-display: "Bricolage Grotesque", "Bricolage Fallback", system-ui, sans-serif;
    --font-body: "Lexend", "Lexend Fallback", system-ui, sans-serif;
    --font-mono: ui-monospace, Menlo, Consolas, monospace;

    /* Movimiento */
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);
    --dur-hover: 200ms;
    --dur-reveal: 900ms;
    --stagger: 70ms;

    --focus: var(--verde-600);
  }
  @media (min-width: 820px) {
    :root { --nav-top: 12px; --hero-pad-top: 150px; }
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
@layer base {
  html {
    scroll-padding-top: 90px;
    background: var(--verde-900);
    overflow-x: clip;
  }
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
  }
  body {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--verde-900);
    background: var(--verde-900);
    overflow-x: clip;
  }
  a { color: var(--verde-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
  a:hover { color: var(--link-hover); }
  :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
  .on-dark, .btn--dark, .promo { --focus: var(--lima); }
  .promo { --focus: var(--verde-900); }
  .on-dark { color: var(--blanco); }
  .on-dark a { color: inherit; }

  .icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .icon--arrow { transition: transform var(--dur-hover) var(--ease-out); }
  a:hover .icon--arrow, a:focus-visible .icon--arrow { transform: translateX(4px); }

  .h2 {
    margin-top: 12px;
    font-family: var(--font-display);
    font-weight: 800;
    line-height: .98;
    letter-spacing: -0.025em;
  }
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--verde-600);
  }
  .eyebrow--lime { color: var(--lima); }
  .eyebrow--dark { color: var(--verde-900); }
  .eyebrow .icon { width: 16px; height: 16px; }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
@layer layout {
  .container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
  }
  .skip-link {
    position: fixed;
    top: 8px; left: 8px;
    z-index: 70;
    padding: 10px 16px;
    background: var(--lima);
    color: var(--verde-900);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--r-pill);
    transform: translateY(-200%);
    transition: transform var(--dur-hover) var(--ease-out);
  }
  .skip-link:focus { transform: none; }
}

/* --------------------------------------------------------------------------
   Componentes
   -------------------------------------------------------------------------- */
@layer components {

  /* --- Botones y píldoras --- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 24px;
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: transform var(--dur-hover) var(--ease-out), border-color var(--dur-hover) var(--ease-out);
  }
  .btn:hover { transform: translateY(-2px); }
  .btn .icon { width: 20px; height: 20px; }
  .btn--lime { background: var(--lima); color: var(--verde-900); }
  .btn--lime:hover { color: var(--verde-900); }
  .btn--dark { background: var(--verde-900); color: var(--blanco); min-height: 48px; padding: 0 22px; font-size: 15px; }
  .btn--dark:hover { color: var(--blanco); }
  .btn--dark .icon { width: 18px; height: 18px; }
  .btn--glass {
    border: 1px solid rgb(255 255 255 / .35);
    background: rgb(255 255 255 / .06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--blanco);
  }
  .btn--glass:hover { border-color: var(--blanco); color: var(--blanco); }
  .btn--outline-light { border: 1px solid var(--chip-borde); color: var(--blanco); min-height: 48px; }
  .btn--outline-light:hover { border-color: var(--texto-inv); color: var(--blanco); }
  .btn--sm { min-height: 46px; padding: 0 20px; font-size: 14px; }
  .btn--sm .icon { width: 16px; height: 16px; }

  .chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgb(203 218 201 / .35);
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 600;
    color: var(--texto-inv);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  /* --- Barra de progreso de lectura --- */
  .progress {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 60;
    width: 100%;
    height: 2px;
    pointer-events: none;
  }
  .progress__bar {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    background: var(--lima);
    transition: width .12s linear;
  }

  /* --- Barra de navegación flotante --- */
  .nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    padding: var(--nav-top) clamp(12px, 3vw, 32px) 12px;
    pointer-events: none;
  }
  .nav__pill {
    pointer-events: auto;
    max-width: var(--container);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 12px;
    border-radius: var(--r-pill);
    background: rgb(20 49 42 / .42);
    border: 1px solid rgb(255 255 255 / .12);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    transition: background .35s, box-shadow .35s;
  }
  .nav.is-scrolled .nav__pill {
    background: rgb(13 33 28 / .82);
    box-shadow: var(--sh-nav);
  }
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--blanco);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.1;
    white-space: nowrap;
    flex: none;
  }
  .brand__logo {
    width: 36px; height: 36px;
    padding: 3px;
    border-radius: 50%;
    background: var(--blanco);
    object-fit: contain;
    flex: none;
  }
  .nav__links { display: none; }
  .nav__links ul { display: flex; gap: 4px; margin: 0; }
  .nav__links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 600;
    color: rgb(255 255 255 / .78);
    text-decoration: none;
    transition: color .3s, background .3s;
  }
  .nav__links a:hover { background: rgb(255 255 255 / .08); color: var(--blanco); }
  .nav__dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--lima);
    opacity: 0;
    transition: opacity .3s;
  }
  .nav__links a[aria-current="true"] { color: var(--blanco); }
  .nav__links a[aria-current="true"] .nav__dot { opacity: 1; }
  .nav__wa {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    min-width: 40px;
    padding: 0;
    border-radius: var(--r-pill);
    background: var(--lima);
    color: var(--verde-900);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    flex: none;
    transition: transform var(--dur-hover) var(--ease-out);
  }
  .nav__wa:hover { transform: translateY(-1px); color: var(--verde-900); }
  .nav__wa .icon { width: 18px; height: 18px; }
  .nav__wa-text { display: none; }
  .nav__burger {
    width: 40px; height: 40px;
    flex: none;
    border-radius: 50%;
    border: 1px solid rgb(255 255 255 / .18);
    background: rgb(255 255 255 / .06);
    color: var(--blanco);
    display: grid;
    place-items: center;
  }
  .nav__burger svg { width: 18px; height: 18px; }
  /* La barra queda por encima del overlay: la hamburguesa se vuelve X en su sitio */
  .nav__burger-x, .nav.is-menu-open .nav__burger-bars { display: none; }
  .nav.is-menu-open .nav__burger-x { display: block; }

  /* --- Menú móvil a pantalla completa --- */
  .menu[hidden] { display: none; }
  .menu {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgb(13 33 28 / .94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 28px 40px;
    color: var(--blanco);
    overflow-y: auto;
  }
  .menu__nav ul { display: flex; flex-direction: column; gap: 6px; margin: 0; list-style: none; padding: 0; }
  .menu__nav a {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(34px, 11vw, 44px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--blanco);
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid rgb(255 255 255 / .1);
  }
  .menu__actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
  .menu__actions .btn { flex: 1 1 auto; }

  /* --- Hero “Cuidado” --- */
  .hero {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    background: var(--verde-900);
    display: flex;
    align-items: flex-end;
  }
  .hero__photo {
    position: absolute;
    inset: -12% 0;
    will-change: transform;
  }
  .hero__photo picture, .hero__photo img { width: 100%; height: 100%; }
  .hero__photo img { object-fit: cover; object-position: 50% 40%; }
  .hero__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(20 49 42 / .45) 0%, rgb(20 49 42 / .05) 30%, rgb(20 49 42 / .6) 58%, rgb(13 33 28 / .97) 100%);
  }
  .hero__veil--side {
    background: linear-gradient(90deg, rgb(13 33 28 / .25) 0%, rgb(13 33 28 / .15) 55%, rgb(13 33 28 / 0) 100%);
  }
  .hero__inner {
    position: relative;
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding: var(--hero-pad-top) var(--gutter) clamp(28px, 7vh, 88px);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px 48px;
  }
  .hero__copy { flex: 1 1 520px; max-width: 800px; }
  .hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--lima);
  }
  .hero__eyebrow .rule { width: 28px; height: 1px; background: var(--lima); flex: none; }
  .hero__title {
    margin-top: 14px;
    font-family: var(--font-display);
    font-size: clamp(56px, 8.4vw, 112px);
    font-weight: 800;
    line-height: .96;
    letter-spacing: -0.03em;
  }
  .hero__title .w {
    display: inline-block;
    overflow: hidden;
    padding-bottom: .08em;
    margin-bottom: -.08em;
    vertical-align: bottom;
  }
  .hero__title .w > span { display: inline-block; }
  .hero__title .dot { color: var(--lima); }
  .hero__lead {
    margin-top: 18px;
    max-width: 46ch;
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.55;
    color: var(--texto-claro);
  }
  .hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
  .hero__cta { position: relative; flex: 1 1 100%; }
  .hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }

  /* Tarjeta “Nuestro local” */
  .local {
    flex: 1 1 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--r-20);
    background: rgb(255 255 255 / .08);
    border: 1px solid rgb(255 255 255 / .14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--blanco);
    text-decoration: none;
    transition: transform .3s var(--ease-out);
  }
  .local:hover { transform: translateY(-3px); color: var(--blanco); }
  .local__thumb {
    flex: none;
    display: block;
    width: 72px;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--r-12);
    background: var(--verde-700);
  }
  .local__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
  .local__text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 6px 0 0;
  }
  .local__eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--lima);
  }
  .local__addr { display: block; font-size: 13px; color: var(--texto-inv); margin-top: 2px; }
  .local .icon { width: 18px; height: 18px; }

  /* --- Especies --- */
  .species {
    position: relative;
    background: var(--verde-800);
    padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 96px);
    overflow: hidden;
  }
  .species__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 40px;
  }
  .species__head > .reveal { flex: 1 1 420px; max-width: 680px; }
  .species__head .h2 { font-size: clamp(34px, 4.6vw, 62px); line-height: 1; }
  .species__note { flex: 0 1 380px; font-size: 16px; line-height: 1.6; color: var(--texto-inv); }
  .species__track {
    display: flex;
    gap: clamp(10px, 1.4vw, 18px);
    margin: clamp(32px, 5vw, 64px) calc(-1 * var(--gutter)) 0;
    padding: 0 var(--gutter) 6px;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    list-style: none;
  }
  .species__track::-webkit-scrollbar { display: none; }
  .species__cell {
    flex: 0 0 64vw;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .species__cell--1 { padding-top: 16px; }
  .species__cell--2 { padding-top: 0; }
  .species__cell--3 { padding-top: 24px; }
  .species__cell--4 { padding-top: 8px; }
  .species__cell--5 { padding-top: 19px; }
  .species__card {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: var(--r-18);
    overflow: hidden;
    background: var(--verde-700);
  }
  .species__card img { width: 100%; height: 100%; object-fit: cover; }
  .species__card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgb(13 33 28 / .85));
  }
  .species__label {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(17px, 1.5vw, 20px);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--blanco);
  }

  /* --- Servicios --- */
  .services {
    position: relative;
    background: var(--crema);
    color: var(--verde-900);
    padding: var(--seccion) 0;
  }
  .services__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 40px;
    margin-bottom: clamp(32px, 4vw, 56px);
  }
  .services__head .h2 { font-size: clamp(36px, 5vw, 68px); }
  .services__note { max-width: 40ch; font-size: 15px; line-height: 1.6; color: var(--texto-sec); }
  .services__body {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(24px, 4vw, 64px);
    align-items: flex-start;
  }

  .svcphoto {
    position: relative;
    flex: 1 1 400px;
    align-self: flex-start;
    width: 100%;
    aspect-ratio: 16/11;
    max-height: 640px;
    border-radius: var(--r-26);
    overflow: hidden;
    background: var(--verde-700);
    box-shadow: var(--sh-panel);
  }
  .svcphoto__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity .7s var(--ease-out), transform 1.2s var(--ease-out);
  }
  .svcphoto__img.is-active { opacity: 1; transform: none; }
  .svcphoto__img:nth-of-type(1) { object-position: 50% 40%; }
  .svcphoto__img:nth-of-type(2) { object-position: 50% 50%; }
  .svcphoto__img:nth-of-type(3) { object-position: 50% 50%; }
  .svcphoto__img:nth-of-type(4) { object-position: 50% 40%; }
  .svcphoto__img:nth-of-type(5) { object-position: 50% 35%; }
  .svcphoto__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgb(13 33 28 / .7));
  }
  .svcphoto__cap {
    position: absolute;
    left: 20px; right: 20px; bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--blanco);
  }
  .svcphoto__name {
    font-family: var(--font-display);
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 800;
    letter-spacing: -0.01em;
  }
  .svcphoto__num { font: 12px var(--font-mono); color: var(--lima); flex: none; }

  .svc { flex: 1 1 380px; min-width: 0; margin: 0; border-bottom: 1px solid var(--divisor); }
  .svc__item { border-top: 1px solid var(--divisor); }
  .svc__heading { margin: 0; }
  .svc__row {
    width: 100%;
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding: clamp(18px, 2vw, 26px) 0;
    text-align: left;
    color: inherit;
  }
  .svc__num { font: 12px var(--font-mono); color: var(--verde-600); flex: none; width: 2ch; }
  .svc__main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
  .svc__icon { width: 22px; height: 22px; color: var(--inactivo-icono); transition: color .3s; }
  .svc__name {
    font-family: var(--font-display);
    font-size: clamp(24px, 2.6vw, 38px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--inactivo);
    transition: color .3s;
  }
  .svc__dot {
    flex: none;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--lima);
    box-shadow: 0 0 0 4px rgb(199 232 76 / .25);
    opacity: 0;
    transition: opacity .3s;
  }
  .svc__item.is-active .svc__name { color: var(--verde-900); }
  .svc__item.is-active .svc__icon { color: var(--verde-600); }
  .svc__item.is-active .svc__dot { opacity: 1; }
  .svc__body { padding: 0 0 clamp(18px, 2vw, 26px) calc(18px + 2ch); }
  .svc__item:not(.is-active) .svc__body { display: none; }
  .svc__desc { font-size: 16px; line-height: 1.6; color: var(--texto-sec); max-width: 46ch; }
  .svc__body .btn { margin-top: 16px; }

  /* --- Tienda --- */
  .shop {
    position: relative;
    background: var(--verde-900);
    padding: var(--seccion) 0;
    overflow: hidden;
  }
  .shop__glow {
    position: absolute;
    top: -20%; right: -10%;
    width: 50vw; height: 50vw;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(199 232 76 / .08), transparent);
    pointer-events: none;
  }
  .shop .container { position: relative; }
  .shop__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 40px;
    margin-bottom: clamp(28px, 4vw, 48px);
  }
  .shop__head .h2 { font-size: clamp(36px, 5vw, 68px); }
  .shop__note { max-width: 40ch; font-size: 15px; line-height: 1.6; color: var(--texto-inv); }
  .shop__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0;
    transition: grid-template-columns .7s var(--ease-out);
  }

  .cat {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-22);
    min-height: 240px;
    background: var(--verde-tienda);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
    transition: min-height .5s var(--ease-out);
  }
  .cat.is-open { min-height: 0; }
  .cat__photo { position: absolute; inset: -8% 0; z-index: -2; }
  .cat__photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: transform 1s var(--ease-out); }
  .cat.is-open .cat__photo img { transform: scale(1.08); }
  .cat[data-cat="alimentos"] .cat__photo img { object-position: 50% 45%; }
  .cat[data-cat="farmacia"] .cat__photo img { object-position: 50% 40%; }
  .cat[data-cat="accesorios"] .cat__photo img { object-position: 50% 50%; }
  .cat[data-cat="herramientas"] .cat__photo img { object-position: 50% 45%; }
  .cat__scrim {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgb(13 33 28 / .25) 0%, rgb(13 33 28 / .05) 35%, rgb(13 33 28 / .75) 75%, rgb(13 33 28 / .95) 100%);
  }
  /* Al abrir, el título sube sobre la parte clara de la foto: se refuerza el velo */
  .cat.is-open .cat__scrim {
    background: linear-gradient(180deg, rgb(13 33 28 / .55) 0%, rgb(13 33 28 / .7) 40%, rgb(13 33 28 / .95) 100%);
  }
  .cat__top {
    position: absolute;
    top: 18px; left: 18px; right: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .cat__num { font: 12px var(--font-mono); color: var(--lima); }
  .cat__chev {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid rgb(255 255 255 / .25);
    background: rgb(255 255 255 / .08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    transition: transform .4s var(--ease-out);
  }
  .cat__chev .icon { width: 16px; height: 16px; }
  .cat.is-open .cat__chev { transform: rotate(180deg); }
  .cat__body { padding: 20px; }
  .cat__title { margin: 0; }
  .cat__toggle {
    font-family: var(--font-display);
    font-size: clamp(26px, 2.6vw, 38px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--blanco);
    text-align: left;
  }
  /* Toda la tarjeta es el área táctil del botón; el panel queda por encima */
  .cat__toggle::after { content: ""; position: absolute; inset: 0; }
  .cat__tag { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--texto-inv); max-width: 34ch; }
  .cat__panel[hidden] { display: none; }
  .cat__panel {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    background: var(--crema);
    color: var(--verde-900);
    border-radius: var(--r-16);
    padding: 16px;
    cursor: default;
  }
  .cat__panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
  }
  .cat__panel-title { font-family: var(--font-display); font-size: 17px; font-weight: 800; }
  .cat__panel-note { font-size: 12px; color: var(--texto-sec); }

  .items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 14px 0;
  }
  .item { background: var(--blanco); border-radius: var(--r-12); overflow: hidden; display: flex; flex-direction: column; }
  .item__ph { display: block; aspect-ratio: 1; }
  .item__ph img { width: 100%; height: 100%; object-fit: cover; }
  .item:nth-child(1) .item__ph img { object-position: 50% 55%; }
  .item:nth-child(2) .item__ph img { object-position: 50% 65%; }
  .item:nth-child(3) .item__ph img { object-position: 50% 70%; }
  .item__ph--empty {
    background: repeating-linear-gradient(135deg, var(--crema) 0 12px, var(--borde) 12px 24px);
    display: grid;
    place-items: center;
  }
  .item__ph--empty span {
    font: 10px var(--font-mono);
    color: var(--texto-sec);
    background: var(--blanco);
    padding: 4px 6px;
    border-radius: 4px;
  }
  .item__name { margin: 10px 12px 4px; font-size: 13px; font-weight: 600; line-height: 1.3; }
  .item__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: auto 12px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--verde-600);
    text-decoration: none;
  }
  .item__link .icon { width: 14px; height: 14px; }

  /* --- Promo (sección retirada del HTML hasta que haya promo vigente; los
     estilos se conservan para reponerla sin rehacerlos) --- */
  .promo {
    position: relative;
    background: var(--lima);
    color: var(--verde-900);
    padding: clamp(56px, 7vw, 96px) 0;
    overflow: hidden;
  }
  .promo__mark {
    position: absolute;
    right: -6%;
    top: 50%;
    width: clamp(260px, 34vw, 480px);
    height: clamp(260px, 34vw, 480px);
    margin-top: calc(-1 * clamp(130px, 17vw, 240px));
    opacity: .10;
    pointer-events: none;
  }
  .promo__mark img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) brightness(.2); }
  .promo__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 40px;
  }
  .promo__content { flex: 1 1 480px; }
  .promo__content .h2 { margin-top: 10px; font-size: clamp(34px, 4.8vw, 64px); line-height: 1; }
  .u-underline {
    text-decoration: underline;
    text-decoration-thickness: .1em;
    text-underline-offset: .1em;
    text-decoration-color: var(--verde-900);
  }
  .promo__cta { flex: none; min-height: 54px; padding: 0 26px; }
  .promo__cta .icon { width: 18px; height: 18px; }

  /* --- Nosotros --- */
  .about {
    position: relative;
    background: var(--verde-900);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
  }
  .about__photo { position: absolute; inset: -14% 0; }
  .about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; }
  .about__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(20 49 42 / .35) 0%, rgb(20 49 42 / .15) 30%, rgb(13 33 28 / .85) 70%, rgb(13 33 28 / 1) 100%);
  }
  .about__inner {
    position: relative;
    padding-top: 52vh;
    padding-bottom: clamp(56px, 7vw, 96px);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px 48px;
  }
  .about__copy { flex: 1 1 480px; max-width: 720px; }
  .about__copy .h2 { font-size: clamp(36px, 5vw, 68px); }
  .about__text {
    margin-top: 20px;
    font-size: clamp(16px, 1.25vw, 19px);
    line-height: 1.6;
    color: var(--texto-claro);
    max-width: 56ch;
  }
  .about__card { flex: 0 1 340px; }
  .about__card-inner {
    padding: 10px;
    border-radius: var(--r-20);
    background: rgb(255 255 255 / .08);
    border: 1px solid rgb(255 255 255 / .14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .about__card-photo {
    aspect-ratio: 4/3;
    border-radius: var(--r-12);
    overflow: hidden;
    background: var(--verde-700);
  }
  .about__card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
  .about__card-text { padding: 12px 6px 4px; font-size: 13px; line-height: 1.5; color: var(--texto-inv); }

  /* --- Contacto --- */
  .contact {
    position: relative;
    background: var(--verde-800);
    padding: clamp(64px, 9vw, 120px) 0;
  }
  .contact__head { margin-bottom: clamp(28px, 4vw, 48px); }
  .contact__head .h2 { font-size: clamp(36px, 5vw, 68px); }
  .contact__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 14px;
  }
  .card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px;
    border-radius: var(--r-22);
    background: rgb(255 255 255 / .05);
    border: 1px solid rgb(255 255 255 / .1);
  }
  .card .eyebrow { letter-spacing: .12em; }
  .card__text { font-size: 17px; line-height: 1.55; }
  .card__link {
    color: var(--blanco);
    text-decoration: underline;
    text-decoration-color: rgb(199 232 76 / .7);
    text-underline-offset: 4px;
  }
  .card__link:hover { color: var(--lima); }
  .card__tel {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--texto-inv);
    text-decoration: none;
  }
  .card__tel .icon { width: 16px; height: 16px; }
  .card__cta { margin-top: auto; align-self: flex-start; min-height: 48px; padding: 0 22px; font-size: 15px; }
  .card__cta .icon { width: 18px; height: 18px; }
  .contact__map {
    position: relative;
    min-height: 280px;
    border-radius: var(--r-22);
    overflow: hidden;
    background: repeating-linear-gradient(135deg, var(--verde-tienda) 0 14px, var(--verde-700) 14px 28px);
  }
  .contact__map .map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: saturate(.8);
    opacity: 0;
    transition: opacity .5s var(--ease-out);
  }
  .contact__map.is-loaded .map { opacity: 1; }

  /* --- Footer --- */
  .site-footer { background: var(--verde-950); padding: 36px 0; }
  .site-footer__grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 40px;
  }
  .site-footer__brand {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    align-items: center;
  }
  .site-footer__brand img {
    grid-row: 1 / span 3;
    width: 44px; height: 44px;
    padding: 3px;
    border-radius: 50%;
    background: var(--blanco);
    object-fit: contain;
  }
  .site-footer__name { font-weight: 600; font-size: 17px; }
  .site-footer__address { margin-top: 2px; font-size: 13px; line-height: 1.6; color: var(--texto-inv); }
  .site-footer__address a { color: inherit; }
  .site-footer__copy { margin-top: 2px; font-size: 12px; color: var(--footer-sec); }
  .site-footer__social { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
  .pill {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--chip-borde);
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 600;
    color: var(--blanco);
    text-decoration: none;
  }
  .pill[aria-disabled="true"] { opacity: .6; cursor: default; }
  .pill--lime { border-color: var(--lima); color: var(--lima); }
  .pill--lime:hover { color: var(--lima); }

  /* --- FAB WhatsApp --- */
  .fab {
    position: fixed;
    right: 18px;
    bottom: max(18px, env(safe-area-inset-bottom, 0px));
    z-index: 40;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--lima);
    color: var(--verde-900);
    display: grid;
    place-items: center;
    box-shadow: var(--sh-fab);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity .4s, transform .4s var(--ease-out);
  }
  .fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }
  .fab .icon { width: 24px; height: 24px; }
}

/* --------------------------------------------------------------------------
   Escritorio (≥ 820 px)
   -------------------------------------------------------------------------- */
@layer components {
  @media (min-width: 820px) {
    .brand { font-size: 14px; }
    .nav__links { display: block; margin-inline: auto; }
    .nav__wa { padding: 0 16px; }
    .nav__wa-text { display: inline; }
    .nav__burger { display: none; }

    .hero__photo img { object-position: 62% 30%; }
    .hero__veil {
      background: linear-gradient(180deg, rgb(20 49 42 / .45) 0%, rgb(20 49 42 / .05) 30%, rgb(20 49 42 / .6) 68%, rgb(13 33 28 / .97) 100%);
    }
    .hero__veil--side {
      background: linear-gradient(90deg, rgb(13 33 28 / .7) 0%, rgb(13 33 28 / .15) 55%, rgb(13 33 28 / 0) 100%);
    }
    .hero__cta { flex: none; }
    .local {
      flex: 0 1 300px;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
    }
    .local__thumb { width: 100%; aspect-ratio: 16/10; }
    .local__text { padding: 12px 6px 4px; }

    .species__track {
      margin-inline: 0;
      padding-inline: 0;
      overflow-x: visible;
      overflow-y: visible;
    }
    .species__cell { flex: 1 1 0; }
    .species__cell--1 { padding-top: 48px; }
    .species__cell--2 { padding-top: 0; }
    .species__cell--3 { padding-top: 72px; }
    .species__cell--4 { padding-top: 24px; }
    .species__cell--5 { padding-top: 56px; }

    .svcphoto { position: sticky; top: 100px; aspect-ratio: 4/5; }

    .shop__grid { grid-template-columns: repeat(4, 1fr); }
    .cat { min-height: 560px; }
    .cat.is-open { min-height: 560px; }

    .about { min-height: 90svh; }
    .about__inner { padding-top: clamp(160px, 28vh, 300px); }
  }
}

/* --------------------------------------------------------------------------
   Movimiento
   -------------------------------------------------------------------------- */
@layer motion {
  @keyframes kb { from { transform: scale(1.14); } to { transform: scale(1); } }
  @keyframes rise { from { transform: translateY(110%); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(70px, 24px, 0); } }
  @keyframes dust {
    0%   { transform: translate3d(0, 0, 0); opacity: 0; }
    15%  { opacity: .75; }
    85%  { opacity: .4; }
    100% { transform: translate3d(18px, -160px, 0); opacity: 0; }
  }
  @keyframes pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(1.5); opacity: 0; } }

  /* Ambiente del hero */
  .ambient { position: absolute; inset: 0; pointer-events: none; }
  .ambient__glow { position: absolute; border-radius: 50%; }
  .ambient__glow--a {
    top: -10%; right: -8%;
    width: 46vw; height: 46vw;
    background: radial-gradient(closest-side, rgb(199 232 76 / .18), transparent);
    animation: drift 16s var(--ease-in-out) infinite alternate;
  }
  .ambient__glow--b {
    bottom: 0; left: -10%;
    width: 40vw; height: 40vw;
    background: radial-gradient(closest-side, rgb(53 101 45 / .55), transparent);
    animation: drift 22s var(--ease-in-out) infinite alternate-reverse;
  }
  .dust { position: absolute; border-radius: 50%; background: var(--polvo); animation: dust 10s linear infinite; }
  .dust--1 { left: 18%; bottom: 30%; width: 3px; height: 3px; animation-duration: 9s; }
  .dust--2 { left: 36%; bottom: 22%; width: 2px; height: 2px; animation-duration: 12s; animation-delay: 2s; }
  .dust--3 { left: 58%; bottom: 36%; width: 3px; height: 3px; animation-duration: 10s; animation-delay: 4s; }
  .dust--4 { left: 74%; bottom: 26%; width: 2px; height: 2px; animation-duration: 13s; animation-delay: 1s; }
  .dust--5 { left: 88%; bottom: 44%; width: 3px; height: 3px; animation-duration: 11s; animation-delay: 6s; }

  /* Entrada del hero */
  .hero__photo img { animation: kb 2.6s var(--ease-out) both; }
  .hero__eyebrow { animation: fadeUp .7s var(--ease-out) .1s both; }
  .hero__title .w > span { animation: rise .9s var(--ease-out) both; animation-delay: calc(.15s + var(--i, 0) * .1s); }
  .hero__title .w:nth-child(2) > span { --i: 1; }
  .hero__title .w:nth-child(3) > span { --i: 2; }
  .hero__title .w:nth-child(4) > span { --i: 3; }
  .hero__lead { animation: fadeUp .8s var(--ease-out) .55s both; }
  .hero__actions { animation: fadeUp .8s var(--ease-out) .7s both; }
  .hero__chips { animation: fadeUp .8s var(--ease-out) .85s both; }
  .local { animation: fadeUp .9s var(--ease-out) 1s both; }
  .hero__cta::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid var(--lima);
    pointer-events: none;
    animation: pulse 1.6s var(--ease-out) 1.6s 3;
  }

  /* Paneles que se despliegan */
  .svc__item.is-active .svc__body { animation: fadeUp .5s var(--ease-out) both; }
  .cat__panel { animation: fadeUp .5s var(--ease-out) .15s both; }
  .menu { animation: fadeUp .35s var(--ease-out) both; }

  /* Reveal al hacer scroll */
  html.js .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
    transition-delay: var(--d, calc(var(--i, 0) * var(--stagger)));
  }
  html.js .reveal.is-visible { opacity: 1; transform: none; }

  /* Sin movimiento */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: .01ms !important;
      animation-iteration-count: 1 !important;
      animation-delay: 0ms !important;
      transition-duration: .01ms !important;
      transition-delay: 0ms !important;
      scroll-behavior: auto !important;
    }
    .hero__cta::before { display: none; }
    .ambient { display: none; }
    html.js .reveal { opacity: 1; transform: none; }
  }
}

/* --------------------------------------------------------------------------
   Utilidades y estados sin JavaScript
   -------------------------------------------------------------------------- */
@layer utilities {
  .visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  /* Sin JS: nada oculto, todo accesible */
  html:not(.js) .nav__burger { display: none; }
  html:not(.js) .nav__links { display: block; }
  html:not(.js) .nav__pill { flex-wrap: wrap; border-radius: var(--r-22); }
  html:not(.js) .menu { display: none; }
  html:not(.js) .svc__item:not(.is-active) .svc__body { display: block; }
  html:not(.js) .svc__name { color: var(--verde-900); }
  html:not(.js) .svc__icon { color: var(--verde-600); }
  html:not(.js) .cat__panel[hidden] { display: block; }
  html:not(.js) .shop__grid { grid-template-columns: 1fr; }
  html:not(.js) .cat { min-height: 0; cursor: default; }
  html:not(.js) .cat__toggle::after { content: none; }
  html:not(.js) .cat__toggle { cursor: default; }
  html:not(.js) .cat__chev { display: none; }
  /* Sin JS la foto no tiene degradado de apertura: oscurece para que el texto siga legible */
  html:not(.js) .cat__scrim { background: linear-gradient(180deg, rgb(13 33 28 / .5), rgb(13 33 28 / .85)); }
  html:not(.js) .contact__map .map { opacity: 1; }
  html:not(.js) .fab { opacity: 1; transform: none; pointer-events: auto; }
}
