/* ==========================================================================
   DESIGN TOKENS & SYSTEM VARIABLES
   ========================================================================== */
:root {
    /* 60-30-10 Color Architecture */
    --bg-primary: #FDFBF7;        /* Premium warm, soft editorial background */
    --bg-secondary: #FFFFFF;      /* Clean structural surfaces */
    --bg-glow: #F5EAD4;           /* Atmospheric layout backing ambient color */
    --text-main: #1C1B18;         /* Deep high-contrast premium charcoal */
    --text-muted: #6B665B;        /* Elegant gray-brown for clean prose secondary layers */
    --accent: #E5A93C;            /* Buttery Accent Amber */
    --accent-hover: #C98F27;      
    
    /* Typographic Hierarchy (1.25 Ratio System) */
    --font-display: 'Solway', serif;
    --font-body: 'Inter', sans-serif;
    --fs-h1: clamp(2.5rem, 5vw, 3.8rem);     /* Fluid fluid scaling */
    --fs-h2: clamp(1.8rem, 4vw, 2.5rem);
    --fs-tagline: clamp(1.1rem, 2vw, 1.35rem);
    --fs-body: 1.05rem;
    --fs-small: 0.9rem;

    /* Optimized Spacing Framework */
    --space-section: clamp(40px, 6vw, 70px); /* Decreased vertical gap between main sections */
    --space-element: 24px;
    --max-width: 1200px;
    
    /* Smooth Fluid Micro-Interactions */
    --transition-premium: cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
    --transition-fast: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius-premium: 20px;
    --radius-device: 40px;
    --shadow-subtle: 0 10px 40px rgba(28, 27, 24, 0.04);
    --shadow-premium: 0 30px 60px rgba(28, 27, 24, 0.12);
}

/* ==========================================================================
   BASE RESET & LAYOUT STRUCT
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--text-main);
    background-color: var(--bg-primary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

h1, h2 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

/* ==========================================================================
   HERO ENGINE (EDITORIAL SPLIT SCREEN)
   ========================================================================== */
.hero-section {
    padding: 50px 0 30px 0; /* Decreased padding to lift everything up */
    position: relative;
    background: radial-gradient(circle at 80% 20%, rgba(229, 169, 60, 0.15) 0%, transparent 50%);
}

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

.app-badge {
    display: inline-block;
    background-color: var(--bg-secondary);
    border: 1px solid rgba(229, 169, 60, 0.3);
    color: var(--text-main);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: var(--fs-small);
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: var(--shadow-subtle);
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.brand-mark .logo {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.06));
}

.hero-content h1 {
    font-size: var(--fs-h1);
    color: var(--text-main);
}

.tagline {
    font-size: var(--fs-tagline);
    color: var(--text-muted);
    margin-bottom: 32px; /* Pulled download button slightly closer */
    max-width: 520px;
}

.tagline span {
    color: var(--text-main);
    font-weight: 600;
    border-bottom: 2px dashed var(--accent);
}

/* Authentic App Store Layout Engine */
.download-btn {
    display: inline-flex;
    align-items: center;
    background-color: var(--text-main);
    color: var(--bg-secondary);
    padding: 14px 28px;
    border-radius: 14px;
    text-decoration: none;
    transition: var(--transition-fast);
    gap: 14px;
    box-shadow: 0 8px 24px rgba(28, 27, 24, 0.15);
}

.apple-icon {
    width: 28px;
    height: 28px;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.btn-text span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    opacity: 0.8;
}

.btn-text strong {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.download-btn:hover {
    background-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(229, 169, 60, 0.35);
}

/* Hero Visual & Float Stack */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ambient-glow {
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--bg-glow) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-phone {
    z-index: 2;
    transform: rotate(3deg);
    animation: floatingDevice 6s ease-in-out infinite;
}

@keyframes floatingDevice {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50% { transform: translateY(-12px) rotate(4deg); }
}

/* ==========================================================================
   HIGH-FIDELITY DEVICE FRAME ARCHITECTURE
   ========================================================================== */
.screen-box {
    width: 100%;
    max-width: 260px; /* Fluid aspect control safely native */
    aspect-ratio: 1 / 2.04;
    background-color: #121211; 
    border: 10px solid #121211; 
    border-radius: var(--radius-device);
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
    display: flex;
    transition: var(--transition-premium);
}

/* CSS Minimalist Dynamic Island Overlay */
.device-island {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 75px;
    height: 18px;
    background-color: #000000;
    border-radius: 20px;
    z-index: 10;
}

.screen-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-device) - 10px);
    display: block;
    transition: var(--transition-premium);
}

/* ==========================================================================
   SHOWCASE GRID SYSTEM
   ========================================================================== */
.showcase-section {
    padding: var(--space-section) 0;
}

.section-meta {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 32px auto; /* Tightened the gap between title text and screens */
}

.section-meta h2 {
    font-size: var(--fs-h2);
    color: var(--text-main);
    margin-bottom: 12px;
}

.section-lead {
    color: var(--text-muted);
    font-size: var(--fs-tagline);
}

/* Responsive Fluid CSS Grid */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    justify-items: center;
    align-items: center;
}

/* Dynamic Interaction Overrides */
.dynamic-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 40px 80px rgba(28, 27, 24, 0.18);
}

.dynamic-card:hover img {
    transform: scale(1.02);
}

/* Alternate Grid Rhythm */
.bento-style .screenshot-grid {
    gap: 32px;
}

/* ==========================================================================
   SUPPORT & CONTACT SURFACE
   ========================================================================== */
.support-card {
    margin: var(--space-section) 0;
    background-color: var(--bg-secondary);
    border: 1px solid rgba(28, 27, 24, 0.05);
    border-radius: var(--radius-premium);
    padding: 44px 32px; /* Compacted internal vertical container spacing */
    text-align: center;
    box-shadow: var(--shadow-subtle);
    position: relative;
    overflow: hidden;
}

.support-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 150%, rgba(229, 169, 60, 0.1) 0%, transparent 60%);
}

.support-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.support-content h2 {
    margin-bottom: 12px;
}

.support-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.support-link {
    font-size: var(--fs-tagline);
    color: var(--text-main);
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    border-bottom: 2px solid var(--accent);
    transition: var(--transition-fast);
}

.support-link:hover {
    color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* ==========================================================================
   CLEAN FOOTER SYSTEM
   ========================================================================== */
.main-footer {
    padding: 32px 0; /* Reduced vertical footprint */
    border-top: 1px solid rgba(28, 27, 24, 0.06);
    font-size: var(--fs-small);
    color: var(--text-muted);
}

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

.legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 24px;
    transition: var(--transition-fast);
    display: inline-block;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN ENGINE (BREAKPOINTS)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 36px; /* Slightly closer on tablets */
    }
    
    .brand-mark {
        justify-content: center;
    }
    
    .tagline {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-phone {
        transform: rotate(0deg);
        animation: floatingDeviceMobile 6s ease-in-out infinite;
    }

    @keyframes floatingDeviceMobile {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: 36px;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .legal-links a {
        margin: 0 12px;
    }
}