/* =========================================================
   Tokens
   ========================================================= */
:root {
  --bg: #0f1114;
  --surface-1: #181b1f;
  --surface-2: #1e2125;
  --surface-3: #25292e;
  --border: #2a2e33;
  --border-strong: #3a3f46;
  --fg: #eff1f4;
  --fg-muted: #9aa0a6;
  --fg-soft: #6c727a;

  --accent: #6fb6d6;
  --accent-strong: #8fc8e6;
  --accent-dim: rgba(111, 182, 214, 0.16);
  --green: #b5dc72;
  --red: #e06c75;
  --purple: #b89dff;
  --pink: #ff92c8;
  --yellow: #f5d77b;

  --grad-ai: linear-gradient(110deg, #6fb6d6 0%, #b89dff 50%, #ff92c8 100%);
  --grad-soft: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  --shadow-1: 0 2px 4px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 4px 8px rgba(0, 0, 0, 0.3), 0 28px 60px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(111, 182, 214, 0.18), 0 24px 60px rgba(111, 182, 214, 0.12);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --easing: cubic-bezier(0.22, 1, 0.36, 1);
  --easing-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
ul, ol { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, p { margin: 0; }

::selection { background: var(--accent-dim); color: var(--fg); }

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

/* =========================================================
   Background ambience: aurora + grain
   ========================================================= */
.aurora {
  position: fixed;
  inset: -10vh -10vw auto -10vw;
  height: 110vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.aurora-blob {
  position: absolute;
  width: 56vw;
  height: 56vw;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}
.blob-a { background: radial-gradient(circle, #6fb6d6 0%, transparent 60%); top: -10vh; left: -10vw; animation: drift1 22s var(--easing) infinite alternate; }
.blob-b { background: radial-gradient(circle, #b89dff 0%, transparent 60%); top: 10vh; right: -14vw; animation: drift2 28s var(--easing) infinite alternate; }
.blob-c { background: radial-gradient(circle, #ff92c8 0%, transparent 60%); top: 38vh; left: 30vw; opacity: 0.35; animation: drift3 34s var(--easing) infinite alternate; }

@keyframes drift1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(8vw, 6vh, 0) scale(1.08); } }
@keyframes drift2 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-10vw, 4vh, 0) scale(1.12); } }
@keyframes drift3 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-6vw, -10vh, 0) scale(1.05); } }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main, .site-header, .site-footer { position: relative; z-index: 2; }

/* =========================================================
   Layout
   ========================================================= */
.site-header,
.hero,
.metrics,
.ai,
.features,
.privacy,
.specs,
.cta,
.site-footer {
  width: min(1200px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 18px;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.section-head p {
  color: var(--fg-muted);
  font-size: clamp(15px, 1.4vw, 17px);
}
.section-eyebrow {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(111, 182, 214, 0.1);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(24px, calc((100vw - 1200px) / 2), 200px);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  max-width: none;
  background: rgba(15, 17, 20, 0.7);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 240ms var(--easing-soft), background 240ms var(--easing-soft);
}
.site-header.scrolled { border-bottom-color: var(--border); }
.site-header > * { width: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  padding: 4px 0;
  white-space: nowrap;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-1);
  box-shadow: 0 0 0 1px var(--border), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.brand-mark img { width: 36px; height: 36px; object-fit: cover; }
.brand-name { background: var(--grad-ai); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
}
.nav a {
  font-size: 14px;
  color: var(--fg-muted);
  font-weight: 500;
  transition: color 200ms var(--easing-soft);
}
.nav a:hover { color: var(--fg); }
.nav a.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--fg);
  transition: background 200ms var(--easing-soft), border-color 200ms var(--easing-soft);
}
.nav a.nav-github:hover { background: var(--surface-3); border-color: var(--border-strong); }

.nav a.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  background: transparent;
  transition: color 200ms var(--easing-soft), border-color 200ms var(--easing-soft), background 200ms var(--easing-soft);
}
.nav a.nav-lang:hover { color: var(--fg); border-color: var(--border-strong); background: var(--surface-2); }
.nav a.nav-lang .lang-current { color: var(--fg); }
.nav a.nav-lang .lang-sep { color: var(--fg-soft); }

@media (max-width: 760px) {
  .nav { gap: 14px; }
  .nav a:not(.nav-github) { display: none; }
  .nav a.nav-github { display: inline-flex; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 220ms var(--easing), box-shadow 220ms var(--easing), background 220ms var(--easing-soft), border-color 220ms var(--easing-soft);
  isolation: isolate;
  overflow: hidden;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad-ai);
  color: #0e1014;
  box-shadow: 0 12px 28px rgba(184, 157, 255, 0.25);
}
.btn-primary .btn-glow {
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: var(--grad-ai);
  filter: blur(14px);
  opacity: 0.5;
  transition: opacity 240ms var(--easing-soft);
}
.btn-primary:hover .btn-glow { opacity: 0.85; }

.btn-ghost {
  background: var(--surface-2);
  color: var(--fg);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-3); border-color: var(--border-strong); }

