/* OnDevice LLM — ondevicellm.app */

:root {
  --bg: #07080b;
  --bg-soft: #0d0f14;
  --card: #12151c;
  --line: #1f242e;
  --text: #eef1f6;
  --muted: #98a1b0;
  --dim: #6b7480;
  --accent: #4b9cff;
  --accent-2: #7c5cff;
  --ok: #34d399;
  --radius: 16px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

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

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

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 8, 11, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex; align-items: center; gap: 20px;
  height: 60px; max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); font-size: 15px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  background: var(--accent); color: #fff !important; padding: 7px 15px;
  border-radius: 980px; font-size: 13.5px; font-weight: 600;
}
.nav-cta:hover { background: #5ba7ff; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 86px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -260px 0 auto 50%;
  width: 900px; height: 620px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(75,156,255,0.20), rgba(124,92,255,0.09) 42%, transparent 68%);
  pointer-events: none;
}
.hero-in { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; justify-content: center;
  flex-wrap: wrap; max-width: 100%; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.45;
  color: var(--muted); background: var(--card);
  border: 1px solid var(--line); border-radius: 980px; padding: 5px 13px; margin-bottom: 22px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

h1 {
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.06; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 20px;
}
h1 .grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { font-size: clamp(16.5px, 2vw, 19px); color: var(--muted); margin: 0 0 30px; max-width: 34em; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15.5px;
  padding: 13px 24px; border-radius: 980px; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #5ba7ff; text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--card); border-color: #2c3340; }
.note { font-size: 13.5px; color: var(--dim); margin-top: 16px; }

/* ---------- phone ---------- */
.phone {
  position: relative; width: 268px; margin: 0 auto;
  border-radius: 40px; padding: 9px; background: #1b1f28;
  box-shadow: 0 0 0 1px #2b313d, 0 32px 70px -24px rgba(0,0,0,0.9), 0 0 90px -30px rgba(75,156,255,0.4);
}
.phone img {
  border-radius: 32px;
  height: 428px; object-fit: cover; object-position: top center;
}
.phone::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: 9px; height: 84px;
  border-radius: 0 0 32px 32px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(7,8,11,0.92));
}
.phone-sm { width: 226px; }
.phone-sm img { height: 452px; }
.phone-sm::after { height: 110px; }
/* natural-aspect variant — no side cropping */
.phone-nat img { height: auto; object-fit: contain; }
.phone-nat::after { display: none; }

/* ---------- sections ---------- */
section { padding: 76px 0; }
.section-line { border-top: 1px solid var(--line); }

h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -0.028em; font-weight: 680; margin: 0 0 14px; }
h3 { font-size: 18px; letter-spacing: -0.015em; font-weight: 640; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 44px; max-width: 42em; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px;
}
.card p { color: var(--muted); font-size: 14.8px; margin: 0; }
.card .ico { font-size: 22px; margin-bottom: 14px; display: block; }

