/* ===== Theme ===== */
:root {
    --bg: #0a0a16;
    --bg-2: #0e0f20;
    --card: rgba(255, 255, 255, .04);
    --card-border: rgba(255, 255, 255, .09);
    --text: #eef0ff;
    --muted: #9aa0c0;
    --c1: #22d3ee;   /* cyan */
    --c2: #7c3aed;   /* violet */
    --c3: #a855f7;   /* purple (was pink) */
    --grad: linear-gradient(120deg, var(--c1), var(--c2) 55%, var(--c3));
    --radius: 20px;
    --maxw: 1140px;
    --shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo__text { font-family: 'Unbounded', 'Inter', sans-serif; line-height: 1.1; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.container--narrow { max-width: 760px; }

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== Background blobs ===== */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; filter: blur(90px); }
.blob { position: absolute; width: 46vw; height: 46vw; border-radius: 50%; opacity: .35; animation: float 18s ease-in-out infinite; }
.blob--1 { background: var(--c2); top: -12vw; left: -8vw; }
.blob--2 { background: var(--c1); top: 24vw; right: -12vw; animation-delay: -6s; }
.blob--3 { background: var(--c3); bottom: -16vw; left: 22vw; animation-delay: -11s; opacity: .25; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(4vw, -4vw) scale(1.12); }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
    cursor: pointer; border: 1px solid transparent; transition: transform .18s ease, box-shadow .25s ease, background .25s ease;
    white-space: nowrap;
}
.btn--lg { padding: 16px 30px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(124, 58, 237, .45); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(124, 58, 237, .6); }
.btn--ghost { background: var(--card); color: var(--text); border-color: var(--card-border); backdrop-filter: blur(10px); }
.btn--ghost:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .25); }

