:root {
    --primary-color: #5B7FFF;  /* The Quiet Blue */
    --primary-dark: #4A69E0;
    --accent-color: #63B389;   /* Verdant Green */
    --bg-color: #FAFAF9;       /* Warm off-white */
    --surface-color: #FFFFFF;
    --text-primary: #1C1C1E;
    --text-secondary: #666666;
    --text-tertiary: #8E8E93;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 12px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header */
header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding-top: 0 !important; /* Override container padding if needed */
    padding-bottom: 0 !important;
}

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

.logo img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

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

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

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

.nav-cta {
    background-color: var(--primary-color);
    color: white !important;
    padding: 10px 20px;
    border-radius: 50px;
    transition: transform 0.2s, background-color 0.2s;
}

.nav-cta:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 0 80px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(91, 127, 255, 0.08) 0%, rgba(99, 179, 137, 0.05) 30%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: white;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
}

.tag-badge .dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.subtitle {
    font-size: 1.35rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 40px;
    font-weight: 400;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--text-primary);
    color: white;
    padding: 18px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

/* App Preview */
.app-preview-wrapper {
    margin: 60px auto 0;
    position: relative;
    width: 260px;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

/* Decorative blurry blobs behind phone */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}
.blob-1 { top: 20%; left: -50%; width: 300px; height: 300px; background: #E0F2FE; }
.blob-2 { bottom: 10%; right: -50%; width: 250px; height: 250px; background: #DCFCE7; }

.app-preview {
    border-radius: 48px;
    box-shadow: var(--shadow-lg), 0 0 0 12px #FFFFFF;
    overflow: hidden;
    background: #FFF;
    aspect-ratio: 9/19.5;
}

.app-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* iPhone Frame */
.iphone-frame {
    position: relative;
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    height: 490px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border-radius: 44px;
    padding: 10px;
    box-shadow:
        0 0 0 2px #3a3a3a,
        0 15px 40px rgba(0, 0, 0, 0.25),
        inset 0 0 2px rgba(255, 255, 255, 0.1);
    margin: 0 auto;
    overflow: hidden;
    flex-shrink: 0;
}

.iphone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 24px;
    background: #1a1a1a;
    border-radius: 0 0 14px 14px;
    z-index: 10;
}

.iphone-notch::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #2a2a2a;
    border-radius: 50%;
}

.iphone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 34px;
    overflow: hidden;
    /* Ensure screen content is contained */
    display: block;
}

.screen-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.screen-image.active {
    opacity: 1;
}

/* CSS-only carousel animation with crossfade (5 images, 15s cycle) */
@keyframes phoneCarouselFirst {
    0%, 17% { opacity: 1; }
    22% { opacity: 0; }
    95% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes phoneCarousel {
    0% { opacity: 0; }
    5% { opacity: 1; }
    17% { opacity: 1; }
    22% { opacity: 0; }
    100% { opacity: 0; }
}

.iphone-screen .screen-image:nth-child(1) {
    animation: phoneCarouselFirst 15s infinite;
}

.iphone-screen .screen-image:nth-child(2) {
    animation: phoneCarousel 15s infinite;
    animation-delay: 2.5s;
}

.iphone-screen .screen-image:nth-child(3) {
    animation: phoneCarousel 15s infinite;
    animation-delay: 5s;
}

.iphone-screen .screen-image:nth-child(4) {
    animation: phoneCarousel 15s infinite;
    animation-delay: 7.5s;
}

.iphone-screen .screen-image:nth-child(5) {
    animation: phoneCarousel 15s infinite;
    animation-delay: 10s;
}

@media (max-width: 768px) {
    .iphone-frame {
        width: 200px;
        height: 410px;
        border-radius: 38px;
        padding: 8px;
    }
    .iphone-notch {
        width: 75px;
        height: 20px;
        top: 8px;
        border-radius: 0 0 12px 12px;
    }
    .iphone-screen {
        border-radius: 30px;
    }
}

.app-preview-secondary {
    max-width: 600px;
    margin: 60px auto 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 8px solid white;
}

.app-preview-secondary img {
    width: 100%;
    height: auto;
    display: block;
}

/* Features Grid */
.features {
    padding: 100px 0;
}

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

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

.feature-card {
    background: var(--surface-color);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

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

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

.feature-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* How It Works (Timeline) */
.how-it-works {
    padding: 80px 0;
    background: white;
    border-radius: 40px;
    margin: 40px 0;
}

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

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.steps {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.step {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    position: relative;
}

/* Connecting line */
.step:not(:last-child) .step-number::after {
    content: '';
    position: absolute;
    top: 48px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 64px; /* Adjust based on gap */
    background: #E5E5EA;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

/* Footer */
footer {
    padding: 80px 0 40px;
    margin-top: 60px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
}

.footer-brand h4 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand p {
    max-width: 300px;
    font-size: 0.95rem;
}

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

.link-column h5 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

.link-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.link-column a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.75rem; }
    .features-grid { grid-template-columns: 1fr; }
    .hero { padding: 40px 0; }
    
    .header-inner { height: 70px; }
    
    nav { display: none; } /* Simplified mobile handling */
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links-group {
        width: 100%;
        justify-content: space-between;
    }
}
