/* ── Tokens ──────────────────────────────────────────────────────── */

:root {
  --bg:        #000000;
  --bg-2:      #08080a;
  --surface:   #111114;
  --surface-2: #17171b;
  --line:      #26262c;
  --text:      #f5f5f7;
  --muted:     #9b9ba4;
  --accent:    #0a84ff;
  --accent-2:  #64d2ff;
  --shadow:    0 30px 60px -20px rgba(0, 0, 0, .9);
  --bezel:     #1c1c20;

  --wrap:  1140px;
  --r-sm:  10px;
  --r-md:  16px;
  --r-lg:  24px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg:        #ffffff;
  --bg-2:      #f4f4f7;
  --surface:   #ffffff;
  --surface-2: #f0f0f4;
  --line:      #e2e2e8;
  --text:      #0d0d10;
  --muted:     #61616b;
  --accent:    #0071e3;
  --accent-2:  #0a84ff;
  --shadow:    0 24px 50px -20px rgba(0, 0, 0, .28);
  --bezel:     #dcdce2;

  color-scheme: light;
}

/* ── Base ────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .38em;
}

h1, h2, h3 { line-height: 1.08; letter-spacing: -.025em; margin: 0; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.wrap.narrow { max-width: 760px; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px; top: 12px; z-index: 100;
  background: var(--surface); color: var(--text);
  padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--line);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ── Nav ─────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 640;
  font-size: 1.06rem;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 7px; /* the icon file is square; iOS-style corners are ours to add */
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent);
}

.nav-links {
  display: flex;
  gap: 22px;
  margin-inline: auto;
  font-size: .94rem;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.theme-toggle {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
[data-theme="dark"]  .theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-sm { padding: 8px 16px; font-size: .9rem; background: var(--accent); color: #fff; }

/* Apple's badge artwork. Don't restyle it beyond scaling — the black variant carries
   its own hairline border, so it reads on both the black page and the white one. */
.badge-link {
  display: inline-flex;
  border-radius: 8px;
  transition: opacity .15s ease, transform .15s ease;
}
.badge-link:hover { opacity: .82; transform: translateY(-1px); }
.badge-link img { height: 48px; width: auto; display: block; }

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--surface);
}
.btn-ghost:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 30px; }
.cta-row.center { justify-content: center; margin-top: 40px; }

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 0 auto -10%;
  height: 720px;
  background:
    radial-gradient(48% 46% at 22% 30%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    radial-gradient(40% 40% at 82% 10%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 72%);
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .hero::before { opacity: .55; }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: .78rem;
  font-weight: 620;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

.grad {
  background: linear-gradient(96deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 22px 0 0;
  font-size: clamp(1.06rem, 1.9vw, 1.24rem);
  color: var(--muted);
  max-width: 34em;
}

.support {
  margin: 26px 0 0;
  font-size: .95rem;
  color: var(--muted);
  max-width: 36em;
  padding-left: 14px;
  border-left: 2px solid var(--line);
}

/* Hero phones */
.hero-shots {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
}
.hero-shots .phone { width: min(58%, 300px); }
.hero-shots .phone-back {
  transform: translateX(28%) rotate(5deg) scale(.9);
  opacity: .92;
  filter: saturate(.95);
}
.hero-shots .phone-front { transform: translateX(-14%) rotate(-2deg); z-index: 2; }

/* ── Phone frame ─────────────────────────────────────────────────── */

.phone {
  margin: 0;
  padding: 7px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--bezel) 88%, #fff 12%), var(--bezel));
  border-radius: 40px;
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent);
}
.phone img {
  border-radius: 33px;
  width: 100%;
  background: var(--bg-2);
}
.phone figcaption {
  margin-top: 14px;
  font-size: .88rem;
  color: var(--muted);
  text-align: center;
  padding-inline: 6px;
}

/* ── Logo strip ──────────────────────────────────────────────────── */

.logos {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  list-style: none;
  margin: clamp(44px, 7vw, 80px) 0 0;
  padding: 0;
}
.logos li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 8px 15px;
  font-size: .9rem;
  font-weight: 550;
  color: var(--muted);
  white-space: nowrap;
}
.logos img {
  width: 19px;
  height: 19px;
  object-fit: contain;
  flex: none;
  /* several logos are full-bleed square tiles; the radius softens them and does
     nothing to the ones drawn on transparency */
  border-radius: 4px;
}

/* ── Sections ────────────────────────────────────────────────────── */

.section { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--bg-2); }

.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.tagline { margin: 14px 0 0; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(30px, 5vw, 64px);
  /* start, not center: the phone column is much taller, and centering the prose
     against it opens a gap between the section head and the body copy. */
  align-items: start;
}
.split.reverse .prose { order: 2; }
.split.reverse .shots { order: 1; }

.prose p { margin: 0 0 18px; color: var(--muted); font-size: 1.04rem; }
.prose p:last-child { margin-bottom: 0; }
.prose.center { max-width: 44rem; margin-inline: auto; text-align: center; }
.aside { font-style: italic; opacity: .85; }