/* ===== Header ===== */
.header {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(10, 10, 22, .55);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, background .3s;
}
.header.scrolled { border-bottom-color: var(--card-border); background: rgba(10, 10, 22, .8); }
.header__inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; }
.logo__mark {
    display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
    background: var(--grad); box-shadow: 0 6px 18px rgba(124, 58, 237, .5); font-size: 16px;
}
.nav { display: flex; gap: 26px; margin: 0 auto; }
.nav__link { color: var(--muted); font-weight: 500; font-size: 15px; transition: color .2s; }
.nav__link:hover { color: var(--text); }
.header__cta { padding: 10px 18px; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { padding: 70px 0 40px; }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.badge {
    display: inline-block; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    background: var(--card); border: 1px solid var(--card-border); color: var(--c1); margin-bottom: 22px;
}
.hero__title { font-size: clamp(38px, 6vw, 68px); font-weight: 800; letter-spacing: -1px; }
.hero__subtitle { color: var(--muted); font-size: clamp(16px, 2vw, 19px); margin: 20px 0 30px; max-width: 540px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__stats { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.stat__num { font-family: 'Unbounded', sans-serif; font-size: 26px; font-weight: 700; display: block; }
.stat__label { color: var(--muted); font-size: 13px; }

/* Speedometer */
.hero__visual { display: grid; place-items: center; }
.speedo {
    position: relative; width: 100%; max-width: 380px; padding: 34px 30px 26px;
    background: var(--card); border: 1px solid var(--card-border); border-radius: 28px;
    backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.speedo__svg { width: 100%; }
#gaugeArc { stroke-dasharray: 283; stroke-dashoffset: 283; }
.speedo__readout { text-align: center; margin-top: -18px; }
.speedo__value { font-family: 'Unbounded', sans-serif; font-size: 46px; font-weight: 800; }
.speedo__unit { color: var(--muted); margin-left: 6px; }
.speedo__chips { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.chip { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--card-border); color: var(--muted); }
.chip--live { color: #34d399; }
.chip--live::first-letter { color: #34d399; }

/* ===== Sections ===== */
.section { padding: 70px 0; }
.eyebrow { display: block; text-align: center; color: var(--c1); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; margin-bottom: 12px; }
.section__title { text-align: center; font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; letter-spacing: -.5px; }
.section__lead { text-align: center; color: var(--muted); max-width: 620px; margin: 16px auto 0; font-size: 17px; }

/* Problem */
.problem__grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: center; margin-top: 44px; }
.prob-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 26px; }
.prob-card__from { display: inline-block; font-weight: 700; margin-bottom: 14px; color: var(--muted); }
.prob-card ul { list-style: none; display: grid; gap: 10px; }
.prob-card li { padding-left: 26px; position: relative; color: var(--muted); }
.prob-card li::before { content: "✕"; position: absolute; left: 0; color: #f87171; font-weight: 700; }
.prob-card--good { border-color: rgba(124,58,237,.4); box-shadow: 0 10px 40px rgba(124,58,237,.18); }
.prob-card--good li { color: var(--text); }
.prob-card--good li::before { content: "✓"; color: #34d399; }
.prob-arrow { font-size: 40px; color: var(--c2); text-align: center; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 46px; }
.feature {
    background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 28px;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.feature:hover { transform: translateY(-6px); border-color: rgba(124,58,237,.45); box-shadow: 0 18px 46px rgba(124,58,237,.2); }
.feature__icon { font-size: 34px; margin-bottom: 14px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 46px; }
.step { position: relative; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 30px 26px; }
.step__num {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
    background: var(--grad); font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 20px; margin-bottom: 16px;
    box-shadow: 0 8px 22px rgba(124,58,237,.45);
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 46px; align-items: stretch; }
.plan {
    position: relative; display: flex; flex-direction: column; gap: 18px;
    background: var(--card); border: 1px solid var(--card-border); border-radius: 24px; padding: 30px 26px;
    transition: transform .25s ease, box-shadow .25s ease;
}
.plan:hover { transform: translateY(-6px); }
.plan--featured {
    border-color: transparent; background:
        linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
        var(--grad) border-box;
    box-shadow: 0 20px 60px rgba(124,58,237,.3);
}
.plan__badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
    box-shadow: 0 8px 20px rgba(168,85,247,.45);
}
.plan__name { font-size: 22px; }
.plan__tag { color: var(--muted); font-size: 14px; margin-top: 4px; }
.plan__price { font-family: 'Unbounded', sans-serif; font-size: 40px; font-weight: 800; }
.plan__price span { font-size: 14px; color: var(--muted); font-family: 'Inter'; font-weight: 500; vertical-align: middle; margin-right: 4px; }
.plan__price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan__list { list-style: none; display: grid; gap: 11px; flex: 1; }
.plan__list li { padding-left: 28px; position: relative; color: var(--muted); }
.plan__list li::before { content: "✓"; position: absolute; left: 0; color: var(--c1); font-weight: 700; }
.pricing__note { text-align: center; color: var(--muted); margin-top: 28px; }

/* Servers */
.flags { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.flag {
    background: var(--card); border: 1px solid var(--card-border); border-radius: 999px;
    padding: 11px 20px; font-weight: 600; font-size: 15px; transition: transform .2s, border-color .2s;
}
.flag:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.25); }

/* FAQ */
.accordion { margin-top: 36px; display: grid; gap: 12px; }
.acc { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: 4px 22px; }
.acc summary {
    list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 17px;
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 24px; color: var(--c1); transition: transform .25s; }
.acc[open] summary::after { transform: rotate(45deg); }
.acc p { color: var(--muted); padding-bottom: 20px; }

/* CTA */
.cta {
    text-align: center; padding: 56px 30px; border-radius: 28px;
    background: linear-gradient(135deg, rgba(124,58,237,.22), rgba(34,211,238,.16));
    border: 1px solid var(--card-border); box-shadow: var(--shadow);
}
.cta__title { font-size: clamp(26px, 4vw, 40px); }
.cta__text { color: var(--muted); margin: 14px 0 28px; font-size: 17px; }

/* Footer */
.footer { border-top: 1px solid var(--card-border); padding: 44px 0; margin-top: 30px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.footer__brand p { color: var(--muted); font-size: 14px; margin-top: 10px; max-width: 280px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer__links a { color: var(--muted); font-weight: 500; transition: color .2s; }
.footer__links a:hover { color: var(--text); }
.footer__copy { color: var(--muted); font-size: 13px; width: 100%; text-align: center; opacity: .7; padding-top: 10px; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__visual { order: -1; }
    .features, .steps, .plans { grid-template-columns: 1fr 1fr; }
    .problem__grid { grid-template-columns: 1fr; }
    .prob-arrow { transform: rotate(90deg); }
}

@media (max-width: 760px) {
    .nav {
        position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0; margin: 0;
        background: rgba(10,10,22,.97); backdrop-filter: blur(14px);
        padding: 10px 22px 20px; border-bottom: 1px solid var(--card-border);
        transform: translateY(-130%); transition: transform .32s ease; visibility: hidden;
    }
    .nav.open { transform: none; visibility: visible; }
    .nav__link { padding: 14px 0; border-bottom: 1px solid var(--card-border); font-size: 16px; }
    .header__cta { display: none; }
    .burger { display: flex; margin-left: auto; }
    .features, .steps, .plans { grid-template-columns: 1fr; }
    .section { padding: 54px 0; }
    .hero__stats { gap: 22px; }
}

/* ===== Header actions / login ===== */
.header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn--sm { padding: 9px 16px; font-size: 14px; }

/* ===== Globe ===== */
.globe-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; margin-top: 50px; }
.globe { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1 / 1; margin: 0 auto; }
.globe::before {
    content: ""; position: absolute; inset: 4%; border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, rgba(124,58,237,.5), rgba(34,211,238,.12) 55%, transparent 72%);
    filter: blur(36px); z-index: -1; animation: glowPulse 6s ease-in-out infinite;
}
.globe__svg { width: 100%; height: 100%; overflow: visible; }
.globe__orbit { transform-origin: 200px 200px; animation: dashflow 1.4s linear infinite; }
@keyframes dashflow { to { stroke-dashoffset: -130; } }
@keyframes glowPulse { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

.gdot {
    position: absolute; width: 11px; height: 11px; transform: translate(-50%, -50%); border-radius: 50%;
    background: #2a3a72; animation: dotGlow 6.3s ease-in-out infinite; animation-delay: calc(var(--i) * .55s);
}
@keyframes dotGlow {
    0%, 70%, 100% { background: #2a3a72; box-shadow: 0 0 6px 1px rgba(124,150,255,.35); transform: translate(-50%,-50%) scale(.82); }
    8%, 18% { background: #34e6ff; box-shadow: 0 0 0 6px rgba(34,211,238,.12), 0 0 20px 6px rgba(34,211,238,.9); transform: translate(-50%,-50%) scale(1.3); }
}

/* ===== Location legend ===== */
.loc-legend { list-style: none; display: grid; gap: 12px; }
.loc {
    display: flex; align-items: center; gap: 14px; padding: 14px 18px;
    background: var(--card); border: 1px solid var(--card-border); border-radius: 16px;
    transition: border-color .3s ease, box-shadow .3s ease;
}
.loc__pin { width: 9px; height: 9px; border-radius: 50%; background: #2a3a72; flex: none; transition: .3s ease; }
.loc__flag { font-size: 22px; line-height: 1; }
.loc__name { font-weight: 600; }
.loc__ping { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.loc__ping::before { content: "🟢 "; }
@keyframes locGlow {
    0%, 70%, 100% { border-color: var(--card-border); box-shadow: none; }
    8%, 18% { border-color: rgba(34,211,238,.55); box-shadow: 0 0 26px rgba(34,211,238,.2); }
}
@keyframes pinGlow {
    0%, 70%, 100% { background: #2a3a72; box-shadow: none; }
    8%, 18% { background: #34e6ff; box-shadow: 0 0 12px 3px rgba(34,211,238,.85); }
}

/* ===== Toast ===== */
.toast {
    position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px);
    background: rgba(18,20,38,.96); border: 1px solid var(--card-border); color: var(--text);
    padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
    box-shadow: var(--shadow); opacity: 0; pointer-events: none; z-index: 100;
    transition: opacity .3s ease, transform .3s ease; backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 880px) {
    .globe-wrap { grid-template-columns: 1fr; gap: 30px; }
    .globe { max-width: 280px; }
}

/* ===== Ookla-style speedtest gauge ===== */
.speedtest {
    background: var(--card); border: 1px solid var(--card-border); border-radius: 28px;
    padding: 30px 30px 24px; backdrop-filter: blur(14px); box-shadow: var(--shadow);
    max-width: 400px; margin: 0 auto; width: 100%;
}
.speedtest__gauge { position: relative; }
.gauge { width: 100%; display: block; }
.gauge__progress { filter: drop-shadow(0 0 7px rgba(124,58,237,.65)); }
.speedtest__readout { text-align: center; margin-top: 16px; }
.speedtest__dl { display: block; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 5px; }
.speedtest__num { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.speedtest__value { font-family: 'Unbounded', sans-serif; font-size: 52px; font-weight: 800; line-height: 1; }
.speedtest__unit { color: var(--muted); font-size: 15px; }
.speedtest__bar { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }

/* ===== Interactive globe (d3) ===== */
.globe { cursor: grab; }
.globe:active { cursor: grabbing; }
.globe-canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.globe__sphere { stroke: rgba(34,211,238,.3); stroke-width: 1; }
.globe__graticule { fill: none; stroke: rgba(124,150,255,.14); stroke-width: .5; }
.globe__country { fill: rgba(96,124,224,.13); stroke: rgba(124,150,255,.3); stroke-width: .5; }
.globe__country.is-hot { fill: rgba(124,58,237,.3); stroke: rgba(34,211,238,.4); stroke-width: .8; transition: fill .35s ease, stroke .35s ease; }
.globe__country.is-active { fill: rgba(124,58,237,.8); stroke: #34e6ff; stroke-width: 1.3; }
.globe__rim { stroke: rgba(34,211,238,.45); stroke-width: 1.5; filter: drop-shadow(0 0 9px rgba(34,211,238,.5)); }
.globe__marker { fill: #3b4f86; transition: fill .35s ease; }
.globe__marker.is-active { fill: #fff; filter: drop-shadow(0 0 11px rgba(52,230,255,1)); animation: markerPulse 1.6s ease-in-out infinite; }
@keyframes markerPulse { 0%, 100% { filter: drop-shadow(0 0 8px rgba(52,230,255,.9)); } 50% { filter: drop-shadow(0 0 15px rgba(52,230,255,1)); } }

.globe__label-pill {
    position: absolute; z-index: 3; transform: translate(-50%, -165%); pointer-events: none;
    background: rgba(10,12,30,.88); border: 1px solid rgba(34,211,238,.5); color: #eef0ff;
    font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
    box-shadow: 0 0 16px rgba(34,211,238,.3); opacity: 0; transition: opacity .25s ease;
}
.globe__label-pill.show { opacity: 1; }
.globe__hint {
    position: absolute; left: 50%; bottom: -2%; transform: translateX(-50%); z-index: 2;
    color: var(--muted); font-size: 13px; background: rgba(10,10,22,.55);
    padding: 5px 13px; border-radius: 999px; border: 1px solid var(--card-border); pointer-events: none;
}
.loc { cursor: pointer; }
.loc:hover { border-color: rgba(34,211,238,.45); }
.loc.is-active { border-color: rgba(34,211,238,.6); box-shadow: 0 0 26px rgba(34,211,238,.2); }
.loc.is-active .loc__pin { background: #34e6ff; box-shadow: 0 0 12px 3px rgba(34,211,238,.85); }

/* ===== Legal / terms page ===== */
.legal { padding: 46px 0 70px; }
.legal__title { font-family: 'Unbounded', sans-serif; font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -.5px; }
.legal__upd { color: var(--muted); margin: 14px 0 26px; }
.legal h2 { font-family: 'Unbounded', sans-serif; font-size: 20px; margin: 32px 0 12px; }
.legal p { color: #c6cae8; margin-bottom: 11px; }
.legal b { color: var(--text); }
.legal a { color: var(--c1); }
.legal__back { margin-top: 40px; }
