/* 
   Story By You - Premium Design System 
   Theme: Magical, Soft, Playful, Premium
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    /* Palette */
    --color-primary: #FFC857;
    /* Warm Gold/Yellow - Magical */
    --color-primary-hover: #E5B245;
    --color-secondary: #4A90E2;
    /* Soft Blue - Trust/Calm */
    --color-accent: #FF6B6B;
    /* Soft Red/Pink - Playful */

    --color-bg: #FDFBF7;
    /* Cream/Off-white - Soft/Paper-like */
    --color-bg-alt: #FFFFFF;
    /* Pure White */

    --color-text-main: #2C3E50;
    /* Navy/Dark Gray - Readable/Premium */
    --color-text-muted: #5D6D7E;
    /* Muted Blue-Gray */
    --color-text-light: #FFFFFF;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #FDFBF7 0%, #FFF4D6 100%);
    --gradient-primary: linear-gradient(135deg, #FFC857 0%, #FFB347 100%);
    --gradient-magical: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    /* Example magical gradient */

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(44, 62, 80, 0.05);
    --shadow-md: 0 8px 16px rgba(44, 62, 80, 0.08);
    --shadow-lg: 0 16px 32px rgba(44, 62, 80, 0.12);
    --shadow-float: 0 20px 40px rgba(44, 62, 80, 0.15);

    /* BorderRadius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-main);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-text-main);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: white;
    color: var(--color-text-main);
    border: 2px solid rgba(44, 62, 80, 0.1);
}

.btn-app-store {
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.btn-app-store:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Header */
.header {
    padding: var(--spacing-md) 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    padding-top: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    width: 100%;
}

.hero-text {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-text-top {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.hero-tagline {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 200, 87, 0.2);
    color: #B38600;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-animation {
    width: 500px;
    max-width: 100%;
    margin: 0 auto;
    filter: drop-shadow(var(--shadow-float));
}


.hero-download-group {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-download-group p {
    margin-top: 1rem;
    margin-bottom: 0;
    text-align: center;
}

/* Features Section */
.features {
    background-color: var(--color-bg-alt);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.feature-card {
    padding: var(--spacing-md);
    background-color: var(--color-bg);
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    display: inline-block;
    padding: 1rem;
    background-color: rgba(74, 144, 226, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-secondary);
}

/* How It Works */
.how-it-works {
    background-color: var(--color-bg);
}

.step {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.step:nth-child(even) .step-content {
    order: 2;
}

.step:nth-child(even) .step-visual {
    order: 1;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: rgba(255, 200, 87, 0.3);
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.step-visual img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 80%;
    margin: 0 auto;
}

/* Stories on the Go */
.stories-on-go {
    background-color: var(--color-bg-alt);
}

.carplay-feature {
    display: grid;
    grid-template-columns: 30% 70%;
    gap: var(--spacing-xl);
    align-items: center;
}

.carplay-content h2 {
    margin-bottom: var(--spacing-md);
}

.carplay-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.highlight-item {
    padding: 0.75rem 1.5rem;
    background-color: var(--color-bg);
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.carplay-visual {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.carplay-stack {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
}

.carplay-back {
    width: 80%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: block;
}

.carplay-front {
    width: 80%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 3px solid white;
    margin-top: 0;
}

/* Footer */
.footer {
    background-color: var(--color-text-main);
    color: var(--color-text-light);
    padding: var(--spacing-lg) 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    margin-left: var(--spacing-md);
}

.footer-links a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero {
        padding-bottom: 3rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        text-align: center;
        padding-bottom: 3rem;
    }

    .hero-text {
        width: 100%;
        /* display: contents; Removed - using JS reordering */
    }

    .hero-text-top {
        width: 100%;
        margin: 0 auto 0 auto;
        /* Removed bottom margin */
    }

    .hero-visual {
        position: static;
        transform: none;
        width: 100%;
        margin: -2rem auto -3rem auto;
        /* Aggressive vertical spacing, centered horizontally */
    }

    .hero-download-group {
        margin-top: 0;
        width: 100%;
        display: flex;
        padding-bottom: 3rem;
    }

    .step {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-md);
    }

    .step:nth-child(even) .step-content {
        order: 1;
    }

    .step:nth-child(even) .step-visual {
        order: 2;
    }

    .step-visual[style*="display: flex"] {
        flex-direction: column !important;
    }

    .step-visual img[style*="max-width: 48%"] {
        max-width: 80% !important;
    }

    .carplay-feature {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .carplay-stack {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        flex-direction: column;
        gap: 1.5rem;
    }

    .carplay-back,
    .carplay-front {
        width: 100%;
        margin-top: 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links a {
        margin: 0 var(--spacing-xs);
    }
}