.btn-large { padding: 14px 26px; font-size: 15px; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 88px 0 100px;
  position: relative;
}
.hero-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mx, 30%) var(--my, 30%),
    rgba(111, 182, 214, 0.12),
    transparent 60%
  );
  transition: background 240ms var(--easing-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  margin-bottom: 26px;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(181, 220, 114, 0.18);
  animation: pulseDot 2.4s var(--easing) infinite;
}
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 4px rgba(181, 220, 114, 0.18); } 50% { box-shadow: 0 0 0 8px rgba(181, 220, 114, 0.05); } }

.hero-title {
  font-size: clamp(40px, 5.2vw, 70px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
  word-break: keep-all;
}
.hero-title .line { display: block; white-space: nowrap; }
.hero-title .grad {
  background: var(--grad-ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero-title .dot {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  margin-left: 0.05em;
}
.hero-sub {
  color: var(--fg-muted);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 30px;
}
.hero-sub strong { color: var(--fg); font-weight: 600; }

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  font-size: 12px;
  color: var(--fg-muted);
}
.hero-keys li { display: inline-flex; align-items: center; gap: 8px; }
.hero-keys span { font-weight: 500; }

/* Keycap */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  background: linear-gradient(180deg, #2a2e33, #1c1f23);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.4);
  margin-right: 2px;
}
kbd:last-of-type { margin-right: 0; }

/* =========================================================
   Hero Stage (window mock)
   ========================================================= */
.hero-stage {
  position: relative;
  perspective: 1200px;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.5));
}
.window {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: rotateY(-6deg) rotateX(4deg);
  transition: transform 600ms var(--easing);
}
.hero-stage:hover .window { transform: rotateY(-3deg) rotateX(2deg); }

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #22262b, #1a1d22);
  border-bottom: 1px solid var(--border);
}
.window-bar .dot {
  width: 12px; height: 12px; border-radius: 50%;
  display: inline-block;
}
.dot-red { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #28c941; }
.window-title {
  margin-left: 12px;
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}

.window-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 420px;
}

