/* Bixie website — minimal, system font, real renders of Bixie and its notch.
   Smoothness: native scrolling, transform/opacity animation only, page transitions via View Transitions. */

@property --r { syntax: "<length>"; inherits: true; initial-value: 8px; }
@property --e { syntax: "<length>"; inherits: true; initial-value: 6px; }

@view-transition { navigation: auto; }

:root {
  --paper: #FFFFFF;
  --soft: #F4F5F8;
  --soft-hover: #ECEEF2;
  --ink: #111114;
  --ink-2: #33353B;
  --muted: #6B6F79;
  --line: rgba(17, 17, 20, 0.09);
  --peach: #F4C6A5;

  /* The Mac's own typeface (SF Pro) on Apple devices. */
  --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --spring: cubic-bezier(0.3, 1.25, 0.4, 1);
  /* The app's IslandMotion springs: open = spring(duration 0.38, bounce 0.04), close = spring(0.3, bounce 0),
     each run until it has settled. */
  --open-dur: 0.5s;
  --close-dur: 0.46s;
  --open-ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --close-ease: cubic-bezier(0.25, 0.7, 0.25, 1);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --wallpaper:
    radial-gradient(60% 70% at 12% 88%, rgba(166, 229, 196, 0.85), transparent 70%),
    radial-gradient(55% 65% at 88% 78%, rgba(168, 188, 255, 0.9), transparent 70%),
    radial-gradient(45% 55% at 52% 108%, rgba(244, 198, 165, 0.95), transparent 70%),
    radial-gradient(40% 50% at 70% 10%, rgba(241, 183, 215, 0.55), transparent 70%),
    linear-gradient(180deg, #E6ECF8, #D6DFF1);
  interpolate-size: allow-keywords;
}

/* The FAQ page is dark: the same tokens flipped, a soft near-black page with white text in a few tones. */
[data-theme="dark"] {
  --paper: #111114;
  --soft: rgba(255, 255, 255, 0.07);
  --soft-hover: rgba(255, 255, 255, 0.11);
  --ink: #F4F4F6;
  --ink-2: rgba(244, 244, 246, 0.74);
  --muted: rgba(244, 244, 246, 0.5);
  --line: rgba(255, 255, 255, 0.09);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* The page colour on html too, so a page change fades over the colour of the page it's going to. */
html { background: var(--paper); scroll-behavior: smooth; scroll-padding-top: 130px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 12px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px;
  text-decoration: none; font-weight: 600; transition: top 0.2s;
}
.skip:focus { top: 12px; }
.ic {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 20px; border: 0; border-radius: 16px; gap: 7px;
  font: 700 17px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.35s var(--spring), background-color 0.2s, box-shadow 0.35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); transition-duration: 0.12s; }
.btn-xl { height: 60px; padding: 0 20px; border-radius: 16px; font-size: 18px; line-height: 28px; }
.btn-header { height: 56px; padding: 0 19px; border-radius: 15px; font-size: 17px; line-height: 26px; margin-left: 10px; }
.btn-header.btn-dl { --dl: 23px; }
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: 0 14px 28px -14px rgba(17, 17, 20, 0.65); }
.btn-ink:hover { box-shadow: 0 20px 34px -16px rgba(17, 17, 20, 0.65); }
.btn-soft { background: var(--soft); color: var(--ink); }
.btn-soft:hover { background: var(--soft-hover); }
.btn .ic { width: 25px; height: 25px; stroke-width: 2.1; }
.btn .badge-ic { color: #9AA0AA; width: 22px; height: 22px; }
.hero .btn-soft { padding: 0 20px 0 24px; gap: 8px; }
/* The two buttons under the headline: larger, with more room above them. */
.hero .cta-row { margin-top: 64px; gap: 30px; }
.hero .btn-xl { height: 70px; padding: 0 26px; border-radius: 19px; font-size: 21px; line-height: 30px; }
.hero .btn-dl { --dl: 29px; }
.hero .btn-soft { padding: 0 24px 0 28px; gap: 10px; }
.hero .btn .badge-ic { width: 26px; height: 26px; }

/* Purchase: no lift or colour change. While hovered the badge turns slowly and
   picks up Bixie's lavender; the tick stays upright. */
.btn-buy:hover { transform: none; background: var(--soft); }
.buy-badge { width: 32px; height: 32px; flex: none; overflow: visible; }
.buy-badge .bdg-shape {
  fill: #A3A8B2; transform-box: fill-box; transform-origin: center;
  animation: badge-turn 4.5s linear infinite paused; transition: fill 0.35s var(--ease);
}
.buy-badge .bdg-check { fill: none; stroke: #FFFFFF; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.btn-buy:hover .bdg-shape, .btn-buy:focus-visible .bdg-shape { animation-play-state: running; fill: #7F8CFF; }
@keyframes badge-turn { to { transform: rotate(360deg); } }
.hero .price-chip { padding: 5px 10px; border-radius: 9px; font-size: 16px; line-height: 22px; }
.price-chip { margin-left: 4px; padding: 4px 8px; border-radius: 8px; background: var(--ink); color: var(--paper); font: 700 14px/20px var(--font); }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; margin-top: 48px; }

/* Download buttons: no lift. On hover the MacBook slides out to the left,
   the label glides over and an arrow slides in on the right. Width never changes. */
.btn-dl { --dl: 25px; gap: 0; }
.btn-dl:hover { transform: none; }
.dl-mac, .dl-arrow { display: inline-flex; flex: none; overflow: hidden; transition: width 0.42s var(--ease), margin 0.42s var(--ease); }
.dl-mac { width: var(--dl); margin-right: 10px; }
.dl-arrow { width: 0; margin-left: 0; }
.dl-mac svg, .dl-arrow svg { flex: none; transition: transform 0.42s var(--ease), opacity 0.3s var(--ease); }
.ic-mac { width: var(--dl); height: calc(var(--dl) * 0.71); fill: currentColor; }
.ic-arrow {
  width: var(--dl); height: var(--dl); fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  transform: translateX(-100%); opacity: 0;
}
.btn-dl:hover .dl-mac, .btn-dl:focus-visible .dl-mac { width: 0; margin-right: 0; }
.btn-dl:hover .dl-mac svg, .btn-dl:focus-visible .dl-mac svg { transform: translateX(-100%); opacity: 0; }
.btn-dl:hover .dl-arrow, .btn-dl:focus-visible .dl-arrow { width: var(--dl); margin-left: 10px; }
.btn-dl:hover .ic-arrow, .btn-dl:focus-visible .ic-arrow { transform: none; opacity: 1; }

/* ---------- Header: full width ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  height: 116px; padding: 0 32px;
  view-transition-name: site-header;
  transition: background-color 0.35s var(--ease), -webkit-backdrop-filter 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
/* Once the page scrolls, the header turns to frosted glass: mostly white and blurred so strongly that
   what passes under it is only a soft wash of colour, never readable. No line underneath.
   The glass sits on the header itself: its view-transition-name stops a layer inside it from seeing
   the page behind, so a ::before could only tint, never blur. */
.site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(50px) saturate(180%); backdrop-filter: blur(50px) saturate(180%);
}
.brand-group { display: flex; align-items: flex-start; gap: 10px; margin: 0 auto 0 18px; }
.brand { display: block; border-radius: 8px; }
.brand-word { width: auto; height: 44px; }
.version-badge {
  margin-top: -7px; padding: 3px 8px; border-radius: 9px;
  background: rgba(17, 17, 20, 0.05); box-shadow: inset 0 0 0 1px var(--line);
  font: 700 15px/20px var(--font); color: var(--muted); text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.version-badge:hover { background: rgba(17, 17, 20, 0.07); color: var(--ink); }
/* Dark glass is denser: white text under it would otherwise show through as a light smudge. */
[data-theme="dark"] .site-header.scrolled { background-color: rgba(17, 17, 20, 0.9); }
[data-theme="dark"] .version-badge { background: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .version-badge:hover { background: rgba(255, 255, 255, 0.1); }
.nav { display: flex; align-items: center; gap: 7px; }
.nav-link {
  display: flex; align-items: center; gap: 9px; padding: 14px 18px; border-radius: 15px;
  font: 700 17px/26px var(--font); color: var(--ink); text-decoration: none;
  transition: opacity 0.2s;
}
.nav-link .ic { width: 26px; height: 26px; transition: transform 0.4s var(--spring); }
.ic-faq { transform-origin: 20% 90%; }
.nav-link:hover .ic-faq { transform: rotate(-12deg); }
/* Changelog: a new entry writes itself in. The sparkle twinkles, the lines scroll up,
   the top one fades away and a fresh line draws in at the bottom. */
.ic-log .lg-spark { transform-box: fill-box; transform-origin: center; transition: transform 0.5s var(--spring); }
.ic-log .lg-l1, .ic-log .lg-l2, .ic-log .lg-l3 {
  transition: transform 0.32s var(--ease), opacity 0.3s var(--ease), stroke-dashoffset 0.4s var(--ease);
}
.ic-log .lg-l2 { stroke-dasharray: 8; stroke-dashoffset: 2.6; }
.ic-log .lg-l3 { stroke-dasharray: 8; stroke-dashoffset: 8; opacity: 0; }
.nav-link:hover .ic-log .lg-spark { transform: rotate(45deg) scale(1.25); }
.nav-link:hover .ic-log .lg-l1 { transform: translateY(-4px); opacity: 0; }
.nav-link:hover .ic-log .lg-l2 { transform: translateY(-4px); stroke-dashoffset: 0; }
.nav-link:hover .ic-log .lg-l3 { transform: translateY(-4px); opacity: 1; stroke-dashoffset: 2.6; transition-delay: 0.08s; }
.nav-link:hover, .nav-link[aria-current="page"] { background: var(--soft); }
/* Wide screens: larger header links and Download button, in step with the larger logo. */
@media (min-width: 1100px) {
  .nav-link { gap: 10px; padding: 15px 20px; border-radius: 17px; font-size: 20px; line-height: 28px; }
  .nav-link .ic { width: 31px; height: 31px; }
  .btn-header { height: 62px; padding: 0 21px; border-radius: 17px; font-size: 20px; line-height: 28px; gap: 9px; }
  .btn-header.btn-dl { --dl: 26px; }
}

/* ---------- Hero ---------- */

.hero { padding: 76px 0 0; text-align: center; }
.display {
  margin: 0;
  font: 700 52px/1.05 var(--font); letter-spacing: -0.025em;
}
@media (min-width: 640px) { .display { font-size: 100px; line-height: 1; } }
@media (min-width: 1000px) { .display { font-size: 120px; } }
/* A solid MacBook, notch included, sitting in the headline like a glyph,
   with a highlighter stripe swept in behind it and the word Mac. */
.display { isolation: isolate; }
.mark { position: relative; display: inline-block; white-space: nowrap; padding: 0 0.04em 0 0.02em; }
.mark::before {
  content: ""; position: absolute; z-index: -1;
  left: -0.03em; right: -0.05em; bottom: 0.04em; height: 0.46em;
  border-radius: 0.05em;
  background: #C3CDFF;
  transform: rotate(-0.8deg);
  transform-origin: 0 50%;
  animation: mark-in 0.75s var(--ease) 0.55s both;   /* sweeps in once the headline has risen into place */
}
.inline-mac {
  display: inline-block; width: 1.08em; height: 0.77em; margin: 0 0.08em 0 0; vertical-align: -0.04em;
  fill: currentColor;
}
@keyframes mark-in { from { transform: rotate(-0.8deg) scaleX(0); } to { transform: rotate(-0.8deg) scaleX(1); } }

.screen {
  --k: 1.3;
  position: relative;
  width: min(1280px, calc(100vw - 64px)); aspect-ratio: 1.85 / 1; margin: 80px auto 0;
  border-radius: 40px;
  /* A thin black bezel, like the MacBook's display: the notch hangs from it and its curved shoulders
     run into the frame, as on the real screen. The picture inside follows the same rounded corners. */
  border: clamp(6px, 0.85vw, 11px) solid #000;   /* the same black as the notch: no seam */
  background: #000;
  box-shadow: 0 50px 100px -50px rgba(18, 21, 64, 0.6);
  overflow: hidden;
  container-type: inline-size;
  contain: layout paint;
}
/* The wallpaper; it settles back a little as the screen unlocks, like macOS. */
.screen::before {
  content: ""; position: absolute; inset: 0;
  background: url("assets/wallpaper.webp?v=3") center / cover no-repeat;
  transform: scale(1.06); transition: transform 1.1s var(--ease);
}
.screen:not([data-locked="true"])::before { transform: none; }

/* Lock screen: live date and time, two small widgets, Press to unlock. */
.lock {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 9.5% 0 0; border: 0; background: none; cursor: pointer;
  color: rgb(240 247 255 / 0.5); font-family: var(--font); text-align: center;
  /* Like macOS vibrancy: translucent white that adds light to the wallpaper, so the text takes on its colour. */
  mix-blend-mode: plus-lighter;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), filter 0.5s var(--ease), visibility 0s linear 0s;
}
.lock:focus-visible { outline: 3px solid rgba(255, 255, 255, 0.8); outline-offset: -8px; border-radius: 34px; }
.lock-date { font: 600 max(11px, 2.45cqw)/1.15 var(--font); letter-spacing: 0; }
/* The clock is drawn from Apple's rounded font, the public twin of the lock screen's own:
   each digit is a mask image (Scripts/RenderLockClock.swift), so every browser shows it and CSS sets the colour. */
.lock-time {
  --ch: max(34px, 7.95cqw);
  display: flex; justify-content: center; height: var(--ch); margin-top: 0.6cqw; color: rgb(240 247 255 / 0.52);
}
/* One slot per character. When a digit changes, the old one drifts up, shrinks and blurs away
   while the new one springs up from below; the slot eases to the new digit's width. */
.lock-time .slot {
  position: relative; display: flex; justify-content: center; flex: none;
  width: calc(var(--ch) * var(--sa, 0.75)); height: 100%; margin: 0 calc(var(--ch) * -0.035);
  transition: width 0.5s var(--spring);
}
.lock-time .slot:has(.g-colon) { margin: 0 calc(var(--ch) * -0.05); }
.lock-time .d { display: flex; flex: none; height: 100%; }
.lock-time .d-out { position: absolute; top: 0; left: 50%; translate: -50% 0; animation: digit-out 0.39s linear forwards; }
.lock-time .d-in { animation: digit-in 0.85s linear both; }
.lock-time .g {
  flex: none; height: 100%; aspect-ratio: var(--a); background: currentColor;
  -webkit-mask: var(--m) center / 100% 100% no-repeat; mask: var(--m) center / 100% 100% no-repeat;
}
@keyframes digit-out {
  0%   { transform: none; opacity: 1; filter: blur(0); }
  27%  { transform: translateY(-24.5%) scale(0.846); opacity: 0.62; filter: blur(calc(var(--ch) * 0.08)); }
  45%  { transform: translateY(-38%) scale(0.76); opacity: 0.4; filter: blur(calc(var(--ch) * 0.127)); }
  63%  { transform: translateY(-49.4%) scale(0.69); opacity: 0.22; filter: blur(calc(var(--ch) * 0.165)); }
  81%  { transform: translateY(-58%) scale(0.635); opacity: 0.09; filter: blur(calc(var(--ch) * 0.19)); }
  100% { transform: translateY(-63.5%) scale(0.6); opacity: 0; filter: blur(calc(var(--ch) * 0.21)); }
}
@keyframes digit-in {
  0%    { transform: translateY(46%) scale(0.8); opacity: 0; filter: blur(calc(var(--ch) * 0.21)); }
  12.6% { transform: translateY(23%) scale(0.89); opacity: 0.45; filter: blur(calc(var(--ch) * 0.11)); }
  20.7% { transform: translateY(7%) scale(0.966); opacity: 0.83; filter: blur(calc(var(--ch) * 0.035)); }
  29%   { transform: translateY(-1.9%) scale(1.009); opacity: 1; filter: blur(0); }
  37.3% { transform: translateY(-4.7%) scale(1.022); }
  53.6% { transform: translateY(-1.5%) scale(1.007); }
  70%   { transform: translateY(0.46%) scale(0.998); }
  100%  { transform: none; opacity: 1; filter: blur(0); }
}
.g-0 { --a: 0.8123; --m: url("assets/clock/0.png"); }
.g-1 { --a: 0.5945; --m: url("assets/clock/1.png"); }
.g-2 { --a: 0.7490; --m: url("assets/clock/2.png"); }
.g-3 { --a: 0.7826; --m: url("assets/clock/3.png"); }
.g-4 { --a: 0.8029; --m: url("assets/clock/4.png"); }
.g-5 { --a: 0.7776; --m: url("assets/clock/5.png"); }
.g-6 { --a: 0.7984; --m: url("assets/clock/6.png"); }
.g-7 { --a: 0.7066; --m: url("assets/clock/7.png"); }
.g-8 { --a: 0.8044; --m: url("assets/clock/8.png"); }
.g-9 { --a: 0.8000; --m: url("assets/clock/9.png"); }
.g-colon { --a: 0.3428; --m: url("assets/clock/colon.png"); }
.lock-widgets { display: flex; gap: 2.6cqw; margin-top: 1.6cqw; font: 500 max(10px, 1.7cqw)/1 var(--font); color: rgb(240 247 255 / 0.46); }
.lock-chip { display: flex; align-items: center; gap: 0.42cqw; }
.lock-chip .ic { width: max(11px, 1.85cqw); height: max(11px, 1.85cqw); stroke-width: 2; }
.lock-hint {
  position: absolute; bottom: 7%; left: 50%; transform: translateX(-50%);
  font: 500 max(10px, 1.55cqw)/1.2 var(--font); white-space: nowrap;
  /* A glint of light sweeps through the words, then rests. */
  color: transparent;
  background: linear-gradient(100deg, rgb(255 255 255 / 0.42) 0%, rgb(255 255 255 / 0.42) 42%,
              rgb(255 255 255 / 0.9) 50%, rgb(255 255 255 / 0.42) 58%, rgb(255 255 255 / 0.42) 100%) 100% 0 / 300% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text;
  animation: unlock-shine 2.8s linear infinite;
}
.screen:not([data-locked="true"]) .lock {
  opacity: 0; pointer-events: none;
  visibility: hidden; transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s;
}
@keyframes unlock-shine { 0% { background-position: 100% 0; } 65%, 100% { background-position: 0% 0; } }

/* Unlocking runs in steps (main.js sets data-locked):
   true      locked: the notch is a little wider, with a lock on its left;
   opening   a click, the shackle flips open, the lock screen fades;
   bare      the notch springs back to the plain hardware;
   false     the notch springs out again and Bixie appears. */
.screen[data-locked="true"] .demo-notch,
.screen[data-locked="opening"] .demo-notch { --w: calc(244px * var(--k)); }
.screen[data-locked="bare"] .demo-notch { --w: calc(184px * var(--k)); }
.screen:not([data-locked="false"]) .demo-notch { pointer-events: none; }
/* The small notch after unlocking, from the app's character engine. Regular Bixie watches the cursor:
   the gaze sheet holds 25 gazes left → right by 7 level → down, and main.js blends the four nearest
   (two rows of two layers), so the head turns smoothly like the live app. When the song starts
   (data-music="playing") the headphones slide on and the groove begins, then loops; the app's three bars
   dance on the right. Pausing takes the headphones off and Bixie watches the cursor again. */
.dn-bixie {
  position: absolute; top: 0; left: calc(2px * var(--k)); width: calc(40px * var(--k)); height: calc(32px * var(--k));
  opacity: 0; pointer-events: none; transition: opacity 0.1s ease-in;
}
.dn-bixie .gz, .dn-bixie .gz i, .dn-bixie .strip { position: absolute; inset: 0; }
.dn-bixie .gz i { background: url("assets/render/notch-look.webp") 50% 0 / 2500% 700% no-repeat; }
.dn-bixie .gz + .gz, .dn-bixie .gz i + i { opacity: 0; }
.dn-bixie.blink .gz i { background-image: url("assets/render/notch-look-blink.webp"); }
/* Headphones on: 35 frames (2 nods). Then one full sway, 4 nods, 69 frames. Rendered at the app's default
   104 bpm and played about 11% faster: 58 nods a minute, how the app grooves to a 116 bpm song.
   The two strips continue frame for frame. */
.dn-bixie .strip { display: none; background: 0 0 no-repeat; animation-play-state: paused; }
.dn-bixie.intro .gz, .dn-bixie.loop .gz { display: none; }
.dn-bixie.intro .strip {
  display: block; background-image: url("assets/render/notch-music-in.webp"); background-size: 3500% 100%;
  animation: strip 2.099s steps(35, jump-none) forwards;
}
.dn-bixie.loop .strip {
  display: block; background-image: url("assets/render/notch-groove.webp"); background-size: 6900% 100%;
  animation: strip 4.138s steps(69, jump-none) infinite;
}
@keyframes strip { from { background-position-x: 0%; } to { background-position-x: 100%; } }
.screen[data-locked="false"] .demo-notch[data-state="rest"] .dn-bixie { opacity: 1; transition: opacity 0.2s ease-out 0.1s; }
.screen[data-locked="false"] .demo-notch[data-state="rest"] .dn-bixie .strip { animation-play-state: running; }
.dn-bars {
  position: absolute; top: calc(10.5px * var(--k)); left: calc(248.5px * var(--k)); height: calc(11px * var(--k));
  display: flex; align-items: flex-end; gap: calc(1.5px * var(--k));
  opacity: 0; transform: scale(0.8); pointer-events: none; transition: opacity 0.1s ease-in, transform 0.1s ease-in;
}
.screen[data-locked="false"][data-music="playing"] .demo-notch[data-state="rest"] .dn-bars {
  opacity: 1; transform: none; transition: opacity 0.3s ease-out, transform 0.3s var(--spring);
}
/* EqualizerBars: each bar is 0.35 + 0.65 × |sin| at its own speed (7.1, 9.3, 5.7 rad/s). */
.dn-bars i, .np-eq i {
  width: calc(2px * var(--k)); height: 100%; border-radius: 99px; background: rgb(255 255 255 / 0.9);
  transform: scaleY(0.35); transform-origin: 50% 100%;
  animation: bar 0.4425s infinite paused;
}
.dn-bars i:nth-child(2), .np-eq i:nth-child(2) { animation-duration: 0.3378s; animation-delay: -0.1828s; }
.dn-bars i:nth-child(3), .np-eq i:nth-child(3) { animation-duration: 0.5512s; animation-delay: -0.0453s; }
@keyframes bar {
  0%, 100% { transform: scaleY(0.35); animation-timing-function: cubic-bezier(0.61, 1, 0.88, 1); }
  50% { transform: scaleY(1); animation-timing-function: cubic-bezier(0.12, 0, 0.39, 0); }
}
.screen[data-music="playing"] .demo-notch[data-state="rest"] .dn-bars i,
.screen[data-music="playing"] .demo-notch[data-state="open"] .np-eq i { animation-play-state: running; }

.dn-lock {
  position: absolute; top: 50%; left: calc(11px * var(--k));
  width: calc(14px * var(--k)); height: calc(14px * var(--k)); margin-top: calc(-7px * var(--k));
  overflow: visible; color: rgba(255, 255, 255, 0.92); pointer-events: none;
  opacity: 0; transition: opacity 0.2s var(--ease);
}
.screen[data-locked="true"] .dn-lock, .screen[data-locked="opening"] .dn-lock { opacity: 1; }
.lk-shackle {
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round;
  transform-box: view-box; transform-origin: 10.9px 7px; transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.lk-body { fill: currentColor; transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1); }
/* Open: the shackle lifts and flips over its right leg, and the body nudges left. */
.screen:not([data-locked="true"]) .lk-shackle { transform: translateY(-1px) scaleX(-1); }
.screen:not([data-locked="true"]) .lk-body { transform: translateX(-1px); }
.screen-menubar {
  position: absolute; inset: 0 0 auto; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(32px * var(--k)); padding: 0 calc(18px * var(--k));
  /* Like the current macOS menu bar: no bar behind it, just text and icons. White on a dark wallpaper;
     on a light one main.js sets data-menubar="dark" and they turn dark, as macOS does. */
  background: none;
  filter: drop-shadow(0 calc(0.5px * var(--k)) calc(1.5px * var(--k)) rgba(0, 0, 0, 0.28));
  font: 500 calc(11.5px * var(--k))/1 var(--font); color: rgba(255, 255, 255, 0.96);
  transition: opacity 0.5s var(--ease) 0.15s, transform 0.5s var(--ease) 0.15s, visibility 0s linear 0.15s;
}
.screen[data-menubar="dark"] .screen-menubar { color: rgba(0, 0, 0, 0.85); filter: none; }

/* The Dock, in macOS's glass: it slides up once the screen unlocks. Bixie's icon bounces while it
   launches, then gets the small "running" dot. */
.dock {
  position: absolute; left: 50%; bottom: max(6px, 1.2cqw); z-index: 1;
  display: flex; gap: max(5px, 1cqw);
  padding: max(5px, 1cqw) max(5px, 1cqw) max(7px, 1.15cqw);   /* a little more below, for the running dot */
  border-radius: max(13px, 2.7cqw);
  background: rgb(255 255 255 / 0.18);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28), 0 1cqw 3cqw rgb(0 0 0 / 0.14);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  transform: translate(-50%, 170%); opacity: 0;
  transition: transform 0.7s var(--open-ease) 0.25s, opacity 0.4s var(--ease) 0.25s;
}
.screen:not([data-locked="true"]) .dock { transform: translate(-50%, 0); opacity: 1; }
.screen[data-locked="true"] .dock { transition-delay: 0s; pointer-events: none; }
.dock-app, .dock-slot {
  position: relative; flex: none; width: max(26px, 5.3cqw); height: max(26px, 5.3cqw);
  border-radius: 23%;   /* the macOS icon shape */
}
.dock-slot { background: rgb(255 255 255 / 0.16); }
.dock-app { padding: 0; border: 0; background: none; cursor: pointer; }
.dock-app img {
  display: block; width: 100%; height: 100%; border-radius: inherit;
  box-shadow: 0 0.3cqw 0.9cqw rgb(0 0 0 / 0.2); transition: filter 0.15s;
}
.dock-app:active img { filter: brightness(0.75); }
.dock-app:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.dock-app::after {
  /* Just under the icon with a hairline gap, as on macOS. */
  content: ""; position: absolute; left: 50%; bottom: calc(-1 * max(5px, 0.69cqw));
  width: max(3.5px, 0.47cqw); height: max(3.5px, 0.47cqw); border-radius: 50%;
  background: rgb(255 255 255 / 0.85); translate: -50% 0; opacity: 0; transition: opacity 0.3s var(--ease);
}
.screen[data-menubar="dark"] .dock-app::after { background: rgb(0 0 0 / 0.55); }
.dock-app.running::after { opacity: 1; }
.dock-app.launch img { animation: dock-bounce 1.1s var(--ease); }
@keyframes dock-bounce {
  0%, 100% { transform: none; }
  22% { transform: translateY(-48%); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0.4); }
  45% { transform: none; animation-timing-function: cubic-bezier(0.25, 0.6, 0.5, 1); }
  66% { transform: translateY(-26%); animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0.4); }
  86% { transform: none; }
}
.dock-tip {
  position: absolute; bottom: calc(100% + max(8px, 1.3cqw)); left: 50%; translate: -50% 0;
  padding: max(3px, 0.35cqw) max(8px, 0.9cqw); border-radius: max(6px, 0.7cqw);
  background: rgb(28 28 30 / 0.82); color: #fff; font: 500 max(10px, 1.1cqw)/1.2 var(--font); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.dock-app:hover .dock-tip, .dock-app:focus-visible .dock-tip { opacity: 1; }
.screen[data-locked="true"] .screen-menubar {
  opacity: 0; transform: translateY(-100%); visibility: hidden;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0s linear 0.5s;
}
.mb-left, .mb-right { display: flex; align-items: center; gap: calc(15.5px * var(--k)); }
.mb-app {
  height: calc(22px * var(--k)); margin: 0 calc(-6px * var(--k)); padding: 0 calc(6px * var(--k));
  border: 0; border-radius: calc(5px * var(--k)); background: transparent;
  font: 700 calc(11.5px * var(--k))/1 var(--font); color: inherit; cursor: default;
  transition: background-color 0.15s;
}
/* A faint hint on hover; held while the menu is open, like the Mac's selected menu title. */
.mb-app:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.mb-app[aria-expanded="true"] { background: color-mix(in srgb, currentColor 20%, transparent); }
.mb-app:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }

