/* Tlali Huerta — demo1. Layout, type and every transition that CSS can own.
   main.js, slider.js and product.js only write transforms, a few custom properties on the
   element that uses them, and state classes. */

:root {
  --accent: #e5007d; /* rosa mexicano */
  --ink: #1b3fa8; /* cobalto */
  --paper: #f5f1ea;
  --white: #ffffff;
  --tile: #ece6db;

  --serif: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  --text-small: 0.875rem;
  --text-base: 1rem;
  --text-medium: clamp(1.125rem, calc(1.085rem + 0.165vw), 1.25rem);
  --text-large: clamp(1.2rem, calc(1.1rem + 0.5vw), 1.938rem);
  --text-hero: clamp(3rem, calc(2.2rem + 5.4vw), 999px);

  --pad: clamp(16px, 2vw, 40px);
  --space-s: 2.5rem;
  --space-l: clamp(4rem, 7vw, 6.25rem);
  --space-xl: clamp(6rem, 14vw, 12.5rem);
  --radius: 15px;

  --ease-premium: cubic-bezier(0.645, 0.045, 0.355, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-power: cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* The home is one screen: the wheel drives the carousel, not the page. */
html.is-home,
html.is-home body {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

h1, h2, p, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font-weight: 600;
  transform: translateY(-200%);
}

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

/* ---------- Loader (same screen as demo2 and demo3: white canvas, black Xolomai logo) ---------- */

html.is-loading {
  overflow: hidden;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: #fff;
  transition: opacity 500ms;
}

.loader.is-done {
  opacity: 0;
  pointer-events: none;
}

.loader-logo {
  width: 120px;
  height: auto;
  user-select: none;
}

.loader-bar {
  width: 160px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
}

.loader-bar-fill {
  height: 100%;
  background: #000;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease-out;
}

.loader-text {
  color: rgba(0, 0, 0, 0.5);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
  .loader-logo {
    width: 148px;
  }
}

/* ---------- Rolling labels: each letter swaps for a copy from below on hover ---------- */

.roll {
  display: inline-flex;
}

/* 1.2em tall so accents (MENÚ, PRODUCCIÓN) are not clipped */
.roll__char {
  position: relative;
  display: inline-block;
  height: 1.2em;
  overflow: hidden;
  line-height: 1.2;
}

.roll__top,
.roll__bot {
  display: block;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: calc(var(--c, 0) * 18ms);
}

.roll__bot {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate3d(0, 100%, 0);
}

@media (hover: hover) and (pointer: fine) {
  :is(a, button):hover > .roll .roll__top,
  :is(a, button):hover .menu-toggle__label .roll__top,
  .fp-nav__link:hover .roll__top {
    transform: translate3d(0, -100%, 0);
  }

  :is(a, button):hover > .roll .roll__bot,
  :is(a, button):hover .menu-toggle__label .roll__bot,
  .fp-nav__link:hover .roll__bot {
    transform: none;
  }
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 900;
  padding: clamp(16px, 2vw, 30px);
  pointer-events: none;
  transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.site-header.is-hidden {
  transform: translate3d(0, calc(-100% - 40px), 0);
}

.site-header__bar {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.site-header__side {
  display: flex;
  pointer-events: auto;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
}

.lang-switch__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: var(--text-small);
  font-weight: 600;
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
}

.lang-switch__item.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}

.lang-switch__item[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
}

.site-logo {
  position: absolute;
  top: 0;
  left: 50%;
  width: clamp(104px, 9.5vw, 140px);
  pointer-events: auto;
  transform: translateX(-50%);
}

.site-logo__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.site-logo__icon {
  color: var(--accent);
  transform-box: fill-box;
  transform-origin: center bottom;
  transition: transform 0.78s var(--ease-premium), opacity 0.3s var(--ease-premium);
}

.site-logo__icon circle {
  fill: currentColor;
}

.site-logo__icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
}

.site-logo__word {
  fill: var(--ink);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.site-logo__huerta {
  fill: var(--accent);
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
}

.site-logo__word,
.site-logo__huerta {
  transition: transform 0.78s var(--ease-premium), fill 0.3s;
}

/* Scrolled down a page: the icon goes, the wordmark moves up (like the reference). */
.site-header.is-compact .site-logo__icon {
  opacity: 0;
  transform: translateY(-20px) scale(0);
}

.site-header.is-compact .site-logo__word,
.site-header.is-compact .site-logo__huerta {
  transform: translateY(-62px);
}

.site-header.is-menu-open .site-logo__icon {
  color: var(--ink);
}

.site-header.is-menu-open .site-logo__huerta {
  fill: var(--paper);
}

.site-header.is-menu-open .lang-switch__item.is-active {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

/* Menu toggle: an outlined pill and an accent disc with a diamond */
.menu-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle__pill {
  position: relative;
  display: inline-flex;
  min-width: 116px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: var(--text-small);
  font-weight: 600;
  text-transform: uppercase;
}

.menu-toggle__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.9s var(--ease-premium), opacity 0.9s var(--ease-premium);
}

.menu-toggle__label--close {
  opacity: 0;
  transform: translate3d(0, 100%, 0);
}

.menu-toggle__disc {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent);
  isolation: isolate;
}

.menu-toggle__disc::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform 0.3s ease-out;
}