.sidebar {
  background: #181b1f;
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  font-size: 13px;
}
.sidebar-title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-soft);
  padding: 4px 6px 8px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--fg-muted);
  cursor: default;
  transition: background 160ms var(--easing-soft), color 160ms var(--easing-soft);
}
.sidebar-item:hover { background: rgba(255, 255, 255, 0.03); color: var(--fg); }
.sidebar-item.active { background: #3a4452; color: var(--fg); }
.folder-icon, .note-icon {
  width: 12px; height: 12px;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.7;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.folder-icon {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M2 4a1 1 0 011-1h3.5l1.5 1.5H13a1 1 0 011 1v6a1 1 0 01-1 1H3a1 1 0 01-1-1V4z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M2 4a1 1 0 011-1h3.5l1.5 1.5H13a1 1 0 011 1v6a1 1 0 01-1 1H3a1 1 0 01-1-1V4z'/></svg>");
}
.note-icon {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M3 2h7l3 3v9a1 1 0 01-1 1H3a1 1 0 01-1-1V3a1 1 0 011-1zm6 1v3h3'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M3 2h7l3 3v9a1 1 0 01-1 1H3a1 1 0 01-1-1V3a1 1 0 011-1zm6 1v3h3'/></svg>");
}

/* Editor */
.editor {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
}
.editor-rows {
  flex: 1;
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.85;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
  opacity: 0;
  transform: translateY(2px);
  animation: rowIn 380ms var(--easing) forwards;
}
@keyframes rowIn { to { opacity: 1; transform: translateY(0); } }

.row .expr { color: var(--fg); white-space: pre; }
.row .res {
  color: var(--green);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.row.is-comment .expr { color: var(--fg-soft); }
.row.is-blank .expr { color: transparent; }
.row.is-error .res { color: var(--red); }

.row .var { color: var(--accent); }
.row .num { color: var(--fg); }
.row .punc { color: var(--fg-muted); }
.row .op { color: var(--fg-muted); }

.cursor {
  display: inline-block;
  width: 1px;
  height: 1.05em;
  background: var(--fg);
  margin-left: 1px;
  vertical-align: -0.18em;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.editor-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.2));
  font-size: 11.5px;
  color: var(--fg-muted);
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(181, 220, 114, 0.55);
}
.status-spacer { flex: 1; }
.status-icons { display: inline-flex; gap: 12px; }
.status-icon {
  width: 14px; height: 14px;
  background: var(--fg-muted);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  cursor: pointer;
  transition: background 200ms var(--easing-soft), transform 200ms var(--easing);
}
.status-icon:hover { background: var(--accent-strong); transform: translateY(-1px); }
.icon-wand {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M11.6 2.6L13.4 4.4 4.5 13.3l-1.8-1.8L11.6 2.6zM12.5 1l1.5 1.5-1 1L11.5 2l1-1zm-9 11l1.5 1.5-.6.6-1.5-1.5.6-.6z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M11.6 2.6L13.4 4.4 4.5 13.3l-1.8-1.8L11.6 2.6zM12.5 1l1.5 1.5-1 1L11.5 2l1-1zm-9 11l1.5 1.5-.6.6-1.5-1.5.6-.6z'/></svg>");
}
.icon-bubble {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M2 4a2 2 0 012-2h8a2 2 0 012 2v6a2 2 0 01-2 2H7l-3 3v-3a2 2 0 01-2-2V4z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M2 4a2 2 0 012-2h8a2 2 0 012 2v6a2 2 0 01-2 2H7l-3 3v-3a2 2 0 01-2-2V4z'/></svg>");
}
.icon-bulb {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M8 1a5 5 0 00-3 9v2a1 1 0 001 1h4a1 1 0 001-1v-2a5 5 0 00-3-9zm-1 14h2v.5a.5.5 0 01-.5.5h-1a.5.5 0 01-.5-.5V15z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M8 1a5 5 0 00-3 9v2a1 1 0 001 1h4a1 1 0 001-1v-2a5 5 0 00-3-9zm-1 14h2v.5a.5.5 0 01-.5.5h-1a.5.5 0 01-.5-.5V15z'/></svg>");
}

/* Floating AI bubble */
.floating-ai {
  position: absolute;
  right: -28px;
  bottom: 36px;
  width: 320px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--easing-soft), transform 600ms var(--easing);
  pointer-events: none;
}
.floating-ai.show { opacity: 1; transform: translateY(0); }
.ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 17, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg);
  margin-bottom: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
