/* =====================================================================
   Dusty Reel · Beatmaker v1
   Plain CSS, no build step. Sections:
   1. Settings (colors, fonts, motion)   2. Base   3. Shared pieces
   4. Menu   5. Phone layout (drawn on the 390 frame, scaled by --u)
   6. Desktop layout (1024 px and up, drawn on the 1440 frame, scaled by --u)
   7. Animations
   Pieces are placed with numbers from the design: --x and --y (top left
   corner), sizes and --r (angle), in design pixels. One design pixel = --u.
   ===================================================================== */

/* Fonts, loaded from the fonts folder (see README to load them from Google instead) */
@font-face { font-family: "Fraunces"; src: url("../../fonts/fraunces-latin.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("../../fonts/dm-mono-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("../../fonts/dm-mono-500-latin.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- 1. Settings. EDIT: colors, fonts and motion live here. */
:root {
  --wood: #3b2a1e;       /* dark wood: hero, sample packs section, buttons */
  --paper: #e8dcc2;      /* sleeve paper: light sections, packs, light text */
  --ink: #17120d;        /* text on paper, footer, record discs */
  --orange: #e8662b;     /* buttons, record labels, licensing section */
  --orange-text: #c24f1a;/* orange used for big text on paper (3.5:1, large text) */
  --brown: #8a6445;      /* the warm brown of the phone scene */
  --brown-text: #6f4f36; /* small brown notes on paper (5.4:1) */
  --brown-light: #b08260;/* small brown text on black (5.5:1) */
  --photo-hint: #e8dcc2; /* "replace with photo" text on the empty photo spots */
  --photo-top: #4f73a0;  /* empty photo spots: gradient until a photo is added */
  --photo-bottom: #17120d;
  --shadow: drop-shadow(0 calc(14 * var(--u)) calc(11 * var(--u)) rgb(0 0 0 / .35));
  --focus: #e8dcc2;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "DM Mono", "Courier New", monospace;

  /* Motion. Durations in ms, distances in design pixels. */
  --motion-dur: 850ms;          /* pieces coming in */
  --motion-step: 110ms;         /* delay between pieces that come into view together */
  --motion-rise: 24;            /* how far blocks rise while they fade in */
  --motion-slide: 60;           /* how far the cassettes slide onto the desk */
  --motion-spin: 18s;           /* one slow turn of the licensing stamp (forever) */
  --motion-ease: cubic-bezier(.2, .8, .2, 1);
  --motion-pop: cubic-bezier(.3, 1.5, .5, 1);

  --nav-h-compact: 56px;        /* height of the slim menu bar after scrolling (phones) */

  /* --u: one design pixel. Phones: the 390 frame, up to 430 px wide. */
  --W: 390;
  --u: calc(min(100cqi, 430px) / 390);
}

/* ---------- 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body { margin: 0; background: var(--wood); color: var(--paper); font: 400 16px/1.5 var(--font-mono); overflow-x: clip; font-optical-sizing: auto; }
/* the scale units (cqi) are measured on these boxes, not on <body>: a container on <body>
   would make Firefox scroll the fixed menu bar away with the page */
main, footer, .topbar { container-type: inline-size; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: none; }
button, input, textarea { font: inherit; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--orange); color: var(--ink); font: 500 15px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.crate, .contact, .pack, .licensing { --focus: var(--ink); }
.desk-br { display: none; }

/* Sections: each one is drawn at the design size and scaled by --u */
.sec { --H: 1000; --sec-h: calc(var(--H) * var(--u)); --stage-top: calc((var(--sec-h) - var(--H) * var(--u)) / 2);
  position: relative; overflow: hidden; height: var(--sec-h); background-color: var(--wood); }
.stage { position: absolute; left: 50%; top: var(--stage-top); width: calc(var(--W) * var(--u)); height: calc(var(--H) * var(--u)); translate: -50% 0; }
.pc { position: absolute; margin: 0; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); rotate: var(--r, 0deg); transform-origin: var(--o, 0 0); }

/* ---------- 3. Shared pieces */
.btn { display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  font: 500 calc(var(--bf, 17) * var(--u))/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.btn--orange { background: var(--orange); color: var(--ink); }
.btn--line { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--paper); }
.btn--dark { background: var(--wood); color: var(--paper); }
.btn:hover { filter: brightness(1.12); }
.btn--line:hover { background: rgb(232 220 194 / .1); }
.sec__title { font: 700 calc(var(--tf, 48) * var(--u))/1.23 var(--font-display); letter-spacing: -.034em; }

/* Photo spots. EDIT: the gradient shows until a photo is added. */
.photo-slot { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, var(--photo-top), var(--photo-bottom)); }
.photo-slot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot__hint { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: flex; flex-direction: column; align-items: center; gap: calc(8 * var(--u));
  width: 84%; color: var(--photo-hint); font: 400 calc(var(--hf, 10) * var(--u))/1.3 var(--font-mono); text-align: center; }
.photo-slot__hint svg { width: calc(var(--hi, 36) * var(--u)); height: calc(var(--hi, 36) * var(--u)); }
.photo-slot > img ~ .photo-slot__hint { display: none; }

/* Sideways rails (phones) */
.rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > li { flex: none; scroll-snap-align: start; }

/* ---------- 4. Menu */
.topbar { position: fixed; z-index: 20; left: 0; right: 0; top: 0; height: 0; --H: 1013; }
.topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--nav-h-compact); background: rgb(23 18 13 / .96);
  box-shadow: 0 calc(3 * var(--u)) 0 var(--orange); opacity: 0; translate: 0 -100%; transition: opacity .3s, translate .3s; }
