/* 
   CLEAN FOUNDATION - REBUILD V1 
   Focus: Structure, Alignment, Equality 
*/

/* 1. Variables & Design Tokens */
:root {
    /* Colors - Medical Professional */
    --color-primary: #0284C7;
    /* Sky 600 - Main Blue */
    --color-primary-dark: #0369A1;
    /* Sky 700 - Hover */
    --color-primary-light: #E0F2FE;
    /* Sky 100 - Backgrounds */

    --color-text-main: #0C4A6E;
    /* Sky 900 - Deep Blue (No Black) */
    --color-text-body: #475569;
    /* Slate 600 - Soft Grey-Blue */
    --color-text-muted: #64748B;
    /* Slate 500 - Secondary */

    --color-bg-page: #FFFFFF;
    --color-bg-section: #F8FAFC;
    /* Light Grey Section */

    --border-color: #E2E8F0;

    /* Spacing Units - MATHEMATICAL */
    --space-sm: 0.5rem;
    /* 8px */
    --space-md: 1rem;
    /* 16px */
    --space-lg: 2rem;
    /* 32px */
    --space-xl: 4rem;
    /* 64px */

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Font */
    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

input,
textarea,
button {
    font-family: inherit;
    font-size: 1rem;
}

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

h1,
h2,
h3,
h4 {
    color: var(--color-text-main);
    line-height: 1.1;
    /* Tighter for modern look */
    font-weight: 700;
    letter-spacing: -0.03em;
    /* Tight tracking */
}

/* Gradient Text Utility */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), #A855F7);
    /* Blue to Purple */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;


    display: inline-block;
    /* Fix for padding/margins if needed */
}

.ai-highlight {
    background: linear-gradient(135deg, var(--color-primary), #A855F7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    /* Extra boldness */
    display: inline-block;
}

/* Rotator Animation */
.word-rotator {
    display: inline-block;
    color: inherit;
    transition: opacity 1.5s ease-in-out;
    /* No width partial animation */
    white-space: nowrap;
    min-width: 0;
    /* Allows shrinking */
    max-width: 100%;
    /* Prevents overflow */
    box-sizing: border-box;
    /* Include padding in width */
    padding: 0 2px;
    /* Small padding to prevent text clipping */
    text-overflow: ellipsis;
    /* Add ellipsis for overflowed text */
    vertical-align: bottom;
    /* Aligns correctly with text line */
    text-align: left;
    /* Keep left aligned for reading flow */
}

.word-rotator.fade-out {
    opacity: 0;
}

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

ul {
    list-style: none;
}

img,
svg {
    display: block;
    /* Removes baseline gap alignment issues */
}

/* Duotone Transparency */
.duotone-secondary {
    opacity: 0.3;
}

/* 3. Layout Primitives */

/* container: Centers content with max-width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
}

/* grid: Creates a responsive grid with EQUAL HEIGHT columns */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    align-items: stretch;
    /* CRITICAL: Forces equal height */
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    align-items: stretch;
}

/* section: Standard padding for vertical rhythm */
.section {
    padding: var(--space-xl) 0;
    scroll-margin-top: 100px;
    /* Fix for sticky header covering titles */
}

.bg-grey {
    background-color: var(--color-bg-section);
}

/* 4. Components */

/* HEADER - The Navigation Bar */
.header {
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 100;

    /* Flexbox for alignment */
    display: flex;
    align-items: center;
    /* Vertical Center */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    /* Push Logo left, Nav right */
    align-items: center;
    /* CRITICAL: Aligns Logo and Links vertically */
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.95rem;
    font-weight: 500;
}

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

/* HERO - The Main Headline */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(to bottom, #F0F9FF, #FFFFFF);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto var(--space-lg);
}

/* CARDS - Uniform Boxes */
.card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-lg);

    /* Flex column to push content properly */
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Fills the grid cell */
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.card-icon {
    width: 48px;
    height: 48px;
    background-color: transparent;
    color: var(--color-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.card h3 {
    margin-bottom: var(--space-sm);
    font-size: 1.25rem;
}

.card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
    /* Pushes bottom elements down if needed */
}

/* MOUSE ANIMATION */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-top: 2rem;
    opacity: 0.7;
    transition: opacity 0.3s;
    text-decoration: none;
    /* Remove underline */
}

.scroll-indicator:hover {
    opacity: 1;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--color-text-main);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--color-text-main);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        top: 6px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

/* BUTTONS (Modern Gradient Pill) */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    background: linear-gradient(135deg, var(--color-primary), #38BDF8);
    /* Gradient */
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 999px;
    /* Pill Shape */
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(2, 132, 199, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.6rem 1.5rem;
    /* Optical balance */
}

.btn-outline:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* RESPONSIVE */
/* RESPONSIVE */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-main);
    padding: var(--space-sm);
}

@media (max-width: 768px) {
    .header-inner {
        position: relative;
    }

    .mobile-menu-btn {
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-links {
        display: none;
        /* Hidden by default */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: var(--space-lg);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        gap: var(--space-md);
    }

    .nav-links.active {
        display: flex;
    }

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    /* Typography Adjustments */
    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2.5rem !important;
        /* Force override inline styles if needed, though specific class is better */
    }

    .hero p {
        font-size: 1.125rem !important;
    }

    .container {
        padding: 0 var(--space-md);
    }
}