/* BrowserBro product page. Plain CSS, no framework, no web fonts. */

/* ───────────── Tokens ───────────── */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* Accent: the app icon's cyan → blue → violet arrow. */
  --a1: oklch(76% 0.14 222);
  --a2: oklch(62% 0.2 255);
  --a3: oklch(58% 0.22 285);
  --accent: oklch(52% 0.2 258);          /* text-safe accent on light */
  --grad: linear-gradient(100deg, var(--a1), var(--a2) 55%, var(--a3));

  --bg: oklch(97.5% 0.004 260);
  --ink: oklch(21% 0.01 265);
  --muted: oklch(42% 0.012 265);
  --line: oklch(21% 0.01 265 / 0.1);

  --glass-bg: oklch(100% 0 0 / 0.55);
  --glass-deep: oklch(100% 0 0 / 0.42);
  --glass-border: oklch(100% 0 0 / 0.65);
  --spec: oklch(100% 0 0 / 0.9);
  --shadow: oklch(25% 0.03 265 / 0.12);
  --tile: oklch(100% 0 0 / 0.5);
  --cap-bg: linear-gradient(oklch(100% 0 0), oklch(95% 0.004 260));
  --cap-edge: oklch(80% 0.006 260);

  --mesh-1: oklch(85% 0.11 222 / 0.75);
  --mesh-2: oklch(80% 0.13 270 / 0.55);
  --mesh-3: oklch(90% 0.08 180 / 0.6);

  --radius: 28px;
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: oklch(78% 0.13 230);
    --bg: oklch(14% 0.012 270);
    --ink: oklch(96% 0.004 260);
    --muted: oklch(76% 0.01 260);
    --line: oklch(100% 0 0 / 0.1);
    --glass-bg: oklch(28% 0.015 268 / 0.5);
    --glass-deep: oklch(26% 0.02 268 / 0.38);
    --glass-border: oklch(100% 0 0 / 0.14);
    --spec: oklch(100% 0 0 / 0.28);
    --shadow: oklch(0% 0 0 / 0.45);
    --tile: oklch(100% 0 0 / 0.07);
    --cap-bg: linear-gradient(oklch(34% 0.01 265), oklch(27% 0.01 265));
    --cap-edge: oklch(18% 0.01 265);
    --mesh-1: oklch(45% 0.13 230 / 0.55);
    --mesh-2: oklch(40% 0.17 285 / 0.5);
    --mesh-3: oklch(42% 0.09 190 / 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: oklch(78% 0.13 230);
  --bg: oklch(14% 0.012 270);
  --ink: oklch(96% 0.004 260);
  --muted: oklch(76% 0.01 260);
  --line: oklch(100% 0 0 / 0.1);
  --glass-bg: oklch(28% 0.015 268 / 0.5);
  --glass-deep: oklch(26% 0.02 268 / 0.38);
  --glass-border: oklch(100% 0 0 / 0.14);
  --spec: oklch(100% 0 0 / 0.28);
  --shadow: oklch(0% 0 0 / 0.45);
  --tile: oklch(100% 0 0 / 0.07);
  --cap-bg: linear-gradient(oklch(34% 0.01 265), oklch(27% 0.01 265));
  --cap-edge: oklch(18% 0.01 265);
  --mesh-1: oklch(45% 0.13 230 / 0.55);
  --mesh-2: oklch(40% 0.17 285 / 0.5);
  --mesh-3: oklch(42% 0.09 190 / 0.35);
  color-scheme: dark;
}

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 3px solid var(--a2); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 12px; }

