/**
 * Corvue Claw Styles
 * A distinctive, modern design with depth and personality
 */

/* ============================================
   CUSTOM PROPERTIES
   ============================================ */
:root {
    /* Brand Colors - Deep sea / lobster inspired */
    --brand-primary: #e63946;
    --brand-primary-light: #ff6b6b;
    --brand-primary-dark: #c1121f;
    --brand-accent: #06d6a0;
    --brand-accent-light: #4ecca3;
    
    /* Surfaces - Rich dark palette */
    --surface-1: #0a0a0f;
    --surface-2: #12121a;
    --surface-3: #1a1a26;
    --surface-4: #252535;
    --surface-elevated: #1e1e2e;
    
    /* Text */
    --text-1: #fafafa;
    --text-2: #a1a1aa;
    --text-3: #71717a;
    --text-muted: #52525b;
    
    /* Gradients */
    --gradient-brand: linear-gradient(135deg, var(--brand-primary) 0%, #ff8fa3 100%);
    --gradient-surface: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-1) 100%);
    --gradient-glow: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(230, 57, 70, 0.15) 0%, transparent 70%);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Typography */
    --font-display: 'Clash Display', 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Radii */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3), 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(230, 57, 70, 0.2);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ============================================
   BASE RESET & FOUNDATIONS
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--surface-1);
    color: var(--text-1);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        var(--gradient-glow),
        radial-gradient(circle at 80% 80%, rgba(6, 214, 160, 0.05) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-2);
    max-width: 65ch;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

strong { font-weight: 600; }

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 800px;
}

section {
    padding: var(--space-4xl) 0;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-1);
}

.logo-img {
    height: 32px;
    width: auto;
}

.logo-img-footer {
    height: 28px;
}

.logo-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.nav-links a {
    color: var(--text-2);
    font-size: 0.9375rem;
    font-weight: 500;
    padding: var(--space-sm) 0;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-primary);
    transition: width var(--transition-base);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

/* Alpine.js x-cloak - hide elements until Alpine loads */
[x-cloak] {
    display: none !important;
}

/* ---- User avatar & dropdown ---- */
.user-menu {
    position: relative;
}

.user-avatar {
    --avatar-hue: 270;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(
        135deg,
        hsl(var(--avatar-hue), 70%, 55%),
        hsl(calc(var(--avatar-hue) + 40), 80%, 45%)
    );
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
    line-height: 1;
}

.user-avatar:hover {
    box-shadow: 0 0 0 2px hsla(var(--avatar-hue), 70%, 55%, 0.4);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xs) 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 200;
}

.user-dropdown-header {
    padding: var(--space-sm) var(--space-md);
    color: var(--text-3);
    font-size: 0.8125rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.user-dropdown a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-1);
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: var(--space-xs) 0;
}

.user-dropdown-logout {
    display: block;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-body);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.user-dropdown-logout:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-1);
}

/* ---- Mobile menu toggle ---- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-1);
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 10;
}

/* Mobile-only actions - hidden on desktop */
.nav-mobile-actions {
    display: none !important;
}

/* Desktop: Always show nav-links */
.nav-links {
    display: flex !important;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Authed nav-links are mobile-only (hamburger); hidden on desktop */
.nav-links.nav-links-authed {
    display: none !important;
}

@media (max-width: 768px) {
    .site-header .container {
        position: relative;
    }
    
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-links,
    .nav-links-authed {
        display: none !important;
        position: absolute;
        top: calc(100% + var(--space-sm));
        left: var(--space-lg);
        right: var(--space-lg);
        background: var(--surface-2);
        padding: var(--space-lg);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-lg);
        flex-direction: column;
        gap: var(--space-sm);
        z-index: 100;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active,
    .nav-links-authed.active {
        display: flex !important;
    }
    
    .nav-links li {
        list-style: none;
    }
    
    .nav-links a {
        padding: var(--space-sm) var(--space-md);
        display: block;
        border-radius: var(--radius-md);
        transition: background-color 0.2s;
    }
    
    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.05);
    }
    
    /* Show mobile actions in dropdown */
    .nav-mobile-actions {
        display: flex !important;
        flex-direction: column;
        gap: var(--space-sm);
        padding-top: var(--space-md);
        margin-top: var(--space-sm);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-mobile-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Hide desktop nav actions on mobile */
    .nav-actions {
        display: none;
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.5;
    letter-spacing: normal;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(230, 57, 70, 0.4);
}

.btn-secondary {
    background: var(--surface-3);
    color: var(--text-1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--surface-4);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.btn-ghost:hover {
    color: var(--text-1);
    background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.875rem;
}

.btn-icon {
    padding: var(--space-sm);
    aspect-ratio: 1;
}

/* Override Open Props normalize */
a.btn, a.btn:hover, a.btn:visited {
    color: inherit;
    text-decoration: none;
}
a.btn-primary, a.btn-primary:hover, a.btn-primary:visited {
    color: white;
}
a.btn-ghost, a.btn-ghost:visited {
    color: var(--text-2);
}
a.btn-ghost:hover {
    color: var(--text-1);
}
button.btn {
    -webkit-appearance: none;
    appearance: none;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.card-interactive:hover {
    transform: translateY(-2px);
}

.card-glow {
    position: relative;
    overflow: hidden;
}

.card-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-primary), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card-glow:hover::before {
    opacity: 1;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: var(--space-4xl) 0;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: var(--radius-full);
    color: var(--brand-primary-light);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-xl);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(230, 57, 70, 0.2); }
    50% { box-shadow: 0 0 30px rgba(230, 57, 70, 0.4); }
}

.hero h1 {
    margin-bottom: var(--space-lg);
}

.hero h1 .highlight {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-2);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   GRID LAYOUTS - Fixed column patterns
   ============================================ */
