/* Monochrome, after business.x.com. Dark is the default; light follows the system
   unless the visitor picks a theme with the nav toggle (stored as data-theme on <html>). */
:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, .6);
  --faint: rgba(255, 255, 255, .35);
  --border: rgba(255, 255, 255, .1);
  --on-fg: #000;
  --fg-hover: rgba(255, 255, 255, .85);
  --chip: rgba(255, 255, 255, .12);
  --chip-hover: rgba(255, 255, 255, .2);
  --scrim: rgba(0, 0, 0, .55);
  --logo-rim: 0 0 0 1px rgba(255, 255, 255, .28), 0 0 18px rgba(255, 255, 255, .1);
  --floor: rgba(255, 255, 255, .1);
  color-scheme: dark;

  --accent: #f0552d; /* the one colour: the 'coming soon' dot */
  --ease: cubic-bezier(.2, .7, .1, 1);
  /* stiff spring with a hair of overshoot, matched to recent.design's detail transition */
  --spring: linear(0, .45 4%, .75 10%, .9 17%, .97 25%, 1.004 42%, 1.002 65%, 1);
  --panel-w: 380px;
  --pad: clamp(16px, 4vw, 48px);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fff;
    --fg: #000;
    --muted: rgba(0, 0, 0, .6);
    --faint: rgba(0, 0, 0, .4);
    --border: rgba(0, 0, 0, .1);
    --on-fg: #fff;
    --fg-hover: rgba(0, 0, 0, .8);
    --chip: rgba(0, 0, 0, .06);
    --chip-hover: rgba(0, 0, 0, .12);
    --scrim: rgba(255, 255, 255, .55);
    --logo-rim: none;
    --floor: rgba(0, 0, 0, .28);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #fff;
  --fg: #000;
  --muted: rgba(0, 0, 0, .6);
  --faint: rgba(0, 0, 0, .4);
  --border: rgba(0, 0, 0, .1);
  --on-fg: #fff;
  --fg-hover: rgba(0, 0, 0, .8);
  --chip: rgba(0, 0, 0, .06);
  --chip-hover: rgba(0, 0, 0, .12);
  --scrim: rgba(255, 255, 255, .55);
  --logo-rim: none;
  --floor: rgba(0, 0, 0, .28);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Inter Tight", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
body.detail-open { overflow: hidden; }
/* no visible scrollbars: the page, and the detail view's info panel and phone sheet still scroll by touch, wheel or trackpad */
html, .detail-info, .detail-panel { scrollbar-width: none; }
html::-webkit-scrollbar, .detail-info::-webkit-scrollbar, .detail-panel::-webkit-scrollbar { display: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px; border-radius: 999px; border: 0;
  font-size: 15px; font-weight: 500; line-height: 20px;
  cursor: pointer; transition: background .2s, color .2s;
}
.btn-primary { background: var(--fg); color: var(--on-fg); }
.btn-primary:hover { background: var(--fg-hover); }
.btn-secondary { background: var(--chip); color: var(--fg); }
.btn-secondary:hover { background: var(--chip-hover); }

