/* CSS Variables - Brand Colors from Preludio */
:root {
    /* Brand Colors */
    --primary: #536DFE;
    --secondary: #6A3DEF;
    --accent: #1DE9B6;
    --blue: #40C4FF;
    --green: #2ECC71;
    --orange: #FFB74D;
    --red: #FF5252;
    --yellow: #FFEB3B;

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;

    /* Semantic Colors */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --background: var(--white);
    --border: var(--gray-200);

    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 6rem 2rem;
    --section-padding-mobile: 4rem 1.5rem;

    /* Button sizes (height) - as % of phone height */
    --button-volume-size: 5%;              
    --button-mute-size: 2.5%;              
    --button-power-size: 7.5%;             

    /* Button width (thickness) - proportional */
    --button-width: 0.5%;                  

    /* Button positions (as % from top) */
    --button-mute-top: 18%;
    --button-volume-up-top: 23%;
    --button-volume-down-top: 30%;
    --button-power-top: 25%;

    /* Button gap between left buttons */
    --button-gap: 10px;

    /* Button styling */
    --button-color: #0d0d0d;
    --button-border-radius: 2px;          
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 3rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: var(--section-padding);
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero .container {
    max-width: 800px;
}

.app-icon {
    width: 200px;
    height: 200px;
    border-radius: 44px;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
    color: var(--white);
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.tagline {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 3rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.app-store-button {
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
    border-radius: 12px;
    overflow: hidden;
}

.app-store-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    opacity: 1;
}

.app-store-button svg {
    display: block;
}

/* Features Section */
.features {
    padding: var(--section-padding);
    background-color: var(--gray-50);
}

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

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
}

.feature-card.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    color: var(--text-primary);
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
}

/* Screenshots Section */
.screenshots {
    padding: var(--section-padding);
    background-color: var(--white);
}

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

.screenshot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Custom iPhone Mockup - Matte Flat Black */
.phone-mockup {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.3s ease;
}

.phone-mockup.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.phone-mockup:hover .phone-frame {
    transform: translateY(-8px);
}

/* Phone Frame - Matte Black Border */
.phone-frame {
    background: #1a1a1a;
    border-radius: 30px;
    padding: 8px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 0 0 1px rgba(0, 0, 0, 0.8);
    position: relative;
    max-width: 100%;
    transition: transform 0.3s ease;
}

/* Phone Buttons - Physical buttons on frame sides */
.phone-button {
    position: absolute;
    background: var(--button-color);
    border-radius: var(--button-border-radius);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Left side buttons */
.phone-button-left {
    left: 0;
    transform: translateX(-100%);
    width: var(--button-width);
}

/* Right side buttons */
.phone-button-right {
    right: 0;
    transform: translateX(100%);
    width: var(--button-width);
}

/* Mute/Silent Switch - Small button */
.phone-button-mute {
    top: var(--button-mute-top);
    height: var(--button-mute-size);
}

/* Volume Up Button */
.phone-button-volume-up {
    top: var(--button-volume-up-top);
    height: var(--button-volume-size);
}

/* Volume Down Button */
.phone-button-volume-down {
    top: var(--button-volume-down-top);
    height: var(--button-volume-size);
}

/* Power Button - Large button */
.phone-button-power {
    top: var(--button-power-top);
    height: var(--button-power-size);
}

/* Phone Screen Container */
.phone-screen {
    border-radius: 22px;
    overflow: hidden;
    background: #000;
    position: relative;
    aspect-ratio: 9 / 19.5;
}

/* Screenshot Image */
.phone-screen .screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* Optional: Subtle screen glare effect */
.phone-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05) 0%,
        transparent 50%
    );
    pointer-events: none;
    border-radius: 38px;
}

.screenshot-placeholder {
    aspect-ratio: 9 / 19.5;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
}

.placeholder-content {
    text-align: center;
    color: var(--white);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.placeholder-content p {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
    opacity: 0.95;
}

/* Contact Section */
.contact {
    padding: var(--section-padding);
    background-color: var(--gray-50);
    text-align: center;
}

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

.contact p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border-radius: 32px;
    font-size: 1.125rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(83, 109, 254, 0.3);
    opacity: 1;
}

/* Footer */
.footer {
    padding: 3rem 2rem;
    background-color: var(--gray-900);
    color: var(--white);
    text-align: center;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer p {
    margin: 0;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.footer nav a {
    color: var(--gray-400);
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer nav a:hover {
    color: var(--white);
    opacity: 1;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
    :root {
        --section-padding: 8rem 2rem;
    }

    .hero h1 {
        font-size: 4.5rem;
    }

    .tagline {
        font-size: 1.75rem;
    }

    .app-icon {
        width: 250px;
        height: 250px;
        border-radius: 56px;
    }

    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .screenshot-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
        max-width: 900px;
    }

    .footer .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
    :root {
        --section-padding: 10rem 2rem;
    }

    h2 {
        font-size: 3rem;
    }

    .hero h1 {
        font-size: 5rem;
    }

    .tagline {
        font-size: 2rem;
    }

    .app-icon {
        width: 280px;
        height: 280px;
    }

    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }

    .feature-card {
        padding: 3rem 2.5rem;
    }

    .screenshot-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3.5rem;
        max-width: 1200px;
    }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .screenshot-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2.5rem;
    }
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    :root {
        --section-padding: var(--section-padding-mobile);
        /* Button overrides removed - now scales automatically with percentages */
    }

    .hero {
        min-height: auto;
        padding: 4rem 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 2rem;
    }

    .app-icon {
        width: 150px;
        height: 150px;
        border-radius: 33px;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    .screenshot-grid {
        gap: 1.5rem;
        max-width: 300px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}
