/* ==========================================================================
   ZEVYRO · hero-cinematic                                  owner: home-hero
   The first screen + the pinned «Os Três» sequence. Mobile first.

   Patterns
   - phone (< 750) and tablet (750–989): "stacked". The stage sits on top
     (4:5 phone, 16:9 tablet), the copy below it. In the sequence the stage is
     sticky at the top and the panels scroll BENEATH it: the stage is above
     them and its lower part is masked to transparent, so text slides under
     the cards, never over them.
   - desktop (≥ 990): "split". A full-bleed 16:9 stage, the set composed in
     the right ~58% by the engine's lens shift; the copy and the panels pass
     in the left column, beside the cards.
   States
   - default = no JS / fallback: no pin, panels are a stacked list with
     their product image in the tilt component.
   - .is-cinematic (3D + GSAP running): sticky stage, tall panels, no images.
   - .is-static (no 3D on this device): the poster keeps a slow light sweep.
   - [data-z-3d="ready"] on the stage (set by the engine): canvas visible.
   ========================================================================== */

.z-hero {
  --hero-h: min(125vw, 82vh);
  --hero-cut: 63%;          /* phone: the stage is opaque down to here … */
  --hero-clear: 66.5%;      /* … and transparent from here (the copy starts) */
  position: relative;
  isolation: isolate;
  background: var(--z-obsidian);
  color: var(--z-ivory);
}
@supports (height: 1svh) { .z-hero { --hero-h: min(125vw, 82svh); } }
@media (min-width: 750px) {
  .z-hero { --hero-h: 56.25vw; --hero-cut: 77%; --hero-clear: 82%; }
}
@media (min-width: 990px) {
  .z-hero { --hero-h: max(520px, min(56.25vw, 100vh)); }
  @supports (height: 1svh) { .z-hero { --hero-h: max(520px, min(56.25vw, 100svh)); } }
}

.z-hero__track { position: relative; }

/* --------------------------------------------------------------- the stage */
.z-hero__stagebox {
  position: relative;
  z-index: 2;
  height: var(--hero-h);
  pointer-events: none;
}
.z-hero__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--z-obsidian);
  contain: strict;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 var(--hero-cut), transparent var(--hero-clear));
  mask-image: linear-gradient(180deg, #000 0, #000 var(--hero-cut), transparent var(--hero-clear));
}
@media (min-width: 990px) {
  .z-hero__stage { -webkit-mask-image: none; mask-image: none; }
}
.z-hero__poster,
.z-hero__poster img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

/* Opening: a slow gold light sweep across the poster (overlay blend: it only
   lights what is already bright, the metal; the velvet stays black). */
.z-hero__sweep {
  position: absolute;
  inset: -10% -60%;
  pointer-events: none;
  background: linear-gradient(104deg,
    rgba(255, 226, 168, 0) 40%, rgba(255, 228, 172, .34) 46.5%, rgba(255, 244, 214, .78) 50%,
    rgba(255, 228, 172, .34) 53.5%, rgba(255, 226, 168, 0) 60%);
  mix-blend-mode: overlay;
  transform: translate3d(-56%, 0, 0);
  animation: z-hero-sweep 1.25s var(--z-ease-inout) .12s both;
  will-change: transform;
}
@keyframes z-hero-sweep {
  from { transform: translate3d(-56%, 0, 0); }
  to { transform: translate3d(56%, 0, 0); }
}
/* No 3D on this device: the light keeps passing, slowly (every 9 s). */
.z-hero.is-static .z-hero__sweep { animation: z-hero-sweep-loop 9s var(--z-ease-inout) 1.5s infinite; }
@keyframes z-hero-sweep-loop {
  0% { transform: translate3d(-56%, 0, 0); }
  22% { transform: translate3d(56%, 0, 0); }
  100% { transform: translate3d(56%, 0, 0); }
}
.z-hero__stage[data-z-3d="ready"] .z-hero__sweep { animation: none; opacity: 0; }

