:root{
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color-scheme: dark;
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-xl: 0 22px 70px rgba(0,0,0,.55);
  --shadow-md: 0 10px 30px rgba(0,0,0,.35);
  --stroke: rgba(255,255,255,.12);
  --stroke-2: rgba(255,255,255,.18);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --muted2: rgba(255,255,255,.46);
  --accent: #34D3FF;
  --accent2:#8B5CF6;
  --good: #22C55E;
  --bg0: #070A12;
  --bg1: #0B1020;
  /* role tokens (prefer using these in new styles) */
  --surface-0: rgba(255,255,255,.03);
  --surface-1: rgba(255,255,255,.05);
  --surface-2: rgba(255,255,255,.07);
  --border: var(--stroke);
  --border-strong: var(--stroke-2);
  --ring: rgba(52,211,255,.38);
  --ring-2: rgba(139,92,246,.30);
  --shadow-glow: 0 0 0 1px rgba(52,211,255,.10), 0 0 36px rgba(52,211,255,.10);
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
html{
  /* fallback background (prevents body tiling seams) */
  background: linear-gradient(180deg, var(--bg0), var(--bg1));
}
body{
  margin:0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(52,211,255,.18), transparent 60%),
    radial-gradient(1000px 700px at 80% 20%, rgba(139,92,246,.18), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  position: relative;
  isolation: isolate;
}
a{ color: inherit; text-decoration: none; }
a:focus-visible{
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

/* Skip link for accessibility */
.skip-link{
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--bg0);
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus{
  top: 16px;
}

/* cyber background layers */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .55;
  background:
    /* vignette */
    radial-gradient(1200px 900px at 50% 0%, rgba(255,255,255,.08), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(0,0,0,.55), transparent 65%),
    /* micro grid */
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(180deg, rgba(255,255,255,.07) 0 1px, transparent 1px 18px),
    /* noise-ish speckles */
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.12) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 38%, rgba(255,255,255,.10) 0 1px, transparent 2px),
    radial-gradient(circle at 44% 78%, rgba(255,255,255,.10) 0 1px, transparent 2px);
  mix-blend-mode: overlay;
  filter: saturate(1.05) contrast(1.05);
}
body::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .18;
  background:
    /* scanlines */
    repeating-linear-gradient(180deg, rgba(255,255,255,.12) 0 1px, transparent 1px 4px);
  animation: scan 10s linear infinite;
}
@keyframes scan{
  from{ transform: translateY(0); }
  to{ transform: translateY(18px); }
}

.wrap{ max-width: 1100px; margin:0 auto; padding: 28px 18px 64px; position: relative; z-index: 1; }

.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 14px;
  z-index: 10;
}
.topbar .brand b{ white-space: nowrap; }
.lang-switch{
  display:flex;
  align-items:center;
  gap: 8px;
  padding-right: 4px;
}
.lang-switch .chiplink{
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.lang-switch .chiplink.is-active{
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow);
}
.brand{ display:flex; align-items:center; gap:10px; padding:6px 10px; border-radius:999px; }
.dot{
  width:10px; height:10px; border-radius:999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 3px rgba(52,211,255,.12);
}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background: var(--surface-1);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.kbd{
  font-family: var(--mono);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.72);
}

.hero{ margin-top: 26px; display:grid; gap: 14px; }
h1{
  margin:0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.6px;
}
.lead{ margin:0; max-width: 78ch; color: var(--muted); font-size: 15px; line-height: 1.7; }

/* shared heads */
.page-head{ margin-top: 22px; display:grid; gap: 10px; }
.page-head .lead{ max-width: 78ch; }
.page-head small{ color: var(--muted2); font-family: var(--mono); }

.grid{
  margin-top: 22px;
  display:grid;
  gap: 14px;
  grid-template-columns: repeat(12, 1fr);
}
.grid--stack{
  grid-template-columns: 1fr;
}
@media (min-width: 860px){
  .grid--stack{ grid-template-columns: 1fr; }
  .grid--stack .card{ grid-column: span 12; }
}
.card{
  grid-column: span 12;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-0));
  box-shadow: var(--shadow-xl);
  overflow:hidden;
  position: relative;
  transform: translateZ(0);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
