/* Tienda (tienda.html): hero band and the two product sections.
   Cards, buttons, trust strip, header and footer come from livin.css; this file only composes
   them for the shop page. Vertical padding is written as longhands on purpose (see livin.css). */

/* ------------------------------------------------------------------ hero band */
/* A contained band on the warm studio ground, #F8F4F1 (the comp's lit wall). The pre-rendered shot
   (assets/tienda/hero-latas.webp, made by revision/tienda/hero/render-hero.mjs) has a transparent
   background: its wall is a shadow catcher, so the band's own colour shows through, the shot has no
   edge to hide, and only the cans, plinths and their shadows are drawn. */
.tienda-hero__banda {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--suelo-tienda);
}
/* insets are stepped px values, not clamp(): the static design scanner reads clamp() padding as 0 */
.tienda-hero__texto {
  position: relative;
  z-index: 1;
  padding-top: 32px;
  padding-bottom: 8px;
  padding-left: 24px;
  padding-right: 24px;
}
.tienda-hero__texto .overline { margin-bottom: var(--e-4); }
.tienda-hero__titulo {
  font-size: clamp(2rem, 8.4vw, 2.875rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
/* one phrase per line, as in the comp: "Vino en lata / para los momentos / que sí pasan." The title is
   HERBI outlines (fuente/herbi/palabras.json, tienda-hero) with those breaks drawn in; its lines rise
   on load just after the overline (livin.css "HERBI headings"). */
.tienda-hero__linea { display: block; }
.tienda-hero__titulo.titulo-herbi { --herbi-retraso: 150ms; }
.tienda-hero__bajada { margin-top: var(--e-4); max-width: 30ch; text-wrap: balance; } /* "…y perfectos / para cualquier plan." */
/* In the shot the cans span 13–77% of its width (plinths 6–84%), the upright cans fill 60% of its
   height under ~11% of clear wall, and the plinths and the leaning rosado run off the bottom edge. */
.tienda-hero__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;          /* phones: a side crop keeps all three cans and makes them larger */
  object-fit: cover;
  object-position: 28% 100%;    /* centres the three cans in the crop (10% / 13% side margins) */
}
@media (min-width: 600px) and (max-width: 899px) {
  .tienda-hero__texto { padding-top: 48px; padding-left: 40px; padding-right: 40px; }
  .tienda-hero__img { aspect-ratio: 16 / 9; } /* the whole shot: its shadows fall to the right of the cans */
}
@media (min-width: 900px) {
  .tienda-hero__banda {
    display: flex;
    align-items: center;
    min-height: clamp(400px, 33vw, 480px);
  }
  .tienda-hero__texto {
    width: 48%;                 /* the text itself ends ≥27px before the first can (48% of the band) */
    padding-top: 64px;
    padding-bottom: 64px;
    padding-left: 48px;
    padding-right: 24px;
  }
  /* "para los momentos" is 8.74em wide: 4.1vw keeps it on one line inside the column from 900 up */
  .tienda-hero__titulo { font-size: clamp(2.25rem, 4.1vw, 3.625rem); }
  .tienda-hero__bajada { margin-top: var(--e-5); }
  /* The image box is the shot itself (16:9), anchored to the band's bottom-right corner, so the
     plinths and the leaning rosado stay cut by the bottom edge. The shot's right 7% (the tinto's
     wall shadow) runs past the band and is clipped, so at 1440 the shot fills the band's full height
     and the upright cans are ~60% of it, as in the comp. The first can starts at 48% of the band;
     the title ends before it at every width from 900 up (revision/tienda/titular-anchos.mjs). */
  .tienda-hero__img {
    position: absolute;
    z-index: 0;
    right: -4.6%;
    bottom: 0;
    width: 65%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
}

@media (min-width: 1100px) { .tienda-hero__texto { padding-left: 64px; } }
@media (min-width: 1360px) { .tienda-hero__texto { padding-left: 72px; } }

/* the one authored moment of the page: the title settles into focus on load (no scroll, no loop) */
@media (prefers-reduced-motion: no-preference) {
  .tienda-hero__entra {
    animation: tienda-titular 960ms var(--ease-out) both;
    animation-delay: calc(60ms + var(--i, 0) * 90ms);
  }
}
@keyframes tienda-titular {
  from { opacity: 0; transform: translateY(0.42em); filter: blur(0.12em); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* ------------------------------------------------------------------ product sections */
/* the first product row sits closer to the hero so the cards start above the fold at 1440×900 */
.tienda-seccion--primera { padding-top: clamp(48px, 5.5vw, 80px); }
.tienda-seccion__titulo {
  font-size: clamp(1.875rem, 1.1rem + 2.1vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: clamp(var(--e-5), 3vw, var(--e-7));
}
.tienda-seccion__formato { font-variant-numeric: lining-nums; white-space: nowrap; }
/* "VINOS" in HERBI, "236 ml" as a lighter Mulish spec on the same baseline: the svg's negative bottom
   margin puts its margin edge on HERBI's baseline (120 units under it), which flex baseline alignment uses
   for a replaced element; the padding gives that room back. Full scale keeps the caps ≥24px on phones. */
.tienda-seccion__titulo.titulo-herbi {
  --herbi-escala: 1;
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.34em;
  padding-bottom: calc(0.12em * var(--herbi-escala));
}
.tienda-seccion__titulo.titulo-herbi .palabra-herbi { margin-bottom: calc(-0.12em * var(--herbi-escala)); }
.tienda-seccion__titulo.titulo-herbi .tienda-seccion__formato { font-size: 0.5em; font-weight: 700; letter-spacing: 0; color: var(--tinta-2); }

/* Vinos 236 ml: buttons a little narrower than the card, and the price row + buttons aligned across the three cards
   (the can's size on its field: with the splash, below). */
.tienda-rejilla--vinos .tarjeta__linea { margin-bottom: auto; text-wrap: balance; } /* "Crisp, vibrante y perfecto / para cualquier plan." */
.tienda-rejilla--vinos .tarjeta__acciones { max-width: 20rem; }

/* Frisantes 355 ml: taller fields, so the 355 ml can reads as the protagonist (comp ratio ≈ 1.47:1). */
.tienda-rejilla--frisantes .tarjeta--ancha .campo-lata { min-height: clamp(300px, 30vw, 440px); }

/* each can stands in its splash (2026-11-08: "en una versión anterior habíamos puesto a las latas un splash… si mejor
   les ponemos ese splash"; stickers for these headings on hold). The splashes are the Atardecer moments' (2026-10-14,
   approved then): the wine leaping up in the can's colour around it, with the fruit of its notes; assets/splash/
   (560/960, from atardecer/splash-*.webp). Behind the can, centred on it, 128% of the field's height, its trough just
   under the can's foot; the field crops its arms (and the wide frisante fields, their sides). The can comes down from
   86% to 74% of the field, so the splash holds it with its fruit in view (three sizings compared: 86/150, 74/128,
   66/112). On hover the splash swells a hair with the can. */
.tienda-rejilla--vinos .campo-lata, .tienda-rejilla--frisantes .campo-lata { --lata-alto: 74%; isolation: isolate; }
.tienda-rejilla .campo-lata__img { z-index: 1; }
.campo-lata__splash {
  position: absolute; left: 50%; bottom: -6%; z-index: 0; pointer-events: none; /* its liquid is cut straight at the image's
     foot: kept 6% of the field under the edge, so the sway and lift below never bring the cut into view */
  height: 128%; width: auto; max-width: none; aspect-ratio: 1; translate: -50% 0;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .campo-lata__splash { transition: scale var(--dur-lenta) var(--ease-out); }
  .tarjeta:hover .campo-lata__splash { scale: 1.03; }
}
/* and it breathes (2026-11-08, "un movimiento al splash… que se mueva fluido y despacio, discreto"; then "un poco más
   notorio"): from its foot, a slow sway of two degrees each way, a lift of 2% and a swell of up to 5.5%, eased both
   ways; every card on its own rhythm (7.4-9.6s each way) and phase, so the row never moves in step. Transform only
   (centring is `translate`, the hover is `scale`). Still under reduced motion. */
.campo-lata__splash { transform-origin: 50% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .campo-lata__splash { animation: splash-respira var(--splash-dur, 8.4s) cubic-bezier(0.45, 0, 0.55, 1) var(--splash-fase, 0s) infinite alternate; }
  .tienda-rejilla .tarjeta:nth-child(2) .campo-lata__splash { --splash-dur: 9.6s; --splash-fase: -3.4s; }
  .tienda-rejilla .tarjeta:nth-child(3) .campo-lata__splash { --splash-dur: 7.4s; --splash-fase: -5.6s; }
  .tienda-rejilla--frisantes .tarjeta:nth-child(1) .campo-lata__splash { --splash-dur: 9.2s; --splash-fase: -2s; }
  .tienda-rejilla--frisantes .tarjeta:nth-child(2) .campo-lata__splash { --splash-dur: 8s; --splash-fase: -6.2s; }
}
@keyframes splash-respira {
  0% { transform: translateY(0) rotate(-2deg) scale(1); }
  45% { transform: translateY(-2%) rotate(0.6deg) scale(1.04); }
  100% { transform: translateY(-0.8%) rotate(2deg) scale(1.055); }
}

/* Tablets (600–899): one product per row. The wine cards turn sideways (field left, details
   right) so all three read at a glance, echoing the frisante cards below them. */
@media (min-width: 600px) and (max-width: 899px) {
  .tienda-rejilla--vinos, .tienda-rejilla--frisantes { --cols: 1; }
  .tienda-rejilla--vinos .tarjeta { flex-direction: row; align-items: stretch; }
  .tienda-rejilla--vinos .tarjeta__media { flex: 0 0 52%; }
  .tienda-rejilla--vinos .tarjeta__cuerpo {
    justify-content: center;
    padding-top: var(--e-5);
    padding-bottom: var(--e-5);
    padding-left: clamp(24px, 4vw, 40px);
    padding-right: 0;
  }
  .tienda-rejilla--vinos .tarjeta__linea { margin-bottom: 0; }
}

/* ------------------------------------------------------------------ the brand's sticker (livin.css "brand stickers") */
/* a blue peace hand on the floor right of the plinths (the shot's right 16% is clear), the band's corner */
.tienda-hero__sticker { --tam: clamp(40px, 4.2vw, 62px); --giro: 14deg; --abajo: clamp(14px, 2vw, 28px); --derecha: clamp(16px, 2.4vw, 36px); }
