*,
*::before,
*::after {
    box-sizing: border-box;
}
:root {
    --primary: #7b61ff;
    --bg-main: #181820;
    --bg-dark: #111016;
    --bg-sdark: #070707;
    --text-main: #e0e0e0;
    --text-light: #aaa;
    --card-bg: #22202a;
    --border: #373145;
    --radius: 0.6em;
    --max-width: 1100px;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: var(--bg-sdark);
    color: var(--text-main);
    font-family: system-ui, sans-serif;
    line-height: 1.7;
}
h3 {
    text-align: center;
}
/* Hero Section */
.hero-section {
    position: relative;
    background: var(--bg-sdark);
    min-height: 68vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at bottom, #221f3a 0%, #090A0F 100%);
    z-index: 1;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 96px 16px 64px 16px;
    text-align: center;
}
.brand-wordmark {
    height: 48px;
    vertical-align: middle;
    margin-top: 20px;
}
.hero-content h1 {
    color: #fff;
    font-size: 2.3em;
    font-weight: 800;
    margin: 0 0 16px 0;
}
.primary {
    color: var(--primary);
}
.hero-content p {
    color: var(--text-main);
    font-size: 1.2em;
    max-width: 520px;
    margin: 14px auto 0;
}
.cta-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 1.12em;
    padding: 13px 36px;
    border-radius: var(--radius);
    margin-top: 32px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.16s;
    box-shadow: 0 2px 18px 0 #321d5040;
}
.cta-btn:hover {
    background: #5c3ebb;
}
/* Section headings */
section h2 {
    font-size: 2.1em;
    color: #fff;
    margin-top: 0;
    margin-bottom: 28px;
    font-weight: 800;
    text-align: center;
}
/* How it works section */
.how-section {
    background: #232236;
    padding: 36px 0;
}
.how-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 36px;
    max-width: var(--max-width);
    margin: 0 auto;
}
.how-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 1px 18px #18162c22;
    padding: 38px 28px 28px 28px;
    width: 325px;
    border: 1px solid var(--border);
    flex: 1 1 280px;
    min-width: 250px;
    max-width: 350px;
}
.how-card svg {
    color: var(--primary);
    margin-bottom: 20px;
    margin-top: 4px;
    width: 40px;
    height: 40px;
    display: block;
}
.how-card h3 {
    margin-top: 0;
    color: #fff;
    font-size: 1.18em;
    font-weight: 700;
}
.how-card p {
    color: var(--text-light);
    margin-top: 13px;
    margin-bottom: 0;
    font-size: 1em;
}
/* Benefits section */
.benefits-section {
    background: var(--bg-dark);
    padding: 36px 0;
}
.benefits-list {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    max-width: var(--max-width);
    margin: 0 auto;
    justify-content: center;
}
.benefit-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 1px 12px #18162c22;
    border: 1px solid var(--border);
    padding: 28px 22px 24px 22px;
    display: flex;
    flex: 1 1 320px;
    min-width: 100px;
    max-width: 480px;
    align-items: flex-start;
    gap: 18px;
}
.benefit-card svg {
    width: 40px;
    color: var(--primary);
    margin-right: 10px;
    flex-shrink: 0;
    display: block;
}
.benefit-text h4 {
    margin: 0 0 6px 0;
    color: #fff;
    font-size: 1.1em;
    font-weight: 700;
}
.benefit-text p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.99em;
}
/* Signup section */
.signup-section {
    background: var(--bg-dark);
    padding: 36px 0;
}
.signup-form {
    max-width: 540px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 1px 14px #18162c22;
    padding: 40px 24px 32px 24px;
    border: 1px solid var(--border);
}
.signup-form-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}
.signup-form-fields .form-field {
    flex: 1 1 200px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.signup-form input {
    width: 90%;
    padding: 12px 13px;
    border-radius: 0.4em;
    background: var(--bg-main);
    border: 1px solid #312950;
    color: #fff;
    font-size: 1em;
    outline: none;
    transition: border 0.16s, box-shadow 0.16s;
}
.signup-form input:focus {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 2px #7b61ff22;
}
.signup-form label {
    font-size: 0.98em;
    color: #bcbada;
    margin-bottom: 2px;
    margin-left: 2px;
}
.signup-form .submit-row {
    text-align: center;
    margin-top: 24px;
}
.signup-form button {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.1em;
    padding: 13px 36px;
    border: none;
    border-radius: var(--radius);
    transition: background 0.16s;
    box-shadow: 0 2px 16px 0 #321d5040;
    cursor: pointer;
}
.signup-form button:hover {
    background: #5c3ebb;
}

.card-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
}

/* Footer */
footer {
    background: var(--bg-sdark);
    color: #8a8999;
    text-align: center;
    padding: 30px 0 20px 0;
    font-size: 1em;
    margin-top: 0;
}
/* Responsive adjustments */
@media (max-width: 900px) {
    .how-cards, .benefits-list {
        flex-direction: column;
        gap: 18px;
        align-items: center;
    }
    .benefit-card, .how-card {
        width: 100%;
        min-width: 0;
        max-width: 500px;
        flex: 1 1;
    }
}
@media (max-width: 600px) {
    .hero-content {
        padding: 56px 7px 38px 7px;
    }
    .hero-section {
        min-height: 52vh;
    }
    .how-card, .benefit-card {
        padding: 20px 10px 16px 10px;
    }
}

:root {
    --field-size: 2000px;
}

/* ===== Animation ===== */
@keyframes animStar {
    from { transform: translateY(0); }
    to   { transform: translateY(-2000px); } /* keep in sync with --field-size */
}

/* ===== Star layers ===== */
.layer {
    position: absolute;
    top: 0; left: 0;
    background: transparent;
    /* Stars are injected via CSS custom properties */
}

/* Layer 1: small stars */
#stars {
    width: 1px; height: 1px;
    box-shadow: var(--shadows-small, none);
    animation: animStar 50s linear infinite;
}
#stars::after {
    content: "";
    position: absolute; top: 2000px; left: 0;
    width: 1px; height: 1px;
    background: transparent;
    box-shadow: var(--shadows-small, none);
}

/* Layer 2: medium stars */
#stars2 {
    width: 2px; height: 2px;
    box-shadow: var(--shadows-medium, none);
    animation: animStar 100s linear infinite;
}
#stars2::after {
    content: "";
    position: absolute; top: 2000px; left: 0;
    width: 2px; height: 2px;
    background: transparent;
    box-shadow: var(--shadows-medium, none);
}

/* Layer 3: big stars */
#stars3 {
    width: 3px; height: 3px;
    box-shadow: var(--shadows-big, none);
    animation: animStar 150s linear infinite;
}
#stars3::after {
    content: "";
    position: absolute; top: 2000px; left: 0;
    width: 3px; height: 3px;
    background: transparent;
    box-shadow: var(--shadows-big, none);
}

/* ===== Connection canvases ===== */
.links {
    position: absolute;
    top: 0; left: 0;
    width: 2000px; height: 2000px; /* CSS pixels; JS sets the backing store (DPR) */
    pointer-events: none;
}

/* Stacking and synchronized animations */
#links1 { z-index: 0; animation: animStar 50s linear infinite; }
#stars  { z-index: 1; }

#links2 { z-index: 2; animation: animStar 100s linear infinite; }
#stars2 { z-index: 3; }

#links3 { z-index: 4; animation: animStar 150s linear infinite; }
#stars3 { z-index: 5; }