:root {
    --bg: #0b0c10;
    --bg2: #11131a;
    --panel: #14161d;
    --line: #242836;
    --text: #e8eaf0;
    --muted: #8b91a7;
    --accent: #d7ff3f;
    --accent-ink: #0b0c10;
    --danger: #ff5c5c;
    --ok: #53e88b;
    --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background:
      radial-gradient(1200px 600px at 80% -10%, rgba(215,255,63,0.06), transparent 60%),
      radial-gradient(900px 500px at 0% 10%, rgba(83,232,139,0.05), transparent 55%),
      var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.noise {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
}

.wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ---------- header ---------- */
header {
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(11,12,16,0.72);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo {
    font-family: var(--mono); font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
}
.logo a { color: var(--text); text-decoration: none; }
.logo .dot { color: var(--accent); }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
    color: var(--muted); text-decoration: none; font-size: 14px; transition: color .15s;
}
.nav-links a:hover { color: var(--text); }

.btn {
    font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    border: 1px solid var(--line); border-radius: 9px; padding: 9px 18px;
    background: transparent; color: var(--text); text-decoration: none;
    transition: all .15s ease; display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { border-color: #3a4154; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { box-shadow: 0 0 0 4px rgba(215,255,63,0.14); border-color: var(--accent); }
.btn.ghost { background: var(--panel); }
.btn.block { width: 100%; justify-content: center; }
.hidden { display: none !important; }

/* ---------- hero ---------- */
.hero { padding: 96px 0 72px; }
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 12px; color: var(--accent);
    border: 1px solid rgba(215,255,63,0.3); border-radius: 999px;
    padding: 5px 12px; margin-bottom: 24px; background: rgba(215,255,63,0.05);
}
.badge .live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

h1 {
    font-size: clamp(38px, 6vw, 64px);
    font-weight: 800; letter-spacing: -0.035em; line-height: 1.05;
    max-width: 18ch;
}
h1 .accent-text { color: var(--accent); }

.sub {
    margin-top: 20px; color: var(--muted); font-size: 18px; max-width: 52ch;
}

.hero-actions { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }

.specs {
    margin-top: 56px; display: flex; gap: 0; flex-wrap: wrap;
    border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg2);
}
.spec {
    flex: 1 1 220px; padding: 20px 22px; border-right: 1px solid var(--line);
}
.spec:last-child { border-right: none; }
.spec .k { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.spec .v { font-family: var(--mono); font-size: 22px; font-weight: 700; margin-top: 6px; }
.spec .v.ok { color: var(--ok); }
.spec .v.warn { color: var(--accent); }

/* ---------- dashboard preview ---------- */
.dash-wrap { padding: 40px 0 80px; }
.section-label {
    font-family: var(--mono); font-size: 12px; text-transform: uppercase;
    letter-spacing: .14em; color: var(--muted); margin-bottom: 16px;
}

.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
    overflow: hidden;
}

.dash-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a3040; }
.dots i:nth-child(1) { background: var(--danger); opacity:.85; }
.dots i:nth-child(2) { background: #ffb454; opacity:.85; }
.dots i:nth-child(3) { background: var(--ok); opacity:.85; }
.dash-title { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.dash-toolbar .status { font-family: var(--mono); font-size: 12px; color: var(--ok); }

.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; padding: 22px; }
@media (max-width: 820px) { .dash-grid { grid-template-columns: 1fr; } }

.panel {
    background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 22px;
}

.panel h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }

.sub-card {
    border: 1px solid var(--line); border-radius: 10px; padding: 16px;
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--panel);
}
.sub-card .name { font-weight: 600; }
.sub-card .meta { font-family: var(--mono); font-size: 13px; }

