:root {
    --bg-color: #ffffff;
    --bg-secondary: #f5f5f7;
    --text-color: #1d1d1f;
    --text-muted: #86868b;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --border-color: #d2d2d7;
    --card-bg: #ffffff;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #000000;
        --bg-secondary: #1c1c1e;
        --text-color: #f5f5f7;
        --text-muted: #86868b;
        --border-color: #38383a;
        --card-bg: #1c1c1e;
        --shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(var(--bg-color), 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px; /* iPhone style squircle approximation */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    transition: color 0.2s;
}

nav a:hover, nav a.active {
    color: var(--primary);
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 980px; /* Pill shape */
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.button-primary:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.button-secondary {
    background: var(--bg-secondary);
    color: var(--text-color);
}

.button-secondary:hover {
    background: var(--border-color);
}

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

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

.hero p {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Hero Image Wrapper */
.hero-image-wrapper {
    margin-top: 60px;
    position: relative;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    perspective: 1200px;
}

.hero-image-wrapper .promo-card {
    transform: rotateX(15deg) rotateY(-5deg) rotateZ(2deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
    box-shadow: 0 40px 80px rgba(0,0,0,0.15);
}

.hero-image-wrapper:hover .promo-card {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Mockup Frame Styling for raw screenshots */
.mockup-frame {
    width: 100%;
    height: auto;
    border-radius: 44px; /* iPhone corner radius */
    border: 8px solid var(--border-color); /* fake bezel */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    background-color: var(--card-bg);
    display: block;
    object-fit: cover;
    aspect-ratio: 1179 / 2556; /* standard iPhone ratio */
}

/* App Store Promo Card Styling */
.promo-card {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 9 / 16;
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

.promo-title {
    color: white;
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.1;
    margin-top: 40px;
    margin-bottom: 24px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.02em;
    z-index: 2;
    padding: 0 20px;
}

.promo-card .mockup-frame {
    width: 82%;
    border-radius: 36px;
    border: 10px solid #111111;
    box-shadow: 
        inset 0 0 0 2px #2a2a2c,
        0 0 0 1px #333,
        0 30px 60px rgba(0, 0, 0, 0.8),
        0 10px 30px var(--aura);
    margin-bottom: -100px;
    z-index: 1;
    transform: perspective(1000px) rotateX(2deg);
}

/* Gradient Backgrounds - Premium Dark Glow */
.promo-indigo { background: radial-gradient(circle at 50% -10%, #4338ca 0%, #0f172a 50%, #020617 100%); --aura: rgba(67, 56, 202, 0.4); }
.promo-emerald { background: radial-gradient(circle at 50% -10%, #059669 0%, #0f172a 50%, #020617 100%); --aura: rgba(5, 150, 105, 0.3); }
.promo-rose { background: radial-gradient(circle at 50% -10%, #be123c 0%, #0f172a 50%, #020617 100%); --aura: rgba(190, 18, 60, 0.4); }
.promo-amber { background: radial-gradient(circle at 50% -10%, #b45309 0%, #0f172a 50%, #020617 100%); --aura: rgba(180, 83, 9, 0.4); }
.promo-cyan { background: radial-gradient(circle at 50% -10%, #0284c7 0%, #0f172a 50%, #020617 100%); --aura: rgba(2, 132, 199, 0.4); }

/* Aura Behind Phone */
.promo-card::after, .promo-card-mac::after {
    content: '';
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 250px;
    background: var(--aura);
    filter: blur(50px);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.highlight {
    color: #a5b4fc;
}

/* Mac App Promo Card Styling */
.promo-card-mac {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 4 / 3;
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    background: #020617;
}

.promo-card-mac .mockup-frame-mac {
    width: 90%;
    border-radius: 12px;
    border: 8px solid #111111;
    box-shadow: 
        inset 0 0 0 2px #2a2a2c,
        0 0 0 1px #333,
        0 30px 60px rgba(0, 0, 0, 0.8),
        0 10px 30px var(--aura);
    margin-bottom: -150px;
    z-index: 1;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 10;
    transform: perspective(1000px) rotateX(2deg);
}

/* Features Section - Zig Zag */
.features-section {
    padding: 60px 0 120px;
    background-color: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 80px;
    color: var(--text-color);
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 120px;
}

.feature-row:last-child {
    margin-bottom: 0;
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
}

.feature-image {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.feature-image .mockup-frame {
    max-width: 320px;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.feature-text h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.feature-text p {
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1.5;
}

/* TOS Page */
.tos-container {
    padding: 120px 0 80px;
    flex: 1;
}

.document-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.document-wrapper h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.document-wrapper .last-updated {
    color: var(--text-muted);
    margin-bottom: 48px;
}

.document-wrapper h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 48px 0 16px;
}

.document-wrapper p, .document-wrapper ul {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 16px;
}

.document-wrapper ul {
    padding-left: 24px;
}

.document-wrapper hr {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 48px 0;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

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

.footer-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

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

@media (max-width: 900px) {
    .feature-row, .feature-row.reverse {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .feature-text {
        order: -1;
    }
    .feature-icon {
        margin: 0 auto 24px;
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.2rem; }
    
    .footer-container {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        justify-content: center;
        height: auto;
        padding: 12px 24px;
        gap: 12px;
    }
    
    nav {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
}
