/* ==========================================================================
   KomaAI — Official Website
   Design language: "Dark Ink Studio" (mirrors the Android app theme)
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --obsidian: #0D0F14;
  --slate: #151922;
  --card: #171C27;
  --card-hi: #1E2430;
  --line: #262E3D;
  --line-soft: #1E2531;

  --indigo: #6C8CFF;
  --indigo-2: #8F9DFF;
  --violet: #A78BFA;
  --amber: #F5A623;
  --jade: #3DD598;
  --crimson: #FF5C6C;

  --text: #ECF0FA;
  --muted: #9BA6BC;
  --dim: #76819A;

  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --container: 1160px;
  --radius: 20px;
  --radius-lg: 26px;
  --radius-sm: 12px;
  --header-h: 68px;

  --shadow-lg: 0 40px 80px -28px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 120px -40px rgba(108, 140, 255, 0.55);

  --ease: cubic-bezier(0.22, 0.68, 0.29, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  min-height: 100dvh;
  background: var(--obsidian);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient studio lighting + fine grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 12% -8%, rgba(108, 140, 255, 0.17), transparent 62%),
    radial-gradient(760px 540px at 96% -4%, rgba(167, 139, 250, 0.13), transparent 60%),
    radial-gradient(900px 700px at 50% 108%, rgba(108, 140, 255, 0.07), transparent 62%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { padding: 0; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(108, 140, 255, 0.32); color: #fff; }

/* ---------- Layout primitives ---------- */
.container {
  width: min(var(--container), calc(100% - 2.5rem));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}
.container-narrow { width: min(760px, calc(100% - 2.5rem)); margin-inline: auto; position: relative; z-index: 1; }

main { position: relative; z-index: 1; }

.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section-tight { padding-block: clamp(2.5rem, 4.5vw, 4rem); }
.section + .section { padding-top: 0; }

/* Without this the sticky header covers the heading you just jumped to. */
main [id] { scroll-margin-top: calc(var(--header-h) + 1.5rem); }

.stack { display: grid; gap: 1rem; }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--indigo); color: #0B0D12; font-weight: 700;
  padding: 0.7rem 1.15rem; border-radius: 10px; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.032em; }
h1 { font-size: clamp(2.35rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.12rem, 1.7vw, 1.35rem); letter-spacing: -0.02em; line-height: 1.3; }
h4 { font-size: 1rem; letter-spacing: -0.01em; }

p { color: var(--muted); }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.16rem); line-height: 1.7; color: var(--muted); max-width: 62ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--indigo-2);
}
.eyebrow::before {
  content: ''; width: 18px; height: 1px; background: currentColor; opacity: 0.6;
}
.eyebrow.plain::before { display: none; }

