:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f6f7fb;
    --color-surface: #ffffff;
    --color-text: #0f172a;
    --color-text-muted: #475569;
    --color-border: #e2e8f0;
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-accent: #0ea5e9;
    --color-code-bg: #0f172a;
    --color-code-text: #e2e8f0;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.15);
    --shadow-lg: 0 25px 50px -20px rgba(15, 23, 42, 0.25);
    --max-width: 1160px;
    --max-width-narrow: 760px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: var(--max-width-narrow);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

h1, h2, h3 {
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

h3 {
    font-size: 1.25rem;
}

p {
    color: var(--color-text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-small {
    padding: 10px 18px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 18px 32px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
    margin-top: 24px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
    gap: 24px;
}

.logo {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--color-primary);
}

.nav {
    display: flex;
    gap: 28px;
}

.nav a {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav a:hover {
    color: var(--color-text);
}

/* Hero */
.hero {
    padding: 80px 0 100px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
}

.hero-visual {
    min-width: 0;
}

.eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.hero-sub {
    font-size: 1.2rem;
    margin: 24px 0 32px;
    max-width: 560px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.hero-bullets {
    list-style: none;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-bullets li {
    position: relative;
    padding-left: 24px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.hero-bullets li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

/* Code window */
.code-window {
    background: var(--color-code-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: rotate(1deg);
    transition: transform 0.3s ease;
    max-width: 100%;
    min-width: 0;
}

.code-window:hover {
    transform: rotate(0);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

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

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

.code-title {
    margin-left: 12px;
    color: #94a3b8;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 0.85rem;
}

.code-body {
    padding: 24px;
    color: var(--color-code-text);
    font-family: 'SF Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.65;
    overflow-x: auto;
}

.code-body .kw { color: #c084fc; }
.code-body .cls { color: #4ade80; }
.code-body .fn { color: #60a5fa; }

/* Trust bar */
.trust-bar {
    padding: 48px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}

.trust-title {
    text-align: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    font-weight: 600;
}

.trust-items {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.trust-item {
    text-align: center;
}

.trust-item strong {
    display: block;
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 4px;
}

.trust-item span {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Section */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}

.section-lead {
    margin-top: 16px;
    font-size: 1.1rem;
}

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

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.card-icon {
    display: inline-block;
    font-weight: 800;
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.card h3 {
    margin-bottom: 12px;
}

/* Benefits */
.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.benefit h3 {
    margin-bottom: 12px;
    color: var(--color-primary);
}

/* Steps */
.steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    counter-reset: step;
}

.step {
    position: relative;
    padding-top: 8px;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.step h3 {
    margin-bottom: 8px;
}

/* Technologies */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.tech-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: border-color 0.15s ease;
}

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

.tech-item strong {
    display: block;
    color: var(--color-text);
    margin-bottom: 4px;
}

.tech-item span {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.tech-note {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    font-style: italic;
}

/* Pricing */
.pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 880px;
    margin: 0 auto;
}

.price-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    position: relative;
}

.price-card.featured {
    border-color: var(--color-primary);
    border-width: 2px;
    box-shadow: var(--shadow-md);
}

.badge {
    position: absolute;
    top: -12px;
    left: 32px;
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price-card h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.price-lead {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.price-list {
    list-style: none;
}

.price-list li {
    position: relative;
    padding: 10px 0 10px 28px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.price-list li:last-child {
    border-bottom: none;
}

.price-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--color-primary);
    font-weight: 700;
}

/* Testimonials */
.testimonial-section .section-head {
    margin-bottom: 48px;
}

.testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.testimonial {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.testimonial p {
    color: var(--color-text);
    font-size: 1.05rem;
    margin-bottom: 16px;
    font-style: italic;
}

.testimonial footer {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-text);
    padding-right: 32px;
    position: relative;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: transform 0.2s ease;
    line-height: 1;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    margin-top: 12px;
    padding-right: 32px;
}

/* CTA */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    color: white;
    margin-bottom: 16px;
}

.cta p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
    max-width: 1080px;
    margin: 48px auto 0;
    text-align: left;
}

.cta-photo {
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 96px;
}

.cta-photo picture,
.cta-photo img {
    display: block;
    width: 100%;
    height: auto;
}

.cta-photo figcaption {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.cta-photo figcaption span {
    display: block;
    font-weight: 400;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 2px;
}

.contact-form {
    margin: 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 32px;
    backdrop-filter: blur(8px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-field {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.form-field label {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.form-field .optional {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.form-field input,
.form-field textarea {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
    background: white;
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button[type="submit"] {
    width: 100%;
    margin-top: 8px;
}

@media (max-width: 900px) {
    .cta-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 640px;
    }

    .cta-photo {
        position: static;
    }
}

@media (max-width: 520px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form {
        padding: 24px;
    }
}

.cta .btn-primary {
    background: white;
    color: var(--color-primary);
}

.cta .btn-primary:hover {
    background: #f1f5f9;
    color: var(--color-primary-dark);
}

.cta .btn-ghost {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.cta .btn-ghost:hover {
    border-color: white;
    color: white;
}

/* Thank-you page */
.thanks {
    padding: 80px 0 100px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.thanks-inner {
    text-align: center;
}

.thanks-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 32px;
    border-radius: 50%;
    background: #86efac;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.thanks-icon svg {
    width: 28px;
    height: 28px;
}

.thanks h1 {
    margin-bottom: 16px;
}

.thanks-lead {
    font-size: 1.15rem;
    max-width: 560px;
    margin: 0 auto 56px;
}

.thanks-next {
    text-align: left;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 48px;
}

.thanks-next h2 {
    font-size: 1.35rem;
    margin-bottom: 24px;
    text-align: center;
}

.thanks-steps {
    list-style: none;
    counter-reset: thanks-step;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.thanks-steps li {
    counter-increment: thanks-step;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px;
    text-align: center;
}

.thanks-steps li::before {
    content: counter(thanks-step);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    color: var(--color-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.thanks-steps strong {
    display: block;
    color: var(--color-text);
    margin-bottom: 2px;
}

.thanks-steps span {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.thanks-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    .thanks-steps {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 520px) {
    .thanks-next {
        padding: 28px 20px;
    }

    .thanks-cta {
        flex-direction: column;
    }

    .thanks-cta .btn {
        width: 100%;
    }
}

/* Legal pages */
.legal {
    padding: 64px 0 96px;
}

.legal h1 {
    margin-bottom: 32px;
    font-size: clamp(2rem, 4vw, 2.75rem);
}

.legal h2 {
    margin-top: 40px;
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.legal p,
.legal ul {
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.legal ul {
    padding-left: 24px;
}

.legal li {
    margin-bottom: 6px;
}

.legal a {
    word-break: break-word;
}

.legal-note {
    margin-top: 48px;
    padding: 16px 20px;
    background: var(--color-bg-alt);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* Footer */
.site-footer {
    padding: 48px 0 32px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.site-footer strong {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.footer-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-meta a {
    color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero {
        padding: 56px 0 72px;
    }

    .nav {
        display: none;
    }

    .section {
        padding: 72px 0;
    }

    .trust-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 520px) {
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }
}
