/* ---------- Tokens ---------- */
:root {
  --navy: #0B2942;
  --steel: #2B6CB0;
  --crane: #F6863A;

  --bg: #f5f6f8;
  --bg-elev: rgba(255, 255, 255, 0.72);
  --bg-solid: #ffffff;
  --text: #16222e;
  --text-dim: #56636f;
  --border: rgba(11, 41, 66, 0.10);
  --shadow: 0 10px 40px rgba(11, 41, 66, 0.10);
  --shadow-sm: 0 4px 18px rgba(11, 41, 66, 0.08);
  --glass: rgba(255, 255, 255, 0.6);
  --code-bg: #0d1f2e;
  --code-text: #e7eef5;
  --accent: var(--steel);
}

:root[data-theme="dark"] {
  --bg: #0a141d;
  --bg-elev: rgba(22, 36, 49, 0.6);
  --bg-solid: #102230;
  --text: #eaf1f7;
  --text-dim: #9bb0c2;
  --border: rgba(255, 255, 255, 0.10);
  --shadow: 0 14px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.35);
  --glass: rgba(16, 34, 48, 0.55);
  --code-bg: #06121c;
  --code-text: #d8e6f2;
  --accent: #5aa0e6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a141d;
    --bg-elev: rgba(22, 36, 49, 0.6);
    --bg-solid: #102230;
    --text: #eaf1f7;
    --text-dim: #9bb0c2;
    --border: rgba(255, 255, 255, 0.10);
    --shadow: 0 14px 50px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.35);
    --glass: rgba(16, 34, 48, 0.55);
    --code-bg: #06121c;
    --code-text: #d8e6f2;
    --accent: #5aa0e6;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.12; }

code {
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, "Cascadia Code", monospace;
  font-size: 0.9em;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.nav-links {
  margin-left: auto;
  display: flex;
  gap: 22px;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.theme-toggle:hover { transform: translateY(-1px); }
.ico-moon { display: none; }
:root[data-theme="dark"] .ico-sun { display: none; }
:root[data-theme="dark"] .ico-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico-sun { display: none; }
  :root:not([data-theme="light"]) .ico-moon { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 24px 80px;
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: -20% 0 auto 0;
  height: 540px;
  background:
    radial-gradient(circle at 30% 30%, rgba(43, 108, 176, 0.30), transparent 55%),
    radial-gradient(circle at 72% 40%, rgba(246, 134, 58, 0.22), transparent 55%);
  filter: blur(28px);
  z-index: 0;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hero-icon {
  border-radius: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  margin: 0 0 14px;
  background: linear-gradient(120deg, var(--navy), var(--steel) 55%, var(--crane));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
:root[data-theme="dark"] .hero h1 {
  background: linear-gradient(120deg, #cfe0ef, #5aa0e6 50%, var(--crane));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero h1 {
    background: linear-gradient(120deg, #cfe0ef, #5aa0e6 50%, var(--crane));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.tagline {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 30px;
}
.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-note { margin-top: 18px; color: var(--text-dim); font-size: 0.88rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 13px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--steel), var(--navy));
  box-shadow: 0 8px 24px rgba(43, 108, 176, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(43, 108, 176, 0.45); }
.btn-ghost {
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---------- Sections ---------- */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px;
}
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 12px; }
.lead { color: var(--text-dim); font-size: 1.12rem; margin: 0; }

/* ---------- Feature grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--steel), var(--crane));
}
.card-ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.06rem; margin: 0 0 6px; }
.card p { margin: 0; color: var(--text-dim); font-size: 0.94rem; }

/* ---------- Built different ---------- */
.native-panel {
  background: linear-gradient(150deg, var(--navy), #123a5c);
  border-radius: 28px;
  padding: 52px 40px;
  color: #eaf1f7;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.native-panel .section-head { margin-bottom: 36px; }
.native-panel h2 { color: #fff; }
.native-panel .lead { color: #b6cee2; }
.native-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
}
.native-item h3 { margin: 0 0 6px; font-size: 1.08rem; color: #fff; }
.native-item h3::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--crane);
  margin-right: 9px;
  vertical-align: middle;
}
.native-item p { margin: 0; color: #b6cee2; font-size: 0.95rem; }
.native-item code {
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 5px;
  color: #fff;
}

/* ---------- Screenshots ---------- */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.shot { margin: 0; }
.shot figcaption {
  text-align: center;
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
}
.window {
  background: var(--bg-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.titlebar {
  display: flex;
  gap: 8px;
  padding: 11px 14px;
  background: linear-gradient(var(--bg-elev), var(--bg-elev));
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.window-body {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 14px, var(--border) 14px, var(--border) 15px),
    linear-gradient(160deg, rgba(43, 108, 176, 0.08), rgba(246, 134, 58, 0.06));
}
.window-body img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Install ---------- */
.install { max-width: 760px; margin: 0 auto; }
.steps { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 16px; }
.steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.step-n {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--steel), var(--crane));
}
.steps strong { display: block; }
.steps p { margin: 2px 0 0; color: var(--text-dim); font-size: 0.94rem; }
.steps code { background: var(--border); padding: 1px 6px; border-radius: 5px; }

.code-block {
  background: var(--code-bg);
  border-radius: 14px;
  overflow: hidden;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: #9fb6cb;
}
.copy {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #d8e6f2;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}
.copy:hover { background: rgba(255, 255, 255, 0.14); }
.code-block pre { margin: 0; padding: 16px 16px; overflow-x: auto; }
.code-block code { color: var(--code-text); }

.mcp-box {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-elev);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mcp-box h3 { margin: 0 0 6px; }
.mcp-box > p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }
.install-cta { text-align: center; margin-top: 34px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.footer-brand img { border-radius: 6px; }
.footer-meta { margin: 0 auto; color: var(--text-dim); font-size: 0.9rem; }
.footer-link { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 600; }
.footer-link:hover { text-decoration: none; color: var(--accent); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 64px 20px 56px; }
  .native-panel { padding: 36px 24px; }
  .section { padding: 56px 20px; }
}

/* ---------- Hero product shot ---------- */
.hero-brew {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 8px 10px 8px 16px;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 10px;
  font-size: 13.5px;
}
.hero-brew code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.hero-brew .copy {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.hero-brew .copy:hover { background: rgba(255, 255, 255, 0.16); }

.hero-shot {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 56px auto 0;
}
.hero-shot .window {
  box-shadow: 0 30px 90px rgba(11, 41, 66, 0.28);
}
:root[data-theme="dark"] .hero-shot .window,
:root:not([data-theme="light"]) .hero-shot .window {
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}
.hero-shot .window-body img { object-fit: contain; }
@media (max-width: 720px) {
  .hero-shot { margin-top: 36px; }
  .hero-brew { font-size: 12px; }
}