.gradient-text {
  background: linear-gradient(102deg, #FFFFFF 8%, #B9C6FF 48%, #8E7CF5 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.text-amber { color: var(--amber); }
.text-jade { color: var(--jade); }
.text-indigo { color: var(--indigo); }

.mono { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.01em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.85rem 1.45rem; border-radius: 12px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.94rem; letter-spacing: -0.01em;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn-primary {
  background: linear-gradient(180deg, #7E9AFF, var(--indigo));
  color: #0A0C11;
  box-shadow: 0 10px 26px -10px rgba(108, 140, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover { box-shadow: 0 16px 34px -10px rgba(108, 140, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35); transform: translateY(-2px); }
.btn-ghost {
  border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, 0.022);
}
.btn-ghost:hover { border-color: #3A465E; background: rgba(255, 255, 255, 0.05); transform: translateY(-2px); }
.btn-amber {
  background: linear-gradient(180deg, #FFBB4D, var(--amber)); color: #17120A;
  box-shadow: 0 12px 28px -12px rgba(245, 166, 35, 0.7);
}
.btn-sm { padding: 0.58rem 1rem; font-size: 0.85rem; border-radius: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--indigo-2); font-weight: 650; font-size: 0.92rem;
}
.link-arrow svg { transition: transform 0.2s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.site-header.is-stuck {
  background: rgba(13, 15, 20, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line-soft);
}
/* `.container` supplies the width and side gutters here — don't set width on
   this element or the bar sits flush with the window while the body stays inset. */
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.22rem;
  letter-spacing: -0.035em; color: #fff; transition: opacity 0.2s;
}
.brand:hover .brand-name { opacity: 0.82; }
.brand-accent { color: var(--indigo); }

.nav { display: flex; align-items: center; gap: 0.1rem; }
.nav a {
  position: relative; padding: 0.5rem 0.82rem; border-radius: 9px;
  font-size: 0.9rem; font-weight: 550; color: var(--muted); white-space: nowrap;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.nav a.is-active {
  color: var(--text);
  background: rgba(108, 140, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(108, 140, 255, 0.22);
}
.nav-lang {
  position: relative;
  display: inline-flex !important; align-items: center;
  margin-left: 1.05rem !important; padding: 0.34rem 0.62rem !important;
  font-family: var(--font-mono) !important; font-size: 0.72rem !important;
  font-weight: 500 !important; letter-spacing: 0.06em;
  color: var(--dim) !important; background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid var(--line) !important; border-radius: 9px !important;
  transition: color 0.18s, border-color 0.18s, background 0.18s !important;
}
.nav-lang::before {
  content: ''; position: absolute; left: -0.55rem; top: 50%;
  width: 1px; height: 18px; margin-top: -9px; background: var(--line);
}
.nav-lang:hover {
  color: var(--text) !important; border-color: #3A465E !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.nav-toggle span {
  display: block; width: 17px; height: 1.8px; border-radius: 2px; background: var(--text);
  transition: transform 0.24s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0.15rem;
    padding: 1rem 1.25rem 1.5rem;
    background: rgba(13, 15, 20, 0.97);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform 0.24s var(--ease), opacity 0.24s, visibility 0.24s;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav a { padding: 0.72rem 0.7rem; font-size: 0.98rem; border-radius: 10px; }
  .nav a.is-active { background: rgba(108, 140, 255, 0.12); box-shadow: none; }
  .nav-lang { align-self: flex-start; margin: 0.6rem 0 0 !important; }
  .nav-lang::before { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5.5rem); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-copy { display: grid; gap: 1.45rem; justify-items: start; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.85rem 0.4rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem; font-weight: 550; color: var(--muted);
}
.hero-badge .pill-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--jade);
  box-shadow: 0 0 0 3px rgba(61, 213, 152, 0.16); margin-left: 0.35rem;
}
.hero h1 { max-width: 17ch; }
.hero .lead { max-width: 46ch; }
.hero-note { font-size: 0.8rem; color: var(--dim); display: flex; align-items: center; gap: 0.4rem; }
.hero-note svg { flex-shrink: 0; color: var(--jade); }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual::before {
  content: ''; position: absolute; inset: -12% -18%; z-index: 0;
  background: radial-gradient(closest-side, rgba(108, 140, 255, 0.28), transparent 72%);
  filter: blur(8px); pointer-events: none;
}

/* Phone frame */
.phone {
  position: relative; z-index: 1;
  width: min(306px, 100%);
  padding: 9px;
  border-radius: 42px;
  background: linear-gradient(160deg, #2A3142 0%, #14181F 34%, #10131A 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: var(--shadow-lg), var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.phone::before {
  content: ''; position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  width: 64px; height: 5px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); z-index: 3;
}
.phone img {
  width: 100%; border-radius: 34px; display: block;
}
.phone-glare {
  position: absolute; inset: 9px; border-radius: 34px; pointer-events: none; z-index: 2;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1) 0%, transparent 26%);
  mix-blend-mode: screen;
}

/* Floating chips around phone */
.float-chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.8rem; border-radius: 11px;
  background: rgba(23, 28, 39, 0.92); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text);
  box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  animation: float 7s ease-in-out infinite;
}
.float-chip svg { color: var(--indigo); }
.float-chip.is-amber svg { color: var(--amber); }
.float-a { top: 12%; left: -6%; }
.float-b { bottom: 18%; right: -4%; animation-delay: -3.4s; }
/* Below this width the container margin is too small for the chips to hang
   outside the grid column without being clipped by the viewport. */
@media (max-width: 1220px) {
  .float-a { left: 0; }
  .float-b { right: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* The three hero buttons need ~500px; below this width the copy column gets
   too narrow and they wrap, so the hero stacks instead. */
@media (max-width: 1060px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { justify-items: start; }
  .hero h1 { max-width: 22ch; }
  .hero-visual { margin-top: 1rem; }
  /* Single column: no room beside the phone, so drop the floating chips. */
  .float-chip { display: none; }
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 36, 48, 0.55), rgba(21, 25, 34, 0.55));
  overflow: hidden;
}
.stat { padding: 1.35rem 1.25rem; border-left: 1px solid var(--line-soft); }
.stat:first-child { border-left: 0; }
.stat-value {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.04em; color: #fff; line-height: 1.1;
}
.stat-value span { font-size: 0.62em; color: var(--indigo); margin-left: 0.15em; }
.stat-label { margin-top: 0.3rem; font-size: 0.79rem; color: var(--dim); line-height: 1.4; letter-spacing: 0.01em; }
@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
}

/* ---------- Section header ---------- */
.section-head { display: grid; gap: 0.9rem; max-width: 640px; margin-bottom: clamp(2rem, 3.4vw, 3rem); }
.section-head.is-center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head h2 { max-width: 22ch; }
.section-head.is-center h2 { max-width: 26ch; }
.section-head .lead { max-width: 55ch; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  padding: 1.55rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-hi) 0%, #141821 100%);
  transition: transform 0.22s var(--ease), border-color 0.22s, box-shadow 0.28s;
  overflow: hidden;
}
.card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(320px 160px at 50% 0%, rgba(108, 140, 255, 0.1), transparent 70%);
  opacity: 0; transition: opacity 0.28s;
}
.card:hover { transform: translateY(-3px); border-color: #33405A; box-shadow: 0 26px 50px -30px rgba(0, 0, 0, 0.9); }
.card:hover::after { opacity: 1; }
.card h3 { margin-bottom: 0.55rem; }
.card p { font-size: 0.925rem; line-height: 1.65; }
.card-body { display: grid; gap: 0.5rem; }

.icon-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(160deg, rgba(108, 140, 255, 0.22), rgba(108, 140, 255, 0.06));
  border: 1px solid rgba(108, 140, 255, 0.28);
  color: var(--indigo-2); margin-bottom: 1.05rem;
}
.icon-box.amber { background: linear-gradient(160deg, rgba(245, 166, 35, 0.2), rgba(245, 166, 35, 0.05)); border-color: rgba(245, 166, 35, 0.28); color: var(--amber); }
.icon-box.jade { background: linear-gradient(160deg, rgba(61, 213, 152, 0.2), rgba(61, 213, 152, 0.05)); border-color: rgba(61, 213, 152, 0.26); color: var(--jade); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.tag {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.02em;
  padding: 0.26rem 0.55rem; border-radius: 6px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); color: var(--dim);
}