.menu-toggle:hover .menu-toggle__disc::before {
  transform: scale(1);
}

.menu-toggle__diamond {
  position: relative;
  z-index: 1;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--paper);
  transform: rotate(45deg);
  transition: transform 0.9s var(--ease-premium), opacity 0.9s var(--ease-premium);
}

.menu-toggle__close {
  position: absolute;
  z-index: 1;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  opacity: 0;
  transform: translate3d(0, 150%, 0);
  transition: transform 0.9s var(--ease-premium), opacity 0.9s var(--ease-premium);
}

.site-header.is-menu-open .menu-toggle__label--menu {
  opacity: 0;
  transform: translate3d(0, -100%, 0);
}

.site-header.is-menu-open .menu-toggle__label--close {
  opacity: 1;
  transform: none;
}

.site-header.is-menu-open .menu-toggle__disc {
  background: var(--paper);
}

.site-header.is-menu-open .menu-toggle:hover .menu-toggle__close {
  stroke: var(--paper);
}

.site-header.is-menu-open .menu-toggle__diamond {
  opacity: 0;
  transform: translate3d(0, -150%, 0) rotate(45deg);
}

.site-header.is-menu-open .menu-toggle__close {
  opacity: 1;
  transform: none;
}

/* ---------- Full-page menu ---------- */

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  padding: 120px var(--pad) var(--pad);
  background: var(--accent);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.9s var(--ease-premium);
}

.site-menu.is-open {
  clip-path: inset(0 0 0 0);
}

.site-menu__inner {
  display: flex;
  flex: 1;
  align-items: flex-end;
}

.fp-nav {
  width: 100%;
}

.fp-nav__item {
  position: relative;
  display: flex;
  padding: 20px 0;
}

.fp-nav__item:last-child {
  padding-bottom: 0;
}

.fp-nav__item + .fp-nav__item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-premium) calc(0.3s + var(--i) * 0.08s);
}

.site-menu.is-open .fp-nav__item + .fp-nav__item::before {
  transform: scaleX(1);
}

/* Each row starts a step further right, as in the reference: a diagonal staircase. */
.fp-nav__link {
  --fraction: calc(var(--i) / 3);
  display: inline-flex;
  align-items: center;
  gap: 0.22em;
  margin-left: calc(var(--fraction) * 100%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.6rem, calc(1.8rem + 5.4vw), 999px);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(calc(var(--fraction) * -100%));
  transition: color 0.45s var(--ease-premium);
}

.fp-nav__link .roll,
.fp-nav__link [data-roll] {
  display: inline-flex;
  clip-path: inset(0 0 0 0);
}

.fp-nav__link .roll__char {
  height: 1.2em;
}

.fp-nav__item .roll__top {
  transform: translate3d(0, 110%, 0);
  transition: transform 0.9s var(--ease-expo);
  transition-delay: calc(0.25s + var(--i) * 0.07s + var(--c, 0) * 18ms);
}

.site-menu.is-open .fp-nav__item .roll__top {
  transform: none;
}

.site-menu.is-open .fp-nav__link:hover .roll__top {
  transform: translate3d(0, -100%, 0);
  transition-duration: 0.35s;
  transition-delay: calc(var(--c, 0) * 18ms);
}

