/* --- Variables & Theming --- */
:root {
    /* Light Mode (Clean, Apple-like) */
    --bg-color: #FBFBFD;
    --text-main: #1D1D1F;
    --text-muted: #86868B;
    --card-bg: #FFFFFF;
    --accent-color: #000000;
    --accent-text: #FFFFFF;
    --border-color: #E5E5EA;
    --border-hover: #D1D1D6;
    --input-bg: #F5F5F7;
    --mesh-1: rgba(0, 122, 255, 0.06);
    --mesh-2: rgba(255, 45, 85, 0.06);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.04);
    --shadow-hover: 0 12px 32px rgba(0,0,0,0.08);
}

.dark-mode {
    /* Dark Mode (High Contrast, Deep Black) */
    --bg-color: #000000;
    --text-main: #F5F5F7;
    --text-muted: #A1A1A6;
    --card-bg: #121212;
    --accent-color: #FFFFFF;
    --accent-text: #000000;
    --border-color: #333333;
    --border-hover: #555555;
    --input-bg: #1C1C1E;
    --mesh-1: rgba(10, 132, 255, 0.15);
    --mesh-2: rgba(255, 55, 95, 0.15);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.6);
}

/* --- Global Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Background Noise & Mesh --- */
.background-mesh {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(circle at 10% 20%, var(--mesh-1), transparent 40%),
        radial-gradient(circle at 90% 80%, var(--mesh-2), transparent 40%);
    filter: blur(80px);
}

.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* --- Navigation (Not Sticky) --- */
.navbar {
    padding: 30px 0;
    position: relative; /* Changed from sticky */
    width: 100%;
    z-index: 50;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.6rem;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -0.04em;
}

.dot { color: #007AFF; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: none; 
    border: none; 
    cursor: pointer;
    font-size: 1.4rem; 
    color: var(--text-main);
    /* NEW: Force a perfect square */
    width: 44px; 
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* Removes default mobile padding */
    border-radius: 50%;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent; /* Removes blue flash on tap */
}

.icon-btn:hover { background-color: var(--input-bg); }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; border-radius: 100px;
    font-weight: 600; font-size: 0.95rem; text-decoration: none;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--accent-text);
    border: 1px solid var(--accent-color);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- Hero Section --- */
.hero {
    padding: 80px 0 100px;
    text-align: center;
}

.badge-wrapper {
    display: flex; justify-content: center; margin-bottom: 24px;
}

.badge {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 8px 16px; border-radius: 100px;
    font-size: 0.8rem; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
    color: var(--text-main);
}

.pulse {
    width: 8px; height: 8px; background-color: #34C759;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(52, 199, 89, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(52, 199, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

h1 {
    font-size: 4.5rem; line-height: 1.05; font-weight: 700;
    letter-spacing: -0.04em; margin-bottom: 24px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-main) 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem; color: var(--text-muted);
    max-width: 600px; margin: 0 auto 40px;
}

.hero-actions {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.hero-actions .btn-large {
    font-size: 1.1rem; padding: 16px 40px;
    gap: 8px;
}

.small-text { font-size: 0.85rem; color: var(--text-muted); opacity: 0.8; }

/* --- Marquee --- */
.marquee-container {
    width: 100%; overflow: hidden; white-space: nowrap;
    opacity: 0.6; padding: 20px 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
    font-size: 0.9rem; font-weight: 600; color: var(--text-muted);
}
.marquee-content span { margin: 0 20px; }

@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- Features Bento Grid (The Fix) --- */
.features { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 60px; max-width: 700px; margin-left: auto; margin-right: auto; }
.section-header h2 { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 16px; }
.section-header p { font-size: 1.1rem; color: var(--text-muted); }

.bento-grid {
    display: grid;
    /* Desktop: 3 columns wide */
    grid-template-columns: 1fr 1fr 1fr; 
    grid-template-areas: 
        "a a b"
        "c d d";
    gap: 24px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px; padding: 40px;
    position: relative; overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column;
}

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

.card-a { grid-area: a; }
.card-b { grid-area: b; }
.card-c { grid-area: c; }
.card-d { grid-area: d; }

.card-icon {
    font-size: 2rem; color: var(--text-main); margin-bottom: 20px;
    background: var(--input-bg); width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
}
.card h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 12px; }
.card p { color: var(--text-muted); font-size: 1rem; line-height: 1.6; }