kbd {
  font-family: var(--font);
  font-size: .82em;
  font-weight: 600;
  padding: .1em .45em;
  border-radius: 6px;
  background: var(--cap-bg);
  box-shadow: 0 1px 0 var(--cap-edge), inset 0 0 0 1px var(--line);
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ───────────── Background mesh ───────────── */
.mesh { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}
.blob-1 { background: radial-gradient(circle, var(--mesh-1), transparent 65%); left: -18vmax; top: -22vmax; transform: translateY(calc(var(--py, 0) * -0.15px)); }
.blob-2 { background: radial-gradient(circle, var(--mesh-2), transparent 65%); right: -22vmax; top: 8vh; transform: translateY(calc(var(--py, 0) * -0.08px)); }
.blob-3 { background: radial-gradient(circle, var(--mesh-3), transparent 65%); left: 20vw; top: 60vh; transform: translateY(calc(var(--py, 0) * -0.04px)); }

/* ───────────── Liquid Glass ───────────── */
.glass, .glass-deep, .nav {
  position: relative;
  border-radius: var(--radius);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
    inset 0 1px 0 var(--spec),
    inset 0 0 0 1px var(--glass-border),
    0 1px 2px var(--shadow),
    0 18px 50px -12px var(--shadow);
}
.glass-deep { background: var(--glass-deep); -webkit-backdrop-filter: blur(34px) saturate(200%); backdrop-filter: blur(34px) saturate(200%); }
/* Specular rim: a bright edge top-left, a softer one bottom-right. */
.glass::before, .glass-deep::before, .nav::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--spec), transparent 30%, transparent 70%, color-mix(in oklch, var(--spec) 55%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* ───────────── Nav ───────────── */
.nav-wrap { position: sticky; top: 0; z-index: 50; padding: 12px 12px 0; }
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.nav-links { display: none; list-style: none; margin: 0 auto; padding: 0; gap: 2px; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--ink); background: var(--tile); }
.theme-toggle {
  margin-left: auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  color: var(--ink);
  background: var(--tile);
  cursor: pointer;
}
.theme-toggle svg { width: 20px; height: 20px; display: none; }
.theme-toggle[data-mode="auto"] .ic-auto,
.theme-toggle[data-mode="light"] .ic-light,
.theme-toggle[data-mode="dark"] .ic-dark { display: block; }
.theme-toggle:not([data-mode]) .ic-auto { display: block; }
.icon-link {
  margin-left: auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--tile);
}
.icon-link svg { width: 20px; height: 20px; }
.icon-link + .theme-toggle { margin-left: 0; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .theme-toggle, .icon-link { margin-left: 0; }
}
.foot-gh { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; }
.foot-gh:hover { color: var(--ink); }
.foot-gh svg { width: 20px; height: 20px; }

/* ───────────── Buttons ───────────── */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600; font-size: 16px;
  text-decoration: none;
  transform: translate(var(--mx), var(--my));
  transition: transform .5s var(--spring), box-shadow .3s, filter .3s;
}
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-primary {
  color: oklch(99% 0 0);
  background: linear-gradient(180deg, oklch(100% 0 0 / 0.22), transparent 50%), linear-gradient(100deg, oklch(55% 0.17 230), oklch(50% 0.21 260) 60%, oklch(48% 0.22 285));
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.45), 0 8px 24px -8px oklch(50% 0.2 260 / 0.7);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-glass {
  color: var(--ink);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--spec), inset 0 0 0 1px var(--glass-border), 0 6px 20px -10px var(--shadow);
}

/* ───────────── Layout ───────────── */
.section { max-width: var(--maxw); margin: 0 auto; padding: 96px 20px 0; }
.sec-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--accent); margin-bottom: 12px; }
h2 { font-size: clamp(34px, 6vw, 64px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; }
.sub { margin-top: 18px; font-size: clamp(17px, 1.6vw, 21px); color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); }
.center { text-align: center; margin-top: 24px; }

/* ───────────── Hero ───────────── */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 20px 0;
  display: grid; gap: 40px;
  justify-items: center;
  text-align: center;
}
.hero-copy { display: grid; justify-items: center; max-width: 760px; }
.hero h1 { font-size: clamp(46px, 9vw, 84px); font-weight: 750; letter-spacing: -0.04em; line-height: .98; }
.lede { margin-top: 22px; font-size: clamp(18px, 2vw, 22px); color: var(--muted); max-width: 34em; }
.lede strong { color: var(--ink); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.hero .fine { margin-top: 18px; }
@media (min-width: 1000px) { .hero { padding-top: 80px; } }
@media (min-width: 1800px) {
  :root { --maxw: 1480px; }
  body { font-size: 19px; }
}

/* Real app media: one light and one dark copy; the theme picks one. */
.on-dark { display: none; }
:root[data-theme="dark"] .on-dark { display: block; }
:root[data-theme="dark"] .on-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-dark { display: block; }
  :root:not([data-theme="light"]) .on-light { display: none; }
}
.hero-media { margin: 0; width: 100%; max-width: 1020px; }
.hero-media video { display: block; }
.hero-media video.on-dark { display: none; }
:root[data-theme="dark"] .hero-media video.on-dark { display: block; }
:root[data-theme="dark"] .hero-media video.on-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-media video.on-dark { display: block; }
  :root:not([data-theme="light"]) .hero-media video.on-light { display: none; }
}
.hero-media video, .shot img {
  width: 100%; height: auto;
  border-radius: clamp(16px, 2.4vw, 28px);
  box-shadow: 0 40px 90px -30px oklch(0% 0 0 / 0.45), 0 0 0 1px var(--line);
}
.hero-media video { aspect-ratio: 1020 / 640; background: var(--tile); }
.hero-media figcaption, .shot figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center; }