.fp-nav__link.is-active {
  color: var(--paper);
}

.fp-nav__marker {
  width: 0.16em;
  height: 0.16em;
  border-radius: 1px;
  background: var(--paper);
  opacity: 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.6s var(--ease-premium) 0.45s, opacity 0.3s 0.45s;
}

.fp-nav__link.is-active .fp-nav__marker {
  opacity: 1;
  transform: rotate(45deg);
}

.fp-nav__row {
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
}

.fp-nav__item--last .fp-nav__link {
  margin-left: 0;
  transform: none;
}

.fp-nav__secondary {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 50px);
  font-size: var(--text-medium);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.6s 0.5s;
}

.site-menu.is-open .fp-nav__secondary {
  opacity: 1;
}

.fp-nav__secondary a:hover {
  color: var(--paper);
}

/* ---------- Home: jar slider ---------- */

.view[hidden] {
  display: none !important;
}

.jar-slider {
  --marquee-top: 55%;
  --marquee-angle: 10deg;
  --parallax-x: 0;
  --parallax-y: 0;
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
}

/* Tropical backdrop (Unsplash): tall palms across a turquoise sky, framed so their crowns sit
   above and beside the cobalt shape. Slightly oversized so the pointer parallax in slider.js
   never shows an edge. */
.jar-slider__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  pointer-events: none;
  user-select: none;
  transform: scale(1.06);
}

/* Lightens the top so the logo and the menu stay legible over the sky */
.jar-slider__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(245, 241, 234, 0.55), rgba(245, 241, 234, 0) 34%);
}

.jar-slider__shape {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 1;
  width: max(750px, 80vw);
  opacity: 0;
  pointer-events: none;
  transform-origin: center bottom;
  transform: translate3d(-50%, 24px, 0);
}

.jar-slider__shape-svg {
  display: block;
  width: 100%;
  height: auto;
  fill: var(--ink);
  transform: scale(0.96);
  transform-origin: center bottom;
}

.jar-slider__badge {
  position: absolute;
  top: 20%;
  left: 50%;
  width: 80%;
  aspect-ratio: 1;
  opacity: 0;
  margin-left: -40%;
}

.jar-slider__badge svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.jar-slider__badge text {
  fill: var(--accent);
  font-family: var(--serif);
  font-size: 104px;
  font-weight: 400;
}

.jar-slider__prompt {
  position: absolute;
  bottom: 30px;
  left: 0;
  z-index: 3;
  width: 100%;
  color: var(--paper);
  font-family: var(--serif);
  font-size: calc(var(--text-small) - 1px);
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.9s var(--ease-premium) 0.18s, transform 0.9s var(--ease-premium) 0.18s;
}

.jar-slider.is-ready .jar-slider__prompt {
  opacity: 1;
  transform: none;
}

.jar-slider__wrapper {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.jar-slider__wrapper:active {
  cursor: grabbing;
}

.jar-slider__marquee {
  position: absolute;
  top: var(--marquee-top);
  left: 50%;
  width: 100vw;
  height: var(--marquee-h, 560px);
  transform: translate(-50%, -50%) rotate(var(--marquee-angle));
}

.jar-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.jar-slider__item {
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  width: var(--item-w, 200px);
  height: var(--item-h, 320px);
  margin-top: calc(var(--item-h, 320px) / -2);
  opacity: 0;
  cursor: pointer;
  will-change: transform, opacity, filter;
  -webkit-tap-highlight-color: transparent;
}

.jar-slider__item canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.jar-slider.is-flying-out .jar-slider__shape,
.jar-slider.is-flying-out .jar-slider__item,
.jar-slider.is-flying-out .jar-slider__prompt {
  opacity: 0 !important;
  transition: opacity 0.42s var(--ease-soft);
}

@media (max-width: 1024px) {
  .jar-slider {
    --marquee-top: 43%;
  }
}

@media (max-width: 480px) {
  .jar-slider {
    --marquee-top: 45%;
  }

  .jar-slider__shape {
    width: 150vw;
  }

  .jar-slider__badge {
    width: 72%;
    margin-left: -36%;
  }
}

/* ---------- Cursor label ---------- */

.cursor-label {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 950;
  pointer-events: none;
  will-change: transform;
}

.cursor-label__pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 500px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(27, 63, 168, 0.12);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translate(18px, -50%) scale(0.4);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-premium), opacity 0.35s var(--ease-premium);
}

