/* ░░░░░░ rm.backgroundlocal — landing ░░░░░░ */
:root {
  --bg: #0f0f12;
  --bg-2: #131319;
  --panel: #17171c;
  --panel-2: #1f1f27;
  --border: #2a2a35;
  --text: #e7e7ee;
  --text-dim: #9b9bab;
  --accent: #7c5cff;
  --accent-2: #a78bff;
  --ok: #3ddc97;
  --max: 1160px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code, .term-type, .codeblock code { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ░░░ animated backdrop ░░░ */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
  radial-gradient(1200px 700px at 80% -10%, rgba(124,92,255,0.14), transparent 60%),
  radial-gradient(900px 600px at 0% 20%, rgba(124,92,255,0.08), transparent 55%),
  var(--bg); }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; }
.orb-1 { width: 420px; height: 420px; top: -80px; right: -60px; background: radial-gradient(circle, rgba(124,92,255,0.55), transparent 70%); }
.orb-2 { width: 360px; height: 360px; top: 40%; left: -120px; background: radial-gradient(circle, rgba(61,220,151,0.22), transparent 70%); }
.orb-3 { width: 500px; height: 500px; bottom: -160px; right: 10%; background: radial-gradient(circle, rgba(124,92,255,0.30), transparent 70%); }
.grid-glow { position: absolute; inset: 0; background-image:
  linear-gradient(rgba(124,92,255,0.05) 1px, transparent 1px),
  linear-gradient(90deg, rgba(124,92,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(1000px 700px at 50% 0%, #000, transparent 80%); }

/* ░░░ nav ░░░ */
.nav {
  position: sticky; top: 0; z-index: 50; width: 100%;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled { background: rgba(15,15,18,0.72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 16px 24px;
  display: flex; flex-wrap: nowrap; align-items: center; gap: 24px;
  transition: padding 0.3s;
}
.nav.scrolled .nav-inner { padding: 11px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand { flex: 0 0 auto; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto; }
.brand-name { font-weight: 700; white-space: nowrap; }
.wm-dot { color: var(--accent); }
.wm-local { color: var(--text-dim); font-weight: 400; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; }
.nav-links a { color: var(--text-dim); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
  color: var(--text); background: var(--panel);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.nav-cta:hover { border-color: var(--accent); background: var(--panel-2); color: #fff; }
.nav-cta svg { width: 14px; height: 14px; }
.lang-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--panel); }
.lang-toggle button { background: none; border: 0; color: var(--text-dim); font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.03em; padding: 6px 11px; cursor: pointer; transition: color 0.2s, background 0.2s; }
.lang-toggle button.active { color: #fff; background: var(--accent); }
.lang-toggle button:not(.active):hover { color: var(--text); }

/* ░░░ buttons ░░░ */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 12px; font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid transparent; transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 10px 30px -8px rgba(124,92,255,0.65); }
.btn-primary:hover { box-shadow: 0 14px 38px -8px rgba(124,92,255,0.8); transform: translateY(-2px); }
.btn-ghost { background: var(--panel-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; transform: translateY(-2px); }

/* ░░░ layout ░░░ */
.section { max-width: var(--max); margin: 0 auto; padding: 100px 24px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(28px, 4.5vw, 46px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; line-height: 1.1; }
.section-head p { color: var(--text-dim); font-size: 17px; margin: 0; }
.accent { background: linear-gradient(180deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ░░░ hero ░░░ */
.hero { max-width: var(--max); margin: 0 auto; padding: 70px 24px 60px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; min-height: 78vh; }
.pill-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); background: var(--panel); border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }
.pill-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(61,220,151,0.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,0.5);} 70% { box-shadow: 0 0 0 8px rgba(61,220,151,0);} 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0);} }
.hero-title { font-size: clamp(40px, 7vw, 76px); font-weight: 900; letter-spacing: -0.03em; line-height: 0.98; margin: 0 0 20px; }
.hero-title .line { display: block; }
.hero-sub { font-size: 18px; color: var(--text-dim); max-width: 460px; margin: 0 0 30px; }
.hero-sub b { color: var(--text); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-term { margin-top: 30px; background: #0b0b0e; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; max-width: 460px; }
.term-bar { display: flex; gap: 7px; padding: 11px 14px; background: var(--panel); border-bottom: 1px solid var(--border); }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a3a45; }
.term-bar span:first-child { background: #ff5f57; } .term-bar span:nth-child(2) { background: #febc2e; } .term-bar span:nth-child(3) { background: #28c840; }
.term-line { display: block; padding: 16px 16px 18px; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; }
.term-prompt { color: var(--accent); margin-right: 8px; }
.term-cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ░░░ before / after ░░░ */
.hero-demo { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ba {
  position: relative; width: 100%; max-width: 440px; aspect-ratio: 1 / 1;
  border-radius: 18px; overflow: hidden; user-select: none; touch-action: pan-y;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -30px rgba(124,92,255,0.5), 0 0 0 1px rgba(255,255,255,0.03) inset;
  background:
    conic-gradient(#2a2a35 25%, #1f1f27 0 50%, #2a2a35 0 75%, #1f1f27 0) 0 0 / 22px 22px;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { clip-path: inset(0 50% 0 0); will-change: clip-path; }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); cursor: ew-resize; z-index: 4;
}
.ba-handle svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: var(--accent); background: #fff; border-radius: 50%; padding: 7px; box-shadow: 0 6px 18px rgba(0,0,0,0.45); }
.ba-handle:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.ba-label { position: absolute; top: 12px; z-index: 3; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 11px; border-radius: 8px; background: rgba(11,11,14,0.82); backdrop-filter: blur(4px); }
.ba-label-before { left: 12px; }
.ba-label-after { right: 12px; }
.ba-bg-picker {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap; width: 100%; max-width: 440px;
}
.ba-bg-label { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.ba-bg-swatches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ba-swatch {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border);
  cursor: pointer; padding: 0; background-clip: padding-box; transition: border-color 0.2s, transform 0.15s;
}
.ba-swatch:hover { transform: scale(1.08); }
.ba-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(124,92,255,0.35); }
.ba-swatch-checker {
  background:
    linear-gradient(45deg, #2a2a35 25%, transparent 25%),
    linear-gradient(-45deg, #2a2a35 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2a35 75%),
    linear-gradient(-45deg, transparent 75%, #2a2a35 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, 5px 0;
  background-color: #1f1f27;
}
.ba-swatch-custom {
  position: relative; overflow: hidden;
  background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
}
.ba-swatch-custom input {
  position: absolute; inset: -4px; opacity: 0; cursor: pointer; width: calc(100% + 8px); height: calc(100% + 8px);
}
.ba-quality {
  display: inline-flex; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: var(--panel); margin-left: 2px;
}
.ba-quality-btn {
  background: none; border: 0; color: var(--text-dim); font-family: inherit;
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 7px 11px; cursor: pointer; transition: color 0.2s, background 0.2s;
}
.ba-quality-btn.active { color: #fff; background: var(--accent); }
.ba-quality-btn:not(.active):hover { color: var(--text); }
.ba-caption { color: var(--text-dim); font-size: 13px; margin: 0; }

/* ░░░ privacy pills ░░░ */
.pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.priv-card { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; transition: transform 0.25s, border-color 0.25s; }
.priv-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.priv-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: rgba(124,92,255,0.12); color: var(--accent-2); margin-bottom: 16px; }
.priv-ico svg { width: 24px; height: 24px; }
.priv-card h3 { margin: 0 0 6px; font-size: 17px; }
.priv-card p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* ░░░ features ░░░ */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; overflow: hidden; transition: transform 0.25s, border-color 0.25s; }
.feature::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.4s ease;
  background-color: #1f1f27;
  background-image:
    linear-gradient(45deg, #2e2e38 25%, transparent 25%),
    linear-gradient(-45deg, #2e2e38 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2e2e38 75%),
    linear-gradient(-45deg, transparent 75%, #2e2e38 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, 6px 0;
  -webkit-mask-image: radial-gradient(
    ellipse 72% 58% at var(--mx, 50%) var(--my, 50%),
    rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 38%, transparent 68%
  );
  mask-image: radial-gradient(
    ellipse 72% 58% at var(--mx, 50%) var(--my, 50%),
    rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 38%, transparent 68%
  );
}
.feature:hover { transform: translateY(-5px); border-color: var(--accent); }
.feature:hover::before { opacity: 0.32; }
.feature > * { position: relative; z-index: 1; }
.f-ico { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 13px; background: rgba(124,92,255,0.12); color: var(--accent-2); margin-bottom: 18px; }
.f-ico svg { width: 26px; height: 26px; }
.feature h3 { margin: 0 0 8px; font-size: 19px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 14.5px; }
.feature code { color: var(--accent-2); font-size: 0.9em; background: rgba(124,92,255,0.1); padding: 1px 5px; border-radius: 5px; }

/* ░░░ models table ░░░ */
.model-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.mt-row { display: grid; grid-template-columns: 1.1fr 1.6fr 0.9fr; gap: 16px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.mt-row:last-child { border-bottom: 0; }
.mt-head { background: var(--panel-2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); font-weight: 600; }
.mt-row:not(.mt-head):hover { background: rgba(124,92,255,0.06); }
.mt-row code { color: var(--accent-2); }
.tag-default { display: inline-block; margin-left: 8px; font-size: 10px; font-style: normal; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ok); border: 1px solid rgba(61,220,151,0.4); border-radius: 999px; padding: 1px 7px; vertical-align: middle; }
.mt-row span:nth-child(2) { color: var(--text-dim); }
.speed { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.speed i { display: block; height: 7px; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); width: 0; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.model-table.in-view .speed i { width: var(--w); }

/* ░░░ showcase (alternating rows) ░░░ */
.showcase { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 72px; }
.show-row { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.show-row.reverse .show-media { order: 2; }
.show-media { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: 0 24px 60px -32px rgba(124,92,255,0.55); transition: transform 0.3s, box-shadow 0.3s; }
.show-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.show-media:hover { transform: translateY(-5px); box-shadow: 0 30px 72px -28px rgba(124,92,255,0.72); }
.show-tag { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-2); font-weight: 700; }
.show-text h3 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; line-height: 1.15; margin: 8px 0 12px; }
.show-text p { color: var(--text-dim); font-size: 15.5px; margin: 0 0 18px; }
.show-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.show-points li { font-size: 12.5px; color: var(--text); background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; }

/* ░░░ install ░░░ */
.install-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
  align-items: stretch; width: 100%; max-width: 100%; margin-inline: auto;
}
.inst-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.inst-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 24px 60px -30px rgba(124,92,255,0.7); }
.inst-card header { margin-bottom: 16px; }
.inst-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-2); font-weight: 700; }
.inst-card h3 { margin: 6px 0 0; font-size: 18px; }
.inst-card h3 code, .inst-card p code { color: var(--accent-2); font-size: 0.85em; }
.inst-card > p { color: var(--text-dim); font-size: 13.5px; margin: 0; margin-top: auto; padding-top: 14px; }
.codeblock { position: relative; display: flex; align-items: center; gap: 8px; background: #0b0b0e; border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; margin-top: 10px; overflow: hidden; }
.codeblock code { font-size: 12.5px; white-space: nowrap; overflow-x: auto; flex: 1; color: var(--text); scrollbar-width: none; }
.codeblock code::-webkit-scrollbar { display: none; }
.codeblock code .muted { color: var(--text-dim); }
.copy { flex: 0 0 auto; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim); font-size: 11px; padding: 5px 10px; border-radius: 7px; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.copy:hover { color: #fff; border-color: var(--accent); }
.copy.done { color: var(--ok); border-color: var(--ok); }

/* ░░░ final cta ░░░ */
.finalcta { text-align: center; max-width: 720px; margin: 0 auto; padding: 90px 24px 60px; }
.finalcta-logo { width: 78px; height: 78px; border-radius: 18px; margin: 0 auto 24px; box-shadow: 0 20px 50px -16px rgba(124,92,255,0.7); }
.finalcta h2 { font-size: clamp(30px, 5vw, 50px); font-weight: 900; letter-spacing: -0.02em; margin: 0 0 12px; }
.finalcta p { color: var(--text-dim); font-size: 18px; margin: 0 0 28px; }
.finalcta .hero-cta { justify-content: center; }

/* ░░░ footer ░░░ */
.footer { max-width: var(--max); margin: 0 auto; padding: 40px 24px 60px; border-top: 1px solid var(--border); }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.foot-brand img { width: 28px; height: 28px; border-radius: 8px; }
.foot-brand .wm { font-weight: 700; }
.foot-brand .wm-dot { color: var(--accent); }
.foot-brand .wm-local { color: var(--text-dim); font-weight: 400; }
.foot-links { display: flex; gap: 22px; font-size: 14px; }
.foot-links a { color: var(--text-dim); } .foot-links a:hover { color: var(--text); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 20px; margin-top: 26px; }
.foot-by { font-size: 13px; color: var(--text-dim); }
.foot-by b { color: var(--text); font-weight: 600; }
.foot-coffee { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.foot-coffee:hover { border-color: var(--accent); background: var(--panel-2); transform: translateY(-1px); }
.foot-note { color: var(--text-dim); font-size: 12.5px; margin: 14px 0 0; text-align: center; }

/* ░░░ reveal animation base (GSAP toggles) ░░░ */
[data-reveal], [data-stagger] { will-change: transform, opacity; }

/* ░░░ responsive ░░░ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: auto; padding-top: 50px; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-cta, .hero-term { margin-left: auto; margin-right: auto; }
  .hero-demo { order: -1; }
  .pills { grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .install-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install-grid .inst-card:last-child:nth-child(3) {
    grid-column: 1 / -1; max-width: calc(50% - 10px); justify-self: center;
  }
  .show-row { grid-template-columns: 1fr; gap: 22px; }
  .show-row.reverse .show-media { order: 0; }
  .show-media { max-width: 460px; margin: 0 auto; }
  .showcase { gap: 56px; }
}
/* Hide nav-links earlier so the brand + lang + GitHub never get squeezed */
@media (max-width: 880px) {
  .nav-links { display: none; }
}
/* Drop the " local" sub-word so the wordmark stays on one line */
@media (max-width: 720px) {
  .brand-name .wm-local { display: none; }
}
@media (max-width: 620px) {
  .nav-inner { gap: 10px; padding: 12px 14px; }
  .nav.scrolled .nav-inner { padding: 10px 14px; }
  .brand-name { font-size: 14px; }
  .brand-logo { width: 30px; height: 30px; }
  .lang-toggle button { padding: 5px 8px; }
  .nav-cta { padding: 5px 10px; }
  .section { padding: 70px 20px; }
  .pills, .feature-grid, .install-grid { grid-template-columns: 1fr; }
  .mt-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
  .mt-head { display: none; }
  .speed { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb, .pill-badge .dot, .term-cursor { animation: none !important; }
}