.icon-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; color: var(--fg); cursor: pointer;
  display: grid; place-items: center; transition: background .2s;
}
.icon-btn:hover { background: var(--chip); }
.icon-btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--pad);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; white-space: nowrap; }
/* logo: spins into place on load, presses in like a real button on hover */
.brand-mark { animation: mark-in .9s var(--spring) backwards; transition: transform .45s var(--spring), filter .3s; }
@keyframes mark-in { from { transform: scale(.2) rotate(-200deg); opacity: 0; } }
.brand:hover .brand-mark { transform: scale(.86) rotate(-12deg); filter: brightness(1.25); }
.brand:active .brand-mark { transform: scale(.74); transition-duration: .1s; }
/* wordmark: letters rise in one by one, then wave when hovered */
.brand-name .ch { display: inline-block; animation: ch-in .7s var(--spring) backwards; animation-delay: calc(.25s + var(--i) * 22ms); }
.brand-name.ready .ch { animation: none; } /* intro done: don't replay it after a hover */
@keyframes ch-in { from { transform: translateY(70%); opacity: 0; filter: blur(3px); } }
.brand:hover .brand-name .ch { animation: ch-wave .55s ease both; animation-delay: calc(var(--i) * 16ms); }
@keyframes ch-wave { 40% { transform: translateY(-3px); } }
/* Get in touch: the label rolls up and "Say hello →" rolls in */
.roll { display: inline-grid; height: 20px; overflow: hidden; }
.roll-a, .roll-b { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; transition: transform .5s var(--spring); }
.roll-b { transform: translateY(110%); }
.roll-b svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--spring) .05s; }
.nav-cta:hover .roll-a, .nav-cta:focus-visible .roll-a { transform: translateY(-110%); }
.nav-cta:hover .roll-b, .nav-cta:focus-visible .roll-b { transform: none; }
.nav-cta:hover .roll-b svg { transform: translateX(2px); }
/* magnetic: main.js nudges these toward the pointer; they spring back on leave */
.nav .magnetic { transition: translate .5s var(--spring), background .2s, color .2s, border-color .2s; }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; display: block; object-fit: cover; box-shadow: var(--logo-rim); }
.nav-right { display: flex; align-items: center; gap: 12px; }
/* Theme switch: sliding pill with dot-matrix sun/moon */
.theme-switch {
  position: relative; display: inline-flex; padding: 3px; gap: 0;
  border-radius: 999px; border: 1px solid var(--border); background: transparent;
  cursor: pointer; transition: border-color .2s;
}
.theme-switch:hover { border-color: var(--faint); }
.theme-switch:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--chip-hover); box-shadow: inset 0 0 0 1px var(--border);
  transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), scale .2s;
}
:root[data-theme-resolved="dark"] .switch-thumb { transform: translateX(32px); }
.dots { position: relative; z-index: 1; display: block; width: 20px; height: 20px; margin: 6px; overflow: visible; transition: opacity .3s, transform .6s var(--spring); }
.dots circle { transform-box: fill-box; transform-origin: center; }
.dots .off { fill: var(--fg); opacity: .09; }
.dots .on  { fill: var(--fg); }
.dots .a   { fill: var(--fg); }
/* the inactive side sits dim; the active side lights up dot by dot */
:root[data-theme-resolved="dark"] .dots-sun,
:root[data-theme-resolved="light"] .dots-moon { opacity: .62; }
:root[data-theme-resolved="light"] .dots-sun :is(.on, .a),
:root[data-theme-resolved="dark"] .dots-moon :is(.on, .a) { animation: dot-in .45s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: calc(var(--d) * 14ms); }
.theme-switch:hover .dots .off { opacity: .16; }
.theme-switch:hover .dots { opacity: 1; }
/* hover: the sun turns, the moon rocks, and the lit dots shimmer */
.theme-switch:hover .dots-sun { transform: rotate(45deg); }
.theme-switch:hover .dots-moon { transform: rotate(-18deg) scale(1.06); }
:root[data-theme-resolved="dark"] .theme-switch:hover .dots-moon .a,
:root[data-theme-resolved="light"] .theme-switch:hover .dots-sun .a { animation: twinkle .9s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -73ms); }
@keyframes twinkle { from { opacity: .25; transform: scale(.6); } to { opacity: 1; transform: scale(1.25); } }
.theme-switch:active .switch-thumb { scale: .9; }
@keyframes dot-in { from { transform: scale(0); } }

/* ---------- Line-art primitives ---------- */
svg .dash   { stroke: var(--fg); stroke-width: 1; stroke-dasharray: 5 5; }
svg .solid  { stroke: var(--fg); stroke-width: 1; }
svg .node   { stroke: var(--fg); stroke-width: 1; fill: var(--bg); }
svg .march  { animation: march 1.4s linear infinite; }
svg .march.reverse { animation-direction: reverse; }

@keyframes march { to { stroke-dashoffset: -10; } }
@keyframes orbit { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px var(--pad) 56px; overflow: hidden;
}
.stage {
  position: relative; width: 100%; height: min(66vh, 580px); min-height: 420px;
  container-type: inline-size;
  --art: clamp(1100px, 100cqw, 1220px); /* rendered width of the orbit drawing */
}

/* Orbit art, after the X "ad credit" block */
.orbit-art {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: var(--art); height: auto; overflow: visible;
  transition: opacity .6s var(--ease), scale .9s var(--ease);
}
.orbit-art .ring-node { fill: var(--bg); stroke: var(--fg); stroke-width: 1; } /* moved along the jelly ring by main.js */
/* the stage owns touches so the ring can be dragged on phones */
.stage { touch-action: none; user-select: none; -webkit-user-select: none; }
.ellipse-spin { transform-origin: 610px 260px; animation: tilt 48s linear infinite; }
@keyframes tilt { from { transform: rotate(34deg); } to { transform: rotate(394deg); } }
.hero.is-previewing .orbit-art { scale: 1.08; opacity: .55; }