/* ---------- Pipeline / steps ---------- */
.pipeline { display: grid; gap: 0; position: relative; }
.step {
  display: grid; grid-template-columns: 58px minmax(0, 1fr);
  gap: 1.15rem; padding: 1.15rem 0; position: relative;
}
.step:not(:last-child)::before {
  content: ''; position: absolute; left: 28px; top: 3.4rem; bottom: -0.35rem;
  width: 1px; background: linear-gradient(180deg, rgba(108, 140, 255, 0.42), rgba(108, 140, 255, 0.05));
}
.step-num {
  width: 56px; height: 40px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  color: var(--indigo-2); background: rgba(108, 140, 255, 0.09);
  border: 1px solid rgba(108, 140, 255, 0.24);
}
.step-body h3 { font-size: 1.02rem; margin-bottom: 0.25rem; }
.step-body p { font-size: 0.9rem; line-height: 1.6; }
.step.is-accent .step-num { color: var(--amber); background: rgba(245, 166, 35, 0.1); border-color: rgba(245, 166, 35, 0.26); }

.pipeline-split {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
}
@media (max-width: 720px) { .pipeline-split { grid-template-columns: 1fr; } }

.lane {
  padding: 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 36, 48, 0.6), rgba(19, 23, 31, 0.6));
}
.lane-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.9rem; }
.lane-title { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lane-rate {
  font-family: var(--font-mono); font-size: 0.68rem; padding: 0.2rem 0.5rem; border-radius: 6px;
  background: rgba(61, 213, 152, 0.12); color: var(--jade); border: 1px solid rgba(61, 213, 152, 0.24);
}
.lane-rate.slow { background: rgba(245, 166, 35, 0.12); color: var(--amber); border-color: rgba(245, 166, 35, 0.24); }
.lane ul { list-style: none; display: grid; gap: 0.5rem; }
.lane li {
  display: grid; grid-template-columns: 16px 1fr; gap: 0.6rem;
  font-size: 0.875rem; color: var(--muted); line-height: 1.5;
}
.lane li::before {
  content: ''; width: 6px; height: 6px; margin-top: 0.5rem; border-radius: 50%;
  background: var(--indigo); box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.14);
}
.lane:nth-child(2) li::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.14); }

