/* The capsule's engraved foil rim opens with it; the wordmark stays untouched. */
.zii-logo-replay .zii-scroll-signature::before {
  width: min(81%, 46rem);
  opacity: .58;
}
.zii-logo-replay .zii-scroll-signature::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  width: min(88%, 48rem);
  aspect-ratio: 5.2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 124'%3E%3Cdefs%3E%3ClinearGradient id='foil'%3E%3Cstop stop-color='%23f15065' stop-opacity='0'/%3E%3Cstop offset='.22' stop-color='%23f15065' stop-opacity='.80'/%3E%3Cstop offset='.46' stop-color='%23f3cb85' stop-opacity='.26'/%3E%3Cstop offset='.60' stop-color='%23f3cb85' stop-opacity='.26'/%3E%3Cstop offset='.83' stop-color='%2377b4ff' stop-opacity='.76'/%3E%3Cstop offset='1' stop-color='%2377b4ff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='none' stroke='url(%23foil)'%3E%3Cpath d='M4 62h80l22-22h77l31-31h212l31 31h77l22 22h80M4 62h80l22 22h77l31 31h212l31-31h77l22-22h80'/%3E%3Cpath opacity='.45' d='M26 62h62l25-13h75l30-28h204l30 28h75l25 13h62M26 62h62l25 13h75l30 28h204l30-28h75l25-13h62'/%3E%3C/g%3E%3Cpath fill='%23e3b970' fill-opacity='.78' d='m106 40 4-4 4 4-4 4zm420 44 4-4 4 4-4 4z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
  opacity: .75;
}
.zii-logo-replay .zii-scroll-signature .zii-capsule { z-index: 1; }

@keyframes zii-foil-unfold {
  from { transform: scaleX(.58) scaleY(.85); opacity: .38; }
  to { transform: none; opacity: .75; }
}
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  @supports (animation-timeline: view()) {
    html:not([data-motion-paused]) body:not(.motion-off, .reduce-motion, .page-inactive) .zii-logo-replay:not([data-replay-state]) .zii-scroll-signature::after {
      animation: zii-foil-unfold linear both;
      animation-timeline: --zii-capsule-viewport;
      animation-range: entry 48% cover 42%;
    }
  }
  html:not([data-motion-paused]) body:not(.motion-off, .reduce-motion, .page-inactive) .zii-logo-replay[data-replay-state="playing"] .zii-scroll-signature::after {
    animation: zii-foil-unfold 640ms cubic-bezier(.16, 1, .3, 1) both;
  }
}

/* A pressed edge answers the actual finger location without moving the hit area. */
body[data-page="home"] #universi .home-collection-link {
  position: relative;
}
body[data-page="home"] #universi .home-collection-link::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, #ed5468, #f3cb85 46%, #77b4ff);
  opacity: 0;
}
body[data-page="home"] #universi .home-collection-link[data-foil-press]::after {
  opacity: .9;
}
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  html:not([data-motion-paused]) body:not(.motion-off, .reduce-motion) #universi .home-collection-link::after {
    transform: scaleX(.3);
    transform-origin: var(--foil-press-origin, 50%) center;
    transition: opacity 140ms ease-out, transform 140ms cubic-bezier(.16, 1, .3, 1);
  }
  html:not([data-motion-paused]) body:not(.motion-off, .reduce-motion) #universi .home-collection-link[data-foil-press]::after {
    transform: scaleX(1);
  }
}