/* «Imagens ilustrativas»: a vertical inscription on the stage edge, like the
   side legend of a banknote. */
.z-hero__mark {
  position: absolute;
  right: max(3px, env(safe-area-inset-right, 0px));
  top: calc(var(--hero-h) * .37);
  margin: 0;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  font-family: var(--z-font-caps);
  font-size: 8.5px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--z-ivory-2);
  white-space: nowrap;
  opacity: .8;
}
@media (min-width: 750px) {
  .z-hero__mark { right: calc(var(--z-gutter) * .45); top: 50%; font-size: 9px; }
}

/* ---------------------------------------------------------- the first copy */
.z-hero__intro {
  position: relative;
  z-index: 1;
  margin-top: calc(var(--hero-h) * (var(--hero-clear-n, .665) - 1));
}
@media (min-width: 750px) {
  .z-hero__intro { --hero-clear-n: .82; }
  .z-hero__actions .z-btn { flex: 0 0 auto; padding-inline: 2em; }
}
.z-hero__copy { max-width: 34rem; }
.z-hero__eyebrow { margin-bottom: 8px; }
.z-hero__eyebrow::before { width: 2.2em; }

.z-hero__title {
  font-size: clamp(2.875rem, 13.8vw, 4.25rem);
  line-height: .9;
  letter-spacing: -.022em;
  text-wrap: balance;
}
.z-hero__tl { display: block; padding-block: .02em .1em; margin-block: -.02em -.1em; overflow: hidden; }
.z-hero__tl-in { display: block; }
.z-hero__title em { padding-right: .14em; }

.z-hero__body {
  max-width: 36ch;
  margin-top: 10px;
  font-size: var(--z-fs-base);
  line-height: 1.55;
  color: var(--z-ivory-2);
}
.z-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.z-hero__actions .z-btn { --z-btn-h: 50px; flex: 1 1 auto; padding-inline: 1.35em; }
.z-hero__micro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  margin-top: 11px;
  font-size: var(--z-fs-xs);
  letter-spacing: .02em;
  color: var(--z-ivory-2);
}
.z-hero__dot {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  background: var(--z-gold);
  opacity: .8;
  -webkit-mask: var(--z-lozenge) center / contain no-repeat;
  mask: var(--z-lozenge) center / contain no-repeat;
}

/* Base of the first screen: scroll cue + microprint. */
.z-hero__base {
  position: relative;
  display: grid;
  gap: 18px;
  padding-top: 28px;
}
.z-hero__base .z-microprint { opacity: .5; }
.z-hero__cue {
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 44px;
  min-height: 44px;
  color: var(--z-ivory-2);
  text-decoration: none;
  font-family: var(--z-font-caps);
  font-size: var(--z-fs-micro);
  letter-spacing: var(--z-track-caps);
  text-transform: uppercase;
  transition: color var(--z-dur-base);
}
.z-hero__cue-text { margin-right: calc(-1 * var(--z-track-caps)); }
.z-hero__cue-line {
  position: relative;
  width: 1px;
  height: 40px;
  overflow: hidden;
  background: var(--z-line-soft);
}
.z-hero__cue-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--z-gold-hi), transparent);
  transform: translate3d(0, -100%, 0);
  animation: z-hero-cue 2.8s var(--z-ease-inout) 1.6s infinite;
}
@keyframes z-hero-cue {
  0% { transform: translate3d(0, -100%, 0); }
  60%, 100% { transform: translate3d(0, 100%, 0); }
}
@media (hover: hover) { .z-hero__cue:hover { color: var(--z-gold-hi); } }

/* «Ativar movimento» (touch + 3D + device orientation API only): a quiet round
   control in the free top-right corner of the stage, under the header. */