.topbar__stage { position: absolute; left: 50%; top: 0; width: calc(var(--W) * var(--u)); translate: -50% 0; }
.logo { position: absolute; left: calc(var(--lx, 20) * var(--u)); top: calc(var(--ly, 20) * var(--u)); font: 700 calc(28 * var(--u))/1.25 var(--font-display); text-decoration: none; white-space: nowrap; transition: top .3s var(--motion-ease); }
.nav__toggle { position: absolute; left: calc(328 * var(--u)); top: calc(var(--ty, 27) * var(--u)); padding: 0; border: 0; background: none; cursor: pointer;
  font: 500 calc(16 * var(--u))/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; transition: top .3s var(--motion-ease); }
.nav__toggle::after { content: ""; position: absolute; inset: calc(-12 * var(--u)) calc(-10 * var(--u)); }
.nav__links { position: absolute; left: calc(20 * var(--u)); top: calc(70 * var(--u)); width: calc(350 * var(--u)); padding: calc(14 * var(--u)) calc(22 * var(--u)); background: var(--ink); box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--orange);
  opacity: 0; visibility: hidden; translate: 0 calc(-10 * var(--u)); transition: opacity .25s, visibility .25s, translate .25s, top .3s; }
.nav.is-open .nav__links, .nav__links:target { opacity: 1; visibility: visible; translate: 0 0; }
/* Menu without JavaScript: the button needs main.js, so a plain link takes its place
   (same look) and the menu opens with :target. A link inside the menu closes it. */
html:not(.js) button.nav__toggle, .js .nav__toggle--link { display: none; }
.nav__toggle--link { text-decoration: none; }

