/* ==========================================
   Design System & CSS Variables (Creative Art Style)
   ========================================== */

:root {
    /* Brand Colors */
    --brand-primary: #04114A;
    /* Dark Blue - Background */
    --brand-neutral: #F9F5E4;
    /* Cream - Text & Surface */
    --brand-secondary: #EF8686;
    /* Pink - Accents */

    /* Semantic Colors */
    --bg-primary: var(--brand-primary);
    --bg-surface: var(--brand-neutral);

    /* Text */
    --text-primary: var(--brand-neutral);
    /* Cream text on Dark Blue BG */
    --text-inverse: var(--brand-primary);
    /* Dark Blue text on Cream Surface */
    --text-muted: rgba(249, 245, 228, 0.6);
    /* Cream with opacity */

    /* Borders */
    --border: rgba(249, 245, 228, 0.2);
    /* Subtle Cream border */
    --border-highlight: var(--brand-secondary);

    /* Accents */
    --accent: var(--brand-secondary);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Typography */
    --font-sans: 'Rubik', sans-serif;
    --font-hand: 'Patrick Hand', cursive;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 3rem;
    --text-5xl: 5rem;

    /* Radius - Soft UI */
    --radius-sm: 12px;
    --radius-md: 24px;
    --radius-lg: 32px;
}

/* Light Mode Toggle (Beige-on-White Inverted Logic) */
[data-theme="light"] {
    --bg-primary: var(--brand-neutral);
    /* Cream Background for light mode logic, instead of pure white */
    /* Pure White Background -> Cream */
    --bg-surface: var(--brand-neutral);
    /* Beige Cards */
    --text-primary: var(--brand-primary);
    --text-inverse: var(--brand-neutral);
    --text-muted: rgba(4, 17, 74, 0.6);
    --border: rgba(4, 17, 74, 0.1);
    /* Subtle border */

    /* Make buttons pop in light mode */
    --accent: var(--brand-secondary);
}

/* ==========================================
   Base Styles & Reset
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* cursor: none;  REMOVED: User wants to see cursor */
}



html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* Ensure sticky header doesn't cover content when scrolling to top */
section,
#demo,
#waitlist {
    scroll-margin-top: 100px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    position: relative;
    /* For Art Blobs */
}

a {
    text-decoration: none;
}

/* Custom Interactive Curtain Cursor */
.cursor-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
    opacity: 0.15;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: screen;
    /* Cool blending effect */
    transition: width 0.3s, height 0.3s, opacity 0.3s;
    filter: blur(40px);
}

/* Small dot for precision */
.cursor-spotlight::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
    filter: none;
}

[data-theme="light"] .cursor-spotlight {
    mix-blend-mode: multiply;
    /* Better blending for light mode */
    background: radial-gradient(circle, var(--brand-secondary) 0%, transparent 60%);
    opacity: 0.1;
}

/* Modern Art Abstract Blobs (Static Background) */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    /* Soft organic blurring */
    z-index: -1;
    opacity: 0.1;
    pointer-events: none;
}

/* Top Right Blob - Coral */
body::before {
    top: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--brand-secondary) 0%, transparent 70%);
}

/* Bottom Left Blob - Navy/Accent */
body::after {
    bottom: -20%;
    left: -10%;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, var(--brand-primary) 0%, transparent 70%);
}

[data-theme="light"] body::after {
    background: radial-gradient(circle, #EF8686 0%, transparent 70%);
    opacity: 0.08;
}

/* ==========================================
   Typography Utilities
   ========================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.mono {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.boxed-text {
    background-color: var(--accent);
    color: var(--brand-primary);
    padding: 0 0.4em;
    display: inline-block;
    border-radius: 20px;
    /* Pill shape for softer feel */
}

.title-massive {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    /* Slightly smaller max size */
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    /* Reduced margin */
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--spacing-xl);
}

.section-label {
    font-family: var(--font-sans);
    /* Rubik */
    color: var(--accent);
    font-size: var(--text-sm);
    margin-bottom: var(--spacing-md);
    display: inline-block;
    background: rgba(239, 134, 134, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

.section-label::before {
    content: '';
}

.section-label::after {
    content: '';
}

/* ==========================================
   Layout
   ========================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ==========================================
   Navigation
   ========================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(2, 8, 37, 0.6);
    /* More transparent for blur */
    backdrop-filter: blur(20px);
    /* Stronger glass effect */
    /* Stronger glass effect */
    padding: var(--spacing-sm) 0;
}

[data-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.8);
    /* White for Light Mode Nav */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: var(--text-2xl);
    /* Bumped up slightly for handwriting font */
    font-family: var(--font-hand);
    font-weight: 400;
    /* Patrick Hand is naturally bold-ish/handwritten */
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-link {
    font-family: var(--font-sans);
    /* Rubik */
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

/* ==========================================
   Buttons & CTAs
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: var(--font-sans);
    /* Rubik */
    font-weight: 700;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy */
    border-radius: var(--radius-md);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--brand-primary);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent);
    transform: scale(1.05);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.05);
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.theme-toggle:hover {
    color: var(--text-primary);
    transform: rotate(15deg);
    transition: transform 0.3s;
}

/* ==========================================
   Hero Section
   ========================================== */

/* Compact Hero Section for First Fold visibility */
.hero-section {
    padding: var(--spacing-lg) 0;
    /* Reduced from 3xl */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
    font-weight: 300;
}

.hero-ctas {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: center;
}

.demo-wrapper {
    margin-top: var(--spacing-lg);
    /* Reduced from 3xl */
    border: 1px solid var(--border);
    /* Simplified Shape - less "weird", just soft */
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    padding: 6px;
    /* Frame effect */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    /* Removed pulsing animation on shape */
}