/* ---------- Screenshot showcase ---------- */
.shots {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem; align-items: stretch;
  max-width: 920px; margin-inline: auto;
}

.shot {
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line); background: #0B0D12;
  box-shadow: 0 28px 60px -34px rgba(0, 0, 0, 0.95);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.shot:hover { transform: translateY(-4px); border-color: #34405A; box-shadow: 0 34px 66px -32px rgba(0, 0, 0, 0.95); }
/* One shared ratio — the three screenshots are within 1% of each other,
   so this crops nothing visible but lines every card up exactly. */
.shot img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 760 / 1587; object-fit: cover; object-position: top center;
  border-bottom: 1px solid var(--line);
}
.shot figcaption {
  flex: 1; padding: 0.8rem 0.95rem 0.9rem;
  font-size: 0.78rem; line-height: 1.45; color: var(--muted);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.024), transparent 70%);
}
.shot figcaption strong { display: block; color: var(--text); font-size: 0.875rem; margin-bottom: 0.15rem; font-family: var(--font-body); }

/* Below 980px the deck becomes a swipeable, snapping rail so it stops
   eating a whole screen and a half of vertical space. */
@media (max-width: 980px) {
  .shots {
    grid-template-columns: none; grid-auto-flow: column;
    grid-auto-columns: min(78%, 300px);
    max-width: none; justify-content: start;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 1.6rem; margin-inline: -4px;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shot { scroll-snap-align: start; }
}

/* ---------- Providers ---------- */
.provider-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.provider {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.6rem 0.95rem; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.028);
  font-size: 0.85rem; font-weight: 550; color: var(--text);
}
.provider .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--indigo); }
.provider.is-default { border-color: rgba(108, 140, 255, 0.42); background: rgba(108, 140, 255, 0.08); }
.provider.is-default .dot { background: var(--jade); box-shadow: 0 0 0 3px rgba(61, 213, 152, 0.16); }
.provider small { color: var(--dim); font-family: var(--font-mono); font-size: 0.68rem; }

/* ---------- Security band ---------- */
.band {
  position: relative; border-radius: var(--radius-lg);
  border: 1px solid var(--line); overflow: hidden;
  background:
    radial-gradient(680px 320px at 12% 0%, rgba(108, 140, 255, 0.16), transparent 66%),
    linear-gradient(180deg, #171C27, #12161E);
  padding: clamp(1.75rem, 4vw, 2.9rem);
}
.band-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 860px) { .band-grid { grid-template-columns: 1fr; } }
.sec-list { list-style: none; display: grid; gap: 0.9rem; }
.sec-list li { display: grid; grid-template-columns: 30px 1fr; gap: 0.8rem; align-items: start; }
.sec-ico {
  width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(61, 213, 152, 0.12); color: var(--jade); border: 1px solid rgba(61, 213, 152, 0.24);
  margin-top: 0.1rem;
}
.sec-list strong { display: block; font-size: 0.92rem; font-weight: 650; color: var(--text); }
.sec-list span { font-size: 0.85rem; color: var(--muted); line-height: 1.55; }

