/* ============================================================
   deblock.dipwriter.eu — VPN portal
   Dark theme, lifted from dipwriter.eu design system.
   No frameworks. Plain CSS + custom properties.
   ============================================================ */

/* ---------- Reset (inline-light) ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100%; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  --ink-50:  #f7f7f8;
  --ink-100: #ececef;
  --ink-200: #cfcfd6;
  --ink-300: #a8a8b3;
  --ink-400: #7a7a87;
  --ink-500: #5a5a66;
  --ink-600: #3f3f48;
  --ink-700: #2c2c33;
  --ink-800: #1c1c22;
  --ink-900: #101014;

  --bg:        #0b0b10;
  --accent:    #7c5cff;
  --accent-dk: #5b3fdc;
  --accent-lt: #a48bff;

  --ok:   #22c55e;
  --warn: #f5a623;
  --err:  #ef4444;
  --up:   #5eead4;  /* upload teal */
  --down: #a48bff;  /* download violet */

  --grid: rgba(124, 92, 255, 0.06);

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;

  --shadow-card: 0 18px 38px -22px rgba(124, 92, 255, 0.6);
  --shadow-btn:  0 6px 18px -6px rgba(124, 92, 255, 0.55);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", ui-monospace, Menlo, Consolas, monospace;

  --maxw: 1120px;
}

/* ---------- Base ---------- */
html, body { background-color: var(--bg); color: var(--ink-100); }