/* Finder's menu, in the Mac's dark menu look: a translucent dark panel with a fine light edge, thin
   separators, update badges and shortcut keys on the right, and the blue highlight under the pointer.
   It opens at once and fades away when closed. Sized with the screen (--k), like the menu bar. */
.mac-menu {
  position: absolute; z-index: 3; top: calc(31px * var(--k)); left: calc(10px * var(--k));
  display: flex; flex-direction: column;
  width: calc(237px * var(--k)); padding: calc(4.5px * var(--k)) 0;
  border-radius: calc(10.5px * var(--k));
  background: rgb(42 42 44 / 0.9);
  -webkit-backdrop-filter: blur(30px) saturate(130%); backdrop-filter: blur(30px) saturate(130%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.13), 0 0 0 0.5px rgb(0 0 0 / 0.6),
              0 calc(10px * var(--k)) calc(30px * var(--k)) rgb(0 0 0 / 0.35);
  font: 500 calc(11.5px * var(--k))/1 var(--font); color: rgb(255 255 255 / 0.92);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s var(--ease), visibility 0s linear 0.2s;
}
.mac-menu.open { opacity: 1; visibility: visible; transition: opacity 0.06s linear, visibility 0s; }
.mm-item {
  display: flex; align-items: center; gap: calc(8px * var(--k));
  height: calc(21.5px * var(--k)); margin: 0 calc(4.5px * var(--k)); padding: 0 calc(9px * var(--k));
  border: 0; border-radius: calc(5px * var(--k)); background: none;
  font: inherit; color: inherit; text-align: left; white-space: nowrap; cursor: default;
}
.mm-item:hover, .mm-item:focus-visible { background: #2B6CD9; color: #fff; outline: none; }
.mm-item.flash { background: none; color: inherit; }   /* the quick blink of a chosen item */
.mm-badge {
  margin-left: auto; padding: 0 calc(6px * var(--k)); border-radius: 999px;
  background: rgb(255 255 255 / 0.14); font: 600 calc(9.7px * var(--k))/calc(13px * var(--k)) var(--font);
}
.mm-keys { margin-left: auto; color: rgb(255 255 255 / 0.42); letter-spacing: 0.08em; }
.mm-item:hover .mm-keys, .mm-item:focus-visible .mm-keys { color: rgb(255 255 255 / 0.78); }
.mm-chev {
  margin-left: auto; width: calc(6px * var(--k)); height: calc(9px * var(--k)); overflow: visible;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.mm-sep { display: block; height: 1px; margin: calc(4px * var(--k)) calc(13.5px * var(--k)); background: rgb(255 255 255 / 0.12); }
/* Sleep: the display goes dark for a moment and wakes on the lock screen. */
.screen::after {
  content: ""; position: absolute; inset: 0; z-index: 4; background: #000;
  opacity: 0; pointer-events: none; transition: opacity 0.45s var(--ease);
}
.screen[data-asleep]::after { opacity: 1; }
/* Status icons in the order macOS shows them: battery, Wi-Fi, Control Center. Solid, like the real menu bar. */
.mb-right { gap: calc(13.5px * var(--k)); }
.mbi { flex: none; display: block; fill: currentColor; overflow: visible; }
.mbi-dim { opacity: 0.45; }
.mbi-battery { width: calc(22.5px * var(--k)); height: calc(10.45px * var(--k)); }
.mbi-wifi { width: calc(16.65px * var(--k)); height: calc(11.9px * var(--k)); }
.mbi-cc { width: calc(13px * var(--k)); height: calc(12.25px * var(--k)); }
.mb-right [data-menu-clock] { margin-left: calc(3px * var(--k)); }
.mb-right [data-menu-clock] { font-variant-numeric: tabular-nums; }

/* The notch: a black shape that grows with a spring; Bixie's real renders sit on top. */
.demo-notch {
  --w: calc(276px * var(--k));
  --h: calc(32px * var(--k));
  --r: calc(8px * var(--k));
  --e: calc(6px * var(--k));
  position: absolute; top: 0; left: 50%; z-index: 2;
  width: var(--w); height: var(--h);
  transform: translateX(-50%);
  contain: layout style;
  /* IslandMotion: one spring moves the outline and its corners together. Closing is the default;
     main.js sets data-motion="open" while it grows. */
  transition: width var(--close-dur) var(--close-ease), height var(--close-dur) var(--close-ease),
              --r var(--close-dur) var(--close-ease), --e var(--close-dur) var(--close-ease);
}
.demo-notch[data-motion="open"] { transition-duration: var(--open-dur); transition-timing-function: var(--open-ease); }
.screen:not(.ready) .demo-notch, .screen:not(.ready) .demo-notch * { transition: none !important; }
.demo-notch[data-state="open"] {
  --w: calc(520px * var(--k));
  --h: calc(160px * var(--k));
  --r: calc(20px * var(--k));
  --e: calc(12px * var(--k));
}
.dn-shadow {
  position: absolute; inset: 0; border-radius: 0 0 var(--r) var(--r);
  box-shadow: 0 calc(10px * var(--k)) calc(28px * var(--k)) rgba(0, 0, 0, 0.32);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.demo-notch[data-state="open"] .dn-shadow { opacity: 1; }
.dn-shape { position: absolute; inset: 0; background: #000; border-radius: 0 0 var(--r) var(--r); }
.dn-shape::before, .dn-shape::after { content: ""; position: absolute; top: 0; width: var(--e); height: var(--e); }
.dn-shape::before { right: 100%; background: radial-gradient(circle at 0 100%, transparent calc(var(--e) - 0.5px), #000 var(--e)); }
.dn-shape::after { left: 100%; background: radial-gradient(circle at 100% 100%, transparent calc(var(--e) - 0.5px), #000 var(--e)); }
/* The open views sit at their final size from the start, centred and pinned to the top, inside a mask
   that grows with the outline; they blur in once the shape has started growing and leave quickly
   (IslandMotion.content: in 0.18 s after 0.06 s, out 0.1 s). */
.dn-mask { position: absolute; inset: 0; overflow: hidden; border-radius: 0 0 var(--r) var(--r); pointer-events: none; }
.dn-view {
  position: absolute; top: 0; left: 50%; width: calc(544px * var(--k)); max-width: none;
  translate: -50% 0; transform: scale(0.985); transform-origin: 50% 0;
  opacity: 0; filter: blur(calc(3px * var(--k)));
  user-select: none; -webkit-user-drag: none;
  transition: opacity 0.1s ease-in, filter 0.1s ease-in, transform 0.1s ease-in;
}
.demo-notch[data-state="open"][data-view="home"] .dn-view[data-name="home"],
.demo-notch[data-state="open"][data-view="team"] .dn-view[data-name="team"],
.demo-notch[data-state="open"][data-view="prompter"] .dn-view[data-name="prompter"] {
  opacity: 1; filter: blur(0); transform: none;
  transition: opacity 0.18s ease-out 0.06s, filter 0.18s ease-out 0.06s, transform 0.18s ease-out 0.06s;
}
.demo-notch.settled[data-state="open"] .dn-view { transition-delay: 0s; }
/* Home shows Bixie as it is: plain, or grooving with its headphones on while the song plays. */
.screen[data-music="playing"] .dn-view.v-plain,
.screen:not([data-music="playing"]) .dn-view.v-groove { opacity: 0 !important; }
/* While the song plays, Home's Bixie grooves too: the app's own frames at island size
   (Scripts/RenderWebsiteAssets.swift, islandFrames), over a Home picture rendered without Bixie.
   Headphones on (35 frames), then the loop (69), at the small notch's speed; main.js keeps the two
   in step. The strip only runs while the island is open. */
.dn-groove { height: calc(160px * var(--k)); }
.ib-strip {
  position: absolute; left: calc(34px * var(--k)); top: calc(53.67px * var(--k));
  width: calc(64px * var(--k)); height: calc(65px * var(--k));
  background: 0 0 no-repeat;
}
.dn-groove.intro .ib-strip {
  background-image: url("assets/render/island-music-in.webp"); background-size: 3500% 100%;
  animation: strip 2.099s steps(35, jump-none) forwards;
}
.dn-groove.loop .ib-strip {
  background-image: url("assets/render/island-groove.webp"); background-size: 6900% 100%;
  animation: strip 4.138s steps(69, jump-none) infinite;
}
.demo-notch:not([data-state="open"]) .dn-groove .ib-strip { animation-play-state: paused; }

/* Home's Smart tile shows Now Playing once a song is on: the app's card (HomeGrid NowPlayingWidget),
   203 × 108 pt at island x 307, y 42. Artwork and title open the song in Apple Music. */
.np {
  position: absolute; top: calc(42px * var(--k)); left: calc(50% + 47px * var(--k));
  width: calc(203px * var(--k)); height: calc(108px * var(--k)); box-sizing: border-box;
  display: flex; align-items: flex-start; gap: calc(10px * var(--k)); padding: calc(12px * var(--k));
  border-radius: calc(18px * var(--k)); background: #050506;
  box-shadow: inset 0 0 0 calc(1px * var(--k)) rgb(255 255 255 / 0.04);
  font-family: var(--font); color: #F5F6F8; text-align: left;
  opacity: 0; transform: scale(0.97); filter: blur(calc(3px * var(--k))); pointer-events: none;
  transition: opacity 0.1s ease-in, transform 0.1s ease-in, filter 0.1s ease-in, box-shadow 0.2s;
}
.np:hover { box-shadow: inset 0 0 0 calc(1px * var(--k)) rgb(255 255 255 / 0.09); }
.screen[data-music="playing"] .demo-notch[data-state="open"][data-view="home"] .np,
.screen[data-music="paused"] .demo-notch[data-state="open"][data-view="home"] .np {
  opacity: 1; transform: none; filter: blur(0);
  transition: opacity 0.18s ease-out 0.06s, filter 0.18s ease-out 0.06s, transform 0.35s var(--spring) 0.06s, box-shadow 0.2s;
}
.screen[data-music="playing"] .demo-notch.settled[data-state="open"][data-view="home"] .np,
.screen[data-music="paused"] .demo-notch.settled[data-state="open"][data-view="home"] .np { pointer-events: auto; }
.np a { color: inherit; text-decoration: none; }
.np-art {
  position: relative; flex: none; width: calc(79px * var(--k)); height: calc(79px * var(--k));
  border-radius: calc(12px * var(--k)); overflow: hidden; background: rgb(255 255 255 / 0.06);
}
.np-art::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 calc(1px * var(--k)) rgb(255 255 255 / 0.06);
}
.np-art img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.25s ease-out; }
.np-art img.loaded { opacity: 1; }
.np-col { display: flex; flex-direction: column; flex: 1; min-width: 0; align-self: stretch; }
.np-title { display: block; overflow: hidden; white-space: nowrap; font: 600 calc(13px * var(--k))/1.22 var(--font); }
.np-marquee { display: inline-flex; gap: calc(36px * var(--k)); will-change: transform; }
.np-artist {
  margin-top: calc(1px * var(--k)); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font: 400 calc(11.5px * var(--k))/1.22 var(--font); color: #C5C8CD;
}
.np-source {
  display: flex; align-items: center; gap: calc(4px * var(--k)); margin-top: calc(2px * var(--k));
  font: 500 calc(10px * var(--k))/1.2 var(--font); color: #8E939C;
}
.np-eq { display: none; align-items: flex-end; gap: calc(1.5px * var(--k)); height: calc(7px * var(--k)); }
.screen[data-music="playing"] .np-eq { display: flex; }
.np-transport { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.np-btn, .np-play {
  display: grid; place-items: center; flex: none; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
}
.np-btn {
  width: calc(26px * var(--k)); height: calc(26px * var(--k));
  background: rgb(255 255 255 / 0.09); color: #C5C8CD; transition: background-color 0.15s, color 0.15s;
}
.np-btn:hover { background: rgb(255 255 255 / 0.16); color: #F5F6F8; }
.np-btn svg { width: calc(12px * var(--k)); height: calc(12px * var(--k)); fill: currentColor; }
.np-play { width: calc(30px * var(--k)); height: calc(30px * var(--k)); background: #F5F6F8; color: #0B0C0E; }
.np-play svg { width: calc(14px * var(--k)); height: calc(14px * var(--k)); fill: currentColor; }
.np-btn:focus-visible, .np-play:focus-visible, .np a:focus-visible { outline: 1.5px solid #fff; outline-offset: 2px; }
.screen[data-music="playing"] .np-i-play, .screen:not([data-music="playing"]) .np-i-pause { display: none; }
.dn-hit { position: absolute; inset: 0; border: 0; background: none; cursor: pointer; border-radius: 0 0 var(--r) var(--r); }
.dn-hit:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.demo-notch[data-state="open"] .dn-hit { visibility: hidden; }
.dn-tab {
  position: absolute; top: calc(14px * var(--k)); left: calc(var(--x) * 1px * var(--k));
  width: calc(var(--tw, 30) * 1px * var(--k)); height: calc(22px * var(--k));
  border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  visibility: hidden; transition: background-color 0.2s;
}
.demo-notch.settled[data-state="open"] .dn-tab { visibility: visible; }
.dn-tab:hover { background: rgba(255, 255, 255, 0.12); }
.dn-tab:focus-visible { outline: 1.5px solid #fff; outline-offset: 0; }

/* ---------- Features ---------- */

.features { padding: 132px 0 0; }   /* the space between the Mac screen and the features */
.feature-grid {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 56px; column-gap: 0;
  width: min(1036px, calc(100vw - 48px)); margin: 0 auto; padding: 0;
}
.feature {
  display: flex; flex-direction: column; align-items: center; width: 100%;
  padding: 0; border: 0; border-radius: 24px; background: none; text-align: center;
}
button.feature { cursor: pointer; }
.feature b { margin-top: 20px; font: 700 30px/36px var(--font); letter-spacing: -0.4px; }

/* Feature glyphs: one family, drawn on a 28-unit grid with a single stroke weight, outlines plus small
   solid accents. Each hover is one smooth move that plays back in reverse when the pointer leaves. */
.fic { height: 72px; width: auto; overflow: visible; fill: var(--ink); }
.fic .line { fill: none; stroke: var(--ink); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.fic * { transform-box: fill-box; transform-origin: center; transition: transform 0.45s var(--spring), opacity 0.3s var(--ease); }

/* Fluid transitions: two drops pass through each other, melting together on the way (blur filter). */
.f-fluid .p-big, .f-fluid .p-small { transition: transform 0.7s var(--ease); }
.feature:hover .f-fluid .p-big { transform: translateX(15px); }
.feature:hover .f-fluid .p-small { transform: translateX(-22px); }

/* Instant notifications: the bell rings from its top; the badge stays where it is. */
.f-notify .p-bell { transform-origin: 50% 0%; transition: transform 0.3s var(--ease); }
.f-notify .p-badge { stroke: var(--paper); stroke-width: 1.8; paint-order: stroke; }
.feature:hover .f-notify .p-bell { transform: rotate(12deg); }

/* Live activities: the clock's hands move on (half a turn and an eighth). */
.f-live .p-min { transform-origin: 50% 100%; transition: transform 0.35s var(--ease); }
.f-live .p-hour { transform-origin: 0% 50%; transition: transform 0.3s var(--ease); }
.f-live .p-badge { stroke: var(--paper); stroke-width: 1.8; paint-order: stroke; }
.feature:hover .f-live .p-min { transform: rotate(180deg); }
.feature:hover .f-live .p-hour { transform: rotate(45deg); }

/* Swipe gestures: the hand swipes over from its wrist; the trail it leaves pulls in after it. */
.f-swipe .p-hand { transform-origin: 75% 90%; transition: transform 0.35s var(--ease); }
.f-swipe .p-arc { stroke-dasharray: 9; stroke-dashoffset: 0; transition: stroke-dashoffset 0.35s var(--ease); }
.feature:hover .f-swipe .p-hand { transform: rotate(-32deg); }
.feature:hover .f-swipe .p-arc { stroke-dashoffset: 9; transition-duration: 0.25s; }

/* Full of surprises: the gift's lid swings open on a hinge at its back-right corner, so the near end
   lifts and nothing dips into the box; it settles shut the same way. */
.f-gift .p-lid { transform-origin: 100% 100%; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.feature:hover .f-gift .p-lid { transform: rotate(18deg); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }

/* Music, With Moves: Bixie's headphones lift a touch and sound ripples out from both ear cups. */
.f-music .p-phones { transition: transform 0.35s var(--ease); }
.f-music .p-wave { opacity: 0; transition: transform 0.35s var(--ease), opacity 0.25s var(--ease); }
.f-music .p-right { transform-origin: 0% 50%; transform: translateX(-2px) scale(0.6); }
.f-music .p-left { transform-origin: 100% 50%; transform: translateX(2px) scale(0.6); }
.f-music .p-w2 { opacity: 0; }
.feature:hover .f-music .p-phones { transform: translateY(-1px); }
.feature:hover .f-music .p-wave { opacity: 1; transform: none; }
.feature:hover .f-music .p-w1 { transition-delay: 0.04s; }
.feature:hover .f-music .p-w2 { opacity: 0.45; transition-delay: 0.12s; }

/* Your Codex Team: Bixie in the middle with a teammate either side; on hover Bixie hops and the
   teammates follow, each leaning out a little. */
.f-team .p-lead { transition: transform 0.4s var(--ease); }
.f-team .p-mate { transition: transform 0.4s var(--ease) 0.06s; }
.feature:hover .f-team .p-lead { transform: translateY(-2.4px); }
.feature:hover .f-team .p-left { transform: translateY(-1.6px) rotate(-10deg); }
.feature:hover .f-team .p-right { transform: translateY(-1.6px) rotate(10deg); }

/* Blazing Fast Native App: the bolt gives a quick zap. */
/* Bolt: on hover it darts to the right, and a small spark of itself pops out behind it, top left,
   going from a blurred speck to sharp. 0.3 s each; the bolt waits 0.1 s so the spark leads. */
.f-bolt .p-bolt, .f-bolt .p-spark { --bolt-ease: cubic-bezier(0.4, 0, 0.2, 1); }
.f-bolt .p-bolt { transition: transform 0.3s var(--bolt-ease); }
.feature:hover .f-bolt .p-bolt { transform: translateX(4px); transition-delay: 0.1s; }
.f-bolt .p-spark {
  transform-origin: 50% 40%; transform: scale(0.25); opacity: 0; filter: blur(8px);
  transition: transform 0.3s var(--bolt-ease), opacity 0.3s var(--bolt-ease), filter 0.3s var(--bolt-ease);
}
.feature:hover .f-bolt .p-spark { transform: translate(-4px, -8px) scale(0.5); opacity: 1; filter: blur(0); }

/* A hand-drawn loop round "native app" that draws itself each time the tile scrolls into view.
   It starts above the "n", goes round once, leaning a little, and the second pass runs just
   inside the first to finish over the "a"/"p" of "app". */
.scribble { position: relative; display: inline-block; white-space: nowrap; }
.scribble svg {
  position: absolute; left: -12%; top: -13.9%; width: 124.8%; height: 152.8%; overflow: visible; pointer-events: none;
}
.scribble path {
  fill: none; stroke: #A48CFF; stroke-width: 3px; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: none;   /* resets out of sight */
}
/* Like a pen: starts gently, then sweeps round at a steady pace, in 0.85 s, as soon as it's in view. */
.scribble.drawn path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.85s cubic-bezier(0.5, 0, 0.95, 1); }

/* ---------- Closing ---------- */

.closing { display: flex; flex-direction: column; align-items: center; padding: 96px 0 0; text-align: center; }
.requirement { display: flex; align-items: center; gap: 8px; margin: 36px 0 0; font: 700 14px/20px var(--font); color: var(--muted); }
.requirement .ic { width: 20px; height: 20px; }

/* ---------- Footer ---------- */

.footer { margin: 120px auto 0; text-align: center; overflow: hidden; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.footer-links a {
  padding: 9px 14px; border-radius: 12px; background: var(--soft);
  font: 600 14.5px/1 var(--font); color: var(--ink-2); text-decoration: none; transition: background-color 0.2s;
}
.footer-links a:hover { background: var(--soft-hover); }
.footer-note { margin: 18px 0 0; font: 500 14px/1 var(--font); color: var(--muted); }
.footer-word {
  width: min(1100px, calc(100vw - 32px)); margin: 46px auto -4%; opacity: 0.075;
  -webkit-mask-image: linear-gradient(#000 30%, transparent 92%); mask-image: linear-gradient(#000 30%, transparent 92%);
  pointer-events: none; user-select: none;
}

/* ---------- Article pages (FAQ, changelog) ---------- */

.article { width: min(768px, calc(100vw - 48px)); margin: 0 auto; padding: 80px 0 0; }
.article h1 { margin: 0; font: 700 58px/1.05 var(--font); letter-spacing: -0.025em; }
@media (min-width: 640px) { .article h1 { font-size: 96px; line-height: 1; } }
.updated { display: flex; align-items: center; gap: 10px; margin: 26px 0 0; font: 500 20.5px/1 var(--font); color: var(--muted); }
.updated .ic { width: 25px; height: 25px; stroke-width: 1.7; }
/* The FAQ is one list, no sections, with no line above its first question. */
.article .faq-list { margin-top: 56px; border-top: 0; }
.qa-list, .release-list { border-top: 1px solid var(--line); }
.qa, .release { border-bottom: 1px solid var(--line); }
.qa summary, .release summary {
  --pm: 18px;   /* size of the plus / minus */
  position: relative;
  display: flex; align-items: baseline; gap: 14px; padding: 21px 0; cursor: pointer; list-style: none;
  font: 600 18.5px/1.35 var(--font); letter-spacing: -0.01em;
}
.qa summary::-webkit-details-marker, .release summary::-webkit-details-marker { display: none; }
/* Plus to minus: ::before is the bar across, ::after the upright bar on top of it.
   Opening turns the upright bar flat onto the other one, so the plus becomes a minus. */
.qa summary::before, .release summary::before,
.qa summary::after, .release summary::after {
  content: ""; width: var(--pm); height: var(--pm);
  background: var(--muted);   /* takes the page's muted tone, light or dark */
}
.qa summary::before, .release summary::before {
  flex: none; align-self: center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
}
.qa summary::after, .release summary::after {
  position: absolute; left: 0; top: 50%; margin-top: calc(var(--pm) / -2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform 0.4s var(--spring);
}
.qa[open] summary::after, .release[open] summary::after { transform: rotate(90deg); }
.qa::details-content, .release::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size 0.4s var(--ease), content-visibility 0.4s allow-discrete;
}
.qa[open]::details-content, .release[open]::details-content { block-size: auto; }
/* Opening a changelog entry: a tall block, so it eases in and out over a little longer instead of
   snapping most of the way open at once, and its text fades in as it unfolds. Closing keeps the
   timing above; the text simply stays until the entry has shut. */
.release[open]::details-content {
  transition: block-size 0.55s cubic-bezier(0.4, 0, 0.2, 1), content-visibility 0.55s allow-discrete;
}
.release-body { opacity: 0; transition: opacity 0s linear 0.4s; }
.release[open] .release-body { opacity: 1; transition: opacity 0.42s var(--ease) 0.08s; }
.qa summary { gap: 15px; padding: 27px 0; font-size: 24px; line-height: 1.3; }
.qa summary { --pm: 22px; }
.qa p { margin: -8px 0 28px 37px; max-width: 36em; font-size: 20px; line-height: 1.55; color: var(--ink-2); }
/* After the last question: where to go next. */
.faq-more { margin-top: 72px; }
.faq-more h2 { margin: 0; font: 700 36px/1.15 var(--font); letter-spacing: -0.025em; }
.faq-more p { margin: 14px 0 0; font-size: 20px; line-height: 1.55; color: var(--ink-2); }
.contact-link[href] {
  color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
  text-decoration-color: var(--muted); transition: text-decoration-color 0.2s;
}
.contact-link[href]:hover { text-decoration-color: var(--ink); }
/* Changelog, sized to match the FAQ: no line above the first release, same plus/minus and rhythm. */
.release-group { margin-top: 56px; }
.release-group > h2 { margin: 0; font: 700 40px/1 var(--font); letter-spacing: -0.035em; }
.release-group > p { margin: 16px 0 22px; max-width: 36em; font-size: 20px; line-height: 1.55; color: var(--ink-2); }
.article .release-list { border-top: 0; }
.release summary { --pm: 22px; gap: 15px; padding: 27px 0; }
.release summary b { font: 700 24px/1.2 var(--font); }
.release summary time { margin-left: auto; font: 500 17px/1 var(--font); color: var(--muted); }
.release-body { padding: 0 0 30px 37px; }
/* Each section: an icon and a bold title with its count, then plain lines (no bullets) in a softer tone. */
.release-body h3 { display: flex; align-items: center; margin: 34px 0 12px; font: 700 21px/1.3 var(--font); color: var(--ink); white-space: pre; }
.release-body h3:first-child { margin-top: 2px; }
.release-body h3 .ic { width: 23px; height: 23px; margin-right: 10px; }
.release-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.release-body li { font-size: 20px; line-height: 1.5; color: var(--ink-2); }
.article .footer { margin-top: 100px; }

/* ---------- Download page ---------- */

/* Centred: the title, how to install in one line, then Bixie's app icon (Scripts/make-download-icons.py,
   app_icon), the macOS it needs, the file and version, and the button that downloads it. */
.dl-page { text-align: center; }
.dl-title { margin: 0; font: 700 58px/1.02 var(--font); letter-spacing: -0.03em; isolation: isolate; }   /* the highlight behind Mac sits under the words */
@media (min-width: 640px) { .dl-title { font-size: 96px; line-height: 1; } }
/* Title → line → card read as two equal gaps (about 56 px): the line's own spacing above its capitals and
   below its baseline differs, so the margins differ by a few pixels to make the gaps look the same. */
.dl-steps { max-width: 23.5em; margin: 44px auto 0; font-size: 22px; line-height: 1.55; color: var(--ink-2); text-wrap: balance; }   /* narrower than the title, two even lines */
/* The Bixie wordmark in the line, centred on the letters: the middle of its B lines up with the middle of the
   lowercase text, so it dips a little below the baseline. A little more room on each side than a space. */
.dl-word { display: inline; width: auto; height: 0.92em; margin: 0 0.22em; vertical-align: -0.11em; }
.dl-card { display: flex; flex-direction: column; align-items: center; margin: 40px auto 0; }   /* no panel: the icon, two lines, the button */
.dl-icon { width: 160px; height: 160px; margin-bottom: 8px; }   /* the image carries macOS's margin and shadow */
.dl-req { margin: 0; font: 600 18px/1.3 var(--font); color: var(--ink-2); }
.dl-meta { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 0; font: 600 15.5px/1.3 var(--font); color: var(--muted); }
.dl-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.dl-card .btn { margin-top: 26px; }
.dl-help { margin: 44px 0 0; font-size: 17px; color: var(--muted); }
/* Before notarization: how to open Bixie the first time (main.js removes it once SITE.notarized is true). */
.dl-first { max-width: 30em; margin: 56px auto 0; text-align: left; }
.dl-first h2 { margin: 0 0 12px; font: 700 20px/1.3 var(--font); letter-spacing: -0.01em; text-align: center; }
.dl-first ol { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.dl-first b { color: var(--ink); font-weight: 650; }
@media (max-width: 640px) {
  .dl-steps { font-size: 19px; }
  .dl-icon { width: 132px; height: 132px; }
}

/* ---------- Page transitions ---------- */

::view-transition-old(root) { animation: page-out 0.22s var(--ease) both; }
/* The new page's blocks bring their own entrance (see Page entrance), so the page itself only fades in. */
::view-transition-new(root) { animation: vt-fade-in 0.3s var(--ease) both; }
::view-transition-group(site-header) { animation: none; }
/* The header stays put; only its colours cross-fade, in step with the page (white to dark and back). */
::view-transition-old(site-header) { animation: vt-fade-out 0.3s var(--ease) both; }
::view-transition-new(site-header) { animation: vt-fade-in 0.3s var(--ease) both; }
/* FAQs and Changelog each leave the header on their own page: the link shrinks a little, softens
   and fades. Back on another page it springs in again. When a link only changes place (FAQs moving
   over on the Changelog page), it glides there. */
.nav-link[href="faq.html"] { view-transition-name: nav-faq; }
.nav-link[href="changelog.html"] { view-transition-name: nav-log; }
.btn-header.btn-dl { view-transition-name: nav-dl; }   /* leaves the header on the download page */
::view-transition-group(nav-faq), ::view-transition-group(nav-log), ::view-transition-group(nav-dl) { animation-duration: 0.42s; animation-timing-function: var(--ease); }
::view-transition-old(nav-faq):only-child, ::view-transition-old(nav-log):only-child, ::view-transition-old(nav-dl):only-child { animation: nav-out 0.26s var(--ease) both; }
::view-transition-new(nav-faq):only-child, ::view-transition-new(nav-log):only-child, ::view-transition-new(nav-dl):only-child { animation: nav-in 0.5s var(--spring) 0.12s both; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@keyframes nav-out { to { opacity: 0; transform: scale(0.86); filter: blur(4px); } }
@keyframes nav-in { from { opacity: 0; transform: scale(0.86); filter: blur(4px); } }
/* Browsers without cross-page transitions get a soft fade instead (main.js adds .fade-nav). */
.fade-nav body { animation: vt-fade-in 0.3s var(--ease) both; }
.fade-nav.leaving body { opacity: 0; transform: translateY(-8px); transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }

/* ---------- Page entrance ---------- */

/* When a page opens, its blocks fade in and rise into place one after another, the title from a
   little lower and slightly tilted. Each block sets its start with
   --enter. On a fresh load the header rises in too; moving between pages it stays put (.vt-nav is
   set when a page transition brings you here). Fill "backwards": nothing stays on a block once it
   has landed, so its layout and stacking are untouched. */
@keyframes enter-up { from { opacity: 0; transform: translateY(20px); } }
@keyframes enter-title { from { opacity: 0; transform: translateY(32px) rotate(2deg); } }
@keyframes header-rise { from { opacity: 0; transform: translateY(16px) scale(0.75) rotate(6deg); } }
@keyframes nav-fade { from { opacity: 0; } }
.enter { animation: enter-up 0.5s ease var(--enter, 0s) backwards; }
.enter-title { animation: enter-title 0.5s ease var(--enter, 0s) backwards; }
.brand-group { animation: header-rise 0.5s ease 0.075s backwards; }
.nav { animation: nav-fade 0.7s ease-in 0.075s backwards; }
.vt-nav .brand-group, .vt-nav .nav { animation: none; }

/* ---------- Motion ---------- */

@keyframes page-out { to { opacity: 0; transform: translateY(-10px); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .enter, .enter-title, .brand-group, .nav { animation: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); row-gap: 56px; }
}

@media (max-width: 640px) {
  .site-header { height: 80px; padding: 0 16px; gap: 14px; }
  .nav { gap: 2px; }
  .nav-link { font-size: 0; gap: 0; padding: 10px; border-radius: 12px; }
  .nav-link .ic { width: 27px; height: 27px; }
  .brand-group { margin-left: 0; }
  .cta-row { gap: 14px; }
  .brand-word { height: 30px; }
  .brand-group { gap: 6px; }
  .version-badge { margin-top: -5px; padding: 2px 6px; border-radius: 8px; font-size: 12.5px; line-height: 17px; }
  .btn-header { height: 46px; padding: 0 14px; border-radius: 14px; font-size: 16px; margin-left: 6px; }
  .btn-header .dl-mac, .btn-header .dl-arrow { display: none; }
  .hide-sm { display: none; }
  .hero { padding-top: 36px; }
  .cta-row { margin-top: 34px; }
  .btn-xl { height: 56px; padding: 0 22px; font-size: 17px; }
  .hero .cta-row { margin-top: 40px; gap: 14px; }
  .hero .btn-xl { height: 60px; padding: 0 22px; border-radius: 17px; font-size: 18px; line-height: 28px; }
  .hero .btn-dl { --dl: 25px; }
  .hero .price-chip { padding: 4px 8px; font-size: 14px; line-height: 20px; }
  .buy-badge { width: 26px; height: 26px; }
  .screen { width: calc(100vw - 24px); aspect-ratio: 4 / 3.65; border-radius: 26px; margin-top: 56px; }
  .lock { padding-top: 16%; }
  .mb-left span { display: none; }
  .features { padding-top: 104px; }
  .fic { width: 60px; height: 60px; }
  .feature b { font-size: 23px; line-height: 28px; }
  .closing { padding-top: 110px; }
  .article { padding-top: 52px; }
  .release-body, .qa p { padding-left: 0; margin-left: 0; }
  .qa summary { padding: 22px 0; font-size: 20px; }
  .qa p { font-size: 18px; }
  .updated { font-size: 18px; }
  .updated .ic { width: 22px; height: 22px; }
  .faq-more h2 { font-size: 29px; }
  .faq-more p { font-size: 18px; }
  .release-group > h2 { font-size: 34px; }
  .release-group > p { font-size: 18px; }
  .release summary { padding: 22px 0; }
  .release summary b { font-size: 21px; }
  .release summary time { font-size: 15px; }
  .release-body h3 { font-size: 19px; }
  .release-body li { font-size: 17.5px; }
}