.center-copy {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  text-align: center; pointer-events: none;
  transition: opacity .45s var(--ease), transform .6s var(--ease);
}
/* The oval's short radius is 176/1220 of the drawing; the copy block's diagonal stays well inside it */
.center-copy h1 {
  width: calc(var(--art) * .205);
  font-size: calc(var(--art) * .0245); font-weight: 500; line-height: 1.08; letter-spacing: -.02em;
}
.center-copy h1 .sub { display: block; color: var(--muted); }

/* ---------- Entrance on every load ---------- */
/* the ring and ellipse grow in, the headline rises word by word, then the rest follows */
.orbit-art { animation: art-in 1.4s var(--ease) backwards; }
@keyframes art-in { from { opacity: 0; transform: scale(.88) rotate(-6deg); } }
.center-copy .w { display: inline-block; animation: word-in .9s var(--spring) backwards; animation-delay: calc(.35s + var(--i) * 75ms); }
@keyframes word-in { from { opacity: 0; transform: translateY(45%) rotate(3deg); filter: blur(10px); } }
.center-copy p { animation: rise-in .9s var(--ease) backwards; animation-delay: .95s; }
.product-name { animation: rise-in .8s var(--ease) backwards; animation-delay: calc(1.15s + var(--n, 0) * 90ms); }
.product-name:nth-child(2) { --n: 1; }
.product-name:nth-child(3) { --n: 2; }
.legal { animation: rise-in .8s var(--ease) backwards; animation-delay: 1.5s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }
.center-copy p {
  width: calc(var(--art) * .205); margin-top: calc(var(--art) * .012);
  font-size: calc(var(--art) * .0108); line-height: 1.45; color: var(--muted);
  text-wrap: balance;
}
.hero.is-previewing .center-copy { opacity: 0; transform: scale(.94); }

/* Phone preview */
.device-wrap {
  position: absolute; inset: 0; display: grid; place-items: center; perspective: 1600px;
  opacity: 0; transform: translateY(28px) scale(.94); pointer-events: none;
  transition: opacity .5s var(--ease), transform .8s var(--ease);
}
.hero.is-previewing .device-wrap { opacity: 1; transform: none; }
.device-float {
  --ry: -14deg; --rx: 4deg; --rz: 0deg;
  animation: float 7s ease-in-out infinite;
  transform: rotateY(var(--ry)) rotateX(var(--rx)) rotateZ(var(--rz));
  transition: transform 1.1s var(--ease);
}
@keyframes float { 50% { translate: 0 -8px; } }