/* ---------- CTA ---------- */
.cta-panel {
  position: relative; text-align: center; overflow: hidden;
  padding: clamp(2.2rem, 5vw, 3.6rem) 1.5rem;
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  background:
    radial-gradient(560px 300px at 50% 0%, rgba(108, 140, 255, 0.22), transparent 70%),
    linear-gradient(180deg, #1A1F2B, #10141B);
}
.cta-panel::before {
  content: ''; position: absolute; inset: auto 50% -60% auto; width: 420px; height: 420px;
  transform: translateX(50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(167, 139, 250, 0.16), transparent);
  pointer-events: none;
}
.cta-panel > * { position: relative; }
.cta-panel h2 { max-width: 24ch; margin-inline: auto; }
.cta-panel .lead { margin: 0.9rem auto 1.6rem; max-width: 52ch; }
.cta-panel .btn-row { justify-content: center; }

.availability {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.5rem;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--dim);
  padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px dashed #313B4E;
}
.availability .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.14);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative; z-index: 1;
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(16, 19, 26, 0.4), rgba(10, 12, 16, 0.9));
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem); padding-block: clamp(2.4rem, 4vw, 3.4rem);
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { font-size: 0.875rem; max-width: 34ch; margin-top: 0.9rem; }
.footer-status {
  display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 1rem;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--dim);
}
.footer-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 0 3px rgba(61, 213, 152, 0.14); }
.footer-col h3 {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim);
  margin-bottom: 0.95rem;
}
.footer-col ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-col a { font-size: 0.885rem; color: var(--muted); transition: color 0.18s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; align-items: center;
  padding-block: 1.15rem 1.5rem; border-top: 1px solid var(--line-soft);
}
.footer-bottom p { font-size: 0.815rem; color: var(--dim); }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--text); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-hero .eyebrow { margin-bottom: 1rem; }
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { margin-top: 1.1rem; }
.page-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; margin-top: 1.5rem;
  font-family: var(--font-mono); font-size: 0.73rem; color: var(--dim);
}
.page-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.page-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: #3A4457; }

.crumbs { display: flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; color: var(--dim); margin-bottom: 1.1rem; }
.crumbs a:hover { color: var(--text); }
.crumbs svg { opacity: 0.5; }

/* ---------- Legal / prose layout ---------- */
.legal-layout {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
  padding-bottom: clamp(2rem, 5vw, 4rem);
}
.legal-layout > * { min-width: 0; }
@media (max-width: 960px) { .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }

.toc {
  position: sticky; top: calc(var(--header-h) + 1.5rem);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(23, 28, 39, 0.6); padding: 1.1rem 1rem;
}
@media (max-width: 960px) {
  .toc { position: static; }
  .toc ol { max-height: none; }
}
.toc h2 {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim);
  margin-bottom: 0.8rem;
}
.toc ol { list-style: none; display: grid; gap: 0.1rem; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: block; padding: 0.36rem 0.5rem; border-radius: 7px;
  font-size: 0.815rem; color: var(--muted); line-height: 1.4;
  transition: background 0.16s, color 0.16s;
  border-left: 2px solid transparent;
}
.toc a::before { content: counter(toc, decimal-leading-zero) '  '; font-family: var(--font-mono); font-size: 0.66rem; color: #4B5568; }
.toc a:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); }
.toc a.is-current { color: var(--text); background: rgba(108, 140, 255, 0.1); border-left-color: var(--indigo); }