.z-hero__tilt {
  position: absolute;
  right: max(calc(var(--z-gutter) - 4px), env(safe-area-inset-right, 0px));
  top: calc(var(--z-header-h) + 8px);
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--z-line);
  border-radius: 50%;
  background: rgba(7, 7, 7, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--z-gold);
  pointer-events: auto;
  opacity: 0;
  transform: scale(.92);
  transition: opacity var(--z-dur-slow) var(--z-ease-out), transform var(--z-dur-slow) var(--z-ease-out), color var(--z-dur-base), border-color var(--z-dur-base);
}
.z-hero__tilt.is-visible { opacity: 1; transform: none; }
.z-hero__tilt.is-on { color: var(--z-gold-hi); border-color: var(--z-gold); }
.z-hero__tilt-icon { width: 20px; height: 20px; }
@media (min-width: 750px) {
  .z-hero__tilt { right: calc(var(--z-gutter) * 1.5); }
}

/* ------------------------------------------- opening: headline mask reveal */
@media (prefers-reduced-motion: no-preference) {
  .z-hero__tl-in { animation: z-hero-line 1.1s var(--z-ease-out) both; animation-delay: calc(.14s + var(--z-tl, 0) * .15s); }
  .z-hero__eyebrow::before { transform-origin: left center; animation: z-hero-rule 1.2s var(--z-ease-inout) .1s both; }
}
@keyframes z-hero-line {
  from { transform: translate3d(0, 62%, 0); clip-path: inset(0 -20% 100% -5%); opacity: .2; }
  to { transform: none; clip-path: inset(-30% -20% -30% -5%); opacity: 1; }
}
@keyframes z-hero-rule { from { transform: scaleX(0); } to { transform: none; } }

/* ------------------------------------------------- desktop: split layout */
@media (min-width: 990px) {
  .z-hero__intro {
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: var(--hero-h);
    margin-top: calc(-1 * var(--hero-h));
    padding-top: calc(var(--z-header-h) + 24px);
    padding-bottom: 104px;
  }
  .z-hero__copy { max-width: calc(39vw - var(--z-gutter)); }
  .z-hero__eyebrow { margin-bottom: 20px; }
  .z-hero__title { font-size: clamp(3.5rem, 6.25vw, 8.25rem); }
  .z-hero__body { max-width: 34ch; margin-top: 24px; font-size: var(--z-fs-lead); }
  .z-hero__actions { margin-top: 32px; gap: 14px; }
  .z-hero__actions .z-btn { flex: 0 0 auto; --z-btn-h: 56px; padding-inline: 2.1em; }
  .z-hero__micro { margin-top: 18px; }
  .z-hero__base {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 22px;
    padding-top: 0;
    gap: 14px;
  }
  .z-hero__cue-line { height: 44px; }
}
@media (min-width: 1440px) {
  .z-hero__copy { max-width: min(40vw - var(--z-gutter), 46rem); }
}

/* ================================================================ panels
   Fallback (default): a stacked list, each tier with its product image. */
.z-hero__seq {
  position: relative;
  z-index: 1;
  padding-block: var(--z-section-y-s) var(--z-section-y);
  scroll-margin-top: var(--z-header-h);
}
.z-hero__panel + .z-hero__panel { margin-top: var(--z-space-3xl); }
.z-hero__panel-body { display: grid; gap: 28px; }
.z-hero__panel-copy { display: grid; justify-items: start; max-width: 34rem; }
.z-hero__panel-copy > * + * { margin-top: 14px; }
.z-hero__panel-title { text-wrap: balance; }
.z-hero__panel-line { max-width: 40ch; color: var(--z-ivory-2); line-height: 1.6; }

.z-hero__panel--intro .z-hero__panel-copy { max-width: 40rem; }
.z-hero__panel--intro .z-hero__panel-line {
  font-family: var(--z-font-display);
  font-style: italic;
  font-size: var(--z-fs-display-xs);
  line-height: 1.3;
  color: var(--z-ivory-2);
}