.nav__links a { display: block; padding: calc(10 * var(--u)) 0; font: 500 calc(18 * var(--u))/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.nav__links a:hover { color: var(--orange); }
.topbar.is-scrolled::before { opacity: 1; translate: 0 0; }
.topbar.is-scrolled .logo { --ly: 10; }
.topbar.is-scrolled .nav__toggle { --ty: 17; }
.topbar.is-scrolled .nav__links { top: calc(60 * var(--u)); }
.static-nav .topbar { position: absolute; }

/* ---------- 5. Phone layout (390 frame) */
/* HERO */
.hero { --H: 1013; }
.hero__scene-bg { position: absolute; left: 0; right: 0; top: calc(var(--stage-top) + 613 * var(--u)); bottom: 0; background: var(--brown); }
.hero__title { --x: 20; --y: 75; font: 700 calc(56 * var(--u))/.92 var(--font-display); letter-spacing: -.034em; padding-top: calc(2 * var(--u)); }
.hero__intro { --x: 20; --y: 251; width: calc(350 * var(--u)); font-size: calc(18 * var(--u)); line-height: 1.6; }
.hero__browse { --x: 20; --y: 445; width: calc(350 * var(--u)); height: calc(64 * var(--u)); }
.hero__latest { --x: 20; --y: 529; width: calc(350 * var(--u)); height: calc(64 * var(--u)); }
.scene { pointer-events: none; }
.table { --x: 0; --y: 613; width: calc(390 * var(--u)); height: calc(59.6 * var(--u)); }
.sampler { --x: 10; --y: 631; width: calc(370 * var(--u)); height: calc(380 * var(--u)); filter: drop-shadow(0 calc(7 * var(--u)) calc(5.5 * var(--u)) rgb(0 0 0 / .35)); }
.shelf { display: none; --x: 10; --y: 617; width: calc(333 * var(--u)); height: calc(74.5 * var(--u)); }
.glow, .lamp, .cassette--2, .mug { display: none; }
.sticker--hero { --x: 300; --y: 863; --r: -12deg; width: calc(70 * var(--u)); height: calc(70 * var(--u)); z-index: 1; }
.cassette--1 { --x: 14; --y: 943; --r: 6deg; width: calc(143 * var(--u)); height: calc(93.5 * var(--u)); z-index: 1; }

/* THE CRATE (beat tapes) */
.crate { --H: 589; background-color: var(--paper); color: var(--ink); }
.crate__title { --x: 20; --y: 48; }
.crate__intro { --x: 20; --y: 131; width: calc(350 * var(--u)); font-size: calc(17 * var(--u)); line-height: 1.5; }
.tapes { --x: 0; --y: 233; width: calc(390 * var(--u)); gap: calc(20 * var(--u)); padding: calc(16 * var(--u)) calc(20 * var(--u)) 0; scroll-padding-left: calc(20 * var(--u)); }
.tape { position: relative; width: calc(290 * var(--u)); height: calc(292 * var(--u)); --hf: 9; --hi: 30; }
.tape > * { position: absolute; }
.tape__vinyl { left: calc(105.4 * var(--u)); top: calc(3.1 * var(--u)); width: calc(179.8 * var(--u)); height: calc(179.8 * var(--u)); border-radius: 50%; background: var(--ink); transition: rotate .8s var(--motion-ease); }
.tape:hover .tape__vinyl { rotate: 120deg; }
.tape__cover { inset: auto; left: 0; top: 0; width: calc(186 * var(--u)); height: calc(186 * var(--u)); filter: var(--shadow); }
/* EDIT: the empty covers repeat blue, brown and orange (only until you add your photos) */
.tape:nth-child(3n+1) .tape__cover { background: linear-gradient(180deg, #4675a8, #17171a); }
.tape:nth-child(3n+2) .tape__cover { background: linear-gradient(180deg, #7f5c3f, #1a130e); }
.tape:nth-child(3n) .tape__cover { background: linear-gradient(180deg, #e8834a, #2b1a10); }
.tape__sticker { left: calc(146.3 * var(--u)); top: calc(-13.6 * var(--u)); width: calc(47.1 * var(--u)); height: calc(47.1 * var(--u)); }
.tape__name { left: 0; top: calc(208 * var(--u)); font: 700 calc(22 * var(--u))/1.23 var(--font-display); white-space: nowrap; }
.tape__note { left: 0; top: calc(243 * var(--u)); color: var(--brown-text); font-size: calc(15 * var(--u)); line-height: 1.3; }
.tape__meta { right: 0; top: calc(271 * var(--u)); font: 500 calc(16 * var(--u))/1.3 var(--font-mono); white-space: nowrap; }
.tape__meta a { position: relative; margin-left: .5em; text-decoration: none; }
.tape__meta a::after { content: ""; position: absolute; inset: calc(-12 * var(--u)) calc(-5 * var(--u)); }
.tape__meta a:hover { color: var(--orange-text); text-decoration: underline; }

/* SAMPLE PACKS */
.samples { --H: 475; }
.samples__title { --x: 20; --y: 48; }
.packs { --x: 0; --y: 131; width: calc(390 * var(--u)); gap: calc(16 * var(--u)); padding: 0 calc(20 * var(--u)) calc(16 * var(--u)); scroll-padding-left: calc(20 * var(--u)); }
.pack { position: relative; width: calc(420 * var(--k) * var(--u)); height: calc(400 * var(--k) * var(--u)); background: var(--paper); color: var(--ink); --k: .74; }
.pack:nth-child(2) { --pr: -.8deg; } .pack:nth-child(3) { --pr: .6deg; }
.pack::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(14 * var(--k) * var(--u)); background: var(--orange); }
.pack > * { position: absolute; left: calc(30 * var(--k) * var(--u)); }
.pack__icon { left: calc(324 * var(--k) * var(--u)); top: calc(24 * var(--k) * var(--u)); width: calc(72 * var(--k) * var(--u)); height: calc(72 * var(--k) * var(--u)); }
.pack__name { top: calc(50 * var(--k) * var(--u)); font: 700 calc(30 * var(--k) * var(--u))/1.23 var(--font-display); }
.pack__text { top: calc(112 * var(--k) * var(--u)); width: calc(350 * var(--k) * var(--u)); font-size: calc(19 * var(--k) * var(--u)); line-height: 1.5; }
.pack__small { top: calc(200 * var(--k) * var(--u)); width: calc(350 * var(--k) * var(--u)); color: var(--brown-text); font-size: calc(17 * var(--k) * var(--u)); line-height: 1.5; }
.pack__price { top: calc(300 * var(--k) * var(--u)); color: var(--orange-text); font: 700 calc(44 * var(--k) * var(--u))/1.23 var(--font-display); }
.pack__btn { left: calc(230 * var(--k) * var(--u)); top: calc(300 * var(--k) * var(--u)); width: calc(160 * var(--k) * var(--u)); height: calc(54 * var(--k) * var(--u)); --bf: calc(17 * var(--k)); }
.pack__btn::after { content: ""; position: absolute; inset: calc(-6 * var(--u)) 0; }

/* LICENSING */
.licensing { --H: 804; background-color: var(--orange); color: var(--ink); }
.licensing__title { --x: 20; --y: 48; width: calc(230 * var(--u)); font: 700 calc(38 * var(--u))/.96 var(--font-display); letter-spacing: -.024em; padding-top: calc(4 * var(--u)); }
.stamp { --x: 270; --y: 28; --r: -12deg; --o: 50% 50%; width: calc(99 * var(--u)); height: calc(99 * var(--u)); }
.licenses { --x: 20; --y: 176; width: calc(350 * var(--u)); display: grid; row-gap: calc(17 * var(--u)); }
.license { position: relative; height: calc(183 * var(--u)); border-top: calc(3 * var(--u)) solid var(--paper); }
.license > * { position: absolute; left: 0; }
.license h3 { top: calc(20 * var(--u)); font: 700 calc(36 * var(--u))/1.23 var(--font-display); }
.license p { top: calc(84 * var(--u)); width: calc(350 * var(--u)); font-size: calc(17 * var(--u)); line-height: 1.5; }
.license a { top: calc(156 * var(--u)); font: 500 calc(16 * var(--u))/1.3 var(--font-mono); text-transform: uppercase; text-underline-offset: .2em; }
.license a::after { content: ""; position: absolute; inset: calc(-12 * var(--u)) calc(-4 * var(--u)); }

/* SAY HELLO */
.contact { --H: 832; background-color: var(--paper); color: var(--ink); }
.contact__title { --x: 20; --y: 48; font: 700 calc(64 * var(--u))/1.23 var(--font-display); letter-spacing: -.036em; }
.contact__text { --x: 20; --y: 143; width: calc(350 * var(--u)); font-size: calc(18 * var(--u)); line-height: 1.5; }
.contact__mail { --x: 20; --y: 240; color: var(--orange-text); font: 700 calc(24 * var(--u))/1.23 var(--font-display); text-decoration: none; white-space: nowrap; }
.contact__mail:hover { text-decoration: underline; }
.form { --x: 20; --y: 286; width: calc(350 * var(--u)); display: grid; row-gap: calc(16 * var(--u)); }
.field label { display: block; margin-bottom: calc(16 * var(--u)); font: 500 calc(15 * var(--u))/1.33 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.field input, .field textarea { display: block; width: 100%; height: calc(60 * var(--u)); padding: 0 calc(14 * var(--u)); border: calc(2 * var(--u)) solid var(--ink); border-radius: 0; background: transparent;
  font: 400 max(16px, calc(17 * var(--u)))/1.4 var(--font-mono); }
.field--big textarea { height: calc(160 * var(--u)); padding-top: calc(12 * var(--u)); resize: vertical; }
.form__send { height: calc(62 * var(--u)); }

/* FOOTER */
.footer { --H: 226; background-color: var(--ink); }
.footer__logo { --x: 20; --y: 40; font: 700 calc(36 * var(--u))/1.23 var(--font-display); }
.footer__links { --x: 20; --y: 100; width: calc(350 * var(--u)); display: flex; flex-wrap: wrap; column-gap: calc(20 * var(--u)); row-gap: calc(10 * var(--u)); }
.footer__links a { display: block; font: 500 calc(16 * var(--u))/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.footer__links a:hover { color: var(--orange); }
.footer__copy { --x: 20; --y: 168; color: var(--brown-light); font-size: calc(14 * var(--u)); line-height: 1.3; }

/* ---------- 6. Desktop layout (1440 frame). From 1024 px wide.
   Each section scales to fit the screen: as wide as the screen allows (up to 1440)
   and never taller than the screen, but never smaller than 60 % of the width scale. */
/* TOUCH AREA
   Small text links get an invisible area at least 26 px tall around them (WCAG target size).
   It only makes the clickable area bigger: nothing on screen moves. */
.nav__links a, .footer__links a { position: relative; }
.nav__links a::after, .footer__links a::after { content: ""; position: absolute; left: 0; right: 0; top: min(0px, calc(50% - 13px)); bottom: min(0px, calc(50% - 13px)); }

@media (min-width: 1024px) {
  :root { --W: 1440; --nav-h-compact: 64px; --kw: calc(min(100cqi, 1440px) / 1440); }
  .sec, .topbar { --u: max(min(var(--kw), 100svh / var(--H)), var(--kw) * .6); }
  .sec { --sec-h: max(100svh, var(--H) * var(--u)); }
  .desk-br { display: inline; }

  /* menu */
  .topbar { --H: 980; }
  .topbar__stage { top: calc((max(100svh, 980 * var(--u)) - 980 * var(--u)) / 2); transition: top .3s var(--motion-ease); }
  .topbar.is-scrolled .topbar__stage { top: 0; }
  .logo { --lx: 50; --ly: 34; }
  .topbar.is-scrolled .logo { --ly: 13; }
  .nav__toggle { display: none; }
  .nav__links { left: calc(840 * var(--u)); top: calc(var(--ny, 40) * var(--u)); width: auto; padding: 0; display: flex; gap: calc(40 * var(--u)); background: none; box-shadow: none;
    opacity: 1; visibility: visible; translate: none; transition: top .3s var(--motion-ease); }
  .nav__links a { padding: 0; font-size: calc(16 * var(--u)); }
  .topbar.is-scrolled .nav__links { --ny: 21; top: calc(var(--ny) * var(--u)); }

  /* hero */
  .hero { --H: 980; }
  .hero__scene-bg { display: none; }
  .hero__title { --x: 50; --y: 130; font-size: calc(112 * var(--u)); padding-top: calc(4 * var(--u)); }
  .hero__intro { --x: 50; --y: 500; width: calc(560 * var(--u)); font-size: calc(21 * var(--u)); }
  .hero__browse { --x: 50; --y: 690; width: calc(270 * var(--u)); }
  .hero__latest { --x: 340; --y: 690; width: calc(300 * var(--u)); }
  .table { --x: 0; --y: 760; width: calc(1440 * var(--u)); height: calc(220 * var(--u)); }
  .shelf { display: block; --x: 680; --y: 120; width: calc(740 * var(--u)); height: calc(165.5 * var(--u)); }
  .glow { display: block; --x: 500; --y: 100; width: calc(500 * var(--u)); height: calc(520 * var(--u)); }
  .lamp { display: block; --x: 700; --y: 0; --o: 50% 0; width: calc(120 * var(--u)); height: calc(170 * var(--u)); }
  .cassette--1 { --x: 50; --y: 820; width: calc(260 * var(--u)); height: calc(170 * var(--u)); z-index: 0; }
  .cassette--2 { display: block; --x: 130; --y: 850; --r: -4deg; width: calc(260 * var(--u)); height: calc(170 * var(--u)); }
  .mug { display: block; --x: 477; --y: 769; width: calc(176 * var(--u)); height: calc(203 * var(--u)); }
  .mug img { position: absolute; left: 0; top: calc(-16.2 * var(--u)); width: calc(179.4 * var(--u)); height: calc(219.3 * var(--u)); }
  .sampler { --x: 680; --y: 150; width: calc(740 * var(--u)); height: calc(760 * var(--u)); filter: var(--shadow); }
  .sticker--hero { --x: 1290; --y: 372; width: calc(100 * var(--u)); height: calc(100 * var(--u)); }

  /* the crate */
  .crate { --H: 1130; }
  .crate__title { --x: 50; --y: 70; --tf: 88; }
  .crate__intro { --x: 760; --y: 94; width: calc(520 * var(--u)); font-size: calc(22 * var(--u)); }
  .tapes { --x: 50; --y: 250; width: calc(1340 * var(--u)); padding: 0; overflow: visible; display: grid; grid-template-columns: repeat(3, calc(420 * var(--u))); column-gap: calc(40 * var(--u)); row-gap: calc(110 * var(--u)); }
  .tape { width: calc(420 * var(--u)); height: calc(300 * var(--u)); --hf: 11; --hi: 44; }
  .tape__vinyl { left: calc(170 * var(--u)); top: calc(5 * var(--u)); width: calc(290 * var(--u)); height: calc(290 * var(--u)); }
  .tape__cover { width: calc(300 * var(--u)); height: calc(300 * var(--u)); }
  .tape__sticker { left: calc(236 * var(--u)); top: calc(-22 * var(--u)); width: calc(76 * var(--u)); height: calc(76 * var(--u)); }
  .tape__name { top: calc(322 * var(--u)); font-size: calc(26 * var(--u)); }
  .tape__note { top: calc(360 * var(--u)); font-size: calc(17 * var(--u)); }
  .tape__meta { right: 0; top: calc(360 * var(--u)); font-size: calc(17 * var(--u)); }

  /* sample packs */
  .samples { --H: 720; }
  .samples__title { --x: 50; --y: 70; --tf: 88; }
  .packs { --x: 50; --y: 230; width: calc(1340 * var(--u)); padding: 0; overflow: visible; gap: calc(40 * var(--u)); }
  .pack { --k: 1; rotate: var(--pr, 1.2deg); transform-origin: 0 0; filter: var(--shadow); }

  /* licensing */
  .licensing { --H: 720; }
  .licensing__title { --x: 50; --y: 80; width: auto; font-size: calc(84 * var(--u)); padding-top: calc(6 * var(--u)); white-space: nowrap; }
  .stamp { --x: 1130; --y: 70; --o: 0 0; width: calc(220 * var(--u)); height: calc(220 * var(--u)); }
  .licenses { --x: 50; --y: 350; width: calc(1340 * var(--u)); grid-template-columns: repeat(3, calc(420 * var(--u))); column-gap: calc(40 * var(--u)); }
  .license { height: calc(240 * var(--u)); }
  .license h3 { top: calc(27 * var(--u)); font-size: calc(44 * var(--u)); }
  .license p { top: calc(97 * var(--u)); width: calc(380 * var(--u)); font-size: calc(20 * var(--u)); }
  .license a { top: calc(207 * var(--u)); font-size: calc(17 * var(--u)); }

  /* say hello: the contact and the footer share the last screen */
  .contact { --H: 1060; --sec-h: calc(max(100svh, 1060 * var(--u)) - 200 * var(--u)); --stage-top: calc((var(--sec-h) - 860 * var(--u)) / 2); }
  .contact .stage { height: calc(860 * var(--u)); }
  .contact__title { --x: 50; --y: 70; font-size: calc(110 * var(--u)); }
  .contact__text { --x: 50; --y: 260; width: calc(480 * var(--u)); font-size: calc(23 * var(--u)); }
  .contact__mail { --x: 50; --y: 420; font-size: calc(38 * var(--u)); }
  .form { --x: 780; --y: 80; width: calc(600 * var(--u)); row-gap: calc(42 * var(--u)); justify-items: start; }
  .field { width: 100%; }
  .field label { margin-bottom: calc(8 * var(--u)); }
  .form__send { width: calc(200 * var(--u)); margin-top: calc(20 * var(--u)); }

  /* footer */
  .footer { --H: 1060; --sec-h: calc(200 * var(--u)); --stage-top: 0px; }
  .footer .stage { height: calc(200 * var(--u)); }
  .footer__logo { --x: 50; --y: 56; font-size: calc(44 * var(--u)); }
  .footer__links { --x: 50; --y: 136; width: auto; flex-wrap: nowrap; column-gap: calc(36 * var(--u)); }
  .footer__copy { --x: 1000; --y: 138; font-size: calc(15 * var(--u)); }
}

/* ---------- 7. Animations (only with the "motion" class, see index.html).
   Nothing starts hidden until main.js adds "bm-reveal", so the page always
   shows up complete without JavaScript. To turn them all off: class="no-motion" on <html>. */
.motion.bm-reveal [data-reveal] { transition: opacity var(--motion-dur) var(--motion-ease), translate var(--motion-dur) var(--motion-ease), scale var(--motion-dur) var(--motion-pop), transform var(--motion-dur) var(--motion-ease);
  transition-delay: calc(var(--i, 0) * var(--motion-step)); }
/* blocks rise */
.motion.bm-reveal [data-reveal="rise"]:not(.is-in) { opacity: 0; translate: 0 calc(var(--motion-rise) * var(--u)); }
/* the cassettes slide onto the desk from the left */
.motion.bm-reveal [data-reveal="slide"]:not(.is-in) { opacity: 0; translate: calc(var(--motion-slide) * -1 * var(--u)) 0; }
/* the lamp swings in and its light turns on */
.motion.bm-reveal [data-reveal="swing"]:not(.is-in) { transform: rotate(14deg); }
.motion.bm-reveal [data-reveal="glow"] { transition-delay: calc(var(--motion-dur) * .6); }
.motion.bm-reveal [data-reveal="glow"]:not(.is-in) { opacity: 0; }
/* stickers press on with a small bounce */
.motion.bm-reveal [data-reveal="pop"]:not(.is-in) { opacity: 0; scale: .4; }
.motion.bm-reveal .sticker--hero { transform-origin: 50% 50%; }
/* the licensing stamp turns very slowly, forever */
.motion [data-reveal="spin"].is-in { animation: turn var(--motion-spin) linear infinite; }
.motion.bm-reveal [data-reveal="spin"]:not(.is-in) { opacity: 0; }
@keyframes turn { to { transform: rotate(360deg); } }
/* steam over the mug (desktop) */
.steam { position: absolute; left: calc(70 * var(--u)); top: calc(-40 * var(--u)); width: calc(30 * var(--u)); height: calc(36 * var(--u)); opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 70%, rgb(232 220 194 / .35), transparent 60%); }
.motion .steam { animation: steam 4s ease-in-out infinite; }
@keyframes steam { 0% { opacity: 0; translate: 0 0; } 40% { opacity: 1; } 100% { opacity: 0; translate: 0 calc(-24 * var(--u)); } }
/* used by main.js: "bm-still" jumps without animating, "bm-measure" puts every piece in its final place */
.bm-still *, .bm-still *::before, .bm-still *::after { transition: none !important; }
.bm-measure [data-reveal], .bm-measure [data-reveal] * { opacity: 1 !important; translate: none !important; scale: none !important; transform: none !important; animation: none !important; }

/* DEMO ONLY: note after sending the form, template and photo credits under the footer */
.form__send-wrap { position: relative; }
.demo-note { position: absolute; left: 0; right: 0; bottom: 0; height: calc(62 * var(--u)); display: flex; align-items: center; justify-content: center; margin: 0; padding: 0 calc(10 * var(--u)); background: var(--orange); color: var(--ink); font: 500 calc(14 * var(--u))/1.25 var(--font-mono); text-align: center; }
.demo-note[hidden] { display: none; }
.demo-credit { background: var(--ink); color: var(--paper); padding: 22px 20px 28px; font: 400 13px/1.5 var(--font-mono); }
.demo-credit p { width: min(100%, 390px); margin: 0 auto 6px; opacity: .8; }
@media (min-width: 1024px) { .demo-note { position: static; height: auto; justify-content: flex-start; padding: 0; background: none; color: var(--orange-text); font-size: calc(16 * var(--u)); } .demo-credit { padding: 24px 56px 32px; font-size: 14px; } .demo-credit p { width: min(100%, 1328px); } }