.demo-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    align-items: center;
    border-radius: 20px 20px 0 0;
    /* Inner rounded */
    margin-bottom: 4px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--border);
}

.dot:nth-child(1) {
    background-color: var(--accent);
}

.dot:nth-child(2) {
    background-color: var(--brand-neutral);
    opacity: 0.5;
}

.demo-placeholder {
    aspect-ratio: 16/9;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-direction: column;
    font-family: var(--font-mono);
    border-radius: 0 0 20px 20px;
}

/* ==========================================
   About Section (Organic Art Cards)
   ========================================== */

.about-section {
    padding: var(--spacing-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    align-items: center;
    /* Center items for varied heights */
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    /* Uniform rounded corners */
    overflow: visible;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s;
    height: 100%;
    display: flex;
    color: var(--brand-primary);
    /* Force Dark Blue text on Cream surface */
    flex-direction: column;
    position: relative;
}

/* ORGANIC SHAPES - The "Pebble" Effect */

/* Standardize Cards (Remove Organic Shapes) */
.card:nth-child(n) {
    transform: none;
    border-radius: var(--radius-lg);
}

/* Card 4: Waitlist (Wider/Bigger) */
.card:nth-child(4) {
    grid-column: 1 / -1;
    /* Span all columns */
    max-width: 900px;
    /* Slightly wider max-width */
    margin: var(--spacing-lg) auto 0;
    /* Add top margin */
    padding: var(--spacing-md);
    /* Extra internal padding */
    width: 100%;
}

.card:hover {
    transform: scale(1.02) rotate(0deg) !important;
    /* Straighter on hover */
    border-color: var(--accent);
    z-index: 10;
}

.card-header {
    padding: 16px 24px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Remove border for cleaner "art object" look */
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--accent);
    text-transform: uppercase;
    background: rgba(239, 134, 134, 0.1);
    /* Keep as Accent tint */
    padding: 2px 6px;
    border-radius: 8px;
}

.terminal-controls {
    display: flex;
    gap: 6px;
}

.card-body {
    padding: 1rem var(--spacing-xl) var(--spacing-xl);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--spacing-sm);
    color: var(--brand-primary);
    /* Dark Blue */
}

.card-desc {
    color: rgba(4, 17, 74, 0.7);
    /* Dark Blue muted */
    font-size: var(--text-lg);
}

/* Waitlist Specifics */
#waitlist .card-body {
    padding-bottom: var(--spacing-xl);
}

.waitlist-form {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

.form-input {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    padding: var(--spacing-sm);
    color: var(--brand-primary);
    font-family: var(--font-mono);
    flex: 1;
    min-width: 150px;
    border-radius: 12px;
}

.form-input:focus {
    border-color: var(--accent);
    outline: none;
}

/* ==========================================
   Footer
   ========================================== */

.footer {
    border-top: 1px solid var(--border);
    padding: var(--spacing-3xl) 0;
    margin-top: var(--spacing-3xl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-email {
    color: var(--accent);
    font-family: var(--font-mono);
    text-decoration: none;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    /* Rubik */
}

.footer-link:hover {
    color: var(--text-primary);
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 1024px) {

    /* Tablet Optimizations */
    .card-body {
        padding: var(--spacing-lg);
        /* Reduce padding from XL default */
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
        /* Reduce container padding */
    }

    .title-massive {
        font-size: 2rem;
        /* Smaller font for mobile */
        word-wrap: break-word;
        /* Prevent overflow */
    }

    .hero-section {
        padding: var(--spacing-lg) 0;
        min-height: auto;
    }

    /* Navigation: Stack vertically and clean up */
    .nav-container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .nav-links {
        gap: var(--spacing-sm);
        /* Tighter gap */
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .nav-link {
        font-size: var(--text-xs);
        /* Slightly smaller nav text */
    }

    .nav-actions {
        margin-top: var(--spacing-xs);
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Buttons: Full width on very small screens if needed, otherwise centered */
    .nav-actions .btn {
        flex: 1;
        min-width: 120px;
        max-width: 200px;
    }

    .theme-toggle {
        position: absolute;
        top: var(--spacing-sm);
        right: var(--spacing-md);
    }

    .cards-grid {
        /* Switch to single column for mobile, overriding the minmax300px */
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Waitlist form mobile optimization */
    .waitlist-form {
        flex-direction: column;
    }

    .form-input {
        min-width: 100%;
    }

    /* Disable custom cursor on touch devices */
    * {
        cursor: auto;
    }

    .cursor-spotlight {
        display: none;
    }

    /* Tame organic shapes for mobile stacking */
    .card:nth-child(n) {
        border-radius: var(--radius-md);
        /* Slightly smaller radius */
        transform: none;
        margin-bottom: 0;
        /* Let grid gap handle spacing */
    }

    .card-body {
        padding: var(--spacing-md);
    }

    /* Footer adjustments */
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--spacing-lg);
    }
}

/* Very Small Screens (SE, old devices) */
@media (max-width: 375px) {
    .container {
        padding: 0 var(--spacing-sm);
        /* Even tighter padding */
    }

    .title-massive {
        font-size: 1.75rem;
    }

    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        /* Compact buttons */
        font-size: var(--text-xs);
    }
}

/* ==========================================
   Legal Pages Styling
   ========================================== */

.legal-section {
    padding: var(--spacing-3xl) 0;
    min-height: 80vh;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--spacing-lg);
    color: var(--accent);
}

.last-updated {
    font-family: var(--font-mono);
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.legal-content h2 {
    font-size: var(--text-2xl);
    margin-top: var(--spacing-xl);
    color: var(--text-primary);
}

.legal-content p,
.legal-content li {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.legal-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.legal-content a:hover {
    border-color: var(--accent);
}