/* Each tier speaks in its own metal: numeral and italic accent in the tier foil. */
.z-hero__panel--tier { --z-accent-foil: var(--z-tier-foil, var(--z-foil)); }
.z-hero__panel--tier[data-tier="black"] .z-hero__panel-name { color: var(--z-ivory-2); }
.z-hero__panel--tier[data-tier="silver"] .z-hero__panel-name { color: var(--z-silver); }
/* Denomination row: the roman numeral in the tier's metal, the name in inscription caps. */
.z-hero__panel-head { display: flex; align-items: flex-end; gap: 16px; }
.z-hero__numeral {
  display: block;
  flex: 0 0 auto;
  font-family: var(--z-font-display);
  font-weight: 300;
  font-size: clamp(2.75rem, 2rem + 3vw, 4.5rem);
  line-height: .78;
  letter-spacing: .02em;
}
.z-hero__numeral .z-foil { padding-inline: 0 .06em; margin-inline: 0; }
.z-hero__panel-name {
  flex: 1 1 auto;
  gap: .9em;
  padding-bottom: .1em;
}
.z-hero__panel-name::before {
  content: "";
  flex: 0 0 auto;
  width: 2.2em;
  height: 1px;
  background: currentColor;
  opacity: .5;
}
.z-hero__panel-copy > .z-hero__panel-title { margin-top: 16px; }

/* Price + choose: the act never waits for an animation; hairline above, like a cheque's amount line. */
.z-hero__buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  width: 100%;
  max-width: 30rem;
  margin-top: 20px !important;
  padding-top: 16px;
  border-top: 1px solid var(--z-line-soft);
}
.z-hero__buy .z-price { font-size: var(--z-fs-display-xs); letter-spacing: .01em; }
.z-hero__choose { --z-btn-h: 50px; padding-inline: 1.6em; }
.z-hero__buy-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  width: 100%;
  max-width: 30rem;
  margin-top: 6px !important;
}
.z-hero__quick { display: grid; justify-items: end; margin: 0 0 0 auto; }
.z-hero__quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 2px;
  color: var(--z-ivory-2);
  font-size: var(--z-fs-xs);
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
  background: linear-gradient(var(--z-gold), var(--z-gold)) 0 calc(100% - 11px) / 0 1px no-repeat;
  transition: color var(--z-dur-base), background-size var(--z-dur-slow) var(--z-ease-out);
}
.z-hero__quick-icon { width: 16px; height: 16px; color: var(--z-gold); }
@media (hover: hover) { .z-hero__quick-btn:hover { color: var(--z-ivory); background-size: 100% 1px; } }
.z-hero__quick-btn:focus-visible { outline-offset: 2px; }
.z-hero__quick-btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
.z-hero__quick-btn.is-done { color: var(--z-gold-hi); }
.z-hero__quick-status { max-width: 22ch; font-size: var(--z-fs-micro); line-height: 1.4; color: var(--z-ivory-2); text-align: right; }
.z-hero__quick-status:empty { display: none; }
.z-hero__quick-status.is-error { color: var(--z-error); }
.z-hero__aside {
  font-family: var(--z-font-display);
  font-style: italic;
  font-weight: 400;
  font-size: var(--z-fs-lead);
  line-height: 1.25;
  color: var(--z-ivory-2);
}

/* Product plate in the tilt component (fallback only): a square studio plate
   whose edges are the page colour, so only the card seems to turn. */
