/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');

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

:root {
    /* App-inspired warm color palette */
    --primary-color: #DB8C56;
    --secondary-color: #FBE3BC;
    --primary-blue: #2D6CDF;
    --black: #000000;
    --text-dark: #443640;
    --text-light: #9E9E9E;
    --background-light: #FEFCF5;
    --background-white: #FFFFFF;
    --background-cream: #FBE3BC;
    --card-background: #FFF5E4;
    --border-color: #E0E0E0;
    --gradient: linear-gradient(135deg, var(--primary-color), #E89BA6);
    --warm-gradient: linear-gradient(135deg, #FEFCF5 0%, #FBE3BC 100%);
    --shadow: 0 5px 10px rgba(68, 54, 64, 0.1);
    --shadow-hover: 0 8px 20px rgba(68, 54, 64, 0.15);
    --border-radius: 16px;
    --large-border-radius: 30px;
    --transition: all 0.3s ease;
    
    /* Gender-based colors for future enhancement */
    --girl-background: #F7D6D6;
    --girl-accent: #E89BA6;
    --boy-background: #D6E7F7;
    --boy-accent: #92B8E8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Playfair Display', serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

/* Adjust header position when Smart App Banner is present */
@supports (-webkit-backdrop-filter: blur(20px)) {
    .header {
        /* iOS Smart App Banner is typically 84px tall on iPhone, 96px on iPad */
        top: env(safe-area-inset-top, 0);
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 22%;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background-color: var(--background-light);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-family: 'DM Serif Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.hero-title-highlight {
    color: var(--primary-color);
    font-style: italic;
}

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

.download-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-download {
    display: inline-block;
    transition: var(--transition);
}

.btn-download:hover {
    transform: translateY(-2px);
}

.btn-download img {
    height: 60px;
    width: auto;
}

/* Button container for disabled Android buttons */
.btn-download-container {
    display: inline-block;
    text-align: center;
}

/* Disabled button styles */
.btn-download.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-download.disabled:hover {
    transform: none;
}

.btn-download.disabled img {
    filter: grayscale(100%);
}

/* Available Soon text */
.available-soon {
    font-family: 'Playfair Display', serif;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0;
    font-weight: 500;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Feature Sections */
.feature-section {
    padding: 100px 0;
}

.feature-section:nth-child(odd) {
    background-color: var(--background-light);
}

.feature-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.feature-section.reverse .feature-content {
    direction: rtl;
}

.feature-section.reverse .feature-text {
    direction: ltr;
}

.feature-text h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.feature-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
}

.feature-text p {
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.6;
}

.feature-image img {
    width: 50%;
    height: auto;
}

/* Features Grid */
.features-grid {
    padding: 100px 0;
    background-color: var(--background-light);
}

.features-grid h2 {
    font-family: 'DM Serif Display', serif;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
}

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

.grid-item {
    text-align: center;
    padding: 32px 24px;
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.grid-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    filter: brightness(0) saturate(100%) invert(64%) sepia(35%) saturate(1347%) hue-rotate(346deg) brightness(95%) contrast(89%);
}

.grid-item h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.grid-item p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Premium Section */
.premium-section {
    padding: 100px 0;
    background: var(--gradient);
    color: white;
}

.premium-section h2 {
    font-family: 'DM Serif Display', serif;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.premium-subtitle {
    text-align: center;
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.premium-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.premium-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
}

.premium-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
    filter: brightness(0) saturate(100%) invert(100%);
}

.premium-item h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.premium-item p {
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.5;
}

/* Final CTA */
.final-cta {
    padding: 100px 0;
    text-align: center;
    background-color: var(--background-light);
}

.final-cta h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.final-cta p {
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-subtitle {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--text-dark) !important;
    margin-bottom: 40px !important;
}

.footer-image {
    margin-top: 60px;
}

.footer-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: var(--border-radius);
}

/* Footer */
.footer {
    background-color: var(--black);
    color: white;
    padding: 40px 0;
}

.footer-content {
    font-family: 'DM Serif Display', serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.footer-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

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

/* Smart App Banner adjustments for iOS */
@media screen and (max-width: 768px) {
    /* Adjust hero padding to account for Smart App Banner */
    .hero {
        padding-top: 140px; /* 120px base + 20px extra for banner */
    }
    
    /* Ensure header doesn't overlap with Smart App Banner */
    .header {
        top: 0;
    }
    
    /* Add margin-top to body to prevent content from being hidden behind banner */
    body {
        margin-top: env(safe-area-inset-top, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .feature-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .feature-section.reverse .feature-content {
        direction: ltr;
    }
    
    .feature-text h3 {
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .premium-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .download-buttons {
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .feature-section {
        padding: 60px 0;
    }
    
    .feature-text h3 {
        font-size: 1.75rem;
    }
    
    .features-grid {
        padding: 60px 0;
    }
    
    .premium-section {
        padding: 60px 0;
    }
    
    .final-cta {
        padding: 60px 0;
    }
    
    .btn-download img {
        height: 50px;
    }
}


/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Focus styles for accessibility */
.btn-download:focus,
.footer-links a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-light: #666666;
        --border-color: #999999;
    }
}

/* Smart App Banner specific styles */
.ios-safari .header {
    /* Ensure header is positioned correctly on iOS Safari */
    position: fixed;
    z-index: 999; /* Lower than Smart App Banner's z-index */
}

.smart-app-banner-present .hero {
    /* Additional padding when Smart App Banner is detected */
    padding-top: 160px;
}

.smart-app-banner-present .header {
    /* Header will be positioned by JavaScript based on banner height */
    transition: top 0.3s ease;
}

/* Fallback for when JavaScript doesn't run */
.no-js .ios-safari .hero {
    padding-top: 160px;
}

.no-js .ios-safari .header {
    top: 84px; /* Typical Smart App Banner height */
}
