:root {
    --bg-dark: #0b0f19;
    --bg-card: #111827;
    --bg-card-hover: #1f293d;
    --bg-light: #f8fafc;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #0f172a;
    --primary: #38bdf8;
    --primary-hover: #0284c7;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --border: #1e293b;
    --border-light: #e2e8f0;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --container-w: 1240px;
    --transition: all 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

body {
    position: relative;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Background effects */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: -2;
    pointer-events: none;
}

.bg-glow-main {
    position: fixed;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    z-index: 1000;
    transition: width 0.1s linear;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 900;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
}

.logo__mark {
    color: var(--primary);
    font-family: var(--font-mono);
}

.nav {
    display: flex;
    gap: 1.75rem;
}

.nav__link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav__link:hover {
    color: var(--primary);
}

.header__right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active {
    background: var(--primary);
    color: var(--text-dark);
}

.lang-btn:hover:not(.active) {
    color: #fff;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn--primary {
    background: var(--primary);
    color: var(--text-dark);
}

.btn--primary:hover {
    background: #0284c7;
    color: #fff;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn--outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-main);
}

.btn--outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn--full {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 5rem 0 4rem;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero__title {
    font-size: 2.6rem;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.hero__stats {
    display: flex;
    gap: 3rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.stat__num {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-mono);
}

.stat__label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Terminal */
.terminal-wrap {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.terminal {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.terminal__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot--red { background: #ef4444; }
.dot--yellow { background: #f59e0b; }
.dot--green { background: #10b981; }

.terminal__title {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.terminal__body p {
    margin-bottom: 0.5rem;
}

.prompt { color: var(--primary); }
.ok { color: #10b981; }

.cursor {
    animation: blink 1s infinite;
    color: var(--primary);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Section Shared */
section {
    padding: 5rem 0;
}

.section-head {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 3.5rem;
}

.section-head__tag {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-head__title {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0.5rem 0 1rem;
}

.section-head__desc {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Cards Grid */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.cards--3 {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 12px;
    transition: var(--transition);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-4px);
}

.card__icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.card__text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Light Section Override */
.section--light {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.section--light .section-head__title {
    color: var(--text-dark);
}

.section--light .section-head__desc {
    color: #64748b;
}

.card--white {
    background: #ffffff;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.card--white .card__title {
    color: var(--text-dark);
}

.card--white .card__text {
    color: #475569;
}

.card--white:hover {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

/* Pricing Section */
.plans {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.plan {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.plan:hover {
    border-color: var(--primary);
}

.plan--featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.08) 0%, var(--bg-card) 100%);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.15);
}

.plan__badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary);
    color: var(--text-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.plan__name {
    font-size: 1.2rem;
    font-weight: 700;
}

.plan__subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    min-height: 2.5em;
}

.plan__price {
    font-size: 2.25rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #fff;
    margin-bottom: 1.5rem;
}

.plan__price span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.plan__list {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.plan__list li {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.25rem;
}

.plan__list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Calculator Box */
.calculator-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.calculator-box__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.calculator-box__desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.calculator-box__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.calc-item__name {
    font-size: 0.9rem;
}

.calc-item__price {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

/* Stack */
.stack__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stack__group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 12px;
}

.stack__title {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.stack__list {
    list-style: none;
}

.stack__list li {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* CTA */
.cta {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #111827 100%);
    border-top: 1px solid var(--border);
}

.cta__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.cta__title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta__text {
    color: var(--text-muted);
}

.cta__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-dark);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

select.input option {
    background-color: var(--bg-dark);
    color: var(--text-main);
}

.form-status {
    font-size: 0.85rem;
    text-align: center;
}

/* Footer */
.footer {
    background: #070a10;
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    max-width: 400px;
}

.footer__col h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer__col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer__bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
}

/* To Top Button */
.to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--primary);
    border: 1px solid var(--border);
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 800;
}

.to-top.visible {
    opacity: 1;
    visibility: visible;
}

.to-top:hover {
    background: var(--primary);
    color: var(--text-dark);
}

/* Animations Reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
    .plans {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .hero__inner, .cta__inner, .footer__inner {
        grid-template-columns: 1fr;
    }
    
    .cards--3, .stack__grid {
        grid-template-columns: 1fr;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid var(--border);
    }

    .nav.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .header__cta {
        display: none;
    }
}

@media (max-width: 600px) {
    .plans {
        grid-template-columns: 1fr;
    }
    .hero__title {
        font-size: 2rem;
    }
}