.cursor-label.is-visible .cursor-label__pill {
  opacity: 1;
  transform: translate(18px, -50%) scale(1);
}

.cursor-label__diamond {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}

/* ---------- Page transition: an ink panel rises, then lifts away ---------- */

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 1500;
  overflow: hidden;
  pointer-events: none;
}

.page-transition__panel {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translate3d(0, 100%, 0);
}

.page-transition__line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(245, 241, 234, 0.65);
  opacity: 0;
  transform: translate3d(-100%, 0, 0);
}

.page-transition.is-covering {
  pointer-events: auto;
}

.page-transition.is-covering .page-transition__panel {
  animation: panel-cover 0.75s var(--ease-premium) both;
}

.page-transition.is-covering .page-transition__line {
  animation: line-sweep 0.75s var(--ease-power) both;
}

.page-transition.is-lifting .page-transition__panel {
  animation: panel-lift 0.75s var(--ease-premium) both;
}

@keyframes panel-cover {
  from { transform: translate3d(0, 100%, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes panel-lift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -100%, 0); }
}

@keyframes line-sweep {
  0% { opacity: 1; transform: translate3d(-100%, 0, 0); }
  60% { opacity: 1; transform: translate3d(0, 0, 0); }
  100% { opacity: 0; transform: translate3d(0, 0, 0); }
}

/* The jar that flies from the carousel to the product page */
.flight {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1400;
  pointer-events: none;
  transform-origin: 0 0;
  will-change: transform;
}

/* ---------- Product page ---------- */

.product-hero {
  position: relative;
  overflow-x: clip;
}

.product-hero__stage {
  --ph: 0;
  --title-rest-y: 48%;
  --title-fall: 48vh;
  --meta-shift: 0px;
  --jar-rise: -24vh;
  --jar-rotate: 20deg;
  --jar-scale-to: 0.8;
  position: relative;
  height: 100svh;
  min-height: 560px;
}

.product-hero__title {
  position: absolute;
  top: var(--title-rest-y);
  left: 50%;
  z-index: 1;
  width: 95%;
  margin: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(3.4rem, calc(2.4rem + 7.6vw), 999px);
  font-weight: 400;
  line-height: 0.92;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, calc(-50% + var(--ph) * var(--title-fall)));
  will-change: transform;
}

.product-hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.product-hero__title .char {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  transition: transform 1s var(--ease-expo);
  transition-delay: calc(0.1s + var(--c) * 35ms);
}

.product-view.is-revealed .product-hero__title .char {
  transform: none;
}

.product-hero__meta {
  position: absolute;
  right: 0;
  bottom: 12%;
  left: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding-inline: calc(var(--pad) + 8.33vw);
}

.product-hero__meta-item {
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--text-large);
  line-height: 1.15;
  transform: translateY(calc(var(--ph) * var(--meta-shift)));
  opacity: 0;
  transition: opacity 0.8s var(--ease-premium) 0.35s, color 0.3s;
}

.product-view.is-revealed .product-hero__meta-item {
  opacity: 1;
}

a.product-hero__meta-item:hover {
  color: var(--accent);
}

.product-hero__meta-item--right {
  text-align: right;
}

.product-hero__jar {
  --scale-from: 1;
  position: absolute;
  bottom: var(--jar-bottom, -30%);
  left: 50%;
  z-index: 2;
  width: var(--jar-w, 30vw);
  aspect-ratio: 630 / 1013;
  transform: translate(-50%, calc(var(--ph) * var(--jar-rise))) rotate(calc(var(--ph) * var(--jar-rotate)))
    scale(calc(var(--scale-from) + var(--ph) * (var(--jar-scale-to) - var(--scale-from))));
  will-change: transform;
}

.product-hero__jar.is-flight-pending {
  opacity: 0;
}

.product-hero__jar canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.rhombus {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 2px;
  background: var(--ink);
  transform: rotate(45deg);
}