.ai-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 4px rgba(184, 157, 255, 0.25);
  animation: pulseDot 1.8s var(--easing) infinite;
}
.ai-bubble {
  position: relative;
  background: linear-gradient(145deg, rgba(111, 182, 214, 0.14), rgba(184, 157, 255, 0.12));
  border: 1px solid rgba(184, 157, 255, 0.35);
  padding: 16px 18px;
  border-radius: 16px;
  font-size: 14px;
  color: var(--fg);
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 40px rgba(184, 157, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.ai-bubble strong { color: var(--accent-strong); font-weight: 600; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 56px 0 72px; }
  .hero-stage { transform: scale(0.96); }
  .window { transform: rotateY(0) rotateX(0); }
  .floating-ai { right: 8px; bottom: 8px; width: 280px; }
  .window-body { grid-template-columns: 140px 1fr; min-height: 360px; }
}
@media (max-width: 600px) {
  .hero-stage { display: none; }
}

/* =========================================================
   Metrics
   ========================================================= */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 24px 0 80px;
}
.metric {
  text-align: center;
  padding: 28px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  border: 1px solid var(--border);
}
.metric-num {
  display: block;
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--grad-ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.metric-label {
  display: block;
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 500;
}
@media (max-width: 720px) { .metrics { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   AI section
   ========================================================= */
.ai { padding: 80px 0; }

.ai-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.ai-tab {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  text-align: left;
  transition: background 220ms var(--easing-soft), border-color 220ms var(--easing-soft), color 220ms var(--easing-soft), transform 220ms var(--easing);
}
.ai-tab:hover { background: var(--surface-2); color: var(--fg); transform: translateY(-2px); }
.ai-tab.active {
  background: var(--surface-2);
  border-color: rgba(184, 157, 255, 0.45);
  color: var(--fg);
  box-shadow: 0 0 0 1px rgba(184, 157, 255, 0.18), 0 14px 30px rgba(184, 157, 255, 0.12);
}
.tab-keys { display: inline-flex; gap: 4px; }
.tab-name { font-size: 14px; font-weight: 600; }

.ai-panels { position: relative; min-height: 360px; }
.ai-panel {
  display: none;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--border);
  animation: panelIn 420ms var(--easing);
}
.ai-panel.active { display: grid; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.ai-panel-text h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 14px;
  word-break: keep-all;
  text-wrap: balance;
}
.ai-panel-text p { color: var(--fg-muted); font-size: 15px; margin-bottom: 22px; }
.ai-panel-text code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(111, 182, 214, 0.12);
  color: var(--accent-strong);
}

.check-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 8px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--grad-ai);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M2 8.5l4 4 8-9'  stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2 8.5l4 4 8-9' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.ai-panel-demo {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 14px;
  position: relative;
}
.demo-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.demo-prompt {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-soft);
}
.demo-text { color: var(--fg); }
.demo-row code {
  background: none;
  padding: 0;
  color: var(--fg);
  white-space: pre-wrap;
}
.demo-row code em {
  font-style: normal;
  color: var(--green);
  font-weight: 600;
}
.demo-row .comment { color: var(--fg-soft); }
.demo-row.demo-row-output {
  background: rgba(111, 182, 214, 0.06);
  border-color: rgba(111, 182, 214, 0.25);
  position: relative;
}
.demo-row.demo-row-output::before {
  content: "✦";
  position: absolute;
  top: 12px; right: 14px;
  background: var(--grad-ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 16px;
}
.demo-summary p { color: var(--fg); font-size: 14px; line-height: 1.6; }
.demo-summary strong { color: var(--accent-strong); }

.demo-arrow {
  align-self: center;
  color: var(--fg-soft);
  font-size: 18px;
  line-height: 1;
}

.demo-error code {
  color: var(--red);
}
.caret-blink {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--red);
  margin-left: 2px;
  vertical-align: -0.18em;
  animation: blink 0.9s steps(2) infinite;
}
.demo-tag {
  align-self: flex-start;
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 4px;
}
.tag-err { background: rgba(224, 108, 117, 0.15); color: var(--red); border: 1px solid rgba(224, 108, 117, 0.35); }

@media (max-width: 880px) {
  .ai-tabs { grid-template-columns: repeat(2, 1fr); }
  .ai-panel { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
}

/* =========================================================
   Bento Features
   ========================================================= */
.features { padding: 80px 0; }

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 16px;
}
.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 320ms var(--easing), border-color 320ms var(--easing-soft), box-shadow 320ms var(--easing);
}
.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--cx, 50%) var(--cy, 0%), rgba(111, 182, 214, 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 360ms var(--easing-soft);
  pointer-events: none;
}
.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
}
.bento-card:hover::before { opacity: 1; }

.bento-card header h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}
.bento-card header p { color: var(--fg-muted); font-size: 13.5px; line-height: 1.6; }
.bento-card code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(111, 182, 214, 0.1);
  color: var(--accent-strong);
}

.bento-units { grid-column: span 3; }
.bento-dates { grid-column: span 3; }
.bento-bits { grid-column: span 3; }
.bento-refs { grid-column: span 3; }
.bento-cloud { grid-column: span 2; }
.bento-menu { grid-column: span 2; }
.bento-export { grid-column: span 2; }
.bento-fns { grid-column: span 6; }

.bento-demo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
}
.bd-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; }
.bd-expr { color: var(--fg); white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.bd-eq { color: var(--fg-soft); }
.bd-val { color: var(--green); font-weight: 500; text-align: right; }

.cloud-icon { color: var(--accent); margin-bottom: 4px; }
.cloud-icon svg { filter: drop-shadow(0 8px 18px rgba(111, 182, 214, 0.35)); }

.menubar-mock {
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  overflow: hidden;
}
.menubar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #2a2e33, #1f2227);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--fg-muted);
}
.mb-app.active { color: var(--fg); font-weight: 600; }
.mb-clock { margin-left: auto; }
.menubar-pop { padding: 10px 12px; font-family: var(--font-mono); font-size: 12px; }
.mp-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.mp-row .mp-val { color: var(--green); }

.bento-files { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
.file-tile {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--fg-muted);
}
.file-ext {
  display: inline-flex;
  align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--grad-ai);
  color: #0e1014;
  letter-spacing: 0.05em;
}

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card { grid-column: auto !important; }
}
@media (max-width: 540px) {
  .bento { grid-template-columns: 1fr; }
}

/* =========================================================
   Privacy
   ========================================================= */