.device {
  position: relative;
  height: min(60vh, 540px); min-height: 380px; aspect-ratio: 9 / 19.2;
  border-radius: 16% / 7.6%; padding: 3.4%;
  background: linear-gradient(100deg, #2b2b2e, #141416 40%, #1d1d20);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .12),
    7px 1px 0 -1px #3a3a3e, 9px 2px 0 -1px #222225, 11px 3px 0 -2px #111,
    0 40px 80px -20px rgba(0, 0, 0, .5);
}
.device::before, .device::after { content: ""; position: absolute; right: -11px; width: 3px; border-radius: 2px; background: #2c2c30; }
.device::before { top: 26%; height: 10%; }
.device::after  { top: 56%; height: 10%; }
.hero[data-active="promo"]      .device-float { --ry: 14deg;  --rx: 3deg;  --rz: -1deg; }
.hero[data-active="unreleased"] .device-float { --ry: -12deg; --rx: -3deg; --rz: 1.5deg; }
.hero[data-active="novernote"]  .device-float { --ry: 6deg;   --rx: 5deg;  --rz: -2deg; }
.device-camera, .device-base { display: none; }

.device-screen {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 13% / 6.2%; background: #000;
  container-type: size;
}
.screen { position: absolute; inset: 0; opacity: 0; filter: blur(4px); transition: opacity .45s var(--ease), filter .45s var(--ease); }
.screen.is-shown { opacity: 1; filter: none; }
.screen picture, .media-scroll picture { display: contents; }

/* Novernote: a still of the real app with a slow drift and a coming-soon badge */
.app-still { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.soon-badge {
  position: absolute; left: 50%; bottom: 5%; translate: -50% 0;
  display: inline-flex; align-items: center; gap: .5em;
  padding: .5em 1em; border-radius: 999px; background: #fff; color: #000;
  font-size: max(10px, 3.4cqw); font-weight: 500; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.soon-badge::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--accent); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* Laptop on wide screens (the page swaps in desktop captures at the same width) */
@media (min-width: 900px) {
  .device-float { --ry: -10deg; --rx: 6deg; }
  .hero[data-active="promo"]      .device-float { --ry: 10deg;  --rx: 5deg;  --rz: -.5deg; }
  .hero[data-active="unreleased"] .device-float { --ry: -9deg;  --rx: 3deg;  --rz: .5deg; }
  .hero[data-active="novernote"]  .device-float { --ry: 5deg;   --rx: 7deg;  --rz: -1deg; }
  .device {
    height: auto; min-height: 0; aspect-ratio: 16 / 10.4;
    width: min(56vw, 760px, calc((min(66vh, 580px) - 40px) * 1.5));
    border-radius: 18px 18px 6px 6px; padding: 2.2% 1.8% 3%;
    background: linear-gradient(180deg, #2a2a2d, #151517);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 50px 90px -30px rgba(0, 0, 0, .55);
  }
  .device::before, .device::after { display: none; }
  .device-screen { border-radius: 6px; }
  .device-camera { display: block; position: absolute; top: .9%; left: 50%; translate: -50% 0; width: 6px; height: 6px; border-radius: 50%; background: #0b0b0c; box-shadow: inset 0 0 0 1px #333; }
  .device-base {
    display: block; position: relative; width: 116%; margin-left: -8%; height: 16px;
    border-radius: 2px 2px 14px 14px / 2px 2px 10px 10px;
    background: linear-gradient(180deg, #4a4a4e 0, #2a2a2d 30%, #161618);
    box-shadow: 0 30px 40px -18px rgba(0, 0, 0, .5);
  }
  .device-base::before { content: ""; position: absolute; top: 0; left: 50%; translate: -50% 0; width: 15%; height: 6px; border-radius: 0 0 8px 8px; background: #1a1a1c; }
  .soon-badge { font-size: 1.5cqw; bottom: 7%; }
}

/* Real site, scrolling on its own inside the phone */
.site-scroll { display: block; width: 100%; height: auto; animation: site-scroll 36s ease-in-out infinite alternate; }
@keyframes site-scroll {
  0%, 6%    { transform: translateY(0); }
  94%, 100% { transform: translateY(calc(-100% + 100cqh)); }
}

/* Product names under the stage (block.xyz row) */
.product-row {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px clamp(28px, 5vw, 72px);
  margin-top: clamp(16px, 4vh, 40px);
}
.product-name {
  position: relative;
  font-size: 15px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); padding: 10px 0; transition: color .3s;
  -webkit-text-stroke: 0 currentColor;
}
/* the product's logo springs up above its name on hover */
.name-logo {
  position: absolute; left: 50%; bottom: 100%; width: 30px; height: 30px; margin-left: -15px;
  border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px var(--border);
  opacity: 0; transform: translateY(10px) scale(.5) rotate(-8deg); pointer-events: none;
  transition: opacity .2s ease, transform .5s var(--spring);
}
.product-name:hover .name-logo, .product-name:focus-visible .name-logo, .product-name.is-active .name-logo {
  opacity: 1; transform: translateY(-2px) scale(1) rotate(0deg);
}
/* bold without the text reflowing: thicken with a stroke instead of font-weight */
.product-name:hover, .product-name:focus-visible, .product-name.is-active { color: var(--fg); -webkit-text-stroke: .6px currentColor; outline: none; }

.hero-captions { position: relative; margin-top: 6px; min-height: 1.5em; width: 100%; max-width: 560px; text-align: center; font-size: 14px; }
.caption { position: absolute; inset: 0; color: var(--faint); opacity: 0; transform: translateY(4px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.hero[data-active="promo"] [data-caption="promo"],
.hero[data-active="unreleased"] [data-caption="unreleased"],
.hero[data-active="novernote"] [data-caption="novernote"] { opacity: 1; transform: none; }

.legal { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--faint); }
.legal .sep { margin: 0 8px; }
.legal a { color: var(--muted); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.legal a:hover, .legal a:focus-visible { color: var(--fg); text-decoration-color: currentColor; }

/* ---------- DETAIL VIEW (after recent.design) ---------- */
.detail { position: fixed; inset: 0; z-index: 100; }
.detail[hidden] { display: none; }
.detail-backdrop {
  position: absolute; inset: 0; background: var(--scrim);
  backdrop-filter: blur(22px) saturate(.8); -webkit-backdrop-filter: blur(22px) saturate(.8);
  opacity: 0; transition: opacity .3s ease;
}
.detail-panel { position: absolute; inset: 0; display: grid; grid-template-columns: var(--panel-w) 1fr; pointer-events: none; }
.detail-info {
  pointer-events: auto; overflow-y: auto;
  background: var(--bg); border-right: 1px solid var(--border);
  padding: 16px 28px 40px;
  opacity: 0; transform: translateX(-40px);
  transition: opacity .18s linear, transform .55s var(--spring);
}
.detail-media { opacity: 0; transition: opacity .12s linear; }
.detail.open .detail-backdrop { opacity: 1; }
.detail.open .detail-info { opacity: 1; transform: none; }
.detail.open .detail-media { opacity: 1; transition: opacity .3s ease .05s; }

/* Opening pushes the landing page aside by the panel's width, the way recent.design moves its feed */
.hero, .nav { transition: transform .55s var(--spring); }
@media (min-width: 821px) {
  body.detail-open .hero, body.detail-open .nav { transform: translateX(var(--panel-w)); }
}

.detail-tools { display: flex; align-items: center; justify-content: space-between; }
.detail-nav { display: flex; gap: 8px; }
.detail-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

.detail-item { display: none; text-align: center; padding-top: 28px; }
.detail-item.is-shown { display: block; animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.detail-logo { display: block; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 16px; object-fit: cover; box-shadow: 0 0 0 1px var(--border); }
.detail-cat { font-size: 13px; color: var(--muted); }
.detail-item h2 { font-size: 22px; font-weight: 500; letter-spacing: -.01em; margin-top: 2px; }
.detail-desc { font-size: 14px; color: var(--muted); max-width: 310px; margin: 14px auto 0; line-height: 1.55; }
.detail-cta { margin-top: 20px; }
.detail-table { margin-top: 32px; text-align: left; border-bottom: 1px solid var(--border); }
.detail-table div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 13px; }
.detail-table dt { color: var(--muted); flex: none; }
.detail-table dd { text-align: right; }

.detail-media {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 32px; min-width: 0;
}
.media-frame {
  display: none; pointer-events: auto; position: relative;
  height: min(84vh, 860px); aspect-ratio: 390 / 844; max-width: 100%;
  border-radius: 28px; overflow: hidden; background: #000;
  border: 1px solid var(--border);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .55);
  container-type: size;
}
.media-frame.is-shown { display: block; animation: media-in .3s ease both; }
@keyframes media-in { from { opacity: 0; } }
/* pages of one product: stacked, the current one slides in */
.media-pages { position: relative; height: 100%; }
.media-scroll {
  position: absolute; inset: 0; overflow-y: auto; scrollbar-width: none;
  opacity: 0; visibility: hidden; transform: translateX(var(--from, 16px));
  transition: opacity .3s ease, transform .5s var(--spring), visibility 0s .3s;
}
.media-scroll.is-current { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .5s var(--spring), visibility 0s; }

/* simulated cursor that browses the site in the detail view */
.sim-cursor {
  position: absolute; left: 0; top: 0; z-index: 3; width: 22px; height: 22px; margin: -3px 0 0 -5px;
  pointer-events: none; opacity: 0; transition: opacity .3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35));
}
.sim-cursor.is-visible { opacity: 1; }
.sim-cursor svg { display: block; width: 100%; height: 100%; fill: #fff; stroke: #000; stroke-width: 1.3; stroke-linejoin: round; transform-origin: 5px 3px; }
.sim-cursor.click svg { animation: cursor-press .3s ease; }
@keyframes cursor-press { 40% { transform: scale(.82); } }
.sim-cursor .ripple {
  position: absolute; left: 5px; top: 3px; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); opacity: 0;
}
.sim-cursor.click .ripple { animation: ripple .55s ease-out; }
@keyframes ripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
/* phones: a touch dot instead of an arrow */
.touch .sim-cursor { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.touch .sim-cursor svg { display: none; }
.touch .sim-cursor::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); border: 1.5px solid rgba(255, 255, 255, .95); box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
.touch .sim-cursor.click::before { animation: cursor-press .3s ease; }
.touch .sim-cursor .ripple { left: 50%; top: 50%; }

.page-tabs {
  pointer-events: auto; display: flex; gap: 2px; padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg);
}
.page-tabs:empty { display: none; }
.page-tab {
  position: relative; flex: none; height: 30px; padding: 0 13px; border: 0; border-radius: 999px;
  background: none; color: var(--muted); font-size: 13px; cursor: pointer; transition: color .2s, background .2s;
}
.page-tab:hover { color: var(--fg); }
.page-tab.is-current { color: var(--fg); background: var(--chip); }
.page-tab:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
/* progress through the current page while it plays on its own */
.page-tab .bar { position: absolute; left: 13px; right: 13px; bottom: 4px; height: 2px; border-radius: 1px; background: var(--border); opacity: 0; transition: opacity .2s; }
.page-tab .bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: var(--fg); }
.page-tab.is-current .bar { opacity: 1; }
.media-scroll::-webkit-scrollbar { display: none; }
.media-scroll img { display: block; width: 100%; height: auto; }
.media-scroll .app-still { height: 100%; }
@media (min-width: 900px) {
  .media-frame { height: auto; aspect-ratio: 16 / 10; width: min(100%, calc(80vh * 1.6), 1240px); border-radius: 14px; }
  .media-frame .soon-badge { font-size: 1.3cqw; }
}
.media-caption { pointer-events: auto; font-size: 12px; color: var(--muted); }
.media-caption a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .stage { height: 62vh; min-height: 400px; }
  .product-name { font-size: 13px; }

  .detail-panel { display: block; overflow-y: auto; pointer-events: auto; background: var(--bg); }
  .detail-info { border-right: 0; padding-bottom: 8px; transform: translateY(16px); }
  .detail-media { padding: 16px 16px 40px; }
  .media-frame { height: auto; width: min(100%, 390px); }
  .page-tabs { order: -1; } /* stacked layout: page tabs sit above the device screen */
  .page-tab { padding: 0 9px; font-size: 12.5px; } /* tighter, so up to five tabs fit on a phone */
}

/* ---------- Phones: switch + button move into a dropdown behind an animated hamburger ---------- */
.menu-toggle, .menu-label, .menu-scrim { display: none; }
.menu-row { display: contents; } /* on desktop the switch sits in the nav as before */

@media (max-width: 640px) {
  .nav { padding-inline: 16px; }
  .menu-toggle {
    position: relative; display: block; width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg); color: var(--fg); cursor: pointer;
    transition: background .2s, transform .3s var(--spring);
  }
  .menu-toggle:active { transform: scale(.92); }
  .menu-toggle span {
    position: absolute; left: 50%; top: 50%; width: 18px; height: 1.6px; margin: -.8px 0 0 -9px;
    border-radius: 2px; background: currentColor;
    transition: transform .5s var(--spring), width .3s var(--ease);
  }
  .menu-toggle span:first-child { transform: translateY(-4px); }
  .menu-toggle span:last-child { transform: translateY(4px); width: 12px; } /* a shorter second line, like a wink */
  .nav.menu-open .menu-toggle span:first-child { transform: rotate(45deg); }
  .nav.menu-open .menu-toggle span:last-child { transform: rotate(-45deg); width: 18px; }

  /* the dropdown */
  .nav-right {
    position: fixed; top: 68px; right: 12px; width: min(320px, calc(100vw - 24px));
    flex-direction: column; align-items: stretch; gap: 10px; padding: 12px;
    border-radius: 24px; background: var(--bg); border: 1px solid var(--border);
    box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .5);
    transform-origin: calc(100% - 20px) -10px;
    opacity: 0; transform: translateY(-10px) scale(.9); visibility: hidden; pointer-events: none;
    transition: opacity .2s ease, transform .5s var(--spring), visibility 0s .5s;
  }
  .nav.menu-open .nav-right {
    opacity: 1; transform: none; visibility: visible; pointer-events: auto;
    transition: opacity .2s ease, transform .5s var(--spring), visibility 0s;
  }
  .nav.menu-open .nav-right > * { animation: menu-item .55s var(--spring) backwards; }
  .nav.menu-open .nav-right > :nth-child(2) { animation-delay: .07s; }
  @keyframes menu-item { from { opacity: 0; transform: translateY(-8px); } }

  .menu-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 14px; border-radius: 18px; background: var(--chip); }
  .menu-label { display: block; font-size: 15px; color: var(--muted); }
  .nav-right .nav-cta { width: 100%; height: 50px; font-size: 16px; border-radius: 18px; }
  .nav-right .nav-cta .roll { height: 22px; }

  .menu-scrim {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; pointer-events: none; transition: opacity .3s ease;
  }
  body.menu-open .menu-scrim { opacity: 1; pointer-events: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