/* A finite color reflection signals the native navigation; no elapsed-time fill. */
.zii-page-transition__bar span {
  width: 100%;
  background: linear-gradient(90deg, #9b4252 0%, #e8ab77 27%, #ffdea2 50%, #82a7da 77%, #34588d);
  opacity: .8;
}
.zii-page-transition:is([data-state="leaving"],[data-state="arriving"]):not(.zii-page-transition--quiet) .zii-page-transition__bar span {
  animation: zii-navigation-foil 460ms ease-out both;
}
@keyframes zii-navigation-foil {
  0% { opacity: .92; transform: scaleX(.24); }
  64% { opacity: .83; transform: scaleX(1); }
  100% { opacity: .30; transform: scaleX(1); }
}
@media (forced-colors: active) {
  .zii-logo-replay .zii-scroll-signature::after { display: none; }
  body[data-page="home"] #universi .home-collection-link[data-foil-press]::after { background: Highlight; }
  .zii-page-transition__bar span { background: Highlight; }
}

/* A red and blue enamel seam carries the eye to the next home section.
   The section label and its controls never move; the line stands alone. */
body[data-page="home"] :is(#home-navigation-title, #discovery-title, #home-experiences-title) {
  position: relative;
}
body[data-page="home"] :is(#home-navigation-title, #discovery-title, #home-experiences-title)::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: -.26em;
  inline-size: min(91%, 15rem);
  margin-inline: auto;
  block-size: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, #ae405b 23%, #f0ca85 48% 52%, #608ec4 77%, transparent 100%);
  opacity: .63;
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  @supports (animation-timeline: view()) {
    body[data-page="home"] :is(#home-navigation-title, #discovery-title, #home-experiences-title) {
      view-timeline-name: --zii-home-heading;
      view-timeline-axis: block;
    }
    html:not([data-motion-paused]) body[data-page="home"]:not(.motion-off, .reduce-motion, .page-inactive)
    :is(#home-navigation-title, #discovery-title, #home-experiences-title)::after {
      animation: zii-section-seam linear both;
      animation-timeline: --zii-home-heading;
      animation-range: entry 15% cover 32%;
    }
  }
}
@keyframes zii-section-seam {
  from { opacity: .2; transform: scaleX(.24); }
  70% { opacity: .83; transform: scaleX(1); }
  to { opacity: .63; transform: scaleX(1); }
}
@media (forced-colors: active) {
  body[data-page="home"] :is(#home-navigation-title, #discovery-title, #home-experiences-title)::after { background: CanvasText; }
}
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  html:not([data-motion-paused]) body[data-page="home"]:not(.motion-off, .reduce-motion, .page-inactive)
  :is(#home-navigation-title, #discovery-title, #home-experiences-title)[data-section-seam-entered]::after {
    animation: zii-section-seam 440ms cubic-bezier(.16, 1, .3, 1) both;
  }
}

/* The opening edge of each home chapter picks up the color of the next room. */
body[data-page="home"] :is(#universi, #scopri, .home-experiences) { position: relative; }
.zii-chapter-light {
  --chapter-tone: 73 143 241;
  --chapter-edge: 157 208 255;
  position: absolute;
  z-index: 0;
  inset: -30px 0 auto;
  margin-inline: auto;
  inline-size: min(94%, 54rem);
  block-size: clamp(72px, 13vw, 146px);
  pointer-events: none;
  overflow: clip;
  view-timeline-name: --zii-home-chapter;
  view-timeline-axis: block;
}
.zii-chapter-light[data-chapter-palette="ember"] { --chapter-tone: 230 75 110; --chapter-edge: 254 166 149; }
.zii-chapter-light[data-chapter-palette="amber"] { --chapter-tone: 229 166 84; --chapter-edge: 255 220 153; }
.zii-chapter-light::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 24%, rgb(var(--chapter-tone) / .32), transparent 68%),
    radial-gradient(ellipse 42% 2px at 50% 24%, rgb(var(--chapter-edge) / .8), transparent);
  opacity: .24;
}
body[data-page="home"] :is(#home-navigation-title, .discovery-heading, #home-experiences-title) { position: relative; z-index: 1; }
@keyframes zii-chapter-light-in {
  0% { opacity: .12; transform: translateY(9px) scaleX(.54); }
  59% { opacity: .96; transform: translateY(0) scaleX(1); }
  100% { opacity: .24; transform: none; }
}
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  @supports (animation-timeline: view()) and (view-timeline-name: --zii-home-chapter) {
    html:not([data-motion-paused]) body:not(.motion-off, .reduce-motion, .page-inactive) .zii-chapter-light::before {
      animation: zii-chapter-light-in linear both;
      animation-timeline: --zii-home-chapter;
      animation-range: entry 5% cover 55%;
    }
  }
  html:not([data-motion-paused]) body:not(.motion-off, .reduce-motion, .page-inactive) .zii-chapter-light[data-chapter-arrived]::before {
    animation: zii-chapter-light-in 760ms cubic-bezier(.16, 1, .3, 1) both;
  }
}
@media (forced-colors: active) { .zii-chapter-light { display: none; } }

/* The entry filaments return between chapters and during native navigation.
   The trace is decoration, never a mask over content or the touch target. */
.zii-chapter-light::before {
  background:
    radial-gradient(ellipse at 50% 24%, rgb(var(--chapter-tone) / .32), transparent 68%),
    radial-gradient(ellipse 42% 2px at 50% 24%, rgb(var(--chapter-edge) / .8), transparent),
    radial-gradient(ellipse 36% 1px at 50% 29%, rgb(var(--chapter-edge) / .58), transparent),
    radial-gradient(ellipse 29% 1px at 50% 34%, rgb(var(--chapter-edge) / .43), transparent);
}
.zii-page-transition__bar span {
  border-radius: 50%;
  box-shadow: 0 0 9px #88b8ff70;
}
/* Local reflection: leave the card's print, hit box and label alone. */
:is(.store-related-photo, .discovery-card-face) { position: relative; }
:is(.store-related-photo, .discovery-card-face)::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(ellipse at var(--card-touch-x, 50%) var(--card-touch-y, 42%),
    #fde3ac1f 0%, #82bfff14 23%, transparent 58%);
  box-shadow: inset 0 0 0 1px #e6d3ab92, inset 0 0 24px #78b5f24d;
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  html:not([data-motion-paused]) body:not(.motion-off, .reduce-motion, .page-inactive)
  :is(.store-related-photo, .discovery-card-face)::before { transition: opacity 210ms ease-out; }
  html:not([data-motion-paused]) body:not(.motion-off, .reduce-motion, .page-inactive)
  :is(.store-related-link, .discovery-card)[data-card-touch] :is(.store-related-photo, .discovery-card-face)::before {
    opacity: 1;
    transition-duration: 85ms;
  }
}
.store-related { position: relative; }
.store-related .zii-chapter-light { inset-block-start: -36px; opacity: .8; }
.store-related > :is(header, .store-related-grid) { position: relative; z-index: 1; }
