/* The desktop hero (film.js): the headline, a short film of Flick at work, and the buttons, all on
   the first screen. These rules replace home.css's old interactive hero; phones never show it. */

/* ---------- The first screen ---------- */
html:not(.phone) .hero { height: 100vh; height: 100svh; min-height: 600px; justify-content: center; gap: clamp(10px, 1.9vh, 22px); padding: calc(66px + clamp(4px, 1.4vh, 18px)) 24px clamp(14px, 2.4vh, 30px) !important; cursor: auto; }
html:not(.phone) .hero-copy { width: var(--fw, min(100%, 1100px)); padding: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 40px; text-align: left; }
html:not(.phone) .home .hero .headline { font-size: clamp(40px, min(6vw, 7.4vh), 104px); line-height: .92; white-space: nowrap; }
html:not(.phone) .hero .lead { margin: 0 0 .55em; max-width: 24em; font-size: clamp(15px, min(1.4vw, 2.2vh), 20px); line-height: 1.4; color: #d9d7ea; text-align: right; text-wrap: balance; }
/* The headline keeps time with the film: the word for what the hand is doing is lit. */
.hero .headline span { transition: opacity .5s ease, filter .5s ease, transform .6s var(--spring); }
.hero .headline.live span { opacity: .3; filter: none; }
.hero .headline.live span.on { opacity: 1; filter: drop-shadow(0 0 26px rgba(190, 170, 255, .55)); transform: translateY(-.02em) scale(1.02); }
html:not(.phone) .hero-foot { position: relative; left: auto; right: auto; bottom: auto; width: var(--fw, auto); flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 0; text-align: left; }
html:not(.phone) .hero-foot .fine { margin: 0; font-size: 14px; color: #cfcde0; }

/* The film takes the room that's left, at 16:9, with its scene strip under it. */
.film-slot { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; width: 100%; max-height: calc(min(100vw - 48px, 1440px) * 9 / 16 + 50px); container-type: size; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.film, .scenes { --fw: min(100cqw, (100cqh - 50px) * 16 / 9, 1440px); width: var(--fw); flex: none; }
.film { position: relative; aspect-ratio: 16 / 9; border-radius: clamp(12px, 1.3cqw, 20px); overflow: hidden; background: #0c0b16; pointer-events: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 50px 120px -40px rgba(90, 70, 220, .6), 0 30px 70px -30px rgba(0, 0, 0, .9); opacity: 0; transition: opacity .9s var(--ease); }
.film.ready { opacity: 1; }
.scenes { display: flex; gap: 8px; height: 40px; }
.scenes button { position: relative; flex: 1 1 0; min-width: 0; padding: 13px 0 0; border: 0; background: none; color: #a8a6be; font: 500 13px/1.3 var(--font); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: color .3s; }
.scenes button::before, .scenes i { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .14); }
.scenes i { background: linear-gradient(90deg, #cfc8ff, #ff9fd0); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.scenes button.on, .scenes button:hover { color: #fff; }
.scenes button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

@media (max-width: 900px) {
  html:not(.phone) .hero-copy { flex-direction: column; align-items: center; text-align: center; }
  html:not(.phone) .hero .lead { text-align: center; margin: 0; }
  html:not(.phone) .hero-foot { justify-content: center; text-align: center; }
}
/* Without script there's no film: the words and the buttons stand on their own. */
html:not(.js) .film-slot { display: none; }
html:not(.js) .home .hero .headline { white-space: normal; }
@media (prefers-reduced-motion: reduce) { .film { transition: none; } }

/* ---------- Capture (?capture=1): only the film, at 1920 × 1080, for exporting video ---------- */
.film-capture, .film-capture body { background: #000; overflow: hidden; }
.film-capture :is(.topbar, .skip, #aurora, .sky, footer, main > :not(#stage), #stage > :not(.film-slot), .scenes) { display: none !important; }
html.film-capture .hero { display: block; height: auto; min-height: 0; padding: 0 !important; }
.film-capture .film-slot { position: fixed; left: 0; top: 0; width: 1920px; height: 1080px; max-height: none; container-type: normal; display: block; }
.film-capture .film { width: 1920px; height: 1080px; border-radius: 0; box-shadow: none; transition: none; }

/* ---------- The film's set, drawn at 1920 × 1080 ---------- */
.film-canvas { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; text-align: left; }
/* Light or dark: --d goes from 0 to 1 when dark mode is flicked on. */
.desk { position: absolute; inset: 0; z-index: 0; overflow: hidden; color: var(--f-ink); --d: 0;
  --f-win: color-mix(in srgb, #24232d calc(var(--d) * 100%), #fbfbfd);
  --f-win2: color-mix(in srgb, #1c1b24 calc(var(--d) * 100%), #efeef4);
  --f-field: color-mix(in srgb, #32313d calc(var(--d) * 100%), #e5e4ec);
  --f-ink: color-mix(in srgb, #efeef7 calc(var(--d) * 100%), #1c1b22);
  --f-ink2: color-mix(in srgb, #9d9bb1 calc(var(--d) * 100%), #75738a);
  --f-line: color-mix(in srgb, rgba(255, 255, 255, .09) calc(var(--d) * 100%), rgba(0, 0, 0, .09));
  --f-sk: color-mix(in srgb, rgba(255, 255, 255, .12) calc(var(--d) * 100%), rgba(20, 20, 50, .1));
  --f-glass: color-mix(in srgb, rgba(26, 24, 38, .6) calc(var(--d) * 100%), rgba(255, 255, 255, .45)); }
.d-wall { position: absolute; inset: 0; background: radial-gradient(55% 70% at 16% 22%, #c9bcff, transparent 70%), radial-gradient(50% 60% at 88% 84%, #ff9ccc, transparent 70%), radial-gradient(45% 55% at 74% 12%, #8fd3ff, transparent 70%), linear-gradient(155deg, #7a6cf0, #4b56c9 55%, #6a3fb2); }
.d-night { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 6, 24, .6), rgba(10, 6, 26, .76)); opacity: var(--d); }
.d-files { position: absolute; right: 34px; top: 160px; display: grid; gap: 30px; justify-items: center; color: #fff; font-size: 15px; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.d-files span { display: grid; justify-items: center; gap: 7px; }
.d-files i { position: relative; width: 76px; height: 58px; border-radius: 9px; background: linear-gradient(#86ccff, #3f9af2); box-shadow: inset 0 9px 0 rgba(255, 255, 255, .28); }
.d-files i::before { content: ""; position: absolute; left: 0; top: -8px; width: 32px; height: 12px; border-radius: 5px 5px 0 0; background: #6cbcff; }

.d-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 20; height: 38px; display: flex; align-items: center; gap: 26px; padding: 0 22px; font-size: 16px; color: var(--f-ink); background: var(--f-glass); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6); }
.d-bar .apple { width: 17px; height: 20px; }
.d-bar b { font-weight: 700; }
.d-bar .grow { flex: 1; }
.d-dock { position: absolute; left: 50%; bottom: 14px; z-index: 20; display: flex; gap: 12px; padding: 10px 12px; border-radius: 26px; transform: translateX(-50%); background: var(--f-glass); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 20px 50px rgba(10, 5, 40, .25); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6); }
.d-dock span { position: relative; }
.d-dock img { display: block; width: 66px; height: 66px; }
.d-dock .open i { position: absolute; left: 50%; bottom: -7px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--f-ink); opacity: .7; }
/* The volume, as macOS shows it while it changes. */
.d-hud { position: absolute; right: 22px; top: 50px; z-index: 21; width: 330px; padding: 16px 20px 18px; border-radius: 22px; font-size: 16px; opacity: 0; background: var(--f-glass); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 20px 50px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(40px) saturate(1.8); backdrop-filter: blur(40px) saturate(1.8); }
.d-hud b { display: block; margin-bottom: 12px; font-weight: 700; }
.d-hud span { display: flex; align-items: center; gap: 12px; color: var(--f-ink2); }
.d-hud i { flex: 1; height: 26px; border-radius: 13px; overflow: hidden; background: var(--f-sk); }
.d-hud u { display: block; width: var(--v, 30%); height: 100%; border-radius: 13px; background: #fff; }

/* Windows */
.win { position: absolute; overflow: hidden; border-radius: 20px; background: var(--f-win); color: var(--f-ink); box-shadow: 0 0 0 1px var(--f-line), 0 50px 100px -30px rgba(10, 5, 40, .55), 0 18px 40px -10px rgba(10, 5, 40, .3); transform-origin: 50% 40%; }
.win .shade { position: absolute; inset: 0; z-index: 9; background: rgba(10, 8, 24, .3); opacity: var(--sh, 0); }
.lights { display: inline-flex; gap: 9px; flex: none; }
.lights i { width: 14px; height: 14px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.w-bar { height: 56px; display: flex; align-items: center; gap: 24px; padding: 0 20px; background: var(--f-win2); border-bottom: 1px solid var(--f-line); }
.w-title { font-size: 17px; font-weight: 600; color: var(--f-ink2); }
.win p i, .win .s-side i, .f-props i, .c-site i { display: block; width: var(--w); height: 12px; border-radius: 6px; background: var(--f-sk); }

/* Chrome */
.c-strip { height: 58px; display: flex; align-items: flex-end; gap: 6px; padding: 0 16px; background: var(--f-win2); }
.c-strip .lights { align-self: center; margin-right: 22px; }
.c-tab { flex: none; display: flex; align-items: center; gap: 10px; width: 230px; height: 44px; padding: 0 16px; border-radius: 12px 12px 0 0; overflow: hidden; font-size: 16px; white-space: nowrap; color: var(--f-ink2); }
.c-tab b { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--c); }
.c-tab.t3 { width: var(--tab, 236px); padding: 0; margin-right: -6px; }
.c-tab.t3 > span { flex: none; display: flex; align-items: center; gap: 10px; width: 230px; height: 100%; padding: 0 12px 0 16px; }
.c-tab u { margin-left: auto; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--f-field); }
.w-chrome.on-flights .t3, .w-chrome:not(.on-flights) .t2 { background: var(--f-win); color: var(--f-ink); }
.c-bar { height: 56px; display: flex; align-items: center; gap: 22px; padding: 0 22px; color: var(--f-ink2); border-bottom: 1px solid var(--f-line); }
.c-url { flex: 1; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 18px; border-radius: 19px; background: var(--f-field); font-size: 16px; color: var(--f-ink); }
.c-url span { white-space: nowrap; }
.c-page { position: absolute; left: 0; right: 0; top: 114px; bottom: 0; padding: 40px 80px; }
.w-chrome .flights, .w-chrome.on-flights .notes { visibility: hidden; }
.w-chrome.on-flights .flights { visibility: visible; }
.c-page h4 { margin: 0 0 28px; font-size: 36px; letter-spacing: -.02em; }
.c-page p { display: grid; gap: 14px; margin: 0 0 32px; }
.c-site { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; }
.c-site b { width: 34px; height: 34px; border-radius: 10px; background: #2fbf71; }
.c-hero { height: 210px; display: grid; align-content: end; margin-bottom: 24px; padding: 30px 36px; border-radius: 22px; color: #fff; background: radial-gradient(80% 120% at 88% 18%, #ffb37a, transparent 60%), linear-gradient(120deg, #1f5fe0, #6b4cf6); }
.c-hero small { font-size: 16px; opacity: .85; }
.c-hero h4 { margin: 4px 0 2px; font-size: 56px; letter-spacing: -.03em; }
.c-hero span { font-size: 20px; font-weight: 600; }
.c-row { display: grid; grid-template-columns: 80px 1fr 80px 120px 90px; align-items: center; gap: 22px; height: 68px; margin-bottom: 12px; padding: 0 26px; border-radius: 16px; background: var(--f-win2); font-size: 21px; }
.c-row i { height: 2px; background: var(--f-line); }
.c-row span { font-size: 17px; color: var(--f-ink2); }
.c-row strong { text-align: right; font-size: 23px; }

/* Mail */
.m-tools { display: flex; gap: 20px; color: var(--f-ink2); }
.w-mail .w-title { margin: 0 auto; padding-right: 160px; }
.m-field { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 30px; border-bottom: 1px solid var(--f-line); font-size: 19px; }
.m-field small { font-size: 19px; color: var(--f-ink2); }
.m-body { padding: 30px; font-size: 24px; line-height: 1.5; }
.m-typed { min-height: 108px; margin: 0 0 30px; }
.m-caret { display: inline-block; width: 2.5px; height: 1.15em; margin-left: 2px; vertical-align: -.2em; background: #3d8bff; }
.m-quote { padding-left: 20px; border-left: 4px solid rgba(61, 139, 255, .7); font-size: 20px; color: var(--f-ink2); }
.m-quote p { margin: 6px 0 0; }

/* Spotify (always dark, as it is) */
.w-spotify { background: #121216; color: #fff; }
.w-spotify .w-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 1; background: none; border: 0; }
.s-side { position: absolute; left: 10px; top: 62px; bottom: 102px; width: 250px; display: grid; align-content: start; gap: 18px; padding: 26px 24px; border-radius: 14px; background: #1a1a20; --f-sk: rgba(255, 255, 255, .1); }
.s-side hr { width: 100%; height: 1px; margin: 4px 0; border: 0; background: rgba(255, 255, 255, .08); }
.s-main { position: absolute; left: 270px; right: 10px; top: 62px; bottom: 102px; padding: 34px; border-radius: 14px; background: linear-gradient(180deg, #3b2d7c, #1a1a20 62%); }
.s-art { float: left; width: 220px; height: 220px; margin-right: 32px; border-radius: 10px; background: radial-gradient(circle at 30% 30%, #ffb3d9, transparent 55%), linear-gradient(135deg, #7b6cff, #20305f); box-shadow: 0 24px 50px rgba(0, 0, 0, .5); }
.s-meta { padding-top: 36px; }
.s-meta small { font-size: 16px; font-weight: 600; }
.s-meta h4 { margin: 6px 0 10px; font-size: 62px; letter-spacing: -.03em; }
.s-meta span { font-size: 18px; color: #b8b6c8; }
.s-eq { display: flex; align-items: flex-end; gap: 6px; height: 54px; margin-top: 18px; }
.s-eq i { width: 9px; height: 100%; border-radius: 3px; background: #1ed760; transform-origin: 50% 100%; transform: scaleY(.2); }
.s-list { clear: both; display: grid; gap: 4px; padding-top: 30px; }
.s-list div { display: grid; grid-template-columns: 40px 1fr 50%; align-items: center; height: 50px; padding: 0 14px; border-radius: 8px; font-size: 19px; color: #e7e6ef; }
.s-list span { color: #8f8da2; } .s-list .on { background: rgba(255, 255, 255, .08); } .s-list .on b { color: #1ed760; }
.s-list i { width: 40%; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .08); }
.s-player { position: absolute; left: 0; right: 0; bottom: 0; height: 92px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 26px; background: #000; }
.s-now { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.s-now i { width: 56px; height: 56px; border-radius: 6px; background: linear-gradient(135deg, #7b6cff, #20305f); }
.s-ctl { display: flex; align-items: center; gap: 30px; color: #cfcde0; }
.s-ctl u { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: #000; }
.s-vol { justify-self: end; display: flex; align-items: center; gap: 12px; color: #cfcde0; }
.s-vol i { width: 150px; height: 6px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .2); }
.s-vol b { display: block; width: 80%; height: 100%; background: #fff; }

/* Figma */
.w-figma { --f-win: color-mix(in srgb, #2c2c2f calc(var(--d) * 100%), #ffffff); }
.w-figma .w-bar { height: 50px; background: var(--f-win); }
.f-layers { position: absolute; left: 0; top: 50px; bottom: 0; width: 270px; padding: 18px 14px; border-right: 1px solid var(--f-line); }
.f-layers h5, .f-props h5 { margin: 0 0 14px 8px; font-size: 15px; font-weight: 600; }
.f-rows div { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 6px; font-size: 15px; }
.f-rows .on { background: rgba(13, 153, 255, .3); }
.f-rows .child { padding-left: 34px; }
.f-props { position: absolute; right: 0; top: 50px; bottom: 0; width: 290px; display: grid; align-content: start; gap: 16px; padding: 18px 20px; border-left: 1px solid var(--f-line); }
.f-props hr { width: 100%; height: 1px; margin: 6px 0; border: 0; background: var(--f-line); }
.f-canvas { position: absolute; left: 270px; right: 290px; top: 50px; bottom: 0; background: color-mix(in srgb, #1e1e20 calc(var(--d) * 100%), #f1f0f4) radial-gradient(var(--f-sk) 1.4px, transparent 1.7px) 0 0 / 28px 28px; }
.f-frame-name { position: absolute; left: 170px; top: 70px; font-size: 14px; color: var(--f-ink2); }
.f-frame { position: absolute; left: 170px; top: 96px; width: 900px; height: 560px; background: #ebe8f5; box-shadow: 0 0 0 1px var(--f-line); }
.f-shape { position: absolute; left: 420px; top: 170px; width: 200px; height: 170px; }
.f-shape svg { display: block; width: 100%; height: 100%; }
.f-shape.b { opacity: var(--dup, 0); transform: translateX(calc(var(--dup, 0) * 230px)) scaleX(var(--flip, 1)); }
.f-sel { position: absolute; left: 416px; top: 166px; width: 208px; height: 178px; box-shadow: 0 0 0 2px #0d99ff; }
.w-figma[data-sel="copy"] .f-sel { transform: translateX(calc(var(--dup, 0) * 230px)); }
.w-figma[data-sel="group"] .f-sel { width: 438px; }
.f-sel small { position: absolute; left: -2px; top: -32px; padding: 4px 9px; border-radius: 5px; background: #0d99ff; color: #fff; font-size: 14px; font-weight: 600; }
.f-sel b { position: absolute; width: 12px; height: 12px; margin: -7px; border: 2px solid #0d99ff; background: #fff; }
.f-sel b:nth-of-type(2) { left: 100%; } .f-sel b:nth-of-type(3) { top: 100%; } .f-sel b:nth-of-type(4) { left: 100%; top: 100%; }

/* ---------- What plays over the set: the wheel, the hand, and the caption ---------- */
.hero .f-orb { z-index: 4; visibility: hidden; }
.f-press, .f-click { position: absolute; left: -36px; top: -36px; z-index: 3; width: 72px; height: 72px; border-radius: 50%; opacity: 0; }
.f-press { box-shadow: 0 0 0 4px rgba(205, 192, 255, .95), 0 0 34px 8px rgba(160, 140, 255, .55); background: radial-gradient(closest-side, rgba(185, 168, 255, .4), transparent); }
.f-click { left: -22px; top: -22px; width: 44px; height: 44px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 0 0 5px rgba(0, 0, 0, .15); }
.f-cursor { position: absolute; left: -2px; top: -2px; z-index: 6; width: 30px; height: 42px; transform-origin: 2px 2px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35)); }
.f-cursor svg { display: block; width: 100%; height: 100%; }
.f-cue { position: absolute; left: 0; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 9px 18px 9px 13px; border-radius: 999px; white-space: nowrap; font-size: 19px; font-weight: 600; color: #fff; opacity: 0; background: rgba(14, 12, 26, .8); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16), 0 10px 30px rgba(0, 0, 0, .35); }
.f-cue svg { width: 18px; height: 25px; }
.f-cap { position: absolute; left: 36px; bottom: 30px; z-index: 5; max-width: 600px; display: flex; align-items: center; gap: 18px; padding: 14px 28px 14px 14px; border-radius: 26px; color: #fff; opacity: 0; background: rgba(14, 12, 26, .8); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16), 0 24px 60px rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); }
.f-cap > i { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(140deg, #8d7dff, #5a5fe8); }
.f-cap b { display: flex; align-items: center; gap: 14px; font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.f-cap kbd { padding: 6px 10px; border-radius: 9px; font: 600 21px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #f0edff; background: rgba(255, 255, 255, .14); }
.f-cap small { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font-size: 19px; color: #cdcae2; }
.f-cap small span { display: flex; align-items: center; gap: 8px; opacity: .35; }
.f-cap small span.on { opacity: 1; }
.f-cap small kbd { padding: 4px 7px; font-size: 16px; }

/* ---------- A narrow frame (film.js pans a window across the film) ---------- */
.film.cam .f-cap { display: none; }
.film.cam .f-cue { font-size: 29px; }
.film-say { display: none; }