/* ───────────── How it works ───────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.step { padding: clamp(18px, 3vw, 28px); display: grid; gap: 14px; align-content: start; min-width: 0; }
.step-head { display: flex; align-items: center; gap: 12px; }
.step .num {
  flex: none;
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  font-weight: 700; color: white;
  background: var(--grad);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.5);
}
.step p { color: var(--muted); }
.step .shot { margin: 4px 0 0; }
.step .shot img { border-radius: 14px; box-shadow: 0 18px 40px -20px oklch(0% 0 0 / 0.45), 0 0 0 1px var(--line); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.keyrow { list-style: none; margin: 28px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; color: var(--muted); font-size: 15px; }
.keyrow li { display: inline-flex; align-items: center; gap: 8px; }
.keyrow kbd { color: var(--ink); }

/* ───────────── Install ───────────── */
.dl { display: grid; justify-items: center; gap: 14px; text-align: center; margin: 0 auto 40px; }
.btn-big { min-height: 60px; padding: 0 30px; font-size: 18px; gap: 10px; }
.btn-big svg { width: 22px; height: 22px; }
.dl .fine a, .hero .fine a, .first-open .note a, .qa a { color: var(--accent); }
.install-grid { display: grid; gap: 14px; max-width: 980px; margin: 0 auto; }
.install-grid .code { min-width: 0; }
.install-grid pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width: 900px) { .install-grid { grid-template-columns: 1fr 1.4fr; } }
.first-open { max-width: 980px; margin: 28px auto 0; padding: clamp(22px, 4vw, 36px); border-radius: 26px; }
.first-open > .fine { margin-top: 8px; }
.open-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.open-steps li { display: flex; gap: 14px; align-items: flex-start; }
.open-steps .num { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; font-size: 15px; color: white; background: var(--grad); }
.open-steps p { padding-top: 3px; }
@media (min-width: 900px) { .open-steps { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.first-open .note { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.from-source { max-width: 640px; margin: 28px auto 0; }

/* ───────────── Code blocks ───────────── */
.code { overflow: hidden; border-radius: 20px; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.code-bar b { color: var(--ink); font-weight: 600; }
.copy {
  min-height: 36px; padding: 0 14px;
  border: 0; border-radius: 99px;
  font: 600 13px var(--font);
  color: var(--ink); background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: background-color .2s, transform .3s var(--spring);
}
.copy:hover { background: color-mix(in oklch, var(--a2) 18%, transparent); }
.copy:active { transform: scale(.95); }
.copy.done { color: oklch(99% 0 0); background: oklch(52% 0.15 150); }
pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 15px/1.6 var(--mono); }
pre .c { color: var(--muted); }

/* ───────────── FAQ ───────────── */
.qa { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.qa details { border-radius: 22px; padding: 0 22px; }
.qa summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px;
  font-weight: 600; font-size: 18px;
  cursor: pointer;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tile); font-weight: 400; font-size: 20px; transition: transform .4s var(--spring); }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details p { padding: 0 0 22px; color: var(--muted); }
.qa code { overflow-wrap: anywhere; }

/* ───────────── Footer ───────────── */
.foot { margin-top: 120px; border-top: 1px solid var(--line); }
.foot-in { max-width: var(--maxw); margin: 0 auto; padding: 32px 20px 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; }

/* ───────────── Motion: scroll reveals ───────────── */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
  }
  @supports not (animation-timeline: view()) {
    .js .reveal { opacity: 0; transform: translateY(32px) scale(.98); transition: opacity .8s var(--ease), transform 1s var(--spring); }
    .js .reveal.in { opacity: 1; transform: none; }
  }
  .hero-copy > * { animation: enter 1s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; }
  .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .hero-copy > :nth-child(4) { animation-delay: .18s; }
  .hero-copy > :nth-child(5) { animation-delay: .24s; }
  .hero-media { animation: enter 1.2s .15s var(--ease) both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(40px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes enter {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* Motion off: everything static, nothing moves. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .blob { transform: none !important; }
  .btn { transform: none !important; }
}
