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

:root {
    /* MedPal Brand Colors */
    --primary-blue: #007AFF;
    --success-green: #34C759;
    --warning-orange: #FF9500;
    --critical-red: #FF3B30;
    --purple: #AF52DE;
    --teal: #5AC8FA;

    /* Grays */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 100px;

    /* Typography */
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-system);
    color: var(--gray-900);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Hero Section */
.hero {
    padding: 80px 0 100px;
    background: linear-gradient(135deg, #F9FAFB 0%, #EEF2FF 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

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

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-eyebrow {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.eyebrow-icon {
    width: 48px;
    height: 48px;
    display: inline-block;
    vertical-align: middle;
}

.hero-title {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
    color: var(--gray-900);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--gray-600);
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: #0051D5;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
}

.btn-large {
    padding: 18px 36px;
    font-size: 18px;
}

.hero-compatibility {
    font-size: 14px;
    color: var(--gray-600);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 0.8s ease-out;
    perspective: 1000px;
}

.phones-container {
    position: relative;
    width: 500px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    position: absolute;
    width: 260px;
    height: 520px;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    border-radius: 35px;
    padding: 10px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

.phone-mockup:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.4);
    z-index: 10 !important;
}

/* Phone 1 - Center (Main) */
.phone-1 {
    z-index: 3;
    animation: float 4s ease-in-out infinite;
}

/* Phone 2 - Left */
.phone-2 {
    left: -80px;
    top: 40px;
    z-index: 2;
    transform: rotate(-8deg) scale(0.9);
    opacity: 0.9;
    animation: float 4s ease-in-out infinite 0.5s;
}

/* Phone 3 - Right */
.phone-3 {
    right: -80px;
    top: 40px;
    z-index: 1;
    transform: rotate(8deg) scale(0.85);
    opacity: 0.85;
    animation: float 4s ease-in-out infinite 1s;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    background: white;
}

.screenshot {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

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

/* Adjust float animation for rotated phones */
.phone-2 {
    animation-name: floatLeft;
}

.phone-3 {
    animation-name: floatRight;
}

@keyframes floatLeft {
    0%, 100% {
        transform: rotate(-8deg) scale(0.9) translateY(0px);
    }
    50% {
        transform: rotate(-8deg) scale(0.9) translateY(-15px);
    }
}

@keyframes floatRight {
    0%, 100% {
        transform: rotate(8deg) scale(0.85) translateY(0px);
    }
    50% {
        transform: rotate(8deg) scale(0.85) translateY(-15px);
    }
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Features Section */
.features {
    padding: var(--section-padding) 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.section-header p {
    font-size: 18px;
    color: var(--gray-600);
}

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

.feature-card {
    background: white;
    padding: 36px;
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

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

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

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon.blue {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1) 0%, rgba(0, 122, 255, 0.2) 100%);
    color: var(--primary-blue);
}

.feature-icon.green {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1) 0%, rgba(52, 199, 89, 0.2) 100%);
    color: var(--success-green);
}

.feature-icon.purple {
    background: linear-gradient(135deg, rgba(175, 82, 222, 0.1) 0%, rgba(175, 82, 222, 0.2) 100%);
    color: var(--purple);
}

.feature-icon.orange {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.1) 0%, rgba(255, 149, 0, 0.2) 100%);
    color: var(--warning-orange);
}

.feature-icon.red {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1) 0%, rgba(255, 59, 48, 0.2) 100%);
    color: var(--critical-red);
}

.feature-icon.teal {
    background: linear-gradient(135deg, rgba(90, 200, 250, 0.1) 0%, rgba(90, 200, 250, 0.2) 100%);
    color: var(--teal);
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.feature-card p {
    font-size: 16px;
    color: var(--gray-600);
    line-height: 1.7;
}

/* Screenshots Section */
.screenshots {
    padding: var(--section-padding) 0;
    background: var(--gray-50);
}

.screenshots-carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.screenshots-carousel::-webkit-scrollbar {
    height: 8px;
}

.screenshots-carousel::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: 4px;
}

.screenshots-carousel::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

.screenshot-item {
    flex: 0 0 250px;
    text-align: center;
}

.screenshot-item img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
}

.screenshot-item p {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

/* Stats Section */
.stats {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--purple) 100%);
    color: white;
}

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

.stat-item {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
}

.stat-item.animate {
    animation: fadeInUp 0.6s ease-out forwards;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
}

/* Audience Section */
.audience {
    padding: 60px 0;
    background: white;
}

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

.audience-card {
    background: var(--gray-50);
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

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

.audience-card:hover {
    transform: translateY(-8px);
    background: white;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.audience-emoji {
    font-size: 56px;
    margin-bottom: 16px;
}

.audience-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.audience-card p {
    font-size: 16px;
    color: var(--gray-600);
    line-height: 1.7;
}

/* FAQ Section */
.faq {
    padding: 60px 0;
    background: var(--gray-50);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.faq-item.animate {
    animation: fadeInUp 0.6s ease-out forwards;
}

.faq-item:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.1);
}

.faq-item h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.faq-item p {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0;
}

/* CTA Section */
.cta {
    padding: 60px 0;
    background: linear-gradient(135deg, #EEF2FF 0%, #F9FAFB 100%);
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.cta-content p {
    font-size: 17px;
    color: var(--gray-600);
    margin-bottom: 28px;
}

.cta-note {
    margin-top: 12px;
    font-size: 14px;
    color: var(--gray-600);
}

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

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

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-logo {
    width: 64px;
    height: 64px;
}

.footer-disclaimer {
    max-width: 800px;
    margin: 0 auto 18px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.7;
    opacity: 0.9;
}

.footer-legal {
    margin-bottom: 12px;
    font-size: 13px;
    opacity: 0.7;
}

.footer-copyright {
    font-size: 13px;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-image {
        order: -1;
    }

    .phones-container {
        width: 100%;
        height: 450px;
        transform: scale(0.85);
    }

    .phone-mockup {
        width: 220px;
        height: 440px;
    }

    .phone-2 {
        left: -60px;
        top: 30px;
    }

    .phone-3 {
        right: -60px;
        top: 30px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

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

    .audience-grid {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .cta-content h2 {
        font-size: 32px;
    }

    .btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .phones-container {
        width: 100%;
        height: 380px;
        transform: scale(0.7);
    }

    .phone-mockup {
        width: 200px;
        height: 400px;
    }

    .phone-2 {
        left: -50px;
        top: 25px;
    }

    .phone-3 {
        right: -50px;
        top: 25px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .stat-number {
        font-size: 36px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
