/* =========================================================================
   AirDoxx — website. Black & white only.
   Scroll-driven animations are progressive enhancements (feature-detected),
   with an IntersectionObserver fallback in app.js.
   ========================================================================= */

:root {
  --black: #000;
  --white: #fff;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);       /* calm, Apple-like ease-out */
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --radius: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 400 17px/1.55 var(--font);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Sections alternate black / white. Everything else is a shade of those two (via opacity). */
.dark  { --fg: var(--white); --bg: var(--black); --line: rgba(255, 255, 255, 0.12); --soft: rgba(255, 255, 255, 0.55); --faint: rgba(255, 255, 255, 0.06); background: var(--bg); color: var(--fg); }
.light { --fg: var(--black); --bg: var(--white); --line: rgba(0, 0, 0, 0.1);       --soft: rgba(0, 0, 0, 0.55);       --faint: rgba(0, 0, 0, 0.04);       background: var(--bg); color: var(--fg); color-scheme: light; }

a { color: inherit; text-underline-offset: 3px; }
b { font-weight: 600; }
.muted { opacity: 0.38; }

.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: 0.045; mix-blend-mode: difference;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- scroll progress ---------- */
#progress { position: fixed; left: 0; top: 0; z-index: 100; width: 100%; height: 2px; background: var(--white); mix-blend-mode: difference; transform-origin: 0 50%; transform: scaleX(0); }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes grow-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    #progress { animation: grow-progress auto linear; animation-timeline: scroll(root); }
  }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 80;
  display: flex; align-items: center; gap: 32px;
  padding: 12px clamp(18px, 4vw, 48px);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand img, .footer img, .dl-icon, .step-icon, .mac-dock .me { filter: grayscale(1) contrast(1.1); }
.brand img { border-radius: 7px; }
.nav nav { display: flex; gap: 28px; margin-left: auto; }
.nav nav a { color: rgba(255, 255, 255, 0.6); font-size: 13px; text-decoration: none; transition: color 0.3s var(--ease); }
.nav nav a:hover { color: var(--white); }
@media (max-width: 760px) { .nav nav { display: none; } .nav .pill { margin-left: auto; } }

/* ---------- pills (buttons) ---------- */
.pill {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 30px; border-radius: 999px; font: 500 16px/1 var(--font); letter-spacing: -0.01em;
  text-decoration: none; overflow: hidden; isolation: isolate;
  transition: transform 0.5s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.5s var(--ease);
}
.pill span { position: relative; z-index: 1; }
.pill-sm { padding: 8px 16px; font-size: 13px; }
.pill-lg { padding: 20px 40px; font-size: 18px; }
.pill-light { background: var(--white); color: var(--black); }
.pill-dark { background: var(--black); color: var(--white); }
.pill-ghost { color: var(--white); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.pill-ghost:hover { box-shadow: inset 0 0 0 1px var(--white); }
.pill-light::before, .pill-dark::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit;
  background: radial-gradient(120px circle at var(--px, 50%) var(--py, 50%), rgba(127, 127, 127, 0.25), transparent 70%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.pill:hover::before { opacity: 1; }
.pill:active { transform: scale(0.97); }

/* ---------- hero ---------- */
.hero {
  position: relative; text-align: center;
  padding: clamp(80px, 12vh, 140px) clamp(18px, 5vw, 80px) 0;
  overflow: hidden;
}
.hero::after {   /* soft light from above */
  content: ""; position: absolute; left: 50%; top: -30%; width: 120vw; height: 80vh; translate: -50% 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.10), transparent);
}
.kicker { font-size: 14px; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.6); margin: 0 0 18px; }
.hero-title { font-size: clamp(56px, 10vw, 152px); line-height: 0.92; letter-spacing: -0.055em; font-weight: 700; margin: 0 0 30px; }
.hero-title .line { display: block; }
.hero-title .word { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .hero-title .word {
    animation: word-in 1.4s var(--ease) backwards;
    animation-delay: calc(var(--i, 0) * 110ms + 120ms);
  }
}
@keyframes word-in { from { opacity: 0; transform: translateY(0.35em); filter: blur(12px); } }
.lede { font-size: clamp(18px, 1.8vw, 23px); line-height: 1.45; color: rgba(255, 255, 255, 0.62); max-width: 680px; margin: 0 auto; letter-spacing: -0.015em; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }
.meta { font-size: 13px; color: rgba(255, 255, 255, 0.45); margin-top: 16px; }

