/* ==========================================================
   Products — intro screen built on the design's own artwork.
   The picture (text removed) is the backdrop; the words are real text laid exactly where the design has them.
   Sizes are in vw so the whole artboard scales with the screen (1vw = 27.68 design pixels).
   ========================================================== */
.pd-hero { padding-top: 84px; background: #fff; }
.pd-stage { position: relative; aspect-ratio: 2768 / 992; background: url(../img/products/pd-hero.jpg?v=1) center / 100% 100% no-repeat; overflow: hidden; }
.pd-text { position: absolute; left: 12.2471vw; top: 28.9012%; z-index: 2; white-space: nowrap; }
.pd-kicker { display: block; margin-left: 2.8540vw; font-family: var(--font-body); font-style: italic; font-weight: 500; font-size: 1.3367vw; line-height: 1;
  letter-spacing: -.07em; color: #977300; }
.pd-text h1 { margin: 0.6864vw 0 0; font-family: var(--font-body); font-weight: 700; font-size: 4.0824vw; line-height: 1; letter-spacing: -.035em; color: #0A1F40; }
.pd-text h1::after { display: none; }
.pd-text p { margin: 0.4588vw 0 0 0.3432vw; font-family: var(--font-body); font-weight: 400; font-size: 1.0585vw; line-height: 1.5896vw; color: #66625E; max-width: none; }
.pd-crumb { display: flex; list-style: none; padding: 0; margin: 1.0947vw 0 0 0.3793vw; font-family: var(--font-body); font-size: 1.0585vw; line-height: 1; color: #63605E; }
.pd-crumb a { color: #2481CB; text-decoration: none; }
.pd-crumb a:hover { text-decoration: underline; }
.pd-crumb li + li::before { content: "/"; padding: 0 0.3251vw; color: #63605E; }

/* tablets & phones: the products under a band of open sky, with the words on the sky */
@media (max-width: 991.98px) {
  .pd-stage { aspect-ratio: 1170 / 1195; max-height: 680px; width: 100%; background-image: url(../img/products/pd-hero-m.jpg?v=1); background-size: cover; background-position: 50% 100%; }
  .pd-text { left: 0; right: 0; top: clamp(18px, 4.5vw, 34px); padding: 0 22px; white-space: normal; text-align: left; }
  .pd-kicker { margin-left: 2px; font-size: clamp(15px, 3.9vw, 19px); letter-spacing: -.04em; }
  .pd-text h1 { margin-top: 4px; font-size: clamp(2.3rem, 11.2vw, 3.4rem); letter-spacing: -.035em; }
  .pd-text p { margin: 8px 0 0 2px; font-size: clamp(12.5px, 3.48vw, 17px); line-height: 1.6; max-width: 34rem; }
  .pd-crumb { margin: 10px 0 0 2px; font-size: clamp(13.5px, 3.6vw, 16px); }
  .pd-crumb li + li::before { padding: 0 6px; }
}
@media (max-width: 991.98px) and (min-width: 600px) { .pd-text { padding: 0 6vw; } }
@media (max-width: 380px) { .pd-text { padding: 0 18px; } }

/* ---------- intro screen motion (desktop; phones keep the still picture) ---------- */
.pd-scene { display: none; }
@media (min-width: 992px) {
  .pd-stage { background-image: url(../img/products/pdh-plate.jpg?v=2); }
  .pd-scene { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; contain: paint; isolation: isolate; }
  .pd-text { z-index: 3; }
  .ph { position: absolute; display: block; will-change: transform; }
  .ph img { display: block; width: 100%; height: auto; }

  /* river and trees (contact-free WebGL layer drawn by products-hero.js) */
  .pd-land { position: absolute; left: 0; top: 47.379%; width: 52.384%; height: 52.621%; display: block; }

  /* the sun breathes and its rays turn slowly */
  .pd-sun { position: absolute; left: 91.33%; top: 14.6%; width: 17vw; aspect-ratio: 1; margin: -8.5vw 0 0 -8.5vw; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,246,200,0) 0%, rgba(255,246,200,0) 27%, rgba(255,240,180,.5) 33%, rgba(255,236,170,.18) 46%, rgba(255,232,160,0) 64%); animation: pdSun 5.5s ease-in-out infinite alternate; }
  @keyframes pdSun { from { transform: scale(.94); opacity: .45; } to { transform: scale(1.06); opacity: .9; } }
  .pd-rays { position: absolute; left: 91.33%; top: 14.6%; width: 26vw; aspect-ratio: 1; margin: -13vw 0 0 -13vw; border-radius: 50%; opacity: .45;
    background: repeating-conic-gradient(from 0deg, rgba(255,246,205,.0) 0deg 9deg, rgba(255,246,205,.55) 12deg, rgba(255,246,205,0) 15deg 24deg);
    -webkit-mask: radial-gradient(circle, transparent 19%, #000 24%, rgba(0,0,0,.35) 38%, transparent 62%); mask: radial-gradient(circle, transparent 19%, #000 24%, rgba(0,0,0,.35) 38%, transparent 62%);
    animation: pdRays 90s linear infinite; }
  @keyframes pdRays { to { transform: rotate(360deg); } }

  /* clouds: two drift right across the top of the sky on the breeze, the others move gently where they are */
  .pd-lane { position: absolute; left: 0; width: 100%; height: 0; animation: pdLane linear infinite; will-change: transform; }
  .pd-lane img { position: absolute; left: 0; top: 0; height: auto; display: block; }
  .pd-lane.lb img { transform: scaleX(-1); opacity: .85; }
  @keyframes pdLane { from { transform: translate3d(calc(var(--w) * -1%), 0, 0); } to { transform: translate3d(100%, 0, 0); } }
  .pd-drift.cb { animation: pdDriftB 34s ease-in-out infinite alternate; }
  .pd-drift.cc { animation: pdDriftC 28s ease-in-out infinite alternate; animation-delay: -9s; }
  @keyframes pdDriftB { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(4.2vw, -.25vw, 0); } }
  @keyframes pdDriftC { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-3.4vw, .2vw, 0); } }

  /* gulls glide on the air, rising and falling, wings beating now and then */
  .pd-bird { animation: pdGlide 22s ease-in-out infinite alternate; }
  .pd-bird img { transform-origin: 50% 60%; animation: pdFlap 1.6s ease-in-out infinite; }
  .pd-bird.b2 { animation-duration: 26s; animation-delay: -7s; } .pd-bird.b2 img { animation-duration: 1.9s; animation-delay: -.4s; }
  .pd-bird.b3 { animation-duration: 19s; animation-delay: -12s; } .pd-bird.b3 img { animation-duration: 1.4s; animation-delay: -.9s; }
  .pd-bird.b4 { animation-duration: 24s; animation-delay: -3s; } .pd-bird.b4 img { animation-duration: 1.7s; animation-delay: -1.1s; }
  .pd-bird.b5 { animation-duration: 18s; animation-delay: -5s; } .pd-bird.b5 img { animation-duration: 1.3s; animation-delay: -.2s; }
  @keyframes pdGlide { 0% { transform: translate3d(0, 0, 0) rotate(0deg); } 35% { transform: translate3d(1.6vw, -.55vw, 0) rotate(-3deg); }
                       70% { transform: translate3d(3.1vw, .1vw, 0) rotate(2deg); } 100% { transform: translate3d(4.2vw, -.35vw, 0) rotate(-1deg); } }
  @keyframes pdFlap { 0%, 55%, 100% { transform: scaleY(1); } 70% { transform: scaleY(.62) translateY(4%); } 85% { transform: scaleY(1.12) translateY(-3%); } }

  /* sparkles flash */
  .pd-glint { position: absolute; display: block; aspect-ratio: 1; transform: translate(-50%, -50%) scale(0); opacity: 0; animation: pdGlint 4.2s ease-in-out infinite; }
  .pd-glint svg { display: block; width: 100%; height: 100%; }
  .pd-glint.g1 { animation-delay: -1.1s; animation-duration: 3.7s; } .pd-glint.g2 { animation-delay: -2.3s; animation-duration: 4.6s; }
  .pd-glint.g3 { animation-delay: -.4s; animation-duration: 3.9s; } .pd-glint.g4 { animation-delay: -3.2s; animation-duration: 5s; }
  .pd-glint.g5 { animation-delay: -1.8s; animation-duration: 3.4s; } .pd-glint.g6 { animation-delay: -2.9s; animation-duration: 4.4s; }
  .pd-glint.g7 { animation-delay: -.9s; animation-duration: 4.8s; } .pd-glint.g8 { animation-delay: -2.6s; animation-duration: 3.6s; }
  .pd-glint.g9 { animation-delay: -1.5s; animation-duration: 4.1s; } .pd-glint.g10 { animation-delay: -3.6s; animation-duration: 4.9s; }
  @keyframes pdGlint { 0%, 45%, 100% { transform: translate(-50%, -50%) scale(.1) rotate(0deg); opacity: 0; }
                       62% { transform: translate(-50%, -50%) scale(1) rotate(20deg); opacity: 1; } 74% { transform: translate(-50%, -50%) scale(.85) rotate(30deg); opacity: .9; } 90% { transform: translate(-50%, -50%) scale(.2) rotate(45deg); opacity: 0; } }

  /* the products hover on the cloud, each on its own slow breath (they only ever rise from where the design has them) */
  .pd-prod img { transform-origin: 50% 92%; animation: pdBob 5.6s ease-in-out infinite alternate; }
  .pd-prod.monster img { --y: -.38vw; --r0: -.4deg; --r1: .7deg;  animation-duration: 6.1s; animation-delay: -1.3s; }
  .pd-prod.redbull img { --y: -.42vw; --r0: .5deg;  --r1: -.6deg; animation-duration: 5.2s; animation-delay: -3.4s; }
  .pd-prod.takis img   { --y: -.36vw; --r0: -.8deg; --r1: .6deg;  animation-duration: 5.8s; animation-delay: -.6s; }
  .pd-prod.doritos img { --y: -.40vw; --r0: .7deg;  --r1: -.5deg; animation-duration: 6.4s; animation-delay: -2.2s; }
  .pd-prod.maxmax img  { --y: -.34vw; --r0: -.5deg; --r1: .6deg;  animation-duration: 5.4s; animation-delay: -4.1s; }
  .pd-prod.pepsi img   { --y: -.30vw; --r0: .6deg;  --r1: -.7deg; animation-duration: 4.9s; animation-delay: -1.9s; }
  @keyframes pdBob { from { transform: translate3d(0, 0, 0) rotate(var(--r0)); } to { transform: translate3d(0, var(--y), 0) rotate(var(--r1)); } }

  /* chips, nachos and the chilli tumble in the air around them */
  .pd-bit img { transform-origin: 50% 50%; animation: pdTumble 4.6s ease-in-out infinite alternate; }
  .pd-bit.chip1 img  { --tx: .35vw; --ty: -.55vw; --a0: -9deg;  --a1: 11deg; animation-duration: 4.4s; }
  .pd-bit.chip2 img  { --tx: -.4vw; --ty: -.5vw;  --a0: 8deg;   --a1: -12deg; animation-duration: 5.1s; animation-delay: -1.7s; }
  .pd-bit.chip3 img  { --tx: .3vw;  --ty: -.45vw; --a0: -5deg;  --a1: 7deg;  animation-duration: 5.6s; animation-delay: -2.9s; }
  .pd-bit.nacho1 img { --tx: -.35vw; --ty: -.5vw; --a0: 12deg;  --a1: -14deg; animation-duration: 4.1s; animation-delay: -.8s; }
  .pd-bit.nacho2 img { --tx: -.25vw; --ty: -.35vw; --a0: -10deg; --a1: 9deg; animation-duration: 3.8s; animation-delay: -2.2s; }
  .pd-bit.nacho3 img { --tx: .3vw;  --ty: -.55vw; --a0: -12deg; --a1: 13deg; animation-duration: 4.7s; animation-delay: -3.3s; }
  .pd-bit.chili img  { --tx: .3vw;  --ty: -.45vw; --a0: -10deg; --a1: 9deg;  animation-duration: 3.9s; animation-delay: -1.2s; }
  @keyframes pdTumble { from { transform: translate3d(0, 0, 0) rotate(var(--a0)); } to { transform: translate3d(var(--tx), var(--ty), 0) rotate(var(--a1)); } }

  /* leaves ride the wind (products-hero.js) */
  .pd-leaves { position: absolute; inset: 0; }
  .pd-lf { position: absolute; display: block; height: auto; transform: translate(-50%, -50%); will-change: transform, opacity; backface-visibility: hidden; }
}
@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
  .pd-scene *, .pd-scene { animation: none !important; }
  .pd-rays, .pd-lane.lb { display: none; }
  .pd-glint { opacity: 1; transform: translate(-50%, -50%) scale(.8); }
  .pd-sun { opacity: .75; }
}
