:root {
  --accent: #7c5cff;
  --accent-2: #a78bfa;
  --accent-ink: #ffffff;
  --bg: #f7f6fb;
  --bg-glow: rgba(124, 92, 255, 0.16);
  --surface: #ffffff;
  --surface-2: #f0eef8;
  --border: rgba(30, 20, 70, 0.10);
  --text: #16131f;
  --muted: #5d5872;
  --screen: #0d0c12;
  --shadow: 0 12px 40px rgba(40, 20, 110, 0.12);
  --radius: 18px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #8b6dff;
    --accent-2: #b9a4ff;
    --bg: #0b0a10;
    --bg-glow: rgba(124, 92, 255, 0.22);
    --surface: #15131d;
    --surface-2: #1c1927;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f2f0f8;
    --muted: #a39fb6;
    --screen: #000000;
    --shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 50% -120px, var(--bg-glow), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
b { font-weight: 600; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  /* full-bleed bar while the content stays centered */
  box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--bg) 72%, transparent);
  clip-path: inset(0 -100vmax);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links > a { color: var(--muted); }
.nav-links > a:hover { color: var(--text); text-decoration: none; }

.lang {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
}
.lang button {
  font: inherit; font-size: 13px; font-weight: 600;
  border: 0; background: transparent; color: var(--muted);
  padding: 3px 10px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- Mock notch ---------- */
.notch {
  position: fixed; top: 0; left: 50%; z-index: 30;
  transform: translateX(-50%);
  width: 196px; height: 32px;
  background: #000; color: #fff;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
  cursor: default;
  transition: width .38s cubic-bezier(.3,1.3,.5,1), height .38s cubic-bezier(.3,1.3,.5,1), border-radius .38s;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04);
}
.notch-closed {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  transition: opacity .2s;
}
.notch-art {
  width: 18px; height: 18px; border-radius: 5px;
  background: linear-gradient(135deg, #7c5cff, #e46cff);
}
.notch-bars { display: flex; align-items: center; gap: 2px; height: 14px; }
.notch-bars i, .notch-viz i {
  display: block; width: 3px; border-radius: 2px;
  background: linear-gradient(#e2d8ff, #8b6dff);
  animation: bar 1s ease-in-out infinite alternate;
}
.notch-bars i:nth-child(1) { animation-delay: -.2s; }
.notch-bars i:nth-child(2) { animation-delay: -.6s; }
.notch-bars i:nth-child(3) { animation-delay: -.1s; }
.notch-bars i:nth-child(4) { animation-delay: -.45s; }
@keyframes bar { from { height: 3px; } to { height: 14px; } }

.notch-open {
  position: absolute; inset: 0;
  padding: 38px 22px 14px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.notch-player { display: flex; align-items: center; gap: 14px; }
.notch-cover {
  flex: none; width: 54px; height: 54px; border-radius: 12px;
  background: url("assets/icon-256.png") center / cover, linear-gradient(135deg, #7c5cff, #e46cff);
}
.notch-meta { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; }
.notch-meta b { display: block; font-size: 15px; }
.notch-meta span { color: #b7b2c9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.notch-progress { margin-top: 8px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.notch-progress span { display: block; height: 100%; width: 40%; background: #fff; animation: progress 12s linear infinite; }
@keyframes progress { from { width: 8%; } to { width: 96%; } }
.notch-viz { display: flex; align-items: flex-end; gap: 3px; height: 30px; }
.notch-viz i { width: 4px; animation-name: bar2; }
.notch-viz i:nth-child(3n)   { animation-duration: .7s; }
.notch-viz i:nth-child(3n+1) { animation-duration: 1.1s; animation-delay: -.3s; }
.notch-viz i:nth-child(3n+2) { animation-duration: .9s;  animation-delay: -.7s; }
@keyframes bar2 { from { height: 4px; } to { height: 30px; } }
.notch-lyric { margin: 12px 0 0; font-size: 13px; color: #d9d2ff; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.notch:hover, .notch.is-open {
  width: min(440px, calc(100vw - 24px)); height: 150px;
  border-radius: 0 0 26px 26px;
}
.notch:hover .notch-closed, .notch.is-open .notch-closed { opacity: 0; }
.notch:hover .notch-open, .notch.is-open .notch-open { opacity: 1; transition-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
  .notch, .notch * { animation: none !important; transition: none !important; }
}

/* ---------- Hero ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.hero { text-align: center; padding: 0 0 40px; }

/* Dark stage behind the top of the hero, in both themes.
   Background art generated with Higgsfield (GPT Image 2.6). */
.hero-top {
  position: relative; z-index: 0;
  padding-top: 56px;
  --text: #f2f0f8;
  --muted: #b3aec6;
  --accent: #b9a4ff;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.hero-top::before {
  --w: max(100vw, 1100px);              /* rendered width of the art */
  --notch: 128px;                        /* where the glowing notch line sits */
  --art-bottom: calc(var(--notch) + 0.2143 * var(--w));
  content: "";
  position: absolute; z-index: -1;
  top: -80px; bottom: -70px;
  left: 50%; width: 100vw; margin-left: -50vw;
  background:
    linear-gradient(to bottom, transparent calc(100% - 260px), color-mix(in srgb, var(--bg) 75%, transparent) calc(100% - 110px), var(--bg) calc(100% - 10px)),
    linear-gradient(to bottom, transparent calc(var(--art-bottom) - 160px), #010008 var(--art-bottom)),
    url("assets/hero-bg.jpg") 50% calc(var(--notch) - 0.2143 * var(--w)) / var(--w) auto no-repeat,
    #010008;
}
@media (max-width: 760px) {
  .hero-top::before { background-image:
    linear-gradient(to bottom, transparent calc(100% - 260px), color-mix(in srgb, var(--bg) 75%, transparent) calc(100% - 110px), var(--bg) calc(100% - 10px)),
    linear-gradient(to bottom, transparent calc(var(--art-bottom) - 160px), #010008 var(--art-bottom)),
    url("assets/hero-bg-small.jpg"); }
}
.hero-icon {
  width: 144px; height: 144px; margin: 0 auto 18px;
  filter: drop-shadow(0 18px 40px rgba(124, 92, 255, .35));
}
.hero h1 { font-size: clamp(44px, 8vw, 72px); line-height: 1; margin: 0 0 14px; letter-spacing: -0.03em; }
.tagline {
  font-size: clamp(21px, 3.4vw, 30px); font-weight: 600; line-height: 1.25;
  margin: 0 auto 14px; max-width: 18em; letter-spacing: -0.01em;
}
.lede { color: var(--muted); max-width: 36em; margin: 0 auto 30px; }

.cta { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 17px;
  padding: 14px 26px; border-radius: 14px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  color: var(--accent-ink);
  background: linear-gradient(180deg, #8f74ff, #6b48ff);
  box-shadow: 0 10px 28px rgba(124, 92, 255, .38), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(124, 92, 255, .48), inset 0 1px 0 rgba(255,255,255,.25); }
.meta { margin: 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
.version {
  font-weight: 600; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 761px) { .version::after { content: "·"; margin-left: 10px; color: var(--muted); font-weight: 400; } }

/* ---------- Command box ---------- */
.cmd {
  display: flex; align-items: center; gap: 10px;
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 8px 8px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  font-family: var(--mono); font-size: 14.5px;
  text-align: left;
}
.hero .cmd { width: fit-content; }
.cmd .prompt { color: var(--accent); user-select: none; }
.cmd code { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 761px) { .hero .cmd code { white-space: nowrap; } }
.copy {
  flex: none;
  font: 600 13px var(--font);
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; cursor: pointer;
}
.copy:hover { border-color: var(--accent); }
.copy.is-done { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ---------- Screens (GIF frames) ---------- */
.screen {
  margin: 0;
  background: var(--screen);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
}
.screen img, .screen video { display: block; width: 100%; height: auto; border-radius: 10px; background: #000; }
/* Hero demo inside a generated MacBook frame. Positions are fractions of the
   frame image (2200x622): screen top 23.4%, open-notch panel 48.3% wide. */
.mock { margin: 36px auto 0; max-width: 1040px; overflow: hidden; }
.mock-stage {
  position: relative;
  --fade-y: linear-gradient(to bottom, transparent, #000 10%, #000 74%, transparent 94%);
  --fade-x: linear-gradient(to right, transparent, #000 2.4%, #000 97.6%, transparent);
  -webkit-mask-image: var(--fade-y), var(--fade-x);
  -webkit-mask-composite: source-in;
          mask-image: var(--fade-y), var(--fade-x);
          mask-composite: intersect;
}
.mock-frame { width: 100%; height: auto; display: block; }
.mock-screen {
  position: absolute; left: 25.87%; top: 23.42%; width: 48.26%; height: auto;
  border-radius: 0 0 4% 4% / 0 0 12.8% 12.8%;
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.screen-strip { padding: 18px 14px; }
.screen-strip img, .screen-strip video { border-radius: 4px; }

/* ---------- Features ---------- */
.section-title { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.02em; text-align: center; margin: 0 0 12px; }
.section-sub { text-align: center; color: var(--muted); max-width: 36em; margin: 0 auto 36px; }

.features { padding: 64px 0 24px; }
.features .section-title { margin-bottom: 48px; }
.feature { display: grid; gap: 22px; margin-bottom: 72px; }
.feature-text { max-width: 40em; }
.feature h3 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2; margin: 6px 0 10px; letter-spacing: -0.015em; }
.feature p { margin: 0; color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.media-pair { display: grid; grid-template-columns: 45fr 55fr; gap: 16px; align-items: start; }

@media (min-width: 860px) {
  .feature-split { grid-template-columns: 1fr 1.15fr; align-items: center; gap: 40px; }
}

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 36px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { margin: 12px 0 6px; font-size: 19px; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card-icon {
  width: 40px; height: 40px; padding: 8px; border-radius: 11px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.also { text-align: center; color: var(--muted); max-width: 40em; margin: 0 auto; font-size: 15.5px; }

/* ---------- Install ---------- */
.install { padding: 64px 0 24px; }
.install-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; margin-bottom: 16px; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  min-width: 0;
}
.panel h3 { margin: 0 0 14px; font-size: 21px; }
.panel p { color: var(--muted); font-size: 15.5px; margin: 14px 0 0; }
.panel .small { font-size: 14.5px; margin: 18px 0 10px; }
.badge {
  display: inline-block; margin-bottom: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 3px 10px; border-radius: 999px;
}
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li {
  counter-increment: s; position: relative;
  padding-left: 40px; margin-bottom: 14px; font-size: 15.5px;
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  color: var(--accent-ink); background: var(--accent);
}
.perms dl { margin: 0; display: grid; gap: 0; }
.perms dl > div { display: grid; grid-template-columns: 230px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.perms dt { font-weight: 600; }
.perms dd { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- What's new ---------- */
.news { padding: 64px 0 8px; }
.news-panel { max-width: 760px; margin: 0 auto; }
.news-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; }
.news-head h3 { margin: 0; }
.news-date { color: var(--muted); font-size: 15px; }
.news-link { margin-left: auto; font-size: 15px; font-weight: 600; }
.news-list { margin: 0; padding-left: 20px; }
.news-list li { margin-bottom: 8px; font-size: 15.5px; }
.news-list li::marker { color: var(--accent); }
.news-panel .news-note { margin: 10px 0 0; font-size: 13.5px; }
.news-earlier-wrap { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.news-earlier-wrap h4 { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.news-earlier { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.news-earlier li {
  display: inline-flex; gap: 8px; align-items: baseline;
  padding: 5px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 14px;
}
.news-earlier a { font-weight: 600; font-variant-numeric: tabular-nums; }
.news-earlier span { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { padding: 48px 0 24px; }
.faq-list { max-width: 760px; margin: 28px auto 0; display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 0 20px;
}
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  font-size: 22px; font-weight: 400; line-height: 1; color: var(--accent);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.faq details p { margin: 0 0 18px; color: var(--muted); font-size: 15.5px; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw); margin: 40px auto 0;
  padding: 32px 20px calc(48px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  text-align: center; color: var(--muted); font-size: 14.5px;
}
.footer p { margin: 0 auto 12px; max-width: 40em; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { padding: 10px 16px; }
  .nav-links { gap: 14px; }
  .nav-links > a { display: none; }
  .notch { width: 120px; height: 28px; }
  .notch-closed { padding: 0 10px; }
  .notch-art { width: 15px; height: 15px; border-radius: 4px; }
  /* Wide menu-bar strips: crop to the middle (the notch) at a readable size */
  .screen-strip img, .screen-strip video { height: 40px; width: 100%; object-fit: cover; object-position: 50% 50%; }
  .screen-strip .crop-left { object-position: 28% 50%; }
  main { padding: 0 16px; }
  .hero-top { padding-top: 40px; }
  .hero-icon { width: 112px; height: 112px; }
  .hero .cmd { width: 100%; }
  .cmd { font-size: 13px; }
  .media-pair, .cards, .install-grid { grid-template-columns: 1fr; }
  .perms dl > div { grid-template-columns: 1fr; gap: 4px; }
  .feature { margin-bottom: 56px; }
  .panel { padding: 20px; }
  .screen-strip { padding: 12px 8px; }
  /* Zoom into the middle of the frame so the recording stays readable */
  .mock { margin-top: 28px; margin-left: -16px; margin-right: -16px; }
  .mock-stage { width: 170%; margin-left: -35%; }
}