.prose { max-width: 72ch; }
.prose > * + * { margin-top: 1rem; }
.prose h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.62rem); letter-spacing: -0.025em;
  margin-top: 2.9rem; padding-top: 0.2rem; scroll-margin-top: calc(var(--header-h) + 1.5rem);
  display: flex; gap: 0.7rem; align-items: baseline;
}
.prose h2 .num {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  color: var(--indigo); letter-spacing: 0.02em; flex-shrink: 0;
}
.prose h3 { margin-top: 1.8rem; font-size: 1.04rem; scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.prose p, .prose li { color: var(--muted); font-size: 0.955rem; line-height: 1.75; }
.prose strong { color: var(--text); font-weight: 650; }
.prose a:not(.btn) { color: var(--indigo-2); text-decoration: underline; text-decoration-color: rgba(108, 140, 255, 0.35); text-underline-offset: 3px; }
.prose a:not(.btn):hover { text-decoration-color: var(--indigo); }
.prose ul, .prose ol { padding-left: 1.15rem; display: grid; gap: 0.45rem; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { display: grid; grid-template-columns: 14px 1fr; gap: 0.6rem; }
.prose ul > li::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; margin-top: 0.62rem;
  background: var(--indigo); opacity: 0.85;
}
.prose ol { list-style: decimal; }
.prose ol > li::marker { color: var(--indigo); font-family: var(--font-mono); font-size: 0.82em; }
.prose hr { border: 0; border-top: 1px solid var(--line-soft); margin-block: 2.4rem; }

.callout {
  display: grid; grid-template-columns: 26px 1fr; gap: 0.85rem;
  padding: 1.05rem 1.15rem; border-radius: var(--radius-sm);
  border: 1px solid rgba(108, 140, 255, 0.26);
  background: rgba(108, 140, 255, 0.07);
  margin-block: 1.5rem;
}
.callout svg { color: var(--indigo-2); margin-top: 0.15rem; }
.callout p { font-size: 0.9rem; color: #C9D3E8; margin: 0; }
.callout strong { color: #fff; }
.callout.warn { border-color: rgba(245, 166, 35, 0.3); background: rgba(245, 166, 35, 0.07); }
.callout.warn svg { color: var(--amber); }
.callout.jade { border-color: rgba(61, 213, 152, 0.28); background: rgba(61, 213, 152, 0.06); }
.callout.jade svg { color: var(--jade); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-block: 1.35rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.885rem; min-width: 460px; }
thead th {
  text-align: left; padding: 0.7rem 0.9rem;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
  background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--line);
}
tbody td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line-soft); color: var(--muted); vertical-align: top; line-height: 1.55; }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--text); font-weight: 550; white-space: nowrap; }
code {
  font-family: var(--font-mono); font-size: 0.84em;
  background: rgba(108, 140, 255, 0.12); border: 1px solid rgba(108, 140, 255, 0.18);
  padding: 0.08em 0.35em; border-radius: 5px; color: #C6D2FF;
}

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 0.65rem; max-width: 860px; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(30, 36, 48, 0.5), rgba(19, 23, 31, 0.5));
  overflow: hidden; transition: border-color 0.2s, background 0.2s;
}
.faq-item[open] { border-color: #35415A; background: linear-gradient(180deg, rgba(35, 42, 56, 0.72), rgba(21, 25, 34, 0.6)); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.2rem; cursor: pointer; list-style: none;
  font-family: var(--font-body); font-weight: 650; font-size: 0.96rem; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: #fff; }
.faq-item summary .chev { flex-shrink: 0; color: var(--indigo); transition: transform 0.24s var(--ease); }
.faq-item[open] summary .chev { transform: rotate(45deg); }
.faq-answer { padding: 0 1.2rem 1.15rem; }
.faq-answer p { font-size: 0.925rem; line-height: 1.7; }
.faq-answer p + p { margin-top: 0.7rem; }
.faq-answer ul { list-style: none; display: grid; gap: 0.35rem; margin-top: 0.6rem; }
.faq-answer li { display: grid; grid-template-columns: 14px 1fr; gap: 0.55rem; font-size: 0.9rem; color: var(--muted); }
.faq-answer li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--indigo); margin-top: 0.6rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1rem; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.mail-card {
  display: grid; gap: 0.85rem; padding: 1.6rem;
  border-radius: var(--radius); border: 1px solid var(--line);
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(108, 140, 255, 0.16), transparent 70%),
    linear-gradient(180deg, #1A1F2B, #12161E);
}
.mail-address {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0.9rem 1rem; border-radius: var(--radius-sm);
  border: 1px dashed #33405A; background: rgba(0, 0, 0, 0.28);
}
.mail-address a { font-family: var(--font-mono); font-size: 0.95rem; color: var(--text); }
.copy-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--dim);
  padding: 0.35rem 0.6rem; border-radius: 7px; border: 1px solid var(--line);
  transition: color 0.18s, border-color 0.18s;
}
.copy-btn:hover { color: var(--text); border-color: #3A465E; }
.copy-btn.is-done { color: var(--jade); border-color: rgba(61, 213, 152, 0.4); }

/* ---------- About page bits ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.dev-card {
  padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, #1A1F2B, #12161E); display: grid; gap: 1rem; justify-items: start;
}
.dev-avatar {
  width: 54px; height: 54px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: #0B0D12;
  background: linear-gradient(150deg, #9FB2FF, var(--indigo));
  box-shadow: 0 12px 26px -12px rgba(108, 140, 255, 0.9);
}

.spec-list { list-style: none; display: grid; gap: 0; }
.spec-list li {
  display: grid; grid-template-columns: 130px 1fr; gap: 1rem;
  padding: 0.68rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
}
.spec-list li:last-child { border-bottom: 0; }
.spec-list dt, .spec-list .k { color: var(--dim); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; padding-top: 0.15rem; }
.spec-list .v { color: var(--text); }
@media (max-width: 520px) { .spec-list li { grid-template-columns: 1fr; gap: 0.15rem; } }

.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 22px 1fr; gap: 1rem; padding-bottom: 1.5rem; position: relative; }
.tl-item:not(:last-child)::before {
  content: ''; position: absolute; left: 6px; top: 20px; bottom: 0; width: 1px;
  background: linear-gradient(180deg, rgba(108, 140, 255, 0.4), rgba(108, 140, 255, 0.06));
}
.tl-dot { width: 13px; height: 13px; border-radius: 50%; margin-top: 0.35rem; border: 2px solid var(--indigo); background: var(--obsidian); }
.tl-item.is-done .tl-dot { background: var(--indigo); box-shadow: 0 0 0 4px rgba(108, 140, 255, 0.14); }
.tl-item.is-next .tl-dot { border-color: var(--dim); }
.tl-body h3 { font-size: 0.98rem; margin-bottom: 0.2rem; }
.tl-body p { font-size: 0.875rem; }
.tl-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.14rem 0.42rem; border-radius: 5px; margin-bottom: 0.35rem;
  background: rgba(61, 213, 152, 0.12); color: var(--jade); border: 1px solid rgba(61, 213, 152, 0.22);
}
.tl-item.is-next .tl-tag { background: rgba(245, 166, 35, 0.1); color: var(--amber); border-color: rgba(245, 166, 35, 0.22); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- 404 ---------- */
.error-page {
  min-height: calc(100dvh - var(--header-h) - 260px);
  display: grid; place-content: center; justify-items: center; text-align: center;
  gap: 1.1rem; padding-block: 4rem;
}
.error-code {
  font-family: var(--font-display); font-size: clamp(4.5rem, 14vw, 8rem); font-weight: 700;
  letter-spacing: -0.06em; line-height: 0.9;
  background: linear-gradient(150deg, #FFFFFF, #7E93D8 60%, #4B5570);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #111; }
  body::before, body::after, .site-header, .site-footer, .toc, .cta-panel { display: none !important; }
  .prose p, .prose li { color: #222; }
  .prose h2, .prose h3, .prose strong { color: #000; }
  .legal-layout { grid-template-columns: 1fr; }
}

/* ---------- i18n helpers ---------- */
[hidden] { display: none !important; }
.nav-lang .sep { opacity: 0.4; margin: 0 0.18em; }
.nav-lang .is-on { color: var(--text); }
.nav-lang [data-lang-set] { padding: 0 0.1em; }

/* ---------- long tables of contents ---------- */
@media (min-width: 961px) {
  .toc ol { max-height: calc(100dvh - var(--header-h) - 6rem); overflow-y: auto; scrollbar-width: thin; }
  .toc ol::-webkit-scrollbar { width: 6px; }
  .toc ol::-webkit-scrollbar-thumb { background: #2C3446; border-radius: 3px; }
}

/* ---------- bullet lists: marker beside flowing text, not in a grid column ---------- */
.prose ul > li,
.faq-answer li {
  display: block;
  position: relative;
  padding-left: 1.2rem;
}
.prose ul > li::before,
.faq-answer li::before {
  position: absolute;
  left: 0.15rem;
  top: 0.68rem;
  margin: 0;
}
.prose ul > li > ul { margin-top: 0.45rem; }

/* ---------- contact: keep card content top-aligned when the column stretches ---------- */
.mail-card { align-content: start; }
/* Hero CTA row: three buttons stack cleanly on narrow screens */
@media (max-width: 560px) {
  .hero-copy .btn-row { flex-direction: column; align-items: stretch; justify-self: stretch; }
  .hero-copy .btn-row .btn { width: 100%; }
}