.page-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 4vw, 3.75rem);
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--space-xl) * 0.6) var(--pad) 0;
  text-align: center;
}

.page-intro__text {
  font-size: var(--text-large);
  line-height: 1.35;
  max-width: 980px;
}

.page-intro__after {
  font-size: var(--text-medium);
}

.page-intro__after strong {
  font-weight: 700;
}

.page-intro__after p + p {
  margin-top: 0.6em;
}

.product-meta {
  padding: var(--space-l) var(--pad) 0;
}

.product-meta__inner {
  display: grid;
  grid-template-columns: 4fr 2fr 1.1fr;
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid rgba(27, 63, 168, 0.2);
}

.product-meta__col {
  padding-top: 30px;
}

.product-meta__col:not(:first-child) {
  padding-left: clamp(20px, 3vw, 48px);
  border-left: 1px solid rgba(27, 63, 168, 0.2);
}

.product-meta__col:not(:last-child) {
  padding-right: clamp(20px, 3vw, 48px);
}

.product-meta__label {
  color: var(--accent);
  font-size: var(--text-small);
  font-weight: 700;
  text-transform: uppercase;
}

.product-meta__value {
  margin-top: 14px;
  font-size: var(--text-medium);
}

.product-meta__weights {
  display: flex;
  gap: 5px;
  margin-top: 14px;
}

.product-meta__weights li {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(27, 63, 168, 0.25);
  border-radius: 50%;
  font-size: var(--text-small);
  font-weight: 700;
}

/* Gallery: wide slides, dragged sideways, the picture moves a little against the slide */
.photo-slider {
  --slide-w: 61vw;
  --slide-gap: 40px;
  margin-top: var(--space-xl);
  overflow: hidden;
}

.photo-slider__track {
  position: relative;
  height: calc(var(--slide-w) * 702 / 980);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.photo-slider__track:active {
  cursor: grabbing;
}

.photo-slider__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--slide-w);
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  will-change: transform;
}

.still {
  position: absolute;
  top: 0;
  left: 50%;
  width: 132%;
  height: 100%;
  overflow: hidden;
  will-change: transform;
}

.still {
  background-position: center;
  background-size: cover;
}

/* The palm-shadow wall takes the flavour's colour: photo multiplied over it */
.still--tinted {
  background-blend-mode: multiply;
}

/* Photos get a soft vignette so the can stays the brightest thing in the frame */
.still--shaded::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 45%, transparent 35%, rgba(8, 14, 30, 0.45));
}

.still__fruit {
  position: absolute;
  width: var(--s);
  left: var(--x);
  top: var(--y);
  transform: rotate(var(--r));
}

.still__fruit svg {
  display: block;
  width: 100%;
  height: auto;
}

.still__jar {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  aspect-ratio: 630 / 1013;
  transform: rotate(var(--r));
  filter: drop-shadow(18px 28px 22px rgba(10, 18, 40, 0.38));
}

/* Standing on a surface: a tight contact shadow instead of a floating one */
.still__jar--standing {
  filter: drop-shadow(6px 4px 5px rgba(10, 18, 40, 0.35));
}

.still__jar--standing::after {
  content: "";
  position: absolute;
  bottom: 0.5%;
  left: 2%;
  z-index: -1;
  width: 140%;
  height: 7%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(10, 18, 40, 0.42), transparent);
  transform: translate(-6%, 40%);
}

.still__jar canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Other products */
.other-products {
  padding-block: var(--space-xl);
}

.other-products__title {
  color: var(--accent);
  font-family: var(--serif);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.other-products__track {
  display: flex;
  gap: 15px;
  margin-top: var(--space-l);
  padding-inline: var(--pad);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.other-products__track::-webkit-scrollbar {
  display: none;
}

.product-card {
  --card-tile: var(--tile);
  position: relative;
  flex: 0 0 calc(25vw - var(--pad) / 2 - 12px);
  aspect-ratio: 367 / 480;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--tile);
  scroll-snap-align: start;
  transition: background-color 0.6s var(--ease-soft), transform 0.6s var(--ease-soft);
}

/* The fruit's photo fades in behind the can on hover */
.product-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 0.5s var(--ease-soft), transform 1.2s var(--ease-soft);
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(10, 20, 50, 0.55));
  opacity: 0;
  transition: opacity 0.5s;
}