.ticks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 11px; }
.ticks li {
  position: relative;
  padding-left: 28px;
  color: var(--text);
  font-size: .98rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .42em;
  width: 15px; height: 9px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  border-radius: 1px;
}

/* align-items matters: the offset phone in .pair makes the flex line taller, and a
   stretched figure would grow its bezel below the image. */
.shots { display: flex; justify-content: center; align-items: flex-start; }
.shots .phone { width: min(100%, 320px); }
.shots.pair { gap: clamp(14px, 3vw, 26px); }
.shots.pair .phone { width: min(50%, 268px); }
.shots.pair .phone:last-child { margin-top: 34px; }

/* Gallery of three */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3.4vw, 40px);
  margin-top: clamp(40px, 6vw, 72px);
  align-items: start;
}
.gallery .phone.sm { width: 100%; padding: 6px; border-radius: 34px; }
.gallery .phone.sm img { border-radius: 28px; }

/* ── Cards ───────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(38px, 5vw, 56px);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
}
.card h3 { margin-bottom: 2px; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.card-role {
  font-size: .82rem !important;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent) !important;
  margin-bottom: 12px !important;
}

.card-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
}
.card-logo img { width: 100%; height: 100%; object-fit: contain; }

.verbs {
  list-style: none;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  font-size: .92rem;
  color: var(--muted);
}
.verbs li { position: relative; padding-left: 18px; }
.verbs li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Logos shipped for one theme only */
[data-theme="dark"]  .only-light,
[data-theme="light"] .only-dark { display: none; }

/* Single-color artwork on transparency, flipped to keep contrast against the surface.
   .logo-invert is dark art (Ollama, Chatterbox); .logo-invert-light is light art (OpenAI). */
[data-theme="dark"]  .logo-invert { filter: invert(1); }
[data-theme="light"] .logo-invert-light { filter: invert(1); }

/* ── Secondary integration strip ─────────────────────────────────── */

.also { margin-top: clamp(40px, 5vw, 60px); }
.also-title {
  font-size: .82rem;
  font-weight: 620;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 22px;
}

.int-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.int-strip li {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.int-strip img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: none;
  border-radius: 6px;
}
.int-strip span {
  display: flex;
  flex-direction: column;
  font-size: .84rem;
  line-height: 1.35;
  color: var(--muted);
  min-width: 0;
}
.int-strip strong {
  font-size: .96rem;
  font-weight: 620;
  color: var(--text);
  letter-spacing: -.01em;
}

.also-note {
  margin: 20px 0 0;
  text-align: center;
  font-size: .93rem;
  color: var(--muted);
}

/* ── Memory mock ─────────────────────────────────────────────────── */

.mock {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}
.mock-row { display: flex; align-items: center; gap: 14px; font-size: .9rem; }
.mock-label { color: var(--muted); min-width: 64px; }
.mock-val { color: var(--muted); font-variant-numeric: tabular-nums; }
.meter {
  flex: 1;
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}
.mock-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.mock-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.mock-chips span {
  font-size: .84rem;
  padding: 6px 13px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* ── Closing / pricing ───────────────────────────────────────────── */

.closing {
  text-align: center;
  padding-block: clamp(52px, 7vw, 84px);
}
.closing-title {
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  max-width: 16em;
  margin-inline: auto;
}
.closing .cta-row.center { margin-top: 26px; }

/* ── Footer ──────────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); padding: 40px 0; background: var(--bg); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}
.footer-links { display: flex; gap: 20px; font-size: .93rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.copy { margin: 0 0 0 auto; color: var(--muted); font-size: .88rem; }

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 900px) {
  html { scroll-padding-top: 72px; }
  .nav-links { display: none; }

  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-shots { margin-top: 12px; }
  .hero-shots .phone { width: min(52%, 260px); }

  .split { grid-template-columns: 1fr; }
  .split.reverse .prose { order: 1; }
  .split.reverse .shots { order: 2; }

  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery .phone.sm:last-child { grid-column: 1 / -1; justify-self: center; max-width: 48%; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 18px; }

  /* Buttons keep their natural width so the ghost link doesn't dwarf the badge next to it */
  .badge-link img { height: 44px; }
  .cta-row { gap: 10px; }

  .hero-shots .phone { width: min(56%, 220px); }
  .hero-shots .phone-back { transform: translateX(26%) rotate(6deg) scale(.9); }
  .hero-shots .phone-front { transform: translateX(-16%) rotate(-2deg); }

  .phone { padding: 5px; border-radius: 32px; }
  .phone img { border-radius: 27px; }

  .shots .phone { width: min(100%, 280px); }
  .shots.pair .phone { width: 50%; }

  .gallery { grid-template-columns: 1fr; justify-items: center; gap: 34px; }
  .gallery .phone.sm { max-width: 280px; border-radius: 32px; }
  .gallery .phone.sm:last-child { max-width: 280px; }

  .copy { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