body {
  font-family: var(--font-sans);
  line-height: 1.55;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 8% -10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(700px 420px at 110% 10%, rgba(91, 63, 220, 0.18), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(124, 92, 255, 0.10), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(124, 92, 255, 0.35); color: #fff; }

/* Scrollbar */
* { scrollbar-color: var(--ink-600) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--ink-600); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-500); background-clip: content-box; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section  { padding: 72px 0; }
.muted    { color: var(--ink-300); }
.center   { text-align: center; }
.stack    { display: flex; flex-direction: column; gap: 16px; }
.row      { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer   { flex: 1 1 auto; }
.hidden   { display: none !important; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; color: #fff; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p  { color: var(--ink-200); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-lt);
  padding: 6px 12px; border-radius: 99px;
  background: rgba(124, 92, 255, 0.10);
  border: 1px solid rgba(124, 92, 255, 0.25);
}

.gradient-text {
  background: linear-gradient(90deg, #a48bff, #7c5cff, #5b3fdc, #7c5cff, #a48bff);
  background-size: 300% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: gradientShift 8s ease infinite;
}

.lead { font-size: clamp(1.02rem, 1.6vw, 1.22rem); color: var(--ink-200); max-width: 640px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem;
  position: relative; overflow: hidden; user-select: none; cursor: pointer;
  border: 1px solid transparent; background: transparent;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease,
              transform .12s ease, opacity .12s ease, border-color .18s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:active:not([disabled]):not([aria-busy="true"]) { transform: scale(.97); transition-duration: .05s; }
.btn:focus-visible { outline: 2px solid rgba(164, 139, 255, 0.6); outline-offset: 2px; }
.btn[disabled], .btn[aria-busy="true"] { cursor: not-allowed; opacity: .6; transform: none !important; pointer-events: none; }

.btn-primary { color: #fff; background: linear-gradient(135deg, #7c5cff 0%, #5b3fdc 100%); box-shadow: var(--shadow-btn); }
.btn-primary:hover:not([disabled]):not([aria-busy="true"]) { box-shadow: 0 10px 28px -6px rgba(124,92,255,.75); transform: translateY(-1px); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s ease; pointer-events: none;
}
.btn-primary:hover:not([disabled]):not([aria-busy="true"])::after { transform: translateX(120%); }

.btn-secondary { background: var(--ink-700); color: var(--ink-100); border-color: var(--ink-600); }
.btn-secondary:hover:not([disabled]):not([aria-busy="true"]) { background: var(--ink-600); transform: translateY(-1px); }

.btn-ghost { color: var(--ink-200); }
.btn-ghost:hover:not([disabled]):not([aria-busy="true"]) { color: #fff; background: rgba(44,44,51,.6); }

.btn-danger { background: rgba(239,68,68,.12); color: #fda4a4; border-color: rgba(239,68,68,.3); }
.btn-danger:hover:not([disabled]):not([aria-busy="true"]) { background: rgba(239,68,68,.22); color: #fff; }

.btn-sm { padding: 7px 12px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 9px; width: 38px; height: 38px; }

.btn-spinner {
  display: inline-block; width: 14px; height: 14px; border-radius: 99px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: currentColor;
  animation: spin .65s linear infinite; flex-shrink: 0;
}

/* ---------- Cards ---------- */
.card {
  background: rgba(28,28,34,.8); border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg); padding: 22px; backdrop-filter: blur(6px);
  position: relative;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.card-hover:hover {
  transform: translateY(-4px); border-color: rgba(124,92,255,.55);
  box-shadow: var(--shadow-card); background: rgba(28,28,34,.95);
}

.gradient-border { position: relative; }
.gradient-border::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(124,92,255,.6), rgba(91,63,220,.05), rgba(164,139,255,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: .85rem; color: var(--ink-300); font-weight: 500; }
.input, .textarea, .select {
  width: 100%; background: rgba(16,16,20,.7); border: 1px solid var(--ink-700);
  border-radius: var(--radius-sm); padding: 11px 13px; color: var(--ink-100);
  outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.input::placeholder { color: var(--ink-400); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(124,92,255,.4); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,92,255,.18); }
.input-affix { position: relative; }
.input-affix .prefix {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--ink-400); pointer-events: none; font-weight: 600;
}
.input-affix .input { padding-left: 30px; }
.field-error { color: #fda4a4; font-size: .82rem; min-height: 1.1em; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11,11,16,.72);
  border-bottom: 1px solid rgba(44,44,51,.6);
}
.nav { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: #fff; letter-spacing: -.02em; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #7c5cff, #5b3fdc);
  display: grid; place-items: center; box-shadow: var(--shadow-btn);
}
.brand .logo svg { width: 17px; height: 17px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-300);
  font-size: .92rem; font-weight: 500; transition: color .15s, background .15s;
}
.nav-links a:hover { color: #fff; background: rgba(44,44,51,.5); }
.nav-links a.active { color: #fff; background: rgba(124,92,255,.14); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 92px 0 80px; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
}
.hero h1 { margin: 18px 0 18px; }
.hero .lead { margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta { margin-top: 30px; display: flex; gap: 28px; flex-wrap: wrap; }
.hero-meta .metric .num { font-size: 1.5rem; font-weight: 800; color: #fff; }
.hero-meta .metric .cap { font-size: .82rem; color: var(--ink-400); }

.orb { position: absolute; border-radius: 99px; filter: blur(80px); opacity: .5; pointer-events: none; z-index: 0; }
.orb-1 { width: 380px; height: 380px; background: rgba(124,92,255,.5); top: -120px; right: -80px; }
.orb-2 { width: 320px; height: 320px; background: rgba(91,63,220,.45); bottom: -140px; left: -100px; }
.hero .container { position: relative; z-index: 1; }

.grid-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 50%, transparent 100%);
}

/* Hero side panel: connection visual */
.conn-panel {
  position: relative; z-index: 1;
  background: rgba(28,28,34,.6); border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg); padding: 22px; backdrop-filter: blur(8px);
}
.conn-panel .conn-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.conn-node {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--radius); border: 1px solid var(--ink-700); background: rgba(16,16,20,.5);
  margin-bottom: 10px;
}
.conn-node .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(124,92,255,.14); color: var(--accent-lt); flex-shrink: 0; }
.conn-node .t { font-weight: 600; color: #fff; font-size: .95rem; }
.conn-node .s { font-size: .8rem; color: var(--ink-400); }
.conn-arrow { text-align: center; color: var(--ink-500); font-size: 1.1rem; line-height: 1; margin: -4px 0; }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(124,92,255,.13); color: var(--accent-lt); margin-bottom: 14px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { font-size: .94rem; color: var(--ink-300); }

.proto-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.proto {
  padding: 18px; border-radius: var(--radius); border: 1px solid var(--ink-700);
  background: rgba(28,28,34,.5);
}
.proto .tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-lt); margin-bottom: 8px; }
.proto h4 { margin-bottom: 6px; }
.proto p { font-size: .88rem; color: var(--ink-400); }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 48px 20px; position: relative; }
.auth-card { width: 100%; max-width: 420px; position: relative; z-index: 1; }
.auth-card .card { padding: 32px 30px; }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h2 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-head p { font-size: .92rem; color: var(--ink-300); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-foot { text-align: center; margin-top: 20px; font-size: .9rem; color: var(--ink-300); }
.auth-foot a { color: var(--accent-lt); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: .86rem; line-height: 1.45;
  background: rgba(124,92,255,.10); border: 1px solid rgba(124,92,255,.25); color: var(--ink-200);
}
.notice svg { flex-shrink: 0; margin-top: 1px; color: var(--accent-lt); }

/* ---------- Alerts ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: .9rem;
  border: 1px solid transparent;
}
.alert.error  { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.3); color: #fda4a4; }
.alert.ok     { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.3); color: #86efac; }
.alert.info   { background: rgba(124,92,255,.10); border-color: rgba(124,92,255,.25); color: var(--ink-200); }

/* ---------- Dashboard ---------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-head h2 { margin-bottom: 4px; }
.dash-head .sub { color: var(--ink-300); font-size: .95rem; }
.quota-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600;
  padding: 6px 12px; border-radius: 99px; background: rgba(124,92,255,.12);
  border: 1px solid rgba(124,92,255,.25); color: var(--accent-lt);
}

/* summary stat strip */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat { padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--ink-700); background: rgba(28,28,34,.55); }
.stat .cap { font-size: .78rem; color: var(--ink-400); text-transform: uppercase; letter-spacing: .04em; }
.stat .val { font-size: 1.5rem; font-weight: 800; color: #fff; margin-top: 4px; }
.stat .val small { font-size: .9rem; font-weight: 600; color: var(--ink-400); }

.configs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }

.cfg-card { display: flex; flex-direction: column; gap: 14px; }
.cfg-top { display: flex; align-items: flex-start; gap: 12px; }
.cfg-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.cfg-icon.reality { background: rgba(124,92,255,.15); color: var(--accent-lt); }
.cfg-icon.ws { background: rgba(94,234,212,.13); color: #5eead4; }
.cfg-title { font-weight: 700; color: #fff; font-size: 1.02rem; line-height: 1.2; word-break: break-word; }
.cfg-badge { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.cfg-badge.reality { background: rgba(124,92,255,.16); color: var(--accent-lt); }
.cfg-badge.ws { background: rgba(94,234,212,.14); color: #5eead4; }

.traffic { display: flex; gap: 16px; }
.traffic .t-item { display: flex; flex-direction: column; gap: 2px; }
.traffic .t-item .lbl { font-size: .72rem; color: var(--ink-400); display: flex; align-items: center; gap: 4px; }
.traffic .t-item .amt { font-weight: 700; color: var(--ink-100); font-size: .95rem; }
.traffic .up .amt    { color: var(--up); }
.traffic .down .amt  { color: var(--down); }

.sparkline { width: 100%; height: 38px; margin-top: 2px; }
.bar-track { height: 8px; border-radius: 99px; background: var(--ink-700); overflow: hidden; display: flex; }
.bar-track .seg-up   { background: linear-gradient(90deg, #2dd4bf, #5eead4); }
.bar-track .seg-down { background: linear-gradient(90deg, #7c5cff, #a48bff); }

.cfg-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.cfg-actions .btn { flex: 1 1 auto; }

/* New-config card (dashed CTA) */
.cfg-new {
  border: 1.5px dashed var(--ink-600); background: rgba(28,28,34,.35);
  display: grid; place-items: center; min-height: 220px; text-align: center; gap: 10px;
  border-radius: var(--radius-lg); padding: 24px; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.cfg-new:hover { border-color: rgba(124,92,255,.6); background: rgba(28,28,34,.6); transform: translateY(-3px); }
.cfg-new.disabled { cursor: not-allowed; opacity: .55; }
.cfg-new.disabled:hover { transform: none; border-color: var(--ink-600); background: rgba(28,28,34,.35); }
.cfg-new .plus { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(124,92,255,.14); color: var(--accent-lt); font-size: 1.5rem; }
.cfg-new .nt { font-weight: 700; color: #fff; }
.cfg-new .ns { font-size: .84rem; color: var(--ink-400); }

/* Empty + loading states */
.empty-state, .load-state { text-align: center; padding: 60px 20px; color: var(--ink-300); }
.empty-state .ic { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px; display: grid; place-items: center; background: rgba(124,92,255,.12); color: var(--accent-lt); }
.skeleton { background: linear-gradient(90deg, rgba(44,44,51,.4) 25%, rgba(63,63,72,.6) 37%, rgba(44,44,51,.4) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius); }
.skeleton.card-sk { height: 220px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(5,5,9,.7); backdrop-filter: blur(6px); animation: fadeIn .2s ease;
}
.modal {
  width: 100%; max-width: 440px; background: var(--ink-800); border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg); padding: 26px; position: relative; animation: scaleIn .22s ease;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
}
.modal h3 { margin-bottom: 4px; }
.modal .modal-sub { font-size: .9rem; color: var(--ink-300); margin-bottom: 18px; word-break: break-all; }
.modal-close { position: absolute; top: 14px; right: 14px; }
.qr-box { background: #fff; border-radius: var(--radius); padding: 16px; display: grid; place-items: center; margin: 0 auto 18px; width: fit-content; }
.qr-box img, .qr-box canvas { width: 220px; height: 220px; display: block; }
.link-box {
  display: flex; gap: 8px; align-items: center; background: rgba(16,16,20,.7);
  border: 1px solid var(--ink-700); border-radius: var(--radius-sm); padding: 8px 8px 8px 12px;
}
.link-box code { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-200); white-space: nowrap; overflow-x: auto; flex: 1; }
.link-box code::-webkit-scrollbar { height: 5px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: var(--radius);
  background: var(--ink-800); border: 1px solid var(--ink-700); color: var(--ink-100);
  font-size: .9rem; font-weight: 500; box-shadow: 0 12px 30px -12px rgba(0,0,0,.7);
  animation: toastIn .25s ease; max-width: 90vw;
}
.toast.ok  { border-color: rgba(34,197,94,.4); }
.toast.ok  svg { color: var(--ok); }
.toast.err { border-color: rgba(239,68,68,.4); }
.toast.err svg { color: var(--err); }

/* ---------- Guides ---------- */
.guides-head { margin-bottom: 28px; }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: var(--radius); background: rgba(28,28,34,.6); border: 1px solid var(--ink-700); width: fit-content; max-width: 100%; overflow-x: auto; }
.tab {
  padding: 9px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: .92rem;
  color: var(--ink-300); cursor: pointer; white-space: nowrap; border: none; background: transparent;
  transition: color .15s, background .15s;
}
.tab:hover { color: #fff; }
.tab.active { color: #fff; background: linear-gradient(135deg, rgba(124,92,255,.9), rgba(91,63,220,.9)); box-shadow: var(--shadow-btn); }
.subtabs { margin: 20px 0 8px; }
.subtabs .tabs { background: transparent; border: 1px dashed var(--ink-700); }

.guide-panel { margin-top: 22px; }
.guide-app {
  display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink-200);
  padding: 6px 12px; border-radius: 99px; background: rgba(124,92,255,.1); border: 1px solid rgba(124,92,255,.25); margin-bottom: 18px;
}
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .num {
  counter-increment: step; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(124,92,255,.15); color: var(--accent-lt); font-weight: 700; font-size: .9rem;
}
.step .num::before { content: counter(step); }
.step .txt { color: var(--ink-200); padding-top: 3px; line-height: 1.55; }
.step .txt code { font-family: var(--font-mono); font-size: .85em; background: var(--ink-700); padding: 1px 6px; border-radius: 5px; color: var(--ink-100); }
.guide-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ink-700); }
.guide-links a {
  display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600;
  color: var(--accent-lt); padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid rgba(124,92,255,.3); background: rgba(124,92,255,.08); transition: background .15s, transform .12s;
}
.guide-links a:hover { background: rgba(124,92,255,.16); transform: translateY(-1px); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid rgba(44,44,51,.6); padding: 32px 0; margin-top: 64px; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer .muted { font-size: .88rem; }
.site-footer .f-links { display: flex; gap: 18px; }
.site-footer .f-links a { color: var(--ink-300); font-size: .9rem; }
.site-footer .f-links a:hover { color: #fff; }

/* ---------- Page shell for app pages ---------- */
.page { padding: 40px 0 60px; }

/* ---------- Animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .6s ease both; }
.fade-up.d1 { animation-delay: .06s; }
.fade-up.d2 { animation-delay: .12s; }
.fade-up.d3 { animation-delay: .18s; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .proto-row { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .section { padding: 52px 0; }
  .hero { padding: 60px 0 50px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 64px; left: 0; right: 0; padding: 12px 24px 18px;
    background: rgba(11,11,16,.96); border-bottom: 1px solid var(--ink-700); backdrop-filter: blur(12px);
  }
  .nav.open .nav-links a { padding: 12px; }
  .features { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
}
@media (max-width: 460px) {
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .configs-grid { grid-template-columns: 1fr; }
}