.product-card__jar {
  position: absolute;
  z-index: 1;
  inset: 12% 22%;
  filter: drop-shadow(10px 22px 18px rgba(10, 20, 50, 0.35));
  transform-origin: 50% 72%;
  transition: transform 1s var(--ease-soft);
}

.product-card__jar canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card__name {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 16px;
  left: 0;
  font-family: var(--serif);
  font-size: var(--text-medium);
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.6s var(--ease-soft);
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover {
    background: var(--card-tile);
    transform: scale(0.96) rotate(2deg);
  }

  .product-card:hover .product-card__jar {
    transform: scale(1.1) rotate(4deg);
  }

  .product-card:hover .product-card__photo,
  .product-card:hover::after {
    opacity: 1;
    transform: none;
  }

  .product-card:hover .product-card__name {
    color: var(--white);
  }

  .product-card:hover .product-card__name {
    opacity: 1;
    transform: none;
  }
}

/* Footer */
.site-footer {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: var(--space-l) var(--pad) var(--space-s);
  background: var(--ink);
  color: var(--paper);
}

.site-footer__logo {
  margin-left: 25%;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(4rem, 13.4vw, 999px);
  font-weight: 700;
  line-height: 0.95;
}

.site-footer__logo em {
  display: block;
  font-weight: 400;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 3fr 2fr 3fr 4fr;
  gap: 2rem;
  margin-top: auto;
  padding-top: var(--space-l);
  font-size: var(--text-base);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.site-footer__mark {
  width: clamp(64px, 6vw, 92px);
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
}

.site-footer__mark circle {
  fill: var(--accent);
  stroke: none;
}

.site-footer__copy {
  font-size: var(--text-small);
  line-height: 1.6;
}

.site-footer__copy strong {
  color: var(--accent);
  text-transform: uppercase;
}

.site-footer__nav li + li {
  margin-top: 5px;
}

.site-footer__nav a:hover,
.site-footer__email:hover {
  color: var(--accent);
}

.site-footer__block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__label {
  margin-top: 1rem;
  color: var(--accent);
  font-size: var(--text-small);
  font-weight: 700;
  text-transform: uppercase;
}

.site-footer__label:first-child {
  margin-top: 0;
}

.site-footer__mail {
  font-size: var(--text-medium);
}

.site-footer__email {
  margin-top: 1rem;
  color: var(--accent);
}

/* Small fixed credit, bottom left (the reference keeps "Privacy & Cookies" here) */
.site-legal {
  position: fixed;
  bottom: 14px;
  left: 24px;
  z-index: 700;
  font-size: var(--text-small);
  transition: opacity 0.3s;
}

.site-legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

html:not(.is-home) .site-legal {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .product-hero__title {
    font-size: clamp(3rem, calc(2rem + 6vw), 999px);
  }

  .product-hero__meta {
    justify-content: center;
    top: 35%;
    bottom: auto;
  }

  .product-hero__meta-item--right {
    display: none;
  }

  .product-meta__inner {
    grid-template-columns: 1fr;
    gap: var(--space-s);
    text-align: center;
  }

  .product-meta__col:not(:first-child) {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(27, 63, 168, 0.2);
  }

  .product-meta__col:not(:last-child) {
    padding-right: 0;
  }

  .product-meta__weights {
    justify-content: center;
  }

  .photo-slider {
    --slide-w: 74vw;
    --slide-gap: 24px;
  }

  .product-card {
    flex-basis: calc(40vw - var(--pad));
  }

  .site-footer {
    min-height: auto;
  }

  .site-footer__logo {
    margin-left: 0;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    row-gap: var(--space-l);
  }
}

@media (max-width: 480px) {
  .menu-toggle__pill {
    min-width: 100px;
  }

  .fp-nav__link {
    --fraction: 0;
  }

  .fp-nav__row {
    flex-direction: column-reverse;
    gap: 24px;
  }

  .photo-slider {
    --slide-w: 84vw;
    --slide-gap: 16px;
  }

  .product-card {
    flex-basis: 72%;
  }

  .product-card__name {
    opacity: 1;
    transform: none;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-legal {
    left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}