.privacy { padding: 80px 0; }
.privacy-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.priv-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.priv-card.priv-highlight {
  border-color: rgba(184, 157, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(184, 157, 255, 0.15), 0 24px 60px rgba(184, 157, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(184, 157, 255, 0.07), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface-1));
}
.priv-card h3 { font-size: 17px; font-weight: 600; }
.priv-card p { font-size: 14px; color: var(--fg-muted); line-height: 1.7; }
.priv-card em { color: var(--accent-strong); font-style: normal; }

.priv-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(111, 182, 214, 0.12);
  display: grid;
  place-items: center;
  position: relative;
}
.priv-icon::after {
  content: "";
  width: 22px; height: 22px;
  background: var(--grad-ai);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.icon-shield::after { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2l8 3v7c0 5-3.5 8.5-8 10-4.5-1.5-8-5-8-10V5l8-3z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2l8 3v7c0 5-3.5 8.5-8 10-4.5-1.5-8-5-8-10V5l8-3z'/></svg>"); }
.icon-key::after { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M14 9a5 5 0 11-3.9 8.1L4 22l-2-2 4-4-1-1 1-1 1 1 1-1-1-1 2-2A5 5 0 0114 4a5 5 0 010 5zm1-2a1.5 1.5 0 100 3 1.5 1.5 0 000-3z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M14 9a5 5 0 11-3.9 8.1L4 22l-2-2 4-4-1-1 1-1 1 1 1-1-1-1 2-2A5 5 0 0114 4a5 5 0 010 5zm1-2a1.5 1.5 0 100 3 1.5 1.5 0 000-3z'/></svg>"); }
.icon-chip::after { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 1v3H7a3 3 0 00-3 3v2H1v2h3v4H1v2h3v2a3 3 0 003 3h2v3h2v-3h4v3h2v-3h2a3 3 0 003-3v-2h3v-2h-3V11h3V9h-3V7a3 3 0 00-3-3h-2V1h-2v3h-4V1H9zm-2 6h10v10H7V7z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 1v3H7a3 3 0 00-3 3v2H1v2h3v4H1v2h3v2a3 3 0 003 3h2v3h2v-3h4v3h2v-3h2a3 3 0 003-3v-2h3v-2h-3V11h3V9h-3V7a3 3 0 00-3-3h-2V1h-2v3h-4V1H9zm-2 6h10v10H7V7z'/></svg>"); }

@media (max-width: 880px) { .privacy-cards { grid-template-columns: 1fr; } }

/* =========================================================
   Specs
   ========================================================= */
.specs { padding: 60px 0; }
.specs-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-1);
}
.spec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.spec-item:nth-child(2n) { border-right: none; }
.spec-item:nth-last-child(-n+2) { border-bottom: none; }
.spec-item dt { color: var(--fg-muted); font-size: 13px; font-weight: 500; }
.spec-item dd { font-weight: 600; font-size: 14px; }
.spec-item dd a { color: var(--accent-strong); transition: color 200ms var(--easing-soft); }
.spec-item dd a:hover { color: var(--fg); }
@media (max-width: 720px) {
  .specs-list { grid-template-columns: 1fr; }
  .spec-item { border-right: none; }
  .spec-item:nth-last-child(2) { border-bottom: 1px solid var(--border); }
}

/* =========================================================
   CTA
   ========================================================= */
.cta { padding: 100px 0 80px; }
.cta-card {
  position: relative;
  text-align: center;
  padding: 64px 32px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(1200px circle at 50% 0%, rgba(184, 157, 255, 0.18), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid rgba(184, 157, 255, 0.25);
  overflow: hidden;
  isolation: isolate;
}
.cta-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: var(--grad-ai);
  filter: blur(50px);
  opacity: 0.18;
  z-index: -1;
}
.cta-card h2 {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--grad-ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
.cta-card p {
  color: var(--fg-muted);
  max-width: 540px;
  margin: 0 auto 28px;
  font-size: 15px;
  line-height: 1.7;
}
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  padding: 32px 0 56px;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.footer-brand img { border-radius: 7px; }
.footer-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 13.5px;
  color: var(--fg-muted);
  transition: color 200ms var(--easing-soft);
}
.footer-nav a:hover { color: var(--fg); }
.footer-meta {
  font-size: 12.5px;
  color: var(--fg-soft);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-sep { opacity: 0.5; }

/* =========================================================
   Reveal animation
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--easing), transform 700ms var(--easing);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.is-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--easing), transform 600ms var(--easing);
}
.reveal.is-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--i, 0) * 60ms);
}