@media (hover:hover){
  .card:hover{
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(52,211,255,.12);
  }
}
@media (min-width: 860px){ .card{ grid-column: span 4; } }
.card::before{
  content:"";
  position:absolute; inset:-2px;
  background: radial-gradient(600px 240px at 30% -20%, rgba(52,211,255,.22), transparent 60%);
  opacity: .85;
  pointer-events:none;
}
.card:nth-child(2)::before{ background: radial-gradient(600px 240px at 30% -20%, rgba(139,92,246,.22), transparent 60%); }
.card:nth-child(3)::before{ background: radial-gradient(600px 240px at 30% -20%, rgba(34,197,94,.20), transparent 60%); }
.card-inner{ position:relative; padding: 18px 18px 16px; }
.appname{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom: 8px; }
.appname h2{ margin:0; font-size: 22px; letter-spacing: -0.2px; }
.app-title{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1.1;
}
.app-icon{
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
  background: rgba(255,255,255,.06);
}
.tag{
  display:inline-flex; align-items:center; gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.12);
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
}
.tag .s{
  width:7px; height:7px; border-radius:99px;
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(34,197,94,.12);
}
.desc{ margin:0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.links{ display:grid; gap: 8px; }
.cta-row{ display:grid; gap: 8px; margin-top: 10px; }
.links--sub{ margin-top: 8px; }
@media (min-width: 520px){
  .links--sub{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.btn{
  display:flex; align-items:center; justify-content:center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-1);
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
  font-size: 13px;
}
.btn:hover{ transform: translateY(-1px); background: var(--surface-2); border-color: var(--border-strong); box-shadow: var(--shadow-glow); }
.btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px var(--ring), 0 0 0 6px var(--ring-2), var(--shadow-glow);
  border-color: rgba(255,255,255,.28);
}
.btn small{ color: var(--muted); font-family: var(--mono); font-size: 11px; }
.arrow{ color: var(--muted); font-family: var(--mono); }

.btn--primary{
  border-color: rgba(255,255,255,.14);
  background: linear-gradient(135deg, rgba(52,211,255,.92), rgba(139,92,246,.92));
  color: rgba(6,9,20,.92);
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 18px 55px rgba(52,211,255,.18);
  position: relative;
  isolation: isolate;
}
.btn--primary::after{
  content:"";
  position: absolute;
  inset: -18px;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity .16s ease;
  background:
    radial-gradient(120px 60px at 25% 35%, rgba(52,211,255,.42), transparent 70%),
    radial-gradient(120px 60px at 75% 65%, rgba(139,92,246,.36), transparent 70%),
    radial-gradient(180px 90px at 50% 50%, rgba(255,255,255,.14), transparent 75%);
  filter: blur(10px);
}
.btn--primary:hover{
  transform: translateY(-2px);
  /* keep button fill; only glow around */
  box-shadow:
    0 0 0 1px rgba(255,255,255,.10),
    0 22px 70px rgba(52,211,255,.20),
    0 28px 90px rgba(139,92,246,.16);
}
.btn--primary:hover::after{ opacity: 1; }
.btn--primary:focus-visible::after{ opacity: 1; }
.btn--ghost{
  background: transparent;
  border-style: dashed;
  color: var(--text);
  box-shadow: none;
}
.btn--ghost:hover{
  background: rgba(255,255,255,.06);
  border-style: solid;
  box-shadow: none;
}

.shots{
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}
.shot{
  width: clamp(160px, 26vw, 220px);
  max-height: 360px;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  box-shadow: 0 18px 55px rgba(0,0,0,.35);
  object-fit: contain;
  aspect-ratio: 9 / 19.5;
}
@media (min-width: 760px){
  .shots{ flex-wrap: nowrap; }
}

.btns{ display:grid; gap: 10px; margin-top: 12px; }
.muted{ color: var(--muted); font-size: 13px; line-height: 1.75; }
.list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 13px;
}
.list li{ margin: 6px 0; }