/* ---------- comparison / feature strip ---------- */
.strip { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.strip.rev { direction: rtl; }
.strip.rev > * { direction: ltr; }
.strip ul { margin: 20px 0 0; padding: 0; list-style: none; }
.strip li { color: var(--muted); font-size: 15.5px; padding: 7px 0 7px 28px; position: relative; }
.strip li::before {
  content: ""; position: absolute; left: 4px; top: 15px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* ---------- table ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14.8px; min-width: 560px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; }
td { color: var(--muted); }
td strong { color: var(--text); font-weight: 600; }
tbody tr:hover { background: var(--bg-soft); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 980px; font-size: 12.5px; font-weight: 600; }
.pill-ok { background: rgba(52,211,153,0.13); color: var(--ok); }
.pill-mid { background: rgba(251,191,36,0.13); color: #fbbf24; }
.pill-no { background: rgba(248,113,113,0.13); color: #f87171; }

/* Spec tables on model release pages. Row headers here are labels
   ("Released by"), not column headings, so they lose the uppercase
   treatment the base th rule applies. */
.spec { min-width: 480px; }
.spec tbody th {
  color: var(--text); font-weight: 600; font-size: 14.5px;
  text-transform: none; letter-spacing: 0; width: 38%; vertical-align: top;
}
.spec td { vertical-align: top; }
@media (max-width: 560px) { .spec tbody th { width: 42%; } }

/* ---------- faq / prose ---------- */
.prose { max-width: 720px; }
.prose h2 { margin-top: 44px; font-size: 25px; }
.prose h3 { margin-top: 30px; font-size: 17.5px; }
.prose p, .prose li { color: var(--muted); font-size: 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 7px 0; }
.prose code {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 7px; font-size: 13.5px; color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.prose strong { color: var(--text); }

.faq { border-top: 1px solid var(--line); padding: 22px 0; }
.faq h3 { margin: 0 0 6px; }
.faq p { color: var(--muted); margin: 0; font-size: 15.5px; }

.callout {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 18px 22px; margin: 26px 0;
}
.callout p { margin: 0; font-size: 15.2px; }

/* ---------- steps ---------- */
.steps { counter-reset: s; padding: 0; list-style: none; margin: 26px 0 0; }
.steps li {
  counter-increment: s; position: relative; padding: 0 0 26px 46px;
  border-left: 1px solid var(--line); margin-left: 15px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: -15px; top: -3px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 13.5px; font-weight: 650; color: var(--text);
}
.steps h3 { margin: 3px 0 5px; }
.steps p { color: var(--muted); margin: 0; font-size: 15.3px; }

/* ---------- cta band ---------- */
.band {
  background: linear-gradient(160deg, #101725, #0b0d13 60%);
  border: 1px solid var(--line); border-radius: 24px;
  padding: 56px 40px; text-align: center;
}
.band h2 { margin-bottom: 12px; }
.band .lead { margin-bottom: 30px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 44px 0 56px; }
.foot { display: flex; flex-wrap: wrap; gap: 20px 34px; align-items: center; }
.foot a { color: var(--muted); font-size: 14px; }
.foot a:hover { color: var(--text); text-decoration: none; }
.foot .copy { color: var(--dim); font-size: 13.5px; margin-left: auto; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { padding-top: 54px; }
  .hero-in { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { text-align: center; }
  .sub { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .strip, .strip.rev { grid-template-columns: 1fr; gap: 34px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  section { padding: 58px 0; }
  .nav-links a:not(.nav-cta) { display: none; }
  .band { padding: 44px 24px; }
  .eyebrow { font-size: 12px; }
  .phone { width: 246px; }
  .phone img { height: 470px; }
  .foot .copy { margin-left: 0; width: 100%; }
}

/* ---------- plain screenshot card (for crops that aren't full-device) ---------- */
.shot {
  position: relative;
  border-radius: 18px; overflow: hidden; max-width: 380px; margin: 0 auto;
  border: 1px solid var(--line);
  box-shadow: 0 26px 60px -26px rgba(0,0,0,0.9), 0 0 80px -34px rgba(75,156,255,0.35);
}
.shot img { width: 100%; height: auto; display: block; }
.shot::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
}
.shot-dark { border-color: #232936; }
.shot-dark::after { background: linear-gradient(to bottom, rgba(10,12,17,0), #0a0c11); }

/* ---------- hero: a working recreation of the app ---------- */
.demo {
  position: relative; width: 268px; margin: 0 auto;
  border-radius: 40px; padding: 9px; background: #1b1f28;
  box-shadow: 0 0 0 1px #2b313d, 0 32px 70px -24px rgba(0,0,0,.9), 0 0 90px -30px rgba(75,156,255,.4);
}
.screen {
  position: relative; height: 468px; overflow: hidden;
  border-radius: 32px; background: #fff; color: #000;
  font-size: 11px; line-height: 1.35; text-align: left;
  -webkit-font-smoothing: antialiased;
}
.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 16px 2px; font-size: 10px; font-weight: 600; color: #000;
}
.statusbar .notch { width: 56px; height: 15px; border-radius: 20px; background: #000; }
.statusbar .sig { display: flex; gap: 3px; align-items: center; }
.statusbar .sig i { width: 3px; height: 8px; border-radius: 1px; background: #000; font-style: normal; }
.statusbar .batt { width: 18px; height: 9px; border: 1.2px solid #000; border-radius: 3px; position: relative; }
.statusbar .batt::after { content: ""; position: absolute; inset: 1.5px; background: #000; border-radius: 1px; }

.view { position: absolute; inset: 22px 0 0; padding: 0 14px; opacity: 0; pointer-events: none; }
.view.on { opacity: 1; }

/* --- home --- */
.app-title { display: flex; align-items: center; gap: 5px; font-size: 16px; font-weight: 700; letter-spacing: -.02em; margin: 12px 0 3px; }
.app-title .spark { color: #007aff; }
.app-sub { color: #6b7280; font-size: 10px; line-height: 1.45; margin-bottom: 14px; }
.qa-label { font-size: 11.5px; font-weight: 700; margin: 0 0 7px; }
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.tile { background: #f4f5f7; border-radius: 10px; padding: 9px 9px 10px; }
.tile .dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; margin-bottom: 7px; }
.tile b { display: block; font-size: 10.5px; font-weight: 650; }
.tile span { color: #8b909a; font-size: 9px; }
.row-btn {
  display: flex; align-items: center; gap: 7px; margin-top: 7px;
  background: #f4f5f7; border-radius: 10px; padding: 9px 11px; font-size: 10.5px; font-weight: 600;
}
.row-btn .chev { margin-left: auto; color: #b6bbc4; }

/* --- model sheet --- */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; top: 40px;
  background: #f2f2f7; border-radius: 14px 14px 32px 32px;
  transform: translateY(102%); transition: transform .5s cubic-bezier(.32,.72,.28,1);
  padding: 0 12px; overflow: hidden;
}
.sheet.up { transform: translateY(0); }
.sheet-bar { display: flex; align-items: center; padding: 11px 2px 9px; font-size: 12px; font-weight: 700; }
.sheet-bar .close { margin-left: auto; color: #007aff; font-weight: 600; font-size: 11px; }
.sheet-note { font-size: 9px; color: #8b909a; text-transform: uppercase; letter-spacing: .06em; margin: 2px 2px 6px; }
.m-row {
  display: flex; align-items: center; background: #fff; padding: 11px 11px;
  border-bottom: 1px solid #ececf0; font-size: 10.5px; font-weight: 550;
}
.m-row:first-of-type { border-radius: 10px 10px 0 0; }
.m-row:last-of-type { border-radius: 0 0 10px 10px; border-bottom: 0; }
.m-row .get {
  margin-left: auto; color: #007aff; font-weight: 600; font-size: 10px;
  background: #eaf2ff; border-radius: 20px; padding: 3px 10px;
}
.m-row.picked { background: #eaf2ff; }
.m-row.picked .get { background: #007aff; color: #fff; }

/* --- chat --- */
.chat-bar {
  display: flex; align-items: center; gap: 5px; padding: 9px 2px 8px;
  border-bottom: 1px solid #ececf0; font-size: 10.5px; font-weight: 650;
}
.chat-bar .badge { margin-left: auto; font-size: 8.5px; font-weight: 700; color: #8b909a; letter-spacing: .04em; }
.msgs { padding: 9px 0; }
.bubble { max-width: 84%; padding: 7px 10px; border-radius: 13px; font-size: 10.5px; margin-bottom: 7px; }
.bubble.me { background: #007aff; color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.bubble.ai { background: #f1f2f4; color: #111; border-bottom-left-radius: 4px; }
.bubble.ai b { font-weight: 700; }
.caret { display: inline-block; width: 1.5px; height: 11px; background: currentColor; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.composer {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  display: flex; align-items: center; gap: 7px;
  background: #f1f2f4; border-radius: 20px; padding: 7px 11px; font-size: 10.5px; color: #9aa0a8;
}
.composer .send { margin-left: auto; width: 17px; height: 17px; border-radius: 50%; background: #d3d6dc; }

/* the tap indicator */
.tap {
  position: absolute; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,122,255,.28); box-shadow: 0 0 0 1.5px rgba(0,122,255,.5);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  transform: scale(.6); z-index: 5;
}
.tap.hit { opacity: 1; transform: scale(1); }

.offline-pill {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 16px auto 0; padding: 5px 12px; border-radius: 980px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.offline-pill .live { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.demo-wrap { text-align: center; }

/* ---------- gentle entrance + scroll reveal ---------- */
.rise { opacity: 0; transform: translateY(14px); }
.rise.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.hero .rise { animation: rise-in .8s cubic-bezier(.2,.7,.3,1) forwards; }
.hero .rise:nth-child(2) { animation-delay: .06s; }
.hero .rise:nth-child(3) { animation-delay: .12s; }
.hero .rise:nth-child(4) { animation-delay: .18s; }
@keyframes rise-in { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .phone-stack img, .flow-steps span { animation: none; }
  .phone-stack img:not(:first-child) { opacity: 0; }
  .rise, .hero .rise { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
}
