/* GLUG. One fall through a real sky: deep blue, cloud, open air, sand. */
:root {
  --ink: #12123A; --ink-soft: #4B4B6B;
  --cloud: #FFFFFF; --air: #BFE1F6; --haze: #D8ECF8; --sand: #F1D9B5;
  --yellow: #FFC21A;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --u: min(1vw, 16px); /* one unit of depth-layer width */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: clip; -webkit-text-size-adjust: 100%; }
html.rm { scroll-behavior: auto; }
body { margin: 0; font-family: Poppins, system-ui, sans-serif; color: var(--ink); background: var(--cloud); overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; }
a { color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[id] { scroll-margin-top: 96px; }

/* text styles */
.display { font-weight: 700; font-size: min(16vw, 36svh); line-height: 1; letter-spacing: -0.04em; }
.heading-1 { font-weight: 600; font-size: 60px; line-height: 60px; }
.heading-2 { font-weight: 600; font-size: 48px; line-height: 48px; }
.heading-6 { font-weight: 600; font-size: 20px; line-height: 28px; }
.title-1 { font-weight: 500; font-size: 20px; line-height: 28px; }
.title-3 { font-weight: 500; font-size: 16px; line-height: 24px; }
.title-4 { font-weight: 500; font-size: 14px; line-height: 20px; }
.body-3 { font-weight: 400; font-size: 16px; line-height: 24px; }
.button-lg { font-weight: 600; font-size: 18px; line-height: 28px; }
.button-sm { font-weight: 600; font-size: 14px; line-height: 20px; }
.caption-1 { font-weight: 500; font-size: 14px; line-height: 20px; }
.caption-2 { font-weight: 400; font-size: 14px; line-height: 20px; }
h1, h2, h3, .words { text-wrap: balance; }
p { text-wrap: pretty; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 20; padding: 8px 12px; border-radius: 12px; background: var(--ink); color: var(--cloud); transform: translateY(-96px); }
.skip:focus { transform: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border: 0; border-radius: 12px; background: var(--yellow); color: var(--ink); font-family: inherit; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease); }
@media (hover: hover) { .btn:hover { background: var(--ink); color: var(--cloud); } }
@media (hover: none) { .btn:active { background: var(--ink); color: var(--cloud); } } /* on touch, a press answers instead of a hover that sticks */
.btn:active { transform: scale(.98); }

/* nav: a small bar floating off the top edge */
.nav { position: fixed; top: 12px; left: 50%; translate: -50% 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 8px 8px 8px 24px; border-radius: 24px; background: rgb(255 255 255 / .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.nav nav { display: flex; gap: 24px; }
.nav a { text-decoration: none; white-space: nowrap; }
.nav nav a { transition: color .3s var(--ease); }
@media (hover: hover) { .nav nav a:hover { color: var(--ink-soft); } }
.nav .btn { border-radius: 16px; }

/* layout */
section { position: relative; padding: 96px 0; }
.wrap { width: min(1152px, 100% - 48px); margin-inline: auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.copy { display: grid; gap: 24px; justify-items: start; }
.copy, .words, .flavours-head, .hero-foot { position: relative; z-index: 1; } /* text paints over the far layers */
.lens { display: none; position: absolute; inset: 0 0 auto; height: 100svh; pointer-events: none; }
.js:not(.rm) .lens { display: block; } /* only when they will move: at rest these clouds sit right over the copy */

/* depth layers: clouds and loose fruit. site.js moves each one by its depth as the page scrolls
   and as the pointer moves; near ones pass in front of the can. */
.bit { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * var(--u)); height: auto; pointer-events: none; user-select: none; transform: rotate(calc(var(--rot, 0) * 1deg)) scaleX(var(--flip, 1)); will-change: transform; }
.near { z-index: 6; }
.b1 { filter: blur(1.5px); }
.b3 { filter: blur(3.5px); }
.cloud { opacity: .8; }
.near.cloud { opacity: .95; }

/* a slot is where the travelling can comes to rest; its image is the fallback (reduced motion, no WebGL) */
:is(.slot, .stand) { width: min(440px, 54svh, 100%); aspect-ratio: 1; justify-self: center; } /* sized to the screen's height too, so the can never crowds a laptop */
:is(.slot, .stand) img { width: 100%; height: 100%; transform: rotate(calc(var(--r) * 1deg)); }
.three :is(.slot, .stand) img { visibility: hidden; } /* set once the 3D can is drawing; until then the still shows */
.three :is(.slot, .stand) { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; } /* drag sideways to spin the can, up and down still scrolls */
.three :is(.slot, .stand):active { cursor: grabbing; }
.hint { display: none; color: var(--ink-soft); }
.three .hint { display: block; }
.can { position: fixed; inset: 0; z-index: 5; width: 100%; height: 100%; pointer-events: none; } /* the 3D can's canvas */

/* hero: the real sky. The photo sits far back; the cloud bank melts into the white below. */
.hero { --can: min(60svh, 96vw); min-height: 100svh; display: grid; grid-template-rows: 1fr auto; gap: 24px; background: #2B5B8E; overflow: clip; }
.hero-sky { inset: 0 -3% -25%; width: auto; background: url(media/sky.webp) 50% 0 / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 24%; background: linear-gradient(transparent, var(--cloud)); }
.hero-stage, .hero-foot { z-index: 1; }
.hero-stage { position: relative; display: grid; place-items: center; }
.hero h1 { color: var(--cloud); display: grid; grid-template-columns: 1fr 1fr; column-gap: calc(var(--can) * .4); width: 100%; white-space: nowrap; }
.mask { display: block; overflow: clip; }
.mask > span { display: block; }
.mask:first-child { justify-self: end; }
.hero .hero-slot { position: absolute; left: 50%; top: 50%; width: var(--can); translate: -50% -50%; }
.hero-foot { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.hero-foot p { max-width: 360px; }

/* below the clouds the air gets paler all the way down to the sand. One background for the whole fall,
   so a cloud or a fruit can drift from one section into the next without being cut at the edge. */
main { background: linear-gradient(var(--cloud) calc(100svh + 160px), var(--air) calc(100svh + 900px), var(--haze) 55%, #F3EEE3 78%, var(--sand) 90%); }

.points { display: grid; gap: 24px; }
.points li { display: grid; gap: 4px; }
.points p, .flavour .copy .body-3, .flavours-head p { color: var(--ink-soft); }

/* tagline: words light up in reading order as the block scrolls in */
.words { max-width: 680px; }
.words span { opacity: .3; transition: opacity .5s var(--ease); }
.words span.on { opacity: 1; }

.flavours-head { display: grid; gap: 12px; justify-items: center; text-align: center; margin-bottom: 48px; }
.flavour { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding-block: 48px; }
.flavour:nth-of-type(even) .stage { order: 2; }
.stage { position: relative; display: grid; place-items: center; }
.stage .slot { position: relative; }
.flavour .copy { gap: 12px; }

/* shore: the ground. Pale sunlit sand under a fine grain, brightest where the cans stand. */
.shore { padding-bottom: 128px; }
.shore::before { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .36 0 0 0 0 .2 1 0 0 0 -.36'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"), radial-gradient(46% 42% at 72% 56%, rgb(255 255 255 / .5), transparent), linear-gradient(transparent, #EBD3A9 36%, #E2C491); }
.shore .body-3 { max-width: 440px; }
.dibs { display: grid; gap: 16px; width: min(480px, 100%); }
.dibs-row { display: flex; gap: 8px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.pick legend { margin-bottom: 8px; padding: 0; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px 8px 12px; border: 2px solid var(--ink); border-radius: 9999px; background: var(--cloud); cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease); }
.chip::before { content: ""; width: 12px; height: 12px; border-radius: 9999px; background: var(--dot); }
.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; } /* a real radio under the chip: arrow keys and forms work as usual */
.chip:has(:checked) { background: var(--ink); color: var(--cloud); }
.chip:has(:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.chip:active { transform: scale(.97); }
.dibs input { flex: 1; min-width: 0; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--cloud); color: var(--ink); font-family: inherit; }
.dibs input::placeholder { color: var(--ink-soft); }
/* the line-up: three places on the sand. A place further back sits higher and is a touch smaller. */
.lineup { position: relative; width: min(620px, 100%); aspect-ratio: 62 / 40; justify-self: center; }
.lineup :is(.slot, .stand) { position: absolute; left: var(--at); top: var(--up); width: var(--size); translate: -50% 0; }
.prop { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); z-index: 6; width: calc(var(--w) * 1%); height: auto; rotate: calc(var(--rot) * 1deg); filter: drop-shadow(0 8px 6px rgb(84 50 16 / .4)); pointer-events: none; } /* fruit on the sand, in front of the cans */

/* footer: the sea beyond the sand. It rises over the beach with a rounded edge and ends on the name, bleeding off the page. */
.footer { position: relative; z-index: 2; margin-top: -32px; padding: 96px 0 0; border-radius: 32px 32px 0 0; background: #1E4A7C; color: var(--cloud); overflow: clip; }
.footer-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; gap: 32px 64px; align-items: end; }
.footer-in .caption-2 { grid-column: 1 / -1; }
.footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-mark { position: relative; z-index: 1; margin: 48px 0 -0.14em; font-weight: 700; font-size: min(34vw, 560px); line-height: .8; letter-spacing: -0.05em; text-align: center; white-space: nowrap; }
.js:not(.rm) .footer-mark.reveal { transform: translateY(25%); }
.footer a { text-decoration: none; transition: color .3s var(--ease); }
@media (hover: hover) { .footer a:hover { color: var(--yellow); } }
.footer :focus-visible { outline-color: var(--cloud); }
.footer .caption-2 { color: #B9B9CE; }

/* pause for the idle drift (scroll and pointer movement stay live) */
.dock { display: none; }
.pause { display: none; position: fixed; right: 12px; bottom: 12px; z-index: 10; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 9999px; background: rgb(255 255 255 / .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); cursor: pointer; place-items: center; }
.pause::before { content: ""; width: 12px; height: 12px; border-inline: 4px solid var(--ink); }
.pause[aria-pressed="true"]::before { width: 0; height: 0; border: 6px solid transparent; border-left: 10px solid var(--ink); border-right: 0; }
.js:not(.rm) .pause { display: grid; }

/* motion, only when it will play */
.js:not(.rm) .reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js:not(.rm) .reveal.in { opacity: 1; transform: none; }
.js:not(.rm) .mask > span { animation: rise .9s var(--ease) both; }
.js:not(.rm) .mask + .mask > span { animation-delay: .09s; }
@keyframes rise { from { transform: translateY(105%); } }
/* idle life: everything in the air floats a little. Uses translate/rotate so it adds to the scripted transform. */
.js:not(.rm) .bit:not(.hero-sky) { animation: bob 6s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
.js:not(.rm) .bit:nth-of-type(2n) { animation-duration: 8s; animation-delay: -3s; }
.js:not(.rm) .bit:nth-of-type(3n) { animation-duration: 10s; animation-delay: -6s; }
.js:not(.rm) .bit.cloud { animation: drift 38s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
.still .bit { animation-play-state: paused !important; }
@keyframes bob { to { translate: 0 -16px; rotate: 4deg; } }
@keyframes drift { to { translate: 5vw 0; } }

@media (max-width: 860px) {
  :root { --u: 1.9vw; }
  .heading-1 { font-size: 36px; line-height: 40px; }
  .heading-2 { font-size: 36px; line-height: 40px; }
  section { padding: 64px 0; }
  .split, .flavour { grid-template-columns: 1fr; gap: 32px; }
  .flavour:nth-of-type(even) .stage { order: 0; }
  .slot { width: min(300px, 82vw); }
  .tagline .slot { order: -1; }
  .shore .lineup { order: -1; }

  /* thumb reach: the top bar keeps the links, the main action moves to a bar at the bottom */
  .nav { top: max(12px, env(safe-area-inset-top)); gap: 16px; padding: 4px 16px; }
  .nav nav { gap: 16px; }
  .nav .btn { display: none; }
  .nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .dock { display: flex; position: fixed; left: 16px; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 10; min-height: 48px; box-shadow: 0 8px 24px rgb(18 18 58 / .2); transform: translateY(calc(100% + 48px)); visibility: hidden; transition: transform .5s var(--ease), visibility 0s .5s, background-color .3s var(--ease), color .3s var(--ease); }
  .dock.on { transform: none; visibility: visible; transition-delay: 0s; }
  .dock.on:active { transform: scale(.97); }
  .rm .dock { transition: none; }
  .pause { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .dibs input, .dibs .btn { min-height: 48px; }
  .footer { padding-top: 64px; }
  .footer-in { grid-template-columns: 1fr; gap: 24px; }
  .footer nav { gap: 0 24px; }
  .footer nav a { display: inline-flex; align-items: center; min-height: 44px; }

  /* fewer, sharper layers: blur is costly on a phone GPU, and these pieces would sit behind the stacked copy */
  .b3, .wide { display: none; }
  .b1 { filter: none; }
}
@media (max-width: 640px) {
  .display { font-size: min(30vw, 20svh); }
  .hero { --can: min(46svh, 68vw); padding-bottom: 24px; gap: 16px; } /* headline, can, copy and button all inside the first screen */
  .hero-sky { bottom: -45%; }
  .hero::after { height: 42%; } /* more white under the copy, which sits on the cloud edge here */
  .hero h1 { grid-template-columns: 1fr; row-gap: calc(var(--can) * .95 - .5em); justify-items: center; } /* the can overlaps a quarter of each word */
  .mask:first-child { justify-self: center; }
  .hero-foot { flex-direction: column; align-items: start; }
  .dibs-row { flex-direction: column; }
}