/* 2-column grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 640px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* 3-column grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* 4-column grid - for 4 cards exactly */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* 6-column grid - for 6 cards exactly (shows as 3, 2, 1) */
.grid-6 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 900px) {
    .grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-6 {
        grid-template-columns: 1fr;
    }
}

/* Auto-fit grid - for flexible numbers of cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.feature-card {
    text-align: center;
    padding: var(--space-2xl);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(6, 214, 160, 0.1));
    border-radius: var(--radius-lg);
    font-size: 1.75rem;
}

.feature-card h3 {
    margin-bottom: var(--space-sm);
}

.feature-card p {
    margin: 0 auto;
    font-size: 0.9375rem;
}

/* Small feature cards - for dense grids */
.feature-card-small {
    text-align: center;
    padding: var(--space-xl);
}

.feature-icon-small {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.feature-card-small h4 {
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.feature-card-small p {
    margin: 0 auto;
    font-size: 0.875rem;
}

/* ============================================
   STORIES / TESTIMONIALS
   ============================================ */
.stories-section {
    background: var(--surface-2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.story-card {
    background: var(--surface-3);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    position: relative;
}

.story-emoji {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.story-card h4 {
    margin-bottom: var(--space-sm);
    color: var(--text-1);
}

.story-card p {
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
}

.story-attribution {
    font-size: 0.8125rem;
    color: var(--text-3);
    font-style: italic;
}

/* ============================================
   PRICING
   ============================================ */
.pricing-toggle {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
    background: var(--surface-3);
    padding: var(--space-xs);
    border-radius: var(--radius-full);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.pricing-toggle button {
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    color: var(--text-2);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pricing-toggle button.active {
    background: var(--brand-primary);
    color: white;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    text-align: center;
}

.pricing-card.featured {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-glow);
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--gradient-brand);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-card h3 {
    color: var(--text-2);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.pricing-card .price {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.pricing-card .price span {
    font-size: 1rem;
    color: var(--text-3);
    font-weight: 400;
}

.pricing-card .tagline {
    color: var(--text-3);
    font-size: 0.875rem;
    margin-bottom: var(--space-xl);
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: var(--space-xl);
}

.pricing-features li {
    padding: var(--space-sm) 0;
    color: var(--text-2);
    font-size: 0.9375rem;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.pricing-features li::before {
    content: '✓';
    color: var(--brand-accent);
    font-weight: 600;
}

.pricing-card .pricing-annual {
    font-size: 0.8125rem;
    color: var(--text-3);
    margin-bottom: var(--space-sm);
}

.pricing-card .btn {
    width: 100%;
}

/* ============================================
   FAQ
   ============================================ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-xl);
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

.faq-item {
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-item h4 {
    color: var(--text-1);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item p {
    font-size: 0.9375rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--surface-2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand {
    max-width: 300px;
}

.footer-brand p {
    margin-top: var(--space-md);
    font-size: 0.9375rem;
}

.footer-links h5 {
    color: var(--text-1);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

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

.footer-links a:hover {
    color: var(--text-1);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-3);
    font-size: 0.875rem;
}

.footer-bottom a {
    color: var(--text-3);
}

.footer-bottom a:hover {
    color: var(--text-1);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    text-align: center;
    background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-2) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-section h2 {
    margin-bottom: var(--space-lg);
    position: relative;
}

.cta-section p {
    margin: 0 auto var(--space-xl);
    max-width: 500px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: var(--space-md);
    background: var(--surface-3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-1);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.form-input::placeholder {
    color: var(--text-3);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-primary);
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.flash-success {
    background: rgba(6, 214, 160, 0.1);
    border: 1px solid rgba(6, 214, 160, 0.3);
    color: var(--brand-accent);
}

.flash-error {
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid rgba(230, 57, 70, 0.3);
    color: var(--brand-primary-light);
}

.flash-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.flash-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

/* ============================================
   INTEGRATIONS
   ============================================ */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.integration-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--surface-3);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.integration-item:hover {
    background: var(--surface-4);
    transform: translateY(-2px);
}

.integration-item .icon {
    font-size: 2rem;
}

.integration-item span {
    font-size: 0.875rem;
    color: var(--text-2);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    margin: 0 auto;
}

.section-eyebrow {
    display: inline-block;
    color: var(--brand-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

/* ============================================
   HTMX INDICATORS
   ============================================ */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--text-3); }
.text-brand { color: var(--brand-primary); }
.text-accent { color: var(--brand-accent); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   IMPERSONATION BANNER
   ============================================ */
.impersonation-banner {
    background: rgba(139, 92, 246, 0.15);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    padding: 0.4rem 0;
    font-size: 0.8rem;
    text-align: center;
    display: flex;
    align-items: center;
}

.impersonation-banner strong {
    color: #e9d5ff;
}

/* ============================================
   COPY / INLINE ACTION BUTTONS
   ============================================ */
.copy-btn {
    background: none !important;
    border: none !important;
    color: var(--text-3);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 6px;
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

.copy-btn svg {
    flex-shrink: 0;
}

.copy-btn:hover {
    color: var(--text-1);
    background: rgba(255, 255, 255, 0.08) !important;
}

/* ============================================
   RADIO OPTION (Security page)
   ============================================ */
.radio-option {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--surface-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.radio-option.selected {
    border-color: var(--brand-accent);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-3);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.radio-dot.active {
    border-color: var(--brand-accent);
}

.radio-dot-inner {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: background 0.2s;
}

.radio-dot.active .radio-dot-inner {
    background: var(--brand-accent);
}

.radio-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.radio-label-text {
    min-width: 0;
}

.radio-label-text .title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-1);
}

.radio-label-text .desc {
    font-size: 0.8125rem;
    color: var(--text-3);
    margin-top: 2px;
}