.section{
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-1);
  padding: 16px;
}
.section h2, .section h3{ margin: 0 0 10px; font-size: 14px; letter-spacing: .2px; }
.contact{ display:flex; flex-wrap:wrap; gap: 10px; align-items:center; justify-content:space-between; }
.contact p{ margin:0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.chiplink{
  display:inline-flex; align-items:center; gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-1);
}
footer{ margin-top: 18px; color: rgba(255,255,255,.45); font-size: 12px; text-align:center; }

/* LP pages */
.nav{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.chiplink{ white-space: nowrap; }

/* iPhone layout: stack language + back nicely */
@media (max-width: 520px){
  body::before,
  body::after{
    content: none;
  }
  .doc-head{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }
  .doc-head .brand{
    padding: 6px 8px;
  }
  .doc-head .lang-switch{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-right: 0;
  }
  .doc-head .lang-switch .chiplink{
    width: 100%;
    justify-content: center;
    padding: 10px 10px;
    font-size: 12px;
  }
  .doc-head .lang-switch .chiplink:last-child{
    grid-column: 1 / -1; /* back button full width */
  }
  .topbar{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    border-radius: var(--radius-xl);
    padding: 12px;
  }
  .topbar .brand{
    padding: 6px 8px;
  }
  .topbar .lang-switch{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-right: 0;
  }
  .topbar .lang-switch .chiplink{
    width: 100%;
    justify-content: center;
  }
  .nav{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    border-radius: var(--radius-xl);
    padding: 12px;
  }
  .nav .brand{
    padding: 6px 8px;
  }
  .nav .lang-switch{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-right: 0;
  }
  .nav .lang-switch .chiplink{
    width: 100%;
    justify-content: center;
    padding: 10px 10px;
    font-size: 12px;
  }
  .nav .lang-switch .chiplink:last-child{
    grid-column: 1 / -1; /* back button full width */
  }
}

/* iOS Safari: avoid background tile seams while scrolling */
@supports (-webkit-touch-callout: none){
  body::before,
  body::after{
    content: none;
  }
  /* iOS Safari sometimes shows seams with multi-layer gradients; simplify */
  body{
    background: linear-gradient(180deg, var(--bg0), var(--bg1));
    background-repeat: no-repeat;
    background-attachment: scroll;
  }
}
.nav--sticky{
  position: sticky;
  top: 14px;
  z-index: 10;
}

/* Docs (privacy/terms): readable layout + auto light/dark */
body.doc{
  color-scheme: dark;
  background: #0B1020;
}
.doc-wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 16px 60px;
}
.doc-card{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow-md);
  /* NOTE: keep overflow visible so .doc-head can be position: sticky */
  overflow: visible;
}
.doc-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(900px 240px at 20% 0%, rgba(52,211,255,.18), transparent 65%),
    radial-gradient(900px 240px at 80% 0%, rgba(139,92,246,.18), transparent 65%),
    rgba(255,255,255,.04);
  position: sticky;
  top: 14px;
  z-index: 10;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}
.doc-head .lang-switch{
  flex-wrap: wrap;
  justify-content: flex-end;
}
.doc-head b{ letter-spacing: -0.2px; }
.doc-body{ padding: 18px 16px 18px; }
.doc-body h1{
  font-size: clamp(20px, 2.8vw, 28px);
  margin: 0 0 10px;
}
.doc-body p{ margin: 0 0 12px; color: var(--muted); line-height: 1.75; }
.doc-body pre{
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.75;
  color: rgba(255,255,255,.88);
}
.doc-body a{ text-decoration: underline; text-underline-offset: 2px; }

@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior: auto !important; }
  body::after{ animation: none !important; }
  .btn, .card{ transition: none !important; }
  .btn:hover, .btn--primary:hover, .card:hover{ transform: none !important; }
}

@media print{
  body{ background: #fff !important; color: #000 !important; }
  .topbar, .nav, .section, footer, .doc-head{ display:none !important; }
  .doc-card, .card{ box-shadow:none !important; border: none !important; background: transparent !important; }
  a{ text-decoration: underline; }
}

