/* La filosofía (filosofia.html): manifesto hero with a photo carousel, the five values, the story on
   butter and the personality with a gallery carousel. Photos are pending (.foto-pendiente with the
   rendered cans). The carousel styles here are the house look for js/carrusel.js (.carrusel*). */

.palabra-rosa { font-style: normal; color: var(--rosa); } /* display size only: 3.8:1 on butter, 4.6:1 on white */

/* ------------------------------------------------------------------ hero */
.filo-hero { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(24px, 3vw, 48px); } /* values close up under it (2026-11-08, "sube la sección Los valores"): was clamp(48px, 6vw, 96px) */
.filo-hero__rejilla { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) {
  .filo-hero__rejilla { grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); column-gap: clamp(40px, 6vw, 96px); }
}
.filo-hero__texto { display: grid; justify-items: start; gap: var(--e-5); max-width: 36rem; }
.filo-hero__texto .overline { margin-bottom: 0; }
.filo-hero__titulo { max-width: 11ch; }
.filo-hero__parrafos { display: grid; gap: var(--e-4); max-width: 38ch; color: var(--tinta-2); font-size: var(--t-lead); line-height: 1.45; }
/* the brand's drawing "Latas brillando" (two cans clinking) closes the manifesto's last line, "JUNTOS." (2026-11-08,
   "pon latas brillando"; a drawing over a sticker: the page has its sticker in Nuestra personalidad and the photo
   beside is all colour). Set in the heading's own em, from the HERBI drawing's lines (one svg, 5.175em wide): "JUNTOS."
   ends at 3.534em, its ink spans 2.07-2.80em down; "SABE MEJOR" above ends at 1.83em. So the drawing starts a short
   space after the word (3.78em) and reaches up to 1.95em, clear of the line above; 1.12em tall ("un poco más grandes,
   sin desplazar ni afectar a los demás elementos"; it was 0.85em, standing on the baseline), so its foot hangs about
   0.27em under the word, into the air before the red rule. Absolute: it moves nothing. Tilted a hair like the
   brand's stickers. */
.filo-hero__titulo { position: relative; }
.filo-hero__brindis { position: absolute; left: 3.78em; top: 1.95em; height: 1.12em; width: auto; max-width: none; rotate: -4deg; pointer-events: none; }
/* no button under the manifesto (2026-11-08: "no tiene sentido el botón de Explora, solo nos desplaza hacia abajo";
   it was the comp's client note 1 and led to #valores, right below) */

