/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0c0c12;
    --bg-alt: #101018;
    --bg-card: #14141e;
    --bg-card-hover: #1a1a28;
    --text: #e0ddd8;
    --text-muted: #7a7a8a;
    --accent: #c9a84c;
    --accent-hover: #dbb960;
    --accent-dim: rgba(201, 168, 76, 0.12);
    --border: #22222e;
    --border-light: #2a2a38;
    --success: #4caf50;
    --error: #e74c3c;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
    --max-w: 1140px;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

/* === Typography === */
h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; color: var(--text); }

.accent { color: var(--accent); }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
}
.btn-sm { padding: 0.45rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-accent {
    background: var(--accent);
    color: #0c0c12;
    border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #0c0c12; }

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

/* === Nav === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 1.5rem;
    background: rgba(12, 12, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.nav-logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.nav-logo:hover { color: var(--text); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

/* Language selector */
.lang-select {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-family: inherit;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
    margin-left: 0.5rem;
}
.lang-select:focus { border-color: var(--accent); }
.lang-select option { background: var(--bg-card); color: var(--text); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* === Hero === */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 1.5rem 60px;
    max-width: var(--max-w);
    margin: 0 auto;
    gap: 4rem;
}
.hero-content { flex: 1; max-width: 600px; }
.hero-sub {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin: 1.25rem 0 2rem;
    max-width: 480px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { flex: 0 0 380px; }
.hero-staff { width: 100%; opacity: 0.85; }

/* === Stats === */
.stats {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    background: var(--bg-alt);
}
.stats-grid {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    text-align: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.stat { flex: 1; min-width: 100px; }
.stat-number {
    display: block;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}
.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.25rem;
    display: block;
}

/* === Sections === */
.section {
    padding: 5rem 1.5rem;
    max-width: var(--max-w);
    margin: 0 auto;
}
.section-alt {
    max-width: none;
    background: var(--bg-alt);
}
.section-alt > * { max-width: var(--max-w); margin-left: auto; margin-right: auto; }
.section-alt > .section-title,
.section-alt > .section-sub { max-width: var(--max-w); }

.section-title { margin-bottom: 0.75rem; }
.section-sub {
    color: var(--text-muted);
    font-size: 1.0625rem;
    max-width: 640px;
    margin-bottom: 3rem;
}

/* === Generators === */
.generators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.gen-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all var(--transition);
}
.gen-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}
.gen-icon {
    color: var(--accent);
    margin-bottom: 1rem;
    width: 40px;
    height: 40px;
}
.gen-card h3 { margin-bottom: 0.5rem; }
.gen-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.55; }

/* === Features === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem 2rem;
}
.feature {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}
.feature h4 {
    margin-bottom: 0.35rem;
    font-weight: 600;
}
.feature p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* === Instruments === */
.instruments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}
.inst-family {
    color: var(--accent);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.inst-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.inst-group li {
    font-size: 0.9375rem;
    color: var(--text-muted);
}
.inst-detail {
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.7;
    margin-left: 0.25rem;
}

/* === Steps === */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}
.step { text-align: center; padding: 1.5rem; }
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.step h4 { margin-bottom: 0.5rem; font-size: 1.125rem; }
.step p { font-size: 0.875rem; color: var(--text-muted); max-width: 300px; margin: 0 auto; }

/* === Pricing === */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}
.billing-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.billing-label.active { color: var(--text); }
.badge {
    font-size: 0.7rem;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
}
.toggle-switch {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--border-light);
    border: none;
    cursor: pointer;
    position: relative;
    transition: background var(--transition);
    padding: 0;
}
.toggle-switch.active { background: var(--accent); }
.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform var(--transition);
}
.toggle-switch.active .toggle-thumb { transform: translateX(20px); }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}
.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
}
.price-card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.08);
}
.price-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #0c0c12;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.price-card h3 { margin-bottom: 0.5rem; }
.price {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.price-period {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}
.price-features {
    list-style: none;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}
.price-features li {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding-left: 1.25rem;
    position: relative;
}
.price-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}

/* === Tech === */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.tech-item {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.tech-item h4 { margin-bottom: 0.4rem; }
.tech-item p { font-size: 0.875rem; color: var(--text-muted); }

/* === Footer === */
.footer {
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem 1.5rem;
    background: var(--bg);
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    flex-wrap: wrap;
}
.footer-brand { max-width: 280px; }
.footer-copy {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.75rem;
}
.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.footer-col h5 {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.footer-col a,
.footer-col span {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.footer-bottom {
    max-width: var(--max-w);
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* === Modal === */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.modal-overlay.open { display: flex; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }

.modal-step-hidden { display: none !important; }

.modal-price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

/* Form */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    font-weight: 500;
}
.form-group input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color var(--transition);
    outline: none;
}
.form-group input::placeholder { color: #4a4a58; }
.form-group input:focus { border-color: var(--accent); }
.form-group input.invalid { border-color: var(--error); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
    font-style: italic;
}

/* Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

#step-processing,
#step-success {
    text-align: center;
    padding: 2rem 0;
}
.processing-text {
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Success */
.success-check { margin-bottom: 1.5rem; }
.success-detail {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.75rem 0 1.5rem;
}

/* === Scroll animations === */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(12, 12, 18, 0.97);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-cta { display: none; }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
        gap: 2rem;
        min-height: auto;
    }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-visual { flex: 0 0 auto; max-width: 320px; }

    .generators-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .instruments-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
    .tech-grid { grid-template-columns: 1fr; }

    .section { padding: 3rem 1.5rem; }

    .footer-inner { flex-direction: column; gap: 2rem; }
    .footer-links { gap: 2rem; }
}

@media (max-width: 480px) {
    .stats-grid { gap: 1rem; }
    .stat-number { font-size: 1.75rem; }
    .instruments-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
}