.z-hero__panel-media { position: relative; width: 100%; max-width: 30rem; margin: 0; }
.z-hero__plate { --zt-radius: 0; --zt-glare: .55; --zt-sheen: .6; }
.z-hero__plate .z-tilt__target,
.z-hero__plate-in { box-shadow: none; }
.z-hero__plate-in { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--z-obsidian); }
.z-hero__plate-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.z-hero__plate .z-tilt__glare,
.z-hero__plate .z-tilt__shine {
  -webkit-mask-image: radial-gradient(closest-side at 50% 42%, #000 55%, transparent 100%);
  mask-image: radial-gradient(closest-side at 50% 42%, #000 55%, transparent 100%);
}
.z-hero__panel-media .z-illustrative { left: 0; bottom: 0; }

.z-hero__panel--final .z-hero__panel-copy { max-width: 36rem; }
.z-hero__actions--final { margin-top: 26px !important; }

@media (min-width: 750px) {
  .z-hero__panel--tier .z-hero__panel-body,
  .z-hero__panel--final .z-hero__panel-body {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    column-gap: var(--z-space-2xl);
  }
  .z-hero__panel--tier:nth-of-type(odd) .z-hero__panel-media { order: 2; }
  .z-hero__panel + .z-hero__panel { margin-top: var(--z-space-4xl); }
}

/* ============================================================ cinematic
   The stage is pinned by CSS sticky (native scroll); the panels pass beneath
   it (stacked) or beside it (split). Images hidden: the 3D stage shows them. */
.z-hero.is-cinematic .z-hero__stagebox { position: -webkit-sticky; position: sticky; top: 0; }
.z-hero.is-cinematic [data-z-hero-media] { display: none; }
.z-hero.is-cinematic .z-hero__seq { padding-block: 0 4vh; }
.z-hero.is-cinematic .z-hero__panel + .z-hero__panel { margin-top: 0; }
.z-hero.is-cinematic .z-hero__panel {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
}
.z-hero.is-cinematic .z-hero__panel-body { display: block; }
.z-hero.is-cinematic .z-hero__panel--final { min-height: 0; padding-block: 18vh 6vh; }

@media (max-width: 989.98px) {
  /* stacked: the panel copy is read in the space under the stage */
  .z-hero.is-cinematic .z-hero__panel { padding-top: calc(var(--hero-h) * .5); }
  .z-hero.is-cinematic .z-hero__panel--final { padding-top: 30vh; }
}
@media (min-width: 990px) {
  .z-hero.is-cinematic .z-hero__seq { z-index: 3; }
  .z-hero.is-cinematic .z-hero__panel-copy { max-width: min(36vw, 33rem); }
  .z-hero.is-cinematic .z-hero__panel--final { min-height: 100vh; min-height: 100svh; padding-block: 0; }
}

/* Panels before their light arrives (GSAP sets the scrubbed values). */
.z-hero.is-cinematic [data-z-seq-part] { will-change: opacity, transform; }

/* ================================================================ desktop */
@media (min-width: 990px) {
  .z-hero__seq { padding-block: var(--z-section-y) var(--z-section-y); }
  .z-hero__numeral { font-size: clamp(4rem, 2.6rem + 2.4vw, 5.75rem); }
  .z-hero__panel-head { gap: 22px; }
  .z-hero__panel-line { font-size: var(--z-fs-lead); line-height: 1.55; max-width: 36ch; }
  .z-hero__buy, .z-hero__buy-foot { max-width: 31rem; }
  .z-hero__buy { margin-top: 30px !important; padding-top: 20px; }
}

/* ======================================================= reduced motion */
@media (prefers-reduced-motion: reduce) {
  .z-hero__sweep, .z-hero.is-static .z-hero__sweep { animation: none; opacity: 0; }
  .z-hero__cue-line::after { animation: none; transform: none; opacity: .5; }
  .z-hero__tilt { transition: opacity var(--z-dur-base); transform: none; }
}

/* v6 (30 out 2026) · phones and tablets: the panels follow each other closely, so a card never sits alone on a black
   screen. Each copy is as tall as its content plus a short breath; it rises from the bottom edge as its card arrives
   and slides under the stage's masked edge as the next one comes (no scrubbed fade on stacked, see the hero JS). */
@media (max-width: 989.98px) {
  .z-hero.is-cinematic .z-hero__panel:not(.z-hero__panel--final) { min-height: 0; padding-block: 11vh; display: block; }
  @supports (height: 1svh) { .z-hero.is-cinematic .z-hero__panel:not(.z-hero__panel--final) { padding-block: 11svh; } }
  .z-hero.is-cinematic .z-hero__panel--intro { padding-top: calc(var(--hero-h) * .3); }
  .z-hero.is-cinematic .z-hero__panel--final { padding-top: 14vh; }
}