/* on-load entrance, only when JS runs and motion is allowed (the head script sets html.js-revelar) */
@media (prefers-reduced-motion: no-preference) {
  html.js-revelar .filo-hero__entra { animation: filo-sube 640ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
}
@keyframes filo-sube { from { opacity: 0; transform: translateY(18px); } }

/* ------------------------------------------------------------------ carousel (house styles) */
.carrusel { position: relative; min-width: 0; }
.carrusel__pista {
  position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  /* whole-pixel slides, rounded up: the track scrolls in whole pixels, so a fluid (fractional) slide width
     left the slide in view up to 0.6px off and a hairline of the previous photo showed at its edge.
     Rounded up, every slide starts on a whole pixel and its neighbours stay outside the track. */
  grid-auto-columns: round(up, 100%, 1px);
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.carrusel__pista::-webkit-scrollbar { display: none; }
.carrusel__pista:focus-visible { outline-offset: 4px; }
.carrusel__diapositiva { scroll-snap-align: start; scroll-snap-stop: always; min-width: 0; margin: 0; }
/* the control: one line in as many segments as photos, each filling as its photo's time runs (2026-11-08: "tenemos
   3 selectores de número y además un control de desplazamiento, es redundante… mejor una especie de carrusel"; the
   user chose the self-running carousel with a segmented bar over keeping the arrows or the numbers). The photo before
   is full, the one showing fills (js/carrusel.js drives the turn from that fill, so bar and photo never drift), the
   ones after are empty; the fill pauses where it is on hover, on focus, under a finger and offscreen. Each segment is
   a button (44px tall to the touch, 3px to the eye) that jumps to its photo. Under reduced motion nothing runs: the
   current segment is simply full. */
.carrusel__controles { margin-top: var(--e-3); }
html:not(.js) .carrusel__controles { display: none; } /* without JS the track still swipes and scrolls */
.carrusel__progreso { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.carrusel__segmento { position: relative; display: block; width: 100%; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.carrusel__segmento::before, .carrusel__relleno {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px;
}
.carrusel__segmento::before { background: var(--linea); transition: background-color var(--dur) var(--ease-out); }
.carrusel__segmento:hover::before { background: #C8C8C8; }
.carrusel__relleno { background: var(--rosa); transform: scaleX(0); transform-origin: 0 50%; }
.carrusel__segmento.is-hecho .carrusel__relleno { transform: scaleX(1); }
.carrusel__segmento.is-actual .carrusel__relleno { animation: carrusel-llena var(--carrusel-espera, 5500ms) linear forwards; }
.carrusel.is-quieto .carrusel__segmento.is-actual .carrusel__relleno { animation-play-state: paused; }
.carrusel__segmento:focus-visible { outline-offset: -8px; border-radius: 8px; }
@keyframes carrusel-llena { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .carrusel__pista { scroll-behavior: auto; }
  .carrusel__segmento.is-actual .carrusel__relleno { animation: none; transform: scaleX(1); }
}

/* pending photos on this page: the comp's hero and gallery ratios, note kept off the can */
.filo-foto { --ratio: 4 / 3; }
.filo-foto .foto-pendiente__nota { max-width: 44%; }
.filo-foto .foto-pendiente__escena { position: absolute; inset: 0; }
@media (min-width: 900px) {
  .filo-hero__carrusel .filo-foto { --ratio: 5 / 4; }
}
/* small blocks (phones, tablets): the note stays bottom-left and the can moves right and shrinks,
   so neither covers the other (overrides the shared "note to the top" rule) */
@container (max-width: 520px) {
  .filo-foto.foto-pendiente:has(.foto-pendiente__lata) .foto-pendiente__nota { top: auto; bottom: var(--e-4); max-width: 48%; }
  .filo-foto .foto-pendiente__tag { white-space: nowrap; }
  /* set on the can and its shadow (not the figure): the figure's inline --lata-* would win otherwise */
  .filo-foto:not(.filo-trio):not(.filo-duo) :is(.foto-pendiente__lata, .foto-pendiente__sombra) { --lata-x: 70%; --lata-alto: 60%; }
  .filo-trio .filo-trio__pos-1 { --lata-base: 30%; }
  .filo-trio .filo-trio__pos-2 { --lata-base: 38%; }
  .filo-trio .filo-trio__pos-3 { --lata-base: 32%; }
  .filo-duo .filo-duo__pos-1 { --lata-base: 28%; }
  .filo-duo .filo-duo__pos-2 { --lata-base: 34%; }
}

/* ------------------------------------------------------------------ values */
.filo-valores { padding-top: clamp(24px, 2.5vw, 40px); padding-bottom: var(--seccion); } /* was clamp(32px, 4vw, 56px): about 80px under the manifesto at 1440 instead of 140 */
.filo-valores__titulo { margin-bottom: clamp(32px, 4vw, 56px); }
.filo-valores__lista { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.filo-valor {
  display: grid; justify-items: center; align-content: start; gap: var(--e-4);
  padding: var(--e-4) clamp(12px, 1.6vw, 28px);
  text-align: center;
}
.filo-valor + .filo-valor { border-left: 1px solid var(--linea); }
.filo-valor__nombre { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; line-height: 1.3; }
.filo-valor__texto { font-size: var(--t-chico); line-height: 1.5; color: var(--tinta-2); max-width: 22ch; text-wrap: pretty; }

/* each icon tells its value in one short gesture (2026-11-08: "una animación a los íconos, por ejemplo que las copas
   choquen, el sol que los rayos aparezcan o esté subiendo y bajando"): the glasses swing apart and clink, sparks
   popping; the sun rises and its rays light one after another; the heart beats twice; the rainbow draws itself from
   the inside out; the leaf sways and settles. Played once as the list comes into view, one after the other, and
   again on hover (.is-anim, js/pages/filosofia.js); nothing moves under reduced motion. Drawn in the icon's own 24
   units: every pivot is in those units (transform-box: view-box). */
.icono-anim * { transform-box: view-box; }
.brindis__copa--izq { transform-origin: 5.65px 18.85px; }   /* each glass turns on its foot */
.brindis__copa--der { transform-origin: 18.35px 18.85px; }
.brindis__chispas { transform-origin: 12px 2.2px; }
.sol__centro { transform-origin: 12px 12px; }
.sol__rayos path { stroke-dasharray: 1; }
.corazon { transform-origin: 12px 14px; }
.arcoiris__arco { stroke-dasharray: 1; }
.hoja-icono { transform-origin: 2px 21px; }                      /* the leaf sways on its stem's end */
@media (prefers-reduced-motion: no-preference) {
  .filo-valor.is-anim .brindis__copa--izq { animation: brindis-izq 1300ms cubic-bezier(0.3, 0.7, 0.2, 1) both; }
  .filo-valor.is-anim .brindis__copa--der { animation: brindis-der 1300ms cubic-bezier(0.3, 0.7, 0.2, 1) both; }
  .filo-valor.is-anim .brindis__chispas { animation: brindis-chispas 1300ms var(--ease-out) both; }
  .filo-valor.is-anim .sol__centro { animation: sol-sube 900ms var(--ease-out) both; }
  .filo-valor.is-anim .sol__rayos path { animation: sol-rayo 420ms var(--ease-out) calc(420ms + var(--k) * 70ms) both; }
  .filo-valor.is-anim .corazon { animation: corazon-late 1200ms ease-in-out both; }
  .filo-valor.is-anim .arcoiris__arco { animation: arcoiris-traza 620ms var(--ease-out) calc(var(--k) * 180ms) both; }
  .filo-valor.is-anim .arcoiris__pies { animation: arcoiris-pies 300ms var(--ease-out) 620ms both; }
  .filo-valor.is-anim .hoja-icono { animation: hoja-mece 1500ms cubic-bezier(0.35, 0, 0.25, 1) both; }
}
@keyframes brindis-izq { 0% { transform: rotate(-12deg); } 42% { transform: rotate(6deg); } 56% { transform: rotate(-1deg); } 72% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
@keyframes brindis-der { 0% { transform: rotate(12deg); } 42% { transform: rotate(-6deg); } 56% { transform: rotate(1deg); } 72% { transform: rotate(-2deg); } 100% { transform: rotate(0); } }
@keyframes brindis-chispas { 0%, 40% { opacity: 0; transform: scale(0.4); } 54% { opacity: 1; transform: scale(1.3); } 74%, 100% { opacity: 1; transform: scale(1); } }
@keyframes sol-sube { from { opacity: 0; transform: translateY(5px) scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes sol-rayo { from { opacity: 0; stroke-dashoffset: 1; } 30% { opacity: 1; } to { opacity: 1; stroke-dashoffset: 0; } }
@keyframes corazon-late { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.2); } 28% { transform: scale(1); } 42% { transform: scale(1.12); } 60% { transform: scale(1); } }
@keyframes arcoiris-traza { from { opacity: 0; stroke-dashoffset: 1; } 20% { opacity: 1; } to { opacity: 1; stroke-dashoffset: 0; } }
@keyframes arcoiris-pies { from { opacity: 0; } to { opacity: 1; } }
@keyframes hoja-mece { 0% { transform: rotate(-14deg); } 38% { transform: rotate(7deg); } 64% { transform: rotate(-3deg); } 84% { transform: rotate(1deg); } 100% { transform: rotate(0); } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .filo-valor:hover .icono-circulo { transform: scale(1.05); }
}
@media (max-width: 899px) {
  .filo-valores__lista { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--e-6); }
  .filo-valor + .filo-valor { border-left: 0; }
  .filo-valor:nth-child(even) { border-left: 1px solid var(--linea); }
  .filo-valor:last-child { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--linea); padding-top: var(--e-6); }
}
@media (max-width: 479px) {
  .filo-valores__lista { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .filo-valor { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "icono nombre" "icono texto"; justify-items: start; text-align: left; column-gap: var(--e-4); row-gap: 6px; padding: var(--e-5) 0; }
  .filo-valor .icono-circulo { grid-area: icono; width: 56px; height: 56px; }
  .filo-valor .icono-circulo .icon { --icon: 26px; stroke-width: 1.4; }
  .filo-valor__nombre { grid-area: nombre; align-self: end; }
  .filo-valor__texto { grid-area: texto; max-width: none; }
  .filo-valor:nth-child(even), .filo-valor:last-child { border-left: 0; }
  .filo-valor + .filo-valor { border-top: 1px solid var(--linea); padding-top: var(--e-5); }
  .filo-valor:last-child { grid-column: auto; }
}

/* ------------------------------------------------------------------ story and personality splits */
.filo-split + .filo-split { margin-top: clamp(24px, 3vw, 40px); }
.filo-split--personalidad { margin-bottom: var(--seccion); }
.filo-split__texto { gap: var(--e-5); }
.filo-split__texto .overline { margin-bottom: 0; }
.filo-split__texto .titulo-2 { max-width: 14ch; }
.filo-split__parrafos { display: grid; gap: var(--e-4); max-width: 44ch; line-height: 1.55; }
.superficie-butter .filo-split__parrafos { color: var(--tinta); }
.superficie-peach-claro .filo-split__parrafos { color: var(--tinta); }
.filo-split__foto { --ratio: 4 / 3; }
.filo-split__carrusel { align-self: center; }
@media (min-width: 900px) {
  .filo-split__rejilla { align-items: stretch; }
  .filo-split__foto { aspect-ratio: auto; align-self: stretch; min-height: 480px; }
  .filo-split__texto { min-height: 480px; }
  /* the gallery is its half, flush with the peach block and exactly as tall (2026-11-08, "ajusta la imagen para que
     tenga el mismo tamaño que el contenedor del texto, se ve muy pequeña"; it stood inset 24-48px, 4:3, centred):
     like the story split above, photo and colour meet edge to edge. Its bar hangs just under the photo, in the
     section's bottom margin, so it adds nothing to the row and both blocks share their top and bottom lines. */
  .filo-split__carrusel { align-self: stretch; }
  .filo-split__carrusel .carrusel__pista { height: 100%; }
  .filo-split__carrusel .filo-foto { --ratio: auto; height: 100%; }
  .filo-split__carrusel .carrusel__controles { position: absolute; left: 0; right: 0; top: 100%; }
}
/* the story photo settles from a soft zoom as it enters (client note 4) */
@media (prefers-reduced-motion: no-preference) {
  html.js-revelar .filo-zoom .foto-pendiente__escena { transition: transform 1100ms var(--ease-out); }
  html.js-revelar .filo-zoom:not(.is-visible) .foto-pendiente__escena { transform: scale(1.06); }
}

/* two and three cans composed in one pending photo */
.filo-trio__lata, .filo-duo__lata { --lata-alto: 46%; }
.filo-trio__pos-1 { --lata-x: 29%; --lata-base: 22%; --lata-giro: 8deg; }
.filo-trio__pos-2 { --lata-x: 50%; --lata-base: 30%; --lata-giro: -2deg; }
.filo-trio__pos-3 { --lata-x: 71%; --lata-base: 24%; --lata-giro: -9deg; }
.filo-duo__lata { --lata-alto: 56%; }
.filo-duo__pos-1 { --lata-x: 40%; --lata-base: 18%; --lata-giro: 6deg; }
.filo-duo__pos-2 { --lata-x: 61%; --lata-base: 24%; --lata-giro: -5deg; }

/* ------------------------------------------------------------------ the brand's sticker (livin.css "brand stickers") */
/* Nuestra personalidad: LIVIN with the peace hand for its V, stuck on the peach block's top-right corner, across
   its top edge, beside the label and over the title's end (2026-11-07: off the gallery, where it covered the
   photo). Right of the label and above the title at every width; the white over the block takes its top, clear of the block above. */
.filo-personalidad__sticker { --tam: 92px; --giro: 8deg; --arriba: calc(var(--tam) * -0.24); --derecha: 14px; }
@media (min-width: 900px) {
  .filo-personalidad__sticker { --tam: clamp(120px, 9.8vw, 144px); --giro: 8deg; --arriba: calc(var(--tam) * -0.12); --derecha: clamp(18px, 2vw, 30px); }
}
