@font-face { font-family: 'Chillax'; src: url('../fonts/chillax-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Chillax'; src: url('../fonts/chillax-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Chillax'; src: url('../fonts/chillax-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --page: #ffd9c9; --pale: #fff3ec; --ink: #5a1216; --can: #c42a2a; --can-ink: #fff1e6;
  --m: clamp(16px, 3vw, 48px);
  --t-body: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --t-lead: clamp(1.125rem, 1rem + 0.7vw, 1.625rem);
  --t-head: clamp(1.875rem, 1.3rem + 2.6vw, 4.5rem);
  --track: 1150svh;
  --split: 0;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--page); color: var(--ink); font-family: 'Chillax', system-ui, sans-serif; font-weight: 500; -webkit-text-size-adjust: 100%; transition: background-color .7s var(--ease), color .7s var(--ease); }
body { background: var(--page); font-size: var(--t-body); line-height: 1.5; overflow-x: clip; transition: background-color .7s var(--ease); }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.btn { white-space: nowrap; display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; border-radius: 999px; background: var(--ink); color: var(--pale); text-decoration: none; font-weight: 600; font-size: var(--t-body); transition: transform .18s var(--ease), background-color .7s var(--ease), color .7s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 1rem; }
/* narrow windows (the frames on robertflorea.co.uk, small phones): a size down so "Choose a flavour" stays on one line */
@media (max-width: 760px) { .btn { min-height: 46px; padding: 0 20px; font-size: 1rem; } .btn-small { min-height: 44px; padding: 0 14px; font-size: .9375rem; } }

/* ---------- top bar: on the first screen only, it scrolls away */
.bar { position: absolute; z-index: 6; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--m); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 700; font-size: 1.375rem; letter-spacing: -0.02em; }
.brand svg { width: 34px; height: 26px; fill: currentColor; }

/* ---------- the story: one tall track, one pinned stage */
.story { position: relative; height: var(--track);
  /* a fine paper grain under the stage, so the pastel never bands */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.07 0 0 0 0 0.08 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); }
.anchor { position: absolute; left: 0; top: calc((var(--track) - 100svh) * 0.77); }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.gl, .poster, .poster img { position: absolute; inset: 0; width: 100%; height: 100%; }
.gl { z-index: 2; opacity: 0; transition: opacity .25s; }
.gl-ready .gl { opacity: 1; }
.poster { z-index: 1; transition: opacity .25s .1s; }
.poster img { object-fit: cover; }
.gl-ready .poster { opacity: 0; }
.still { display: none; }
/* film grain over the picture, still (it never moves by itself) */
.grain { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E"); }

/* the name, two inks: "sun" behind the fruit, "split" in front; it parts when the fruit parts */
.word { position: absolute; left: var(--m); right: var(--m); top: 15svh; display: flex; flex-direction: column; align-items: center; font-weight: 700; letter-spacing: -0.045em; line-height: .8; font-size: min(36vw, 27svh); pointer-events: none; }
.word .w1 { position: relative; z-index: 1; color: var(--pale); transform: translateY(calc(var(--split) * -24svh)); opacity: calc(1 - var(--split) * 1.1); animation: rise .9s var(--ease) both; transition: color .7s var(--ease); }
.word .w2 { position: relative; z-index: 1; margin-top: 17svh; color: var(--ink); transform: translateY(calc(var(--split) * 30svh)); opacity: calc(1 - var(--split) * 1.1); animation: rise .9s .09s var(--ease) both; transition: color .7s var(--ease); }
/* with the 3D running the fruit fills the first screen; the big name stays only on the still version (it is in the bar too) */
.gl-ready .word .w1, .gl-ready .word .w2 { visibility: hidden; }
@keyframes rise { from { translate: 0 22px; opacity: 0; } }

.cap { position: absolute; z-index: 6; left: var(--m); right: var(--m); bottom: max(22px, 3.2svh); max-width: 34rem; }
.cap h2 { font-size: var(--t-head); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.cap p { margin-top: 8px; font-size: var(--t-lead); line-height: 1.3; max-width: 28ch; }
.cap-hero p { max-width: 20ch; animation: rise .9s .2s var(--ease) both; }
.cap-hero .btn { margin-top: 16px; animation: rise .9s .28s var(--ease) both; }

.cap-top { bottom: auto; top: 9svh; }
/* the range: four flavours to tap; the scroll also walks through them */
.cap-range { bottom: max(18px, 2.6svh); }
.cap-range .now { min-height: 2.6em; }
.picker { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 30rem; }
.picker button { font: inherit; font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; min-height: 52px; padding: 10px 14px; text-align: left; border: 0; border-radius: 0; background: var(--c); color: var(--t); cursor: pointer; box-shadow: inset 0 0 0 0 var(--ink); transition: transform .18s var(--ease), box-shadow .2s var(--ease); }
.picker button:active { transform: scale(.97); }
.picker button[aria-pressed="true"] { box-shadow: inset 0 0 0 4px var(--ink); }

.foot { padding: 40px var(--m) 32px; background: var(--ink); color: var(--pale); overflow: hidden; transition: background-color .7s var(--ease), color .7s var(--ease); }
.foot-word { font-weight: 700; font-size: 25.5vw; letter-spacing: -0.05em; line-height: .8; margin-left: -0.04em; }
.foot-note { margin-top: 28px; font-size: 1rem; max-width: 46rem; }

/* ---------- computers: the can stands right of centre, the words sit in the left column */
@media (min-aspect-ratio: 4/5) {
  :root { --track: 860svh; }
  .word { top: 12svh; font-size: min(26vw, 30svh); }
  .word .w2 { margin-top: 20svh; }
  .cap { top: 50%; bottom: auto; transform: translateY(-50%); left: calc(var(--m) * 2); max-width: min(36vw, 40rem); }
  .cap-hero { top: auto; bottom: 8svh; transform: none; }
  .cap p { max-width: 24ch; }
  .picker button { min-height: 60px; font-size: 1.125rem; }
  .foot-word { font-size: 24vw; }
}

/* a short computer-shaped window (e.g. the 620x760 frame on robertflorea.co.uk): smaller name, line kept clear of "split" */
@media (min-aspect-ratio: 4/5) and (max-width: 980px) {
  .word { top: 10svh; font-size: min(21vw, 22svh); }
  .word .w2 { margin-top: 13svh; }
  .cap-hero { bottom: 5svh; }
  .cap-hero p { font-size: clamp(1rem, .9rem + .5vw, 1.25rem); max-width: 22ch; }
}

/* ---------- reduced motion: no pinned story; a still of the can, the words in order, the picker repaints */
@media (prefers-reduced-motion: reduce) {
  .story { height: auto; background-image: none; }
  .stage { position: relative; height: auto; overflow: visible; padding: 96px var(--m) 64px; display: grid; gap: 28px; }
  .gl, .poster, .grain { display: none; }
  .word { position: static; flex-direction: row; justify-content: flex-start; gap: .18em; font-size: min(24vw, 9rem); }
  .word .w1, .word .w2 { margin-top: 0; transform: none; opacity: 1; animation: none; transition: none; }
  .still { display: block; width: min(100%, 30rem); height: auto; aspect-ratio: 780 / 1060; object-fit: cover; object-position: 50% 0; justify-self: center; }
  .cap { position: static; opacity: 1 !important; visibility: visible !important; transform: none !important; max-width: 40rem; }
  .cap-hero p, .cap-hero .btn { animation: none; }
  html, body, .btn, .foot { transition: none; }
}
