/* ============================================
   SmartForm Checkout - Dark SaaS Theme
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-input: #22222f;
    --border: #2a2a3a;
    --border-focus: #6366f1;
    --text-primary: #f0f0f5;
    --text-secondary: #9494a8;
    --text-muted: #6b6b80;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --success: #22c55e;
    --error: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
}

/* ---- Reset & Base ---- */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
}

/* ---- Container ---- */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- Navbar ---- */

.navbar {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
}

.brand-simple {
    color: var(--text-primary);
}

.brand-check {
    color: var(--accent);
}

/* ---- Buttons ---- */

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* ---- Hero ---- */

.hero {
    text-align: center;
    padding: 5rem 1.5rem 3rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---- Features ---- */

.features {
    padding: 4rem 1.5rem;
}

.features h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color 0.2s ease;
}

.feature-card:hover {
    border-color: var(--accent);
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---- Pricing Section ---- */

.pricing-section {
    padding: 4rem 1.5rem 5rem;
    text-align: center;
}

.pricing-section h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.pricing-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
}

.pricing-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.pricing-name {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.pricing-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 0.5rem;
}

.price-dollar {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    align-self: flex-start;
    margin-top: 0.5rem;
}

.price-value {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.price-period {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.pricing-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.pricing-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* ---- Social Proof ---- */

.social-proof {
    padding: 3rem 1.5rem 5rem;
}

.social-proof h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.testimonial-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ---- Checkout Page ---- */

.checkout-section {
    padding: 3rem 1.5rem 5rem;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
}

.checkout-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.checkout-summary h2 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.summary-price {
    margin-bottom: 0.25rem;
}

.summary-amount {
    font-size: 2.5rem;
    font-weight: 700;
}

.summary-period {
    font-size: 1rem;
    color: var(--text-secondary);
}

.summary-trial {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.summary-detail {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.summary-features {
    list-style: none;
}

.summary-features li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.summary-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* ---- Form ---- */

.checkout-form-container h2 {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

#card-element {
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease;
}

#card-element.StripeElement--focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#card-element.StripeElement--invalid {
    border-color: var(--error);
}

.form-error {
    color: var(--error);
    font-size: 0.85rem;
    min-height: 1.25rem;
    margin-bottom: 0.75rem;
}

.form-legal {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Spinner */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.hidden {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Success Page ---- */

.success-section {
    padding: 5rem 1.5rem;
    text-align: center;
}

.success-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    max-width: 560px;
    margin: 0 auto;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: var(--success);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    line-height: 64px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.success-card h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.success-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.success-steps {
    text-align: left;
    margin-bottom: 2rem;
}

.success-steps h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.success-steps ol {
    padding-left: 1.25rem;
}

.success-steps li {
    padding: 0.4rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.success-note {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ---- Cancel Page ---- */

.cancel-section {
    padding: 5rem 1.5rem;
    text-align: center;
}

.cancel-card {
    max-width: 480px;
    margin: 0 auto;
}

.cancel-card h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.cancel-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ---- Footer ---- */

.footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 3rem 1rem 2rem;
    }

    .pricing-card {
        padding: 1.75rem;
    }
}