.link-box {
    margin-top: 16px; display: flex; align-items: center; gap: 10px;
    background: #0b0d12; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px;
}
.link-box code {
    font-family: var(--mono); font-size: 13px; color: var(--accent);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.copy { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.copy:hover { border-color: var(--accent); color: var(--accent); }

table.simple { width: 100%; border-collapse: collapse; font-size: 14px; }
table.simple td { padding: 9px 0; border-bottom: 1px solid var(--line); }
table.simple tr:last-child td { border-bottom: none; }
table.simple td:first-child { color: var(--muted); }
table.simple td:last-child { text-align: right; font-family: var(--mono); }
.pill {
    display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.pill.ok { background: rgba(83,232,139,0.12); color: var(--ok); border: 1px solid rgba(83,232,139,0.25); }
.pill.warn { background: rgba(215,255,63,0.1); color: var(--accent); border: 1px solid rgba(215,255,63,0.25); }
.pill.danger { background: rgba(255,92,92,0.12); color: var(--danger); border: 1px solid rgba(255,92,92,0.25); }

.bar-label { display: flex; justify-content: space-between; font-size: 13px; margin: 12px 0 6px; color: var(--muted); }
.bar-label b { color: var(--text); font-family: var(--mono); }
.bar { height: 8px; background: #1d2130; border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #53e88b, #d7ff3f); width: 32%; }

/* ---------- pricing ---------- */
.pricing { padding: 30px 0 90px; }
.price-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.price {
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px;
    position: relative; transition: transform .15s, border-color .15s;
}
.price:hover { transform: translateY(-3px); border-color: #333a4f; }
.price.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 18px 40px -20px rgba(215,255,63,0.35); }
.price .tag { position: absolute; top: -11px; left: 22px; background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
.price .amount { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin: 12px 0 4px; }
.price .amount span { font-size: 15px; color: var(--muted); font-weight: 500; }
.price .per { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.price ul { list-style: none; margin-bottom: 22px; }
.price li { padding: 6px 0; font-size: 14px; color: var(--muted); }
.price li::before { content: "✓ "; color: var(--ok); font-weight: 700; }

/* ---------- auth pages (login/register/cabinet) ---------- */
.auth-page {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 64px 24px;
}
.auth { max-width: 420px; width: 100%; }
.auth.wide { max-width: 560px; }
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 30px; }
.auth-card h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.auth-card .sub2 { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.field input {
    width: 100%; background: #0b0d12; border: 1px solid var(--line); border-radius: 9px;
    color: var(--text); font: inherit; font-size: 15px; padding: 11px 13px; outline: none;
    transition: border-color .15s;
}
.field input:focus { border-color: var(--accent); }
.field.msg { font-size: 13px; color: var(--danger); min-height: 18px; margin-bottom: 8px; }
.field.msg.ok { color: var(--ok); }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-switch a { color: var(--accent); text-decoration: none; cursor: pointer; font-weight: 600; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 14px; color: var(--muted); text-decoration: none; }
.auth-back:hover { color: var(--text); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 50px; margin-top: auto; }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.foot .muted { font-family: var(--mono); font-size: 13px; color: var(--muted); }

a.inline { color: var(--accent); text-decoration: none; }

.info-box {
    background: rgba(215,255,63,0.05); border: 1px solid rgba(215,255,63,0.25);
    border-radius: 10px; padding: 14px 16px; font-size: 14px; color: var(--muted); margin-top: 8px;
}
.info-box a { color: var(--accent); }
/* ---------- how it works ---------- */
.steps { margin: 0; padding-left: 22px; display: grid; gap: 14px; }
.steps li { color: var(--text); font-size: 15px; line-height: 1.55; }
.steps li::marker { color: var(--accent); font-family: var(--mono); font-weight: 700; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.55; }
#how { padding-bottom: 8px; }
#how .muted { margin-top: 18px; }

/* ---------- touch targets ---------- */
.btn { min-height: 44px; }
.copy { min-height: 44px; }

/* ---------- mobile ----------
   The nav previously needed ~524px while an iPhone SE has 360px, so links
   spilled outside the sticky header and followed the user down the page. */
@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .nav { height: 56px; }
    .nav-links { gap: 14px; }
    .nav-links > a:not(.btn) { font-size: 13px; }
    .nav-links .btn { padding: 9px 14px; }

    .hero { padding: 48px 0 36px; }
    .hero h1 { font-size: 30px; }
    .badge { font-size: 11px; }

    /* Full-viewport SVG turbulence plus a backdrop blur is a full repaint on
       every scroll frame; it is the single biggest cost on cheap Android. */
    .noise { display: none; }
    header { backdrop-filter: none; }

    .dash-toolbar { flex-wrap: wrap; gap: 8px; }
    .price-row { grid-template-columns: 1fr; }
    table.simple td:last-child { text-align: left; }
    .foot { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* Stop iOS inflating text in landscape, which breaks the fixed nav. */
@media (orientation: landscape) and (max-height: 480px) {
    html { -webkit-text-size-adjust: 100%; }
}
