:root {
  --navy-900: #050f24;
  --navy-800: #071633;
  --navy-700: #0b2453;
  --blue-500: #2f74ff;
  --blue-400: #5b93ff;
  --cyan-300: #7fe0ff;
  --ink: #0f1a2e;
  --ink-2: #44506a;
  --ink-3: #6b7690;
  --page: #ffffff;
  --page-2: #f3f6fb;
  --line: #dde3ee;
  --card: #ffffff;
  --code-bg: #0b1730;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edf7;
    --ink-2: #b4bfd4;
    --ink-3: #8e99b0;
    --page: #0a1326;
    --page-2: #0e1a33;
    --line: #22304d;
    --card: #111e3a;
  }
}

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-500); }
@media (prefers-color-scheme: dark) { a { color: var(--blue-400); } }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(70% 60% at 85% 10%, rgba(47, 116, 255, 0.45), transparent 70%),
    radial-gradient(60% 60% at 0% 100%, rgba(127, 224, 255, 0.18), transparent 70%),
    linear-gradient(160deg, var(--navy-800), var(--navy-900) 70%);
  overflow: hidden;
  padding-bottom: 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

/* The wheel is blue on a navy ground, and at a small size its outline sank
   into it. A light glow keeps the shape of the wheel itself readable. */
.brand img {
  filter: drop-shadow(0 0 6px rgba(127, 224, 255, 0.55))
          drop-shadow(0 0 16px rgba(47, 116, 255, 0.45));
}

/* The wordmark heads the hero, above everything else in it. */
.hero-brand { margin-bottom: 28px; }
.hero-brand .wordmark {
  height: 150px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35));
}
@media (max-width: 520px) {
  .hero-brand .wordmark { height: auto; width: 100%; }
}

.topbar-links { display: flex; gap: 22px; align-items: center; }
.topbar-links a { color: rgba(255, 255, 255, 0.82); text-decoration: none; font-size: 0.95rem; }
.topbar-links a:hover { color: #fff; }
.topbar-links .pill {
  color: #fff;
  font-weight: 600;
  background: var(--blue-500);
  padding: 7px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(47, 116, 255, 0.35);
}
.topbar-links .pill:hover { background: #3f80ff; }
@media (max-width: 720px) {
  .topbar-links a:not(.pill) { display: none; }
}

.hero-body {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
  padding: 16px 0 24px;
}
@media (max-width: 900px) {
  .hero-body { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; }
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan-300);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.3rem); font-weight: 800; text-wrap: balance; }

.lede {
  margin: 20px 0 0;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 34em;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue-500); color: #fff; box-shadow: 0 8px 24px rgba(47, 116, 255, 0.35); }
.btn-primary:hover { background: #3f80ff; }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.btn { display: inline-flex; align-items: center; gap: 9px; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

.fineprint { margin: 22px 0 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }

.hero-shot .frame { transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); }
@media (max-width: 900px) { .hero-shot .frame { transform: none; } }

.wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 72px;
  fill: var(--page);
}

/* --------------------------------------------------------------- frames */

.frame {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 30px 60px -20px rgba(3, 10, 30, 0.55),
    0 12px 24px -12px rgba(3, 10, 30, 0.35);
  border: 1px solid rgba(15, 26, 46, 0.12);
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  background: #e9edf4;
  border-bottom: 1px solid #d6dce8;
}
.frame-bar i { width: 11px; height: 11px; border-radius: 50%; background: #c8cfdc; }
.frame-bar i:first-child { background: #ff6159; }
.frame-bar i:nth-child(2) { background: #ffbd2e; }
.frame-bar i:nth-child(3) { background: #28c941; }
.frame-bar span {
  margin-left: 14px;
  font-size: 0.75rem;
  color: #6b7690;
  background: #fff;
  border-radius: 6px;
  padding: 2px 12px;
}

/* ------------------------------------------------------------- sections */

main section { padding: 88px 0; }

.intro { padding: 40px 0 8px; text-align: center; }
.intro p {
  margin: 0 auto;
  max-width: 40em;
  font-size: 1.3rem;
  color: var(--ink-2);
}

.section-title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; text-align: center; }
.section-lede { margin: 14px auto 0; max-width: 38em; text-align: center; color: var(--ink-2); font-size: 1.1rem; }

.features { display: grid; gap: 96px; }

.feature {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.feature.flip .feature-text { order: 2; }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .feature-text { order: 0; }
}
.feature h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; }
.feature p { margin: 16px 0 0; font-size: 1.1rem; color: var(--ink-2); }

/* the grid of smaller features */

.more { background: var(--page-2); border-block: 1px solid var(--line); }
.grid {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.grid li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.grid svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--blue-500);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.grid h3 { margin-top: 14px; font-size: 1.08rem; }
.grid p { margin: 8px 0 0; color: var(--ink-2); font-size: 0.97rem; }

/* themes */

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 36px 0 28px;
}
.tabs button {
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
}
.tabs button:hover { color: var(--ink); border-color: var(--ink-3); }
.tabs button[aria-selected="true"] { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.tabs button:focus-visible, .btn:focus-visible, .copy:focus-visible, summary:focus-visible {
  outline: 3px solid var(--cyan-300);
  outline-offset: 2px;
}

/* Light or dark, for whichever theme is picked. */
.mode {
  display: flex;
  justify-content: center;
  margin: -12px auto 24px;
  width: max-content;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--page-2);
}
.mode button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
}
.mode button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 26, 46, 0.18); }
.mode button:focus-visible { outline: 3px solid var(--cyan-300); outline-offset: 2px; }

