/* Odds & Engines — the shop shell (home and brand sheet). The home page is a maker's garage you walk into:
   js/garage.js draws it, and the cards below sit on top of it. Without WebGL (no .has-3d on <html>) the same
   cards are laid out flat under a still picture of the garage. Product pages keep their own look (css/site.css).

   The shell is Beautiful Engine's, piece for piece: cream paper, navy ink, coral; Microbrew headlines, Birdie for
   everything you read, Sundae for a word of script; the rounded nav bar, the rule-and-small-caps kicker, the two
   pill buttons, postcards with a stamp. Walking in from beautifulengine.com is a change of room, not of studio.
   After dark (.lights-off) the page turns to the wall colour and the neon carries it. */
@font-face { font-family: "Microbrew"; src: url("../assets/fonts/be/Microbrew-One.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Birdie"; src: url("../assets/fonts/be/TAYBirdieRegular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sundae"; src: url("../assets/fonts/be/TAYSundaeRegular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
/* drawn into the 3D scene (tape labels, price tags, box art, the neon), not used by the page itself */
@font-face { font-family: "Yellowtail"; src: url("../assets/fonts/Yellowtail-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Tilt Neon"; src: url("../assets/fonts/TiltNeon-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Permanent Marker"; src: url("../assets/fonts/PermanentMarker-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../assets/fonts/Barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/BarlowCondensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/BarlowCondensed-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: light;
  /* Beautiful Engine */
  --paper: #f3ebdd;       /* the page */
  --card: #fbf6ec;        /* postcards, the nav bar */
  --ink: #1d2238;         /* navy: type, outlines */
  --ink-soft: rgba(29, 34, 56, .74);
  --coral: #e86d52;  --coral-deep: #c9523a;
  --coral-ink: #a83e28;   /* coral you can read: small text, and fills that carry light text (5.2:1 on the page, 5.7:1 on a card) */
  --mustard: #f2c14e;
  --teal: #5da8a6;        /* with navy, coral and mustard: the four bands painted on the garage wall */
  --line: rgba(29, 34, 56, .16);
  /* the neon, for after dark and for the marks */
  --wall: #14121a;  --wall-deep: #0c0a10;
  --coral-hot: #ff8a6f;  --coral-core: #ffd9cf;
  --cyan: #2fb7e8;   --cyan-hot: #7fe3ff;   --cyan-core: #d8f6ff;
  --tape: #e7dcbd;
  --head: "Microbrew", "Barlow Condensed", "Arial Narrow", sans-serif;   /* headlines, names, prices */
  --body: "Birdie", Georgia, serif;                                      /* everything you read, and the buttons */
  --script: "Sundae", "Yellowtail", cursive;                             /* a word or two, never a sentence */
  --gutter: clamp(18px, 4vw, 56px);
  --max: 1320px;
  /* what the page is set in right now (day) */
  --bg: var(--paper);  --fg: var(--ink);  --fg-soft: var(--ink-soft);  --accent: var(--coral-ink);  --bar: rgba(251, 246, 236, .92);  --ring: var(--ink);  --ring-gap: var(--card);
}
:root.lights-off { color-scheme: dark; --bg: var(--wall); --fg: var(--paper); --fg-soft: rgba(243, 235, 221, .74); --accent: var(--coral-hot); --line: rgba(243, 235, 221, .2); --bar: rgba(28, 25, 36, .9); --ring: var(--paper); --ring-gap: var(--wall); }
/* Page-to-page motion is hand-authored (the dive into the TV and the pull back out, the walk up the drive);
   the browser's own cross-document cross-fade fought those, so it is off. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; color: var(--fg); font: 400 16px/1.7 var(--body); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; overflow-x: clip;
  background: var(--bg) url("../assets/be/paper-texture.webp") center top / 640px auto; transition: background-color .6s, color .6s; }
:root.lights-off body { background-image: none; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
::selection { background: var(--coral); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ring-gap); border-radius: 6px; }
.ticket :focus-visible, .drop :focus-visible { outline-color: var(--ink); box-shadow: 0 0 0 6px var(--card); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr, .welcome h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 24px; top: -80px; z-index: 60; padding: 14px 22px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; text-decoration: none; }
.skip:focus { top: 20px; }

/* top bar: Beautiful Engine's rounded bar, with the studio's roundel as the way back */
.bar { position: fixed; inset: 16px 0 auto 0; z-index: 40; padding: 0 24px; transition: opacity .3s; pointer-events: none; }
.bar .pill { pointer-events: auto; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 14px 10px 22px; border-radius: 999px;
  background: var(--bar); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 10px 30px -14px rgba(29, 34, 56, .35), 0 0 0 1px var(--line); transition: background-color .6s; }
.bar .be { flex: none; }
.bar .be img { width: 32px; height: 32px; }
.bar .brand { font: 400 17px/1 var(--head); letter-spacing: .02em; text-transform: uppercase; text-decoration: none; white-space: nowrap; padding: 8px 0 6px 14px; border-left: 1px solid var(--line); }   /* the hairline: the roundel leaves, the name stays */
.bar nav { margin-left: auto; display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.bar nav a { font-size: 13px; line-height: 1; text-decoration: none; padding: 14px 0; }
.bar nav a:hover { color: var(--accent); }
.bar nav a.home { white-space: nowrap; }
.bar nav a.cta { padding: 13px 20px; border-radius: 999px; border: 1.5px solid var(--coral); color: var(--accent); white-space: nowrap; }   /* the one button in the bar is the thing for sale; the way back to the studio is the roundel and a plain link */
.bar nav a.cta:hover { background: var(--coral-ink); border-color: var(--coral-ink); color: #fff; }
/* two round switches: daylight or after dark, and pause for everything that moves by itself */
.tog { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; transition: background .12s, color .12s; }
.tog + .tog { margin-left: -8px; }
.tog:hover { background: var(--fg); color: var(--bg); }
.tog svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tog[aria-pressed="true"] .off, .tog[aria-pressed="false"] .on { display: none; }
:root:not(.has-3d) .tog { display: none; }
@media (max-width: 860px) { .bar nav a:not(.home):not(.keep) { display: none; } .bar .brand { font-size: 16px; } .bar nav { gap: 10px; } }
@media (max-width: 620px) { .bar { padding: 0 12px; } .bar .pill { min-height: 60px; padding: 8px 8px 8px 12px; gap: 10px; } .bar nav a.home { display: none; } .bar nav a.cta, .bar nav a.cta:hover { padding: 14px 0; border: 0; border-radius: 0; background: none; color: var(--accent); } .bar .brand { font-size: 15px; padding-left: 10px; } .tog { width: 40px; height: 40px; } }
@media (max-width: 370px) { .has-3d .bar nav a.keep { display: none; } }

/* buttons: Beautiful Engine's two pills */
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1.5px solid rgba(29, 34, 56, .55); color: var(--ink); background: transparent;
  font: 400 13.5px/1 var(--body); letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background .12s, color .12s, border-color .12s, transform .12s, box-shadow .12s; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn.hot { background: var(--coral); border-color: var(--coral); color: var(--ink); box-shadow: 0 10px 22px -10px rgba(232, 109, 82, .9); }
.btn.hot:hover { background: var(--coral-ink); border-color: var(--coral-ink); color: #fff; }
.btn[disabled] { opacity: .6; cursor: default; }
:root.lights-off .welcome .btn:not(.hot) { border-color: rgba(243, 235, 221, .6); color: var(--paper); }
:root.lights-off .welcome .btn:not(.hot):hover { background: var(--paper); color: var(--ink); }

/* the rule and small caps that sit over a headline */
.kicker { display: flex; align-items: center; gap: 12px; font-size: 11.5px; line-height: 1.3; letter-spacing: .22em; text-transform: uppercase; text-wrap: balance; color: var(--coral-ink); }
.kicker::before { content: ""; flex: none; width: 32px; height: 1.5px; background: currentColor; }
.welcome .kicker { color: var(--accent); }

/* ---------- the garage ---------- */
.garage { position: relative; }
.stage { position: relative; background: var(--paper) url("../assets/garage/poster.jpg") center / cover no-repeat; aspect-ratio: 16 / 9; max-height: 74svh; width: 100%; }
:root:not(.has-3d) .stage { margin-top: 100px; }          /* clear of the bar, so the name over the door can be read */
.stage canvas { display: none; width: 100%; height: 100%; }
.stations { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 54px 28px; align-items: start; }
.station.street { grid-column: 1 / -1; }
.station.look, .onward { display: none; }
.welcome { display: grid; gap: 22px; max-width: 30em; }
.welcome .pitch { font: 400 clamp(46px, 5.6vw, 92px)/.93 var(--head); letter-spacing: -.01em; text-transform: uppercase; text-wrap: balance; }
.welcome .more { max-width: 27em; color: var(--fg-soft); }
.welcome .more a { color: var(--accent); text-underline-offset: 4px; }

/* price cards: a Beautiful Engine postcard with a stamp, propped by the thing it is about */
.ticket { position: relative; width: min(100%, 420px); color: var(--ink); padding: 26px 28px 28px; border-radius: 4px;
  background: var(--card) url("../assets/be/paper-texture.webp") center / 560px auto; box-shadow: 0 0 0 1px rgba(29, 34, 56, .06), 0 26px 44px -16px rgba(29, 34, 56, .5), 0 3px 8px rgba(29, 34, 56, .16); }
.ticket .kicker { margin: 4px 86px 34px 0; }
.ticket .stamp { position: absolute; top: 12px; right: 18px; width: 80px; padding: 9px 5px 8px; text-align: center; rotate: 4deg; color: var(--ink); background: var(--coral);
  font: 400 17px/1 var(--head); letter-spacing: .05em; --n: 7px;
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 2.4px, transparent 2.9px) -3.5px -3.5px / var(--n) var(--n) round, linear-gradient(#000 0 0) 50% / calc(100% - 6px) calc(100% - 6px) no-repeat;
  mask: radial-gradient(circle at 50% 50%, #000 2.4px, transparent 2.9px) -3.5px -3.5px / var(--n) var(--n) round, linear-gradient(#000 0 0) 50% / calc(100% - 6px) calc(100% - 6px) no-repeat; }
.ticket .stamp small { display: block; margin-top: 5px; font: 400 11px/1.15 var(--body); letter-spacing: .04em; text-transform: uppercase; }
.ticket .stamp.out { background: var(--ink); color: var(--paper); }
/* one card is franked: the postmark, struck across the corner of the About card's stamp */
.ticket.mark::before { content: ""; position: absolute; top: 7px; right: 86px; width: 60px; height: 60px; border-radius: 50%; border: 1.5px solid rgba(29, 34, 56, .55); outline: 1.5px solid rgba(29, 34, 56, .34); outline-offset: 4px; rotate: -12deg; pointer-events: none; z-index: 1; mix-blend-mode: multiply; }
.ticket.mark::after { content: ""; position: absolute; top: 25px; right: 74px; width: 78px; height: 20px; rotate: -8deg; pointer-events: none; z-index: 1; opacity: .42;
  background: repeating-linear-gradient(to bottom, var(--ink) 0 1.5px, transparent 1.5px 6px); -webkit-mask: linear-gradient(90deg, transparent, #000 22%, #000 58%, transparent 94%); mask: linear-gradient(90deg, transparent, #000 22%, #000 58%, transparent 94%); }
.ticket.mark h2 { max-width: calc(100% - 112px); }          /* the name breaks before it reaches the postmark */
.ticket h2 { margin: 0 0 12px; font: 400 clamp(46px, 4.4vw, 64px)/.9 var(--head); letter-spacing: -.01em; text-transform: uppercase; text-wrap: balance; }
.ticket .what { font-size: 15px; line-height: 1.6; max-width: 31em; }
.ticket .what + .what, .ticket .what.aside { margin-top: 12px; color: var(--ink-soft); }
.ticket a:not(.btn) { text-underline-offset: 4px; text-decoration-color: var(--coral); }
.ticket a:not(.btn):hover { color: var(--coral-ink); }
.ticket .price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 16px; font: 400 68px/.85 var(--head); color: var(--coral-deep); }
.ticket .price s { font: 400 28px/1 var(--head); color: var(--ink-soft); }
.ticket .price small { font: 400 13px/1.3 var(--body); color: var(--ink-soft); }
.ticket .actions { margin-top: 20px; gap: 10px; }
.ticket .btn { min-height: 46px; padding: 0 22px; }
.ticket .fits { margin-top: 14px; font-size: 13.5px; line-height: 1.55; }
.ticket .fits b { font-weight: 400; background: linear-gradient(transparent 62%, rgba(242, 193, 78, .7) 0); }   /* a stroke of mustard under the one thing you must not miss */
.ticket .prints { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 4px; }
.ticket .prints img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; border: 4px solid #fff; box-shadow: 0 4px 10px -4px rgba(29, 34, 56, .5); }
.ticket .prints img:nth-child(1) { rotate: -2deg; }  .ticket .prints img:nth-child(3) { rotate: 1.5deg; }
.ticket .sig { margin-top: 10px; font: 400 26px/1.1 var(--script); letter-spacing: 0; color: var(--coral-ink); }

/* without the garage, the About card lies across the page with its prints beside the words */
@media (min-width: 861px) {
  :root:not(.has-3d) .station[data-station="wall"] { grid-column: 1 / -1; }
  :root:not(.has-3d) .station[data-station="wall"] .ticket { width: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 48px; align-items: start; }
  :root:not(.has-3d) .station[data-station="wall"] .ticket > :not(.stamp):not(.prints) { grid-column: 1; }
  :root:not(.has-3d) .station[data-station="wall"] .ticket h2 { max-width: none; }
  :root:not(.has-3d) .station[data-station="wall"] .ticket > .prints { grid-column: 2; grid-row: 1 / span 7; align-self: end; margin: 96px 0 4px; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; }
  :root:not(.has-3d) .station[data-station="wall"] .prints img { aspect-ratio: auto; min-height: 0; border-width: 6px; }
  :root:not(.has-3d) .station[data-station="wall"] .prints img:nth-child(2) { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: 3 / 2; rotate: -1deg; }
  :root:not(.has-3d) .station[data-station="wall"] .prints img:nth-child(1) { grid-column: 2; grid-row: 1; rotate: 1.5deg; }
  :root:not(.has-3d) .station[data-station="wall"] .prints img:nth-child(3) { grid-column: 2; grid-row: 2; rotate: -1.5deg; }
}

/* with the garage running: the picture stays put, the cards scroll past, the camera walks with them */
.has-3d .stage { position: sticky; top: 0; height: 100vh; height: 100lvh; max-height: none; aspect-ratio: auto; background-color: var(--bg); overflow: hidden; transition: background-color .6s; }   /* the still stays underneath until the first frame is drawn */
:root.lights-off.has-3d .stage { background-image: none; }
.has-3d .stage canvas { display: block; position: relative; opacity: 0; transition: opacity .9s; }
.has-3d .stage.is-live canvas { opacity: 1; }
.returning.has-3d .stage { background-image: none; background-color: #0a0a0c; }   /* back through the TV: open on the dark set, not the street still */
.returning.has-3d .stage canvas { transition: opacity .25s; }
.has-3d.returning .stations { opacity: 0; transition: none; }   /* hold the page empty until the camera is out of the set, then it fades in */
.has-3d.returning .bar { opacity: 0; }
/* paper tooth over the picture, the same sheet the Beautiful Engine pages are printed on */
.has-3d .stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: url("../assets/be/paper-texture.webp") center / 640px auto; mix-blend-mode: multiply; opacity: .26; }
:root.lights-off.has-3d .stage::after { opacity: .08; }
:root.lights-off.has-3d .ticket { filter: brightness(.93); }  /* after dark a card is paper in a dim room, not a lit panel */
/* leaving by the door: the daylight outside is the Beautiful Engine page colour, with the studio's roundel where its own page paints it */
.veil { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: var(--paper) url("../assets/be/be-logo-circle.svg") 53px 36px / 32px 32px no-repeat; opacity: 0; transition: opacity .85s ease-in; }
.veil.on { opacity: 1; }
.in-flight .bar, .in-flight .stations { opacity: 0; pointer-events: none; }
/* Arriving from the studio site ("arriving" in src/garage/main.js): bare paper, the studio's own colour, until the shop
   front comes out of it; the words wait for the door. The bar stays: it is the one thing both sites share. */
.has-3d.arriving .stage { background-image: none; }
.has-3d.arriving .stage canvas { transition: none; }
.has-3d.arriving .stations { opacity: 0; transition: none; }
.has-3d .stations { transition: opacity .8s; }
.has-3d .prints { display: none; }                         /* the real ones are on the wall */
.has-3d .stations { position: relative; margin-top: -100vh; margin-top: -100lvh; max-width: none; padding: 0; display: block; pointer-events: none; transition: opacity .3s; }
.has-3d .station { min-height: 118svh; display: flex; align-items: center; padding: 0 max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); }
.has-3d .station > * { pointer-events: auto; }
.has-3d .station[data-side="right"] { justify-content: flex-end; }
.has-3d .station.street { position: relative; min-height: 100svh; padding-left: clamp(24px, 5vw, 96px); }     /* the welcome is written on the shop front, left of the door */
.has-3d .station.street .welcome { max-width: min(27em, 25.5vw); }
/* wide screens: the lockup is pinned to the shop front by main.js (placeWelcome), so it rides the wall in instead of scrolling up */
@media (min-width: 861px) and (min-aspect-ratio: 1/1) { .has-3d .station.street .welcome { position: fixed; left: 0; top: 0; margin: 0; z-index: 3; will-change: transform, opacity; opacity: 0; } }   /* hidden until main.js has put it on the wall and fades it in */
@media (min-width: 861px) and (min-aspect-ratio: 1/1) { .has-3d .station.street .actions { gap: 10px; } .has-3d .station.street .btn { padding: 0 20px; } }   /* both buttons on one line, clear of the plant by the door */
@media (min-width: 861px) and (min-aspect-ratio: 1/1) { .has-3d .station.street .pitch { font-size: clamp(40px, 4.5vw, 84px); } }
.has-3d .onward { display: grid; justify-items: center; gap: 2px; position: fixed; left: 0; top: 0; z-index: 4; color: var(--paper); text-decoration: none; opacity: 0; pointer-events: none; transition: opacity .7s ease; will-change: transform, opacity; perspective: 260px; }
.has-3d .onward.on { opacity: 1; pointer-events: auto; }
/* the arrow lies flat on the drive (tilted back in perspective) and points up it, into the garage: three chevrons, see-through, flowing forward */
.has-3d .onward .road { position: relative; display: block; width: 130px; height: 128px; transform: rotateX(56deg); transform-origin: 50% 70%; }
.has-3d .onward .road i { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border: solid rgba(255, 246, 228, .95); border-width: 11px 0 0 11px; border-radius: 4px 0 0 0; opacity: 0;
  filter: drop-shadow(0 0 6px rgba(255, 214, 160, .7)); animation: chevFlow 1.8s cubic-bezier(.3, 0, .3, 1) infinite; }
.has-3d .onward .road i:nth-child(2) { animation-delay: .6s; }
.has-3d .onward .road i:nth-child(3) { animation-delay: 1.2s; }
.has-3d .onward .word { font: 400 21px/1 var(--script); letter-spacing: 0; color: var(--paper); text-shadow: 0 1px 2px rgba(20, 16, 12, .75), 0 0 14px rgba(20, 16, 12, .5); margin-top: -18px; }
/* no up or down in the words: which way a wheel, a trackpad or a thumb moves depends on the machine and its settings; the arrow points the way you go */
.onward .by-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .onward .by-wheel { display: none; } .onward .by-touch { display: inline; } }
.scrolled .onward { opacity: 0; pointer-events: none; }      /* once you are walking, the invitation has done its job */
@keyframes chevFlow { 0% { transform: translateY(50px) rotate(45deg); opacity: 0; } 20% { opacity: .95; } 75% { opacity: .7; } 100% { transform: translateY(-50px) rotate(45deg); opacity: 0; } }
.has-3d .station.look { display: flex; min-height: 72svh; align-items: flex-end; justify-content: center; padding-bottom: 8svh; }
.has-3d .station.look p { font-size: 14px; color: var(--paper); background: rgba(29, 34, 56, .88); padding: 11px 22px; border-radius: 999px; }
.has-3d .station:last-child { min-height: 130svh; }
/* the cards fade and grow in as you reach their stop, and fade back out as you walk on (main.js, fadeCards) */
.has-3d .station > .ticket { transform-origin: 50% 60%; will-change: opacity, transform; }
.clean .bar, .clean .stations, .clean .skip { visibility: hidden; }     /* ?clean: the garage alone, for stills */
.clean .stage::after { display: none; }
/* a short window: the tallest card must still clear the bar */
@media (min-width: 861px) and (max-height: 800px) { .has-3d .ticket { padding: 20px 24px 22px; } .has-3d .ticket h2 { font-size: 44px; } .has-3d .ticket .kicker { margin-bottom: 16px; } .has-3d .ticket .aside { display: none; } .has-3d .ticket .price { font-size: 56px; margin-top: 10px; } }

/* phones and upright tablets: the card docks at the bottom, the shelf fills the top (main.js uses the same query) */
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .stage { background-image: url("../assets/garage/poster-tall.jpg"); background-position: center top; aspect-ratio: 4 / 5; max-height: 72svh; }
  :root:not(.has-3d) .stage { margin-top: 84px; }
  .has-3d .station { align-items: flex-end; justify-content: center; padding-bottom: 18px; min-height: 125svh; }
  .has-3d .station[data-side] { justify-content: center; }
  .has-3d .station.look { min-height: 80svh; }
  .has-3d .station.street { padding: 0 var(--gutter) 64px; justify-content: flex-start; align-items: flex-end; }
  /* the words stand on paper, which fades up into the picture of the garage */
  .has-3d .station.street .welcome { max-width: none; width: calc(100% + 2 * var(--gutter)); gap: 14px; margin: 0 calc(-1 * var(--gutter)); padding: min(12svh, 88px) var(--gutter) 0; background: linear-gradient(to top, var(--bg) calc(100% - min(11svh, 80px)), transparent); box-shadow: 0 64px 0 var(--bg); }
  .has-3d .station.street .welcome > * { max-width: 30rem; }
  .welcome .pitch { font-size: clamp(40px, 11.5vw, 62px); }
  .ticket { padding: 20px 20px 18px; width: min(100%, 520px); }
  .ticket h2 { font-size: 40px; margin-bottom: 8px; }
  .ticket .kicker { margin-bottom: 20px; }
  .ticket .what { font-size: 14px; line-height: 1.5; }
  .ticket .price { font-size: 52px; margin-top: 10px; }
  .ticket .actions { margin-top: 14px; flex-wrap: nowrap; }
  .ticket .btn { min-height: 44px; padding: 0 14px; font-size: 13px; flex: 1 1 0; white-space: nowrap; }
  .ticket .fits { margin-top: 10px; font-size: 13px; }
  /* the welcome: smaller, and less paper, so the whole garage front shows above it */
  .has-3d .station.street { padding-bottom: 18px; }
  .has-3d .station.street .welcome { gap: 10px; padding-top: min(6svh, 40px); background: linear-gradient(to top, var(--bg) calc(100% - min(5svh, 34px)), transparent); box-shadow: 0 40px 0 var(--bg); }
  .has-3d .welcome .pitch { font-size: clamp(30px, 8.4vw, 44px); }
  .has-3d .station.street .welcome .more { font-size: 13.5px; line-height: 1.5; }
  .has-3d .station.street .actions { gap: 8px; flex-wrap: nowrap; }
  .has-3d .station.street .btn { min-height: 42px; padding: 0 14px; font-size: 12.5px; flex: 1 1 auto; white-space: nowrap; }
  /* the cards, compact: one paragraph, the price and the buttons */
  .has-3d .ticket { padding: 15px 16px 14px; width: min(100%, 440px); }
  .has-3d .ticket .kicker { margin: 2px 74px 12px 0; font-size: 10.5px; }
  .has-3d .ticket .stamp { width: 64px; top: 10px; right: 12px; font-size: 14px; padding: 7px 4px 6px; }
  .has-3d .ticket .stamp small { font-size: 9.5px; margin-top: 3px; }
  .has-3d .ticket h2 { font-size: 30px; margin-bottom: 6px; max-width: calc(100% - 70px); }
  .has-3d .ticket .what { font-size: 13px; line-height: 1.45; }
  .has-3d .ticket .what + .what, .has-3d .ticket .fits { display: none; }
  .has-3d .ticket .price { font-size: 40px; margin-top: 6px; }
  .has-3d .ticket .price s { font-size: 20px; }
  .has-3d .ticket .actions { margin-top: 10px; }
  .has-3d .ticket .btn { min-height: 40px; }
  .has-3d .ticket .sig { font-size: 20px; margin-top: 4px; }
  /* docked over the picture, a card says the least it can; the rest is one tap away on the product page, and on the flat page */
  .has-3d .ticket .extra, .has-3d .ticket .aside { display: none; }
  .ticket h2 { max-width: calc(100% - 84px); }               /* a name of several words breaks before the stamp */
  .ticket .sig { margin-top: 6px; font-size: 23px; }
}

/* ---------- below the garage: plain Beautiful Engine paper ---------- */
[id] { scroll-margin-top: 96px; }
.ticket[id] { scroll-margin-block: 24svh; }
@media (max-width: 860px), (max-aspect-ratio: 1/1) { .ticket[id] { scroll-margin-block: 90px 18px; } }

.drop { margin: clamp(72px, 10vw, 128px) 0 0; padding: 48px; border-radius: 6px; color: var(--ink); background: var(--mustard) url("../assets/be/paper-texture.webp") center / 640px auto; background-blend-mode: multiply;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; align-items: center; box-shadow: 0 22px 40px -18px rgba(29, 34, 56, .4); }
.drop h2 { margin: 0 0 10px; font: 400 clamp(40px, 5vw, 72px)/.92 var(--head); letter-spacing: -.01em; text-transform: uppercase; }
.drop label { display: block; margin-bottom: 8px; font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; }
.drop .row { display: flex; gap: 10px; flex-wrap: wrap; }
.drop input[type="email"] { flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font: 400 16px/1.2 var(--body); }
.drop input::placeholder { color: rgba(29, 34, 56, .68); }
.drop .btn.hot { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: none; }
.drop .btn.hot:hover { background: var(--coral-ink); border-color: var(--coral-ink); }
.drop .note { margin-top: 12px; font-size: 13.5px; }
@media (max-width: 820px) { .drop { grid-template-columns: 1fr; padding: 28px; } }

.foot { margin-top: clamp(64px, 9vw, 112px); border-top: 1.5px solid var(--line); padding: 30px 0 42px; }
.foot .row { display: flex; align-items: center; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap; }
.foot .brand { font: 400 26px/1 var(--head); letter-spacing: .02em; text-transform: uppercase; text-decoration: none; }
.foot small { display: block; margin-top: 8px; font-size: 12.5px; color: var(--fg-soft); }
.foot nav { display: flex; align-items: center; gap: 6px 26px; flex-wrap: wrap; }
.foot nav a, .foot .plain { font: inherit; font-size: 14px; line-height: 1.7; text-decoration: none; padding: 10px 0; color: inherit; }
.foot .plain { background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--coral); }
.foot nav a:hover, .foot .plain:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
:root.motion-off .onward, .motion-off .onward span, .motion-off .onward .road i { animation: none; }
.motion-off .onward .road i { opacity: .8; }
.motion-off .onward .road i:nth-child(1) { transform: translateY(26px) rotate(45deg); } .motion-off .onward .road i:nth-child(3) { transform: translateY(-26px) rotate(45deg); } .motion-off .onward .road i:nth-child(2) { transform: rotate(45deg); }

/* Plain view (no 3D): the picture starts at the very top of the page, aligned to its top (the bar floats over the sky),
   and on wide screens the welcome stands on the shop front left of the door, the way it does in the 3D street */
:root:not(.has-3d) .stage { margin-top: 0; background-position: center top; }
@media (min-width: 861px) and (min-aspect-ratio: 1/1) {
  :root:not(.has-3d) .garage { position: relative; }
  :root:not(.has-3d) .stage { height: min(100svh, 56.25vw); max-height: none; aspect-ratio: auto; }
  /* the lockup keeps to the bare plaster left of the plant (the door starts at about 38% of the picture), sits high
     enough that its buttons stay above the drive, and has a little paper behind it so nothing in the picture shows through */
  :root:not(.has-3d) .station.street { position: absolute; top: 0; left: 0; z-index: 1; box-sizing: border-box; width: 31vw; height: min(100svh, 56.25vw); display: flex; align-items: flex-start;
    padding: calc(64px + min(100svh, 56.25vw) * .2) 18px 0 clamp(22px, 4vw, 80px);
    background: linear-gradient(90deg, rgba(243, 235, 221, .72) 0%, rgba(243, 235, 221, .55) 82%, rgba(243, 235, 221, 0) 100%); }
  :root:not(.has-3d) .station.street .welcome { max-width: 100%; gap: clamp(12px, 1.4vw, 18px); }
  :root:not(.has-3d) .station.street .pitch { font-size: clamp(32px, 3.7vw, 72px); }
  :root:not(.has-3d) .station.street .more { font-size: clamp(13px, 1.05vw, 16px); line-height: 1.55; }
  :root:not(.has-3d) .station.street .btn { min-height: 42px; font-size: 12.5px; }
  :root:not(.has-3d) .station.street .actions { gap: 10px; }
  :root:not(.has-3d) .station.street .btn { padding: 0 20px; }
  :root:not(.has-3d) .stations { padding-top: 56px; }
}
@media (max-width: 860px), (max-aspect-ratio: 1/1) { :root:not(.has-3d) .stage { background-position: center 25%; } }   /* upright screens: near the top, but never cutting the garage off at a tablet's width */