/* Visuals for Cards */
.card-visual { margin-top: auto; display: flex; justify-content: center; padding-top: 30px; }
.phone-mockup {
    width: 200px; height: 140px; background: #000;
    border-top-left-radius: 24px; border-top-right-radius: 24px;
    border: 4px solid #333; border-bottom: none;
    position: relative; overflow: hidden;
}
.phone-mockup .screen {
    background: #fff; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.app-clip-banner {
    width: 80%; padding: 10px; background: #F5F5F7; border-radius: 12px;
    display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.icon-sq { width: 30px; height: 30px; background: #000; border-radius: 6px; }
.lines { flex: 1; }
.line { height: 4px; background: #E5E5EA; border-radius: 2px; margin-bottom: 4px; }
.line.sm { width: 60%; }
.line.lg { width: 90%; }
.btn-xs { font-size: 0.6rem; background: #007AFF; color: #fff; padding: 4px 8px; border-radius: 100px; }

/* Sim Graphic */
.card-content-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.chip-graphic {
    width: 60px; height: 90px; background: var(--text-main);
    border-radius: 10px; border-bottom-right-radius: 25px;
    position: relative;
}
.chip-internal {
    width: 34px; height: 40px; border: 2px solid rgba(255,255,255,0.2);
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    border-radius: 6px;
}

/* --- Steps Section --- */
.steps-section { padding: 80px 0; border-top: 1px solid var(--border-color); }
.steps-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center;
}
.step-item { position: relative; }
.step-num {
    font-size: 4rem; font-weight: 800; color: var(--input-bg);
    display: block; line-height: 1; margin-bottom: 16px;
}
.step-item h3 { margin-bottom: 8px; font-weight: 600; }
.step-item p { color: var(--text-muted); font-size: 0.95rem; }

/* --- Waitlist (Airtable) --- */
.waitlist-section { padding: 100px 0; }
.waitlist-box {
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 32px; padding: 60px 24px;
    text-align: center; max-width: 600px; margin: 0 auto;
    box-shadow: var(--shadow-card);
}
.waitlist-box h2 { font-size: 2rem; margin-bottom: 12px; }
.waitlist-box p { color: var(--text-muted); margin-bottom: 30px; }

.form-group {
    display: flex; flex-direction: column; gap: 12px;
}
.input-wrapper {
    position: relative;
    width: 100%;
}
.input-wrapper i {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 1.2rem;
}
.form-group input {
    width: 100%; padding: 16px 16px 16px 48px;
    border-radius: 12px; border: 1px solid var(--border-color);
    background: var(--input-bg); color: var(--text-main);
    font-size: 1rem; outline: none; transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--text-main); }

.btn-block { width: 100%; padding: 16px; }
.btn-loader { display: none; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.form-message { margin-top: 16px; font-size: 0.9rem; min-height: 20px; }
.form-message.success { color: #34C759; }
.form-message.error { color: #FF3B30; }

/* --- FAQ --- */
.faq { padding: 80px 0; max-width: 800px; margin: 0 auto; }
.faq-grid { display: flex; flex-direction: column; gap: 16px; }
.faq-item { border-bottom: 1px solid var(--border-color); padding-bottom: 16px; }
.faq-question {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    background: none; border: none; padding: 16px 0;
    font-size: 1.1rem; font-weight: 500; color: var(--text-main);
    cursor: pointer; text-align: left;
}
.faq-answer {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
    color: var(--text-muted); padding-right: 20px;
}
.faq-answer p { margin-bottom: 16px; }
.faq-item.active .faq-answer { max-height: 150px; }
.faq-item.active .ph-caret-down { transform: rotate(180deg); }

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-color); padding: 80px 0 40px;
    background: var(--bg-color);
}
.footer-top {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px;
    margin-bottom: 60px;
}
.footer-brand p { color: var(--text-muted); margin-top: 8px; max-width: 200px; }
.footer-nav { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-nav h4 { font-size: 0.9rem; margin-bottom: 20px; color: var(--text-main); }
.footer-nav a {
    display: block; color: var(--text-muted); text-decoration: none;
    margin-bottom: 12px; font-size: 0.9rem; transition: color 0.2s;
}
.footer-nav a:hover { color: var(--text-main); }

.footer-bottom {
    border-top: 1px solid var(--border-color); padding-top: 30px;
    display: flex; justify-content: space-between; align-items: center;
    color: var(--text-muted); font-size: 0.85rem;
}
.footer-socials { display: flex; gap: 16px; font-size: 1.2rem; cursor: pointer; }

/* --- Animations --- */
.fade-in-up {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "a" "b" "c" "d";
    }
    h1 { font-size: 3rem; }
    .footer-top { flex-direction: column; }
    .footer-nav { gap: 40px; }
}