/* ---------- stage: monochrome Mac + phone ---------- */
.stage { position: relative; height: min(620px, 68vw); max-width: 1180px; margin: 70px auto 0; perspective: 2000px; filter: grayscale(1); }
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes stage-rise { from { transform: translateY(80px) scale(0.94) rotateX(14deg); opacity: 0.3; } }
    .stage { animation: stage-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
  }
}
.mac { position: absolute; left: 3%; top: 4%; width: 74%; transform-style: preserve-3d; }
@media (prefers-reduced-motion: no-preference) { .mac { animation: float 9s var(--ease-io) infinite; } }
@keyframes float { 50% { translate: 0 -10px; } }
.mac-lid { background: #0b0b0b; border: 1.5px solid #3a3a3a; border-radius: 20px; padding: 11px; aspect-ratio: 16 / 10.4; box-shadow: 0 60px 120px -40px rgba(255, 255, 255, 0.12); }
.mac-screen { position: relative; height: 100%; border-radius: 9px; overflow: hidden; background: linear-gradient(170deg, #2b2b2b 0%, #555 55%, #8a8a8a 100%); }
.menubar { display: flex; gap: 6px; padding: 7px 10px; }
.menubar i { width: 14px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.7); }
.menubar .grow { flex: 1; }
.mac-window { position: absolute; left: 12%; top: 22%; width: 48%; height: 45%; border-radius: 10px; background: rgba(20, 20, 20, 0.75); box-shadow: inset 60px 0 rgba(255, 255, 255, 0.04); }
.mirror-window { position: absolute; right: 16%; top: 12%; width: 19%; height: 72%; transition: transform 0.6s var(--ease); }
.mini-phone { position: relative; height: 100%; border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, #e9e9e9, #9a9a9a); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); padding: 14px 8px 8px; }
.punch { position: absolute; top: 6px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: #111; z-index: 2; }
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.app-grid i { aspect-ratio: 1; border-radius: 26%; background: var(--c, #fff); }
@media (prefers-reduced-motion: no-preference) {
  .app-grid i { animation: pop 4s var(--ease) infinite; animation-delay: calc(var(--i) * 140ms); }
}
@keyframes pop { 8% { transform: scale(1.12); } 18% { transform: scale(1); } }
.mini-dock { position: absolute; bottom: 8px; left: 8px; right: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 5px; border-radius: 10px; background: rgba(255, 255, 255, 0.35); }
.mini-dock b { aspect-ratio: 1; border-radius: 26%; background: #fff; }
.mac-dock { position: absolute; bottom: 8px; left: 50%; translate: -50% 0; display: flex; gap: 6px; padding: 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.18); }
.mac-dock i { width: 22px; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, 0.22); }
.mac-dock .me { background: url(assets/icon.png?v=3) center / 130% no-repeat; }
.mac-base { height: 16px; margin: 0 -7%; border-radius: 0 0 18px 18px; background: linear-gradient(#9a9a9a, #4a4a4a); }
.phone { position: absolute; right: 3%; top: 16%; width: 19%; aspect-ratio: 9 / 19.5; border-radius: 34px; padding: 6px; background: #050505; border: 1.5px solid #444; box-shadow: 0 60px 100px -40px rgba(255, 255, 255, 0.15); }
@media (prefers-reduced-motion: no-preference) { .phone { animation: float 8s var(--ease-io) -3s infinite; } }
.phone-screen { position: relative; height: 100%; border-radius: 28px; overflow: hidden; text-align: center; background: linear-gradient(180deg, #3a3a3a 0%, #161616 70%); }
.lock-time { margin-top: 34%; font-size: clamp(22px, 3vw, 42px); font-weight: 600; letter-spacing: -0.04em; }
.lock-date { font-size: clamp(9px, 1vw, 12px); color: rgba(255, 255, 255, 0.6); }
.pulse-ring { position: absolute; left: 50%; bottom: 14%; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.8); }
@media (prefers-reduced-motion: no-preference) { .pulse-ring { animation: ring 2.6s var(--ease) infinite; } }
@keyframes ring { from { transform: scale(0.4); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }

.toast-stack { position: absolute; right: 25%; top: 0; width: 250px; display: grid; gap: 8px; text-align: left; filter: grayscale(1); }
.mac-toast {
  display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 16px; font-size: 12.5px; line-height: 1.3; color: var(--white);
  background: rgba(40, 40, 40, 0.72); border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.9s var(--ease) backwards, toast-out 0.7s var(--ease-io) 4.1s forwards;
}
.mac-toast img { width: 30px; height: 30px; border-radius: 8px; }
.mac-toast small { color: rgba(255, 255, 255, 0.55); }
@keyframes toast-in { from { opacity: 0; transform: translateX(60px) scale(0.96); filter: blur(6px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px) scale(0.97); filter: blur(4px); } }

/* ---------- statement ---------- */
.statement { padding: clamp(110px, 18vh, 200px) clamp(18px, 6vw, 100px); text-align: center; }
.big-quote { font-size: clamp(40px, 6.4vw, 96px); line-height: 1.02; letter-spacing: -0.05em; font-weight: 700; margin: 0 auto; max-width: 1100px; }

/* ---------- section scaffolding ---------- */
section { position: relative; }
.section-title { font-size: clamp(40px, 6vw, 88px); line-height: 1; letter-spacing: -0.05em; font-weight: 700; text-align: center; margin: 0 auto 18px; max-width: 1000px; }
.sub { text-align: center; color: var(--soft); font-size: clamp(17px, 1.6vw, 21px); margin: 0 auto 64px; max-width: 640px; }
.features, .clip, .demo, .download, .setup, .keys, .faq { padding: clamp(110px, 16vh, 180px) clamp(18px, 5vw, 80px); }
.num { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--soft); }

/* reveal: scroll-driven where supported; JS fallback adds .in */
@media (prefers-reduced-motion: no-preference) {
  .reveal.pending { opacity: 0; transform: translateY(40px); filter: blur(8px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); }
  .reveal.pending.in { opacity: 1; transform: none; filter: none; }
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-in { from { opacity: 0; transform: translateY(70px); filter: blur(10px); } }
    .reveal { animation: reveal-in linear backwards; animation-timeline: view(); animation-range: entry 0% entry 75%; }
  }
}

/* ---------- story ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 0 clamp(18px, 5vw, 80px) 60px; }
@media (max-width: 900px) { .story { grid-template-columns: 1fr; } .story-sticky { position: relative !important; height: auto !important; padding: 40px 0; } }
.story-sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; }
.story-phone {
  width: min(310px, 70vw); aspect-ratio: 9 / 19.5; border-radius: 48px; padding: 10px; background: #000;
  box-shadow: 0 0 0 1.5px #d0d0d0, 0 60px 120px -40px rgba(0, 0, 0, 0.45);
  transition: transform 1.2s var(--ease);
}
.story-phone[data-step="1"] { transform: rotateY(-10deg) rotateX(3deg) translateX(-8px); }
.story-phone[data-step="2"] { transform: rotateY(8deg) scale(1.02); }
.story-phone[data-step="3"] { transform: rotateZ(-2.5deg); }
.sp-screen { position: relative; height: 100%; border-radius: 39px; overflow: hidden; background: linear-gradient(180deg, #2c2c2c, #0d0d0d); filter: grayscale(1); }
.sp-layer { position: absolute; inset: 0; padding: 44px 22px 22px; opacity: 0; transform: scale(0.96); filter: blur(8px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); }
.story-phone[data-step="0"] .sp-mirror,
.story-phone[data-step="1"] .sp-control,
.story-phone[data-step="2"] .sp-sound,
.story-phone[data-step="3"] .sp-notify { opacity: 1; transform: none; filter: none; }
.app-grid.big { gap: 14px; }
.tap-dot { position: absolute; left: 30%; top: 30%; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); box-shadow: 0 0 0 9px rgba(255, 255, 255, 0.12); }
@media (prefers-reduced-motion: no-preference) { .story-phone[data-step="1"] .tap-dot { animation: tap 3s var(--ease-io) infinite; } }
@keyframes tap { 0% { translate: 0 0; scale: 1; } 25% { scale: 0.72; } 50% { translate: 80px 120px; scale: 1; } 80% { translate: -10px 260px; } 100% { translate: 0 0; } }
.eq { display: flex; gap: 7px; align-items: flex-end; height: 130px; justify-content: center; margin-top: 50%; }
.eq i { width: 11px; border-radius: 6px; background: var(--white); height: 30%; }
@media (prefers-reduced-motion: no-preference) {
  .eq i { animation: eq 1s var(--ease-io) infinite alternate; }
  .eq i:nth-child(2n) { animation-duration: 0.7s; } .eq i:nth-child(3n) { animation-duration: 1.3s; }
}
@keyframes eq { to { height: 100%; } }
.sp-sound p { text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 14px; }
.notif { margin-top: 30px; padding: 13px 15px; border-radius: 20px; font-size: 13px; line-height: 1.35; color: #fff; background: rgba(255, 255, 255, 0.13); backdrop-filter: blur(12px); }
.notif.n2 { margin-top: 10px; }
@media (prefers-reduced-motion: no-preference) {
  .story-phone[data-step="3"] .notif { animation: drop 1s var(--ease) backwards; }
  .story-phone[data-step="3"] .notif.n2 { animation-delay: 0.2s; }
}
@keyframes drop { from { transform: translateY(-50px); opacity: 0; filter: blur(6px); } }
.story-steps { display: grid; }
.story-step { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.18; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transform: translateY(16px); }
.story-step.active { opacity: 1; transform: none; }
.story-step h2 { font-size: clamp(52px, 7vw, 104px); margin: 8px 0 14px; letter-spacing: -0.055em; line-height: 0.95; }
.story-step p { color: var(--soft); font-size: 21px; line-height: 1.45; max-width: 460px; margin: 0; }

/* ---------- features grid ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; max-width: 1240px; margin: 0 auto; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.tile {
  position: relative; padding: 34px 30px 36px; background: var(--bg); min-height: 240px;
  transition: background 0.6s var(--ease);
}
.tile::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.6s var(--ease);
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.09), transparent 55%); }
.tile:hover::before { opacity: 1; }
.tile.span2 { grid-column: span 2; }
@media (max-width: 560px) { .tile.span2 { grid-column: auto; } }
.ico { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; }
.tile h3 { font-size: 22px; letter-spacing: -0.03em; margin: 22px 0 8px; font-weight: 600; }
.tile p { color: var(--soft); margin: 0; font-size: 16px; }
.waves { position: relative; height: 120px; margin-top: 26px; }
.waves i { position: absolute; left: 50%; bottom: 0; border: 1.5px solid var(--white); border-color: var(--white) transparent transparent; border-radius: 50%; translate: -50% 50%; opacity: 0.2; }
.waves i:nth-child(1) { width: 60px; height: 60px; } .waves i:nth-child(2) { width: 140px; height: 140px; } .waves i:nth-child(3) { width: 220px; height: 220px; }
@media (prefers-reduced-motion: no-preference) {
  .waves i { animation: wifi 2.4s var(--ease-io) infinite; }
  .waves i:nth-child(2) { animation-delay: 0.35s; } .waves i:nth-child(3) { animation-delay: 0.7s; }
}
@keyframes wifi { 40% { opacity: 1; } }
.rotor { width: 40px; height: 72px; margin: 24px auto 0; border-radius: 10px; border: 1.5px solid var(--white); }
@media (prefers-reduced-motion: no-preference) { .rotor { animation: rotor 3.6s var(--ease-io) infinite; } }
@keyframes rotor { 0%, 30% { rotate: 0deg; } 50%, 80% { rotate: -90deg; } 100% { rotate: 0deg; } }
.edge-pad { position: relative; height: 84px; margin-top: 22px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.edge-pad::before, .edge-pad::after { content: ""; position: absolute; top: 0; bottom: 0; width: 11%; background: rgba(255, 255, 255, 0.1); }
.edge-pad::before { left: 0; } .edge-pad::after { right: 0; }
.edge-pad .finger { position: absolute; right: 2%; bottom: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: 0 0 16px rgba(255, 255, 255, 0.7); }
@media (prefers-reduced-motion: no-preference) { .edge-pad .finger { animation: edge-slide 3.6s var(--ease-io) infinite; } }
@keyframes edge-slide { 0%, 10% { bottom: 10px; } 45%, 55% { bottom: 54px; } 90%, 100% { bottom: 10px; } }

/* ---------- clipboard scene ---------- */
.clip-stage { display: grid; grid-template-columns: 1.2fr 1fr 0.8fr; align-items: center; gap: 10px; max-width: 1100px; margin: 0 auto; }
@media (max-width: 860px) { .clip-stage { grid-template-columns: 1fr; justify-items: center; } .clip-path { display: none; } }
.clip-win { position: relative; padding: 18px 22px 28px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.25); }
.clip-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.clip-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d4d4d4; }
.clip-line { margin: 8px 0; font-size: 15px; }
.clip-line.dim { color: var(--soft); }
.sel { padding: 2px 5px; border-radius: 5px; transition: background 0.5s var(--ease), color 0.5s var(--ease); }
.sel.on { background: #000; color: #fff; }
.kbd-chip, .paste-chip { position: absolute; right: 16px; bottom: -15px; padding: 5px 11px; border-radius: 9px; font-size: 13px; font-weight: 600; background: #000; color: #fff; opacity: 0; transform: translateY(8px) scale(0.92); transition: 0.6s var(--ease); }
.kbd-chip.on, .paste-chip.on { opacity: 1; transform: none; }
.clip-path { position: relative; height: 140px; }
.clip-path svg { width: 100%; height: 100%; overflow: visible; }
.clip-path path { fill: none; stroke: rgba(0, 0, 0, 0.25); stroke-width: 1.5; stroke-dasharray: 2 8; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) { .clip-path path { animation: dash 1.4s linear infinite; } }
@keyframes dash { to { stroke-dashoffset: -20; } }
.clip-pill { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12px; font-weight: 600; padding: 7px 13px; border-radius: 999px; background: #000; color: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); opacity: 0;
  offset-path: path("M10 100 C 90 -20, 210 -20, 290 100"); offset-rotate: 0deg; offset-distance: 0%; }
.clip-pill.fly { opacity: 1; transition: offset-distance 1.3s var(--ease-io), opacity 0.4s; offset-distance: 100%; }
.clip-pill.back { offset-distance: 100%; }
.clip-pill.back.fly { offset-distance: 0%; }
.clip-phone { width: 240px; height: 420px; border-radius: 40px; padding: 8px; background: #000; box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.5); }
.clip-chat { position: relative; height: 100%; border-radius: 32px; padding: 42px 14px 14px; display: flex; flex-direction: column; gap: 10px; background: #111; color: #fff; overflow: hidden; }
.bubble { max-width: 85%; padding: 9px 13px; border-radius: 18px; font-size: 13px; line-height: 1.35; }
.bubble.in { background: #2a2a2a; align-self: flex-start; }
.bubble.out { background: #fff; color: #000; align-self: flex-end; opacity: 0; transform: translateY(10px) scale(0.96); transition: 0.7s var(--ease); }
.bubble.out.on { opacity: 1; transform: none; }
.clip-input { position: absolute; left: 12px; right: 12px; bottom: 14px; min-height: 38px; padding: 10px 12px; border-radius: 19px; background: #222; font-size: 12px; white-space: nowrap; overflow: hidden; }
.clip-input .paste-chip { right: 8px; bottom: 6px; background: #fff; color: #000; }
.caret { display: inline-block; width: 2px; height: 14px; vertical-align: middle; background: #fff; }
@media (prefers-reduced-motion: no-preference) { .caret { animation: blink 1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- demo ---------- */
.demo-area { display: flex; gap: 70px; align-items: center; justify-content: center; flex-wrap: wrap; min-height: 660px; }
.demo-window { position: relative; padding-top: 42px; }
.demo-toolbar {
  position: absolute; top: 0; left: 0; right: 0; height: 34px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px; border-radius: 13px; background: rgba(60, 60, 60, 0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  opacity: 0; transform: translateY(6px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.demo-window:hover .demo-toolbar, .demo-window:focus-within .demo-toolbar { opacity: 1; transform: none; }
.lights { display: flex; gap: 7px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.tools { display: flex; gap: 2px; }
.tools button { display: grid; place-items: center; width: 30px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; transition: background 0.3s var(--ease); }
.tools button:hover { background: rgba(255, 255, 255, 0.14); }
.tools svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.demo-phone { width: min(280px, 70vw); height: calc(min(280px, 70vw) * 2.143); border-radius: 42px; padding: 5px; background: #000; box-shadow: 0 0 0 1px #3a3a3a, 0 60px 120px -40px rgba(255, 255, 255, 0.12); transition: width 0.7s var(--ease), height 0.7s var(--ease); }
.demo-window.landscape .demo-phone { width: min(600px, 92vw); height: calc(min(600px, 92vw) * 0.4667); }
.demo-screen { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: linear-gradient(180deg, #ededed, #9d9d9d); padding: 46px 22px 22px; filter: grayscale(1); view-transition-name: demo-screen; }
.demo-window.landscape .demo-screen { padding: 22px 40px; }
.demo-home { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.demo-window.landscape .demo-home { grid-template-columns: repeat(8, 1fr); }
.demo-home button { aspect-ratio: 1; border: 0; border-radius: 26%; cursor: pointer; background: var(--c); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18); transition: transform 0.4s var(--ease); }
.demo-home button:hover { transform: scale(1.06); }
.demo-home button:active { transform: scale(0.92); }
.demo-app { position: absolute; inset: 0; background: #fff; color: #111; padding: 46px 18px 18px; border-radius: 37px; }
.demo-app .app-bar { height: 42px; border-radius: 13px; background: #111; margin-bottom: 14px; display: flex; align-items: center; padding: 0 14px; font-weight: 600; color: #fff; }
.demo-app .app-body i { display: block; height: 14px; margin: 11px 0; border-radius: 7px; background: #ececec; }
.demo-app .app-body i:nth-child(3n) { width: 60%; }
.gesture-bar { position: absolute; bottom: 8px; left: 50%; width: 110px; height: 5px; margin-left: -55px; border-radius: 3px; background: rgba(0, 0, 0, 0.45); z-index: 3; }
::view-transition-group(demo-screen) { animation-duration: 0.6s; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
@media (prefers-reduced-motion: no-preference) {
  .demo-window.spin .demo-phone { animation: spin-in 0.7s var(--ease); }
  .demo-window.spin.landscape .demo-phone { animation-name: spin-in-l; }
}
@keyframes spin-in { from { rotate: 90deg; } }
@keyframes spin-in-l { from { rotate: -90deg; } }
.demo-real-phone { display: grid; gap: 12px; justify-items: center; color: rgba(255, 255, 255, 0.5); font-size: 13px; }
.rp-screen { width: 110px; height: 230px; border-radius: 24px; border: 6px solid #111; box-shadow: 0 0 0 1px #3a3a3a; background: #000; transition: background 0.8s var(--ease), box-shadow 0.8s var(--ease); }
.demo-real-phone.on .rp-screen { background: linear-gradient(180deg, #ededed, #9d9d9d); box-shadow: 0 0 0 1px #3a3a3a, 0 0 50px rgba(255, 255, 255, 0.25); }

/* ---------- download ---------- */
.download { text-align: center; }
.dl-icon { border-radius: 32px; margin-bottom: 30px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.35); }
@media (prefers-reduced-motion: no-preference) { .dl-icon { animation: float 7s var(--ease-io) infinite; } }
.install { list-style: none; padding: 0; margin: 64px auto 26px; max-width: 760px; text-align: left; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.install li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 22px 24px; background: var(--bg); color: var(--soft); }
.install li span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #000; color: #fff; font-size: 13px; font-weight: 600; }
.install b { color: var(--fg); }
.fine { font-size: 13px; color: var(--soft); }
.download.is-downloading .pill-dark span::after { content: " ✓"; }

/* ---------- setup ---------- */
.steps { list-style: none; padding: 0; margin: 0 auto; max-width: 1120px; display: grid; gap: 22px; }
.step { position: relative; display: grid; grid-template-columns: 320px 1fr; gap: 44px; align-items: center; padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--faint); transition: border-color 0.6s var(--ease), background 0.6s var(--ease); }
.step:hover { border-color: rgba(255, 255, 255, 0.3); }
@media (max-width: 820px) { .step { grid-template-columns: 1fr; } }
.step-copy h3 { font-size: 30px; letter-spacing: -0.035em; margin: 10px 0; }
.step-copy p { color: var(--soft); }
.step-art { display: grid; place-items: center; min-height: 230px; border-radius: 20px; background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.10), transparent 70%), #0a0a0a; overflow: hidden; }
.step-icon { border-radius: 26px; }
@media (prefers-reduced-motion: no-preference) { .step-icon { animation: float 6s var(--ease-io) infinite; } }
.mini-settings { width: 230px; border-radius: 18px; background: #161616; padding: 10px; font-size: 13px; position: relative; }
.mini-settings .row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; color: #ddd; transition: background 0.2s; }
.mini-settings .row + .row { margin-top: 4px; }
.mini-settings .hl { background: rgba(255, 255, 255, 0.06); }
.mini-settings .hl.tapped { background: rgba(255, 255, 255, 0.22); }
.toastline { position: absolute; left: 10px; right: 10px; bottom: -48px; padding: 9px 12px; border-radius: 12px; background: #fff; color: #000; text-align: center; font-weight: 500; opacity: 0; transform: translateY(10px); transition: 0.6s var(--ease); }
.toastline.show { opacity: 1; transform: none; }
.switch { position: relative; width: 40px; height: 24px; border-radius: 12px; background: #3a3a3a; transition: background 0.5s var(--ease); flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: translate 0.5s var(--ease); }
.switch.on { background: #fff; }
.switch.on::after { translate: 16px 0; background: #000; }
pre { background: #0a0a0a; border: 1px solid var(--line); border-radius: 14px; padding: 16px; overflow-x: auto; font-size: 13.5px; }
code { font-family: "SF Mono", ui-monospace, Menlo, monospace; color: #e8e8e8; }
.dev summary { cursor: pointer; font-size: 14px; color: var(--soft); padding: 6px 0; list-style: none; }
.dev summary:hover { color: var(--fg); }
.connect-art { position: relative; width: 240px; height: 200px; }
.cable { position: absolute; left: 10px; top: 92px; width: 100px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, #fff, #777); }
.cable::after { content: ""; position: absolute; right: -14px; top: -6px; width: 17px; height: 17px; border-radius: 4px; background: #ddd; }
@media (prefers-reduced-motion: no-preference) { .cable { animation: plug 3s var(--ease-io) infinite; } }
@keyframes plug { 50% { translate: 20px 0; } }
.qr-art { position: absolute; right: 10px; top: 40px; width: 110px; height: 110px; border-radius: 12px; border: 8px solid #fff; background: conic-gradient(from 90deg at 18% 18%, #000 25%, transparent 0) 0 0 / 22px 22px, #fff; }
.qr-art::after { content: ""; position: absolute; left: -8px; right: -8px; height: 2px; background: #000; box-shadow: 0 0 10px rgba(0, 0, 0, 0.6); top: 0; }
@media (prefers-reduced-motion: no-preference) { .qr-art::after { animation: scan 2.4s var(--ease-io) infinite alternate; } }
@keyframes scan { to { top: 100%; } }

/* ---------- keys ---------- */
.keygrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; max-width: 1000px; margin: 0 auto; }
@media (max-width: 800px) { .keygrid { grid-template-columns: repeat(3, 1fr); } }
.key { display: grid; justify-items: center; gap: 12px; color: var(--soft); font-size: 13px; }
.key kbd {
  display: grid; place-items: center; width: 82px; height: 66px; border-radius: 14px; font: 500 17px/1 var(--font); color: #000;
  background: linear-gradient(#fff, #f2f2f2); border: 1px solid #d6d6d6;
  box-shadow: 0 5px 0 #cfcfcf, 0 12px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.key:hover kbd, .key.pressed kbd { transform: translateY(4px); box-shadow: 0 1px 0 #cfcfcf; background: #000; color: #fff; }

/* ---------- faq ---------- */
.faq-list { max-width: 860px; margin: 0 auto; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; padding: 26px 0; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; rotate: 45deg; translate: 0 -4px; transition: rotate 0.5s var(--ease), translate 0.5s var(--ease); }
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
details p { color: var(--soft); margin: 0 0 26px; max-width: 720px; }
@media (prefers-reduced-motion: no-preference) { details[open] p { animation: reveal-p 0.7s var(--ease); } }
@keyframes reveal-p { from { opacity: 0; translate: 0 -8px; filter: blur(4px); } }

/* ---------- footer ---------- */
.footer { text-align: center; padding: 90px 20px 60px; border-top: 1px solid var(--line); color: var(--soft); }
.footer img { border-radius: 10px; }
.footer a { color: var(--fg); }

/* ---------- download tabs + terminal ---------- */
.dl-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); margin-bottom: 30px; }
.dl-tab { border: 0; background: transparent; color: var(--soft); font: 500 14px/1 var(--font); padding: 9px 20px; border-radius: 999px; cursor: pointer; transition: background 0.4s var(--ease), color 0.4s var(--ease); }
.dl-tab.active { background: var(--fg); color: var(--bg); }
.dl-panel { animation: fade-panel 0.5s var(--ease); }
@keyframes fade-panel { from { opacity: 0; transform: translateY(10px); } }
.term-intro { max-width: 640px; margin: 0 auto 22px; color: var(--soft); }
.term { max-width: 760px; margin: 0 auto; text-align: left; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #0a0a0a; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #161616; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a3a; }
.term-bar span { color: #888; font-size: 12px; margin-left: 8px; }
.term-copy { margin-left: auto; border: 1px solid #333; background: transparent; color: #ddd; font-size: 12px; padding: 5px 14px; border-radius: 7px; cursor: pointer; transition: background 0.3s var(--ease); }
.term-copy:hover { background: #222; }
.term-copy.done { background: #fff; color: #000; border-color: #fff; }
.term pre { margin: 0; border: 0; border-radius: 0; background: #0a0a0a; padding: 18px; }
.term code { color: #e8e8e8; font-size: 13px; line-height: 1.7; white-space: pre; }

.term code { white-space: pre-wrap; word-break: break-all; }
.term-steps { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; max-width: 760px; margin: 22px auto 6px; padding: 0; color: var(--soft); font-size: 14px; }
.term-steps b { color: var(--fg); font-weight: 600; }

/* ---------- 2.2: hero extras, what's new ---------- */
.kicker-new { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 8px; border: 1px solid rgba(255,255,255,0.16); border-radius: 999px; color: rgba(255,255,255,0.78); text-decoration: none; text-transform: none; letter-spacing: -0.01em; font-size: 14px; transition: border-color 0.4s var(--ease), color 0.4s var(--ease); }
.kicker-new:hover { border-color: rgba(255,255,255,0.5); color: #fff; }
.kicker-new b { background: #fff; color: #000; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.kicker-new span { transition: transform 0.4s var(--ease); }
.kicker-new:hover span { transform: translateX(4px); }

.one-liner { display: inline-flex; align-items: center; gap: 12px; margin: 26px auto 0; padding: 11px 14px 11px 18px; max-width: 100%; border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.72); font: 13px/1.2 ui-monospace, "SF Mono", Menlo, monospace; cursor: pointer; transition: border-color 0.4s var(--ease), background 0.4s var(--ease); }
.one-liner:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.07); }
.one-liner code { font: inherit; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.one-liner .prompt { color: rgba(255,255,255,0.35); }
.one-liner-hint { font: 500 12px/1 var(--font); padding: 6px 11px; border-radius: 7px; background: rgba(255,255,255,0.1); color: #fff; transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.one-liner.done .one-liner-hint { background: #fff; color: #000; }

.whatsnew { padding: clamp(90px, 12vw, 170px) 24px; text-align: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); margin: 0 0 18px; }
.journey { display: flex; align-items: flex-start; justify-content: center; max-width: 760px; margin: 54px auto 70px; }
.journey .stop { display: grid; justify-items: center; gap: 14px; width: 110px; flex: none; font-size: 13px; color: var(--soft); }
.journey .stop i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--fg); background: var(--bg); }
.journey .stop:first-child i, .journey .stop:last-child i { background: var(--fg); }
.journey .track { flex: 1; height: 2px; margin-top: 6px; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
.journey .track b { position: absolute; inset: 0; background: var(--fg); transform: translateX(-101%); animation: journey 5s var(--ease) infinite; }
.journey .track:nth-of-type(4) b { animation-delay: 1.4s; }
@keyframes journey { 0% { transform: translateX(-101%); } 35%, 70% { transform: translateX(0); } 100% { transform: translateX(101%); } }
.new-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; max-width: 1120px; margin: 0 auto; text-align: left; }
.new-cols h3 { font-size: 24px; letter-spacing: -0.03em; font-weight: 600; margin: 14px 0 10px; }
.new-cols p { color: var(--soft); margin: 0; font-size: 16px; line-height: 1.55; }
.new-cols .num { font-size: 13px; color: var(--soft); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .new-cols { grid-template-columns: 1fr; gap: 36px; } .journey .stop { width: 84px; } }
@media (prefers-reduced-motion: reduce) { .journey .track b { animation: none; transform: none; } }

.grid { grid-auto-flow: dense; }