.theme-panel { max-width: 900px; margin: 0 auto; }
/* Changing theme or appearance fades the new picture in over the old one. */
.theme-panel .frame { position: relative; }
.theme-panel .incoming {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.theme-panel .incoming.shown { opacity: 1; }
#theme-desc { transition: opacity 0.25s ease; }
#theme-desc.fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .theme-panel .incoming, #theme-desc { transition: none; }
}
.theme-desc { text-align: center; color: var(--ink-2); margin: 22px auto 0; max-width: 36em; min-height: 3.2em; }

/* install */

.install {
  color: #fff;
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
}
.install .section-lede { color: rgba(255, 255, 255, 0.75); }
.install a { color: var(--cyan-300); }

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.steps li {
  counter-increment: step;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 26px;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-500);
  font-weight: 700;
  margin-bottom: 14px;
}
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 8px 0 0; color: rgba(255, 255, 255, 0.78); }

.code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 10px 10px 14px;
}
.code code { font-family: var(--mono); font-size: 0.92rem; color: var(--cyan-300); }
.copy {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  padding: 5px 10px;
  cursor: pointer;
}
.copy:hover { background: rgba(255, 255, 255, 0.18); }

code.inline {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
.note { margin: 32px 0 0; text-align: center; color: rgba(255, 255, 255, 0.72); }

/* faq */

.faq { max-width: 780px; }
.faq .section-title { margin-bottom: 36px; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 1.1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue-500); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding-top: 12px; color: var(--ink-2); }
/* Opened and closed by script.js, which animates this wrapper's height. */
.faq-body { overflow: hidden; }
.faq summary::after { transition: transform 0.25s ease; }

/* footer */

.footer { background: var(--navy-900); color: rgba(255, 255, 255, 0.62); padding: 44px 0 50px; font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: center; }
.disclaimer { margin: 0; max-width: 44em; }
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.footer nav a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.footer nav a:hover { color: #fff; text-decoration: underline; }
.footer nav a.support {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  background: rgba(47, 116, 255, 0.18);
  border: 1px solid rgba(91, 147, 255, 0.5);
  transition: background 0.15s ease;
}
.footer nav a.support:hover { text-decoration: none; background: rgba(47, 116, 255, 0.32); }
.footer nav a.support svg { width: 15px; height: 15px; color: var(--cyan-300); }

/* When the two hero buttons don't fit on one line, they stack centered
   instead of hanging off the left edge. script.js sets the class. */
.cta.stacked { justify-content: center; }

/* ------------------------------------------------------------- motion

   Things rise into place as they scroll into view, the cards in a row one
   after another, and the screenshots settle from a slight tilt. Only with
   script running (the class is set in the head) and only for readers who
   haven't asked for less motion; everyone else gets the page as it is. */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal],
  .js [data-stagger] > * {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--delay, 0s);
  }
  .js .feature[data-reveal] .frame {
    transform: perspective(1400px) rotateX(8deg) scale(0.96);
    transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s;
  }
  .js .feature.flip[data-reveal] .frame { transform: perspective(1400px) rotateX(8deg) scale(0.96); }
  .js [data-reveal].shown,
  .js [data-stagger].shown > * { opacity: 1; transform: none; }
  .js .feature[data-reveal].shown .frame { transform: none; }

  /* The hero screenshot drifts a little as the page scrolls past it, and the
     glow behind the hero slowly breathes. */
  .hero-shot .frame { transition: transform 0.2s linear; }
  .hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto auto;
    width: 60%;
    height: 90%;
    background: radial-gradient(closest-side, rgba(47, 116, 255, 0.35), transparent);
    animation: breathe 9s ease-in-out infinite alternate;
    pointer-events: none;
  }
  @keyframes breathe {
    from { opacity: 0.55; transform: translate(0, 0) scale(1); }
    to { opacity: 1; transform: translate(-4%, 6%) scale(1.08); }
  }
}

.hero > * { position: relative; }
.hero > .wave { position: absolute; }

/* Cards lift a touch under the pointer. */
.grid li, .steps li { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
@media (hover: hover) {
  .grid li:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(15, 26, 46, 0.45); border-color: var(--blue-400); }
  .steps li:hover { transform: translateY(-3px); border-color: rgba(127, 224, 255, 0.45); }
}
