/* CSS Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-cream: #f7f5f0;
    --color-cream-dark: #eae7e0;
    --color-navy: #1a1f2e;
    --color-navy-light: #2a3040;
    --color-accent: #3d5a80;
    --color-text: #2d3748;
    --color-text-light: #718096;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-script: 'Playfair Display', Georgia, serif;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(26, 31, 46, 0.08);
    --shadow-lg: 0 25px 50px -12px rgba(26, 31, 46, 0.15);
    --max-width: 1200px;
}

/* Dark mode variables */
[data-theme="dark"] {
    --color-cream: #0f1115;
    --color-cream-dark: #1a1d24;
    --color-navy: #e8e6e1;
    --color-navy-light: #f0ede8;
    --color-accent: #6b8cae;
    --color-text: #e0ddd8;
    --color-text-light: #9a9590;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-cream);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-navy);
}

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

.script {
    font-family: var(--font-script);
    font-style: italic;
    font-weight: 600;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(247, 245, 240, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(26, 31, 46, 0.05);
}

[data-theme="dark"] .nav {
    background: rgba(15, 17, 21, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-icon .bubble {
    fill: none;
    stroke: var(--color-navy);
    stroke-width: 3;
}

.logo-icon .logo-text {
    font-family: var(--font-script);
    font-style: italic;
    font-size: 28px;
    fill: var(--color-navy);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

/* Theme Toggle Button */
.theme-toggle {
    background: var(--color-cream-dark);
    border: 2px solid var(--color-navy);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--color-navy);
    margin-left: 8px;
}

.theme-toggle:hover {
    background: var(--color-navy);
    color: var(--color-cream);
    transform: scale(1.1);
}

[data-theme="dark"] .theme-toggle {
    background: #252830;
    border-color: var(--color-navy);
    color: var(--color-navy);
}

[data-theme="dark"] .theme-toggle:hover {
    background: var(--color-navy);
    color: #0f1115;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.sun-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
    padding: 120px 48px 80px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero-content {
    max-width: 560px;
}

.hero-badge {
    display: inline-block;
    background: rgba(61, 90, 128, 0.1);
    color: var(--color-accent);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

[data-theme="dark"] .hero-badge {
    background: rgba(107, 140, 174, 0.2);
    color: #6b8cae;
}

.hero-title {
    margin-bottom: 24px;
}

.hero-title .script {
    font-size: clamp(4rem, 8vw, 6rem);
    display: block;
    line-height: 1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 40px;
    line-height: 1.6;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

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

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

[data-theme="dark"] .btn-primary {
    background: #3d5a80;
    color: white;
}

[data-theme="dark"] .btn-primary:hover {
    background: #4a6b99;
}

.btn-secondary {
    background: transparent;
    color: var(--color-navy);
    border: 2px solid var(--color-navy);
}

.btn-secondary:hover {
    background: var(--color-navy);
    color: white;
}

[data-theme="dark"] .btn-secondary {
    background: transparent;
    color: #e8e6e1;
    border-color: #e8e6e1;
}

[data-theme="dark"] .btn-secondary:hover {
    background: #e8e6e1;
    color: #0f1115;
}

/* Phone Mockup */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 320px;
    height: 640px;
    background: var(--color-navy);
    border-radius: 48px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.phone-mockup:hover {
    transform: perspective(1000px) rotateY(-2deg) rotateX(2deg);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .phone-screen {
    background: #1a1d24;
}

.chat-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--color-cream);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

[data-theme="dark"] .chat-header {
    background: #14161b;
    border-bottom-color: rgba(255,255,255,0.05);
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-navy));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.chat-info {
    flex: 1;
}

.chat-name {
    font-weight: 600;
    color: var(--color-navy);
}

.chat-status {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 80%;
}

.message.received {
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message.received .message-bubble {
    background: var(--color-cream-dark);
    color: var(--color-text);
    border-bottom-left-radius: 4px;
}

[data-theme="dark"] .message.received .message-bubble {
    background: #252830;
    color: #e0ddd8;
}

.message.sent .message-bubble {
    background: var(--color-navy);
    color: white;
    border-bottom-right-radius: 4px;
}

[data-theme="dark"] .message.sent .message-bubble {
    background: #3d5a80;
    color: white;
}

.message-time {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

/* Features Section */
.features {
    padding: 120px 0;
    background: white;
}

[data-theme="dark"] .features {
    background: #0d0f12;
}

.section-title {
    text-align: center;
    margin-bottom: 64px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 40px;
    background: var(--color-cream);
    border-radius: var(--radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--color-navy);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

[data-theme="dark"] .feature-icon {
    background: #252830;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

[data-theme="dark"] .feature-icon svg {
    color: #ffffff;
}

[data-theme="dark"] .feature-icon {
    background: #3d4350;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Privacy Section */
.privacy {
    padding: 120px 0;
    background: var(--color-navy);
    color: white;
}

[data-theme="dark"] .privacy {
    background: #050608;
}

.privacy .section-title {
    color: white;
    text-align: left;
    margin-bottom: 24px;
}

.privacy-content {
    max-width: 800px;
}

.privacy-lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 48px;
}

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

.privacy-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.check {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Beta Section */
.beta {
    padding: 120px 0;
    background: var(--color-cream);
    text-align: center;
}

.beta .section-title {
    margin-bottom: 16px;
}

.beta-lead {
    font-size: 1.2rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 40px;
}

.beta-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 480px;
    margin: 0 auto 16px;
}

.beta-input {
    flex: 1;
    min-width: 240px;
    padding: 14px 20px;
    border: 2px solid rgba(26, 31, 46, 0.1);
    border-radius: 100px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s ease;
}

[data-theme="dark"] .beta-input {
    background: #1a1d24;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0ddd8;
}

[data-theme="dark"] .beta-input::placeholder {
    color: #9a9590;
}

.beta-input:focus {
    outline: none;
    border-color: var(--color-navy);
}

.beta-note {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Footer */
.footer {
    padding: 64px 0 32px;
    background: white;
    border-top: 1px solid rgba(26, 31, 46, 0.05);
}

[data-theme="dark"] .footer {
    background: #0d0f12;
    border-top-color: rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-brand .script {
    font-size: 1.75rem;
    color: var(--color-navy);
}

.footer-brand p {
    color: var(--color-text-light);
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(26, 31, 46, 0.05);
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 968px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 120px 24px 80px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .phone-mockup {
        width: 280px;
        height: 560px;
        transform: none;
    }
    
    .phone-mockup:hover {
        transform: none;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .privacy-features {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 12px 16px;
    }
    
    .nav-links {
        gap: 16px;
        font-size: 0.85rem;
    }
    
    .hero {
        padding: 100px 16px 60px;
    }
    
    .btn {
        width: 100%;
    }
    
    .beta-form {
        flex-direction: column;
    }
    
    .beta-input {
        min-width: 100%;
    }
}