/* ============================================
   INFINITY MEDTECH INSTITUTE
   Main Stylesheet
   ============================================ */

/* --- 1. VARIABLES & RESET --- */
:root {
    --bg-deep: #020617;
    --bg-dark: #0b1120;
    --bg-panel: #111827;
    --surface: rgba(17, 24, 39, 0.5);

    --cyan-300: #67e8f9;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;

    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;

    --white: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(34, 211, 238, 0.25);

    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;

    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* --- 2. UTILITY CLASSES --- */
.container {
    width: 92%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.text-gradient-cyan {
    background: linear-gradient(135deg, var(--cyan-300), var(--cyan-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-emerald {
    background: linear-gradient(135deg, var(--emerald-300), var(--emerald-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- 3. NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.85rem 0;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-infinity {
    color: var(--white);
}

.brand-medtech {
    color: var(--cyan-400);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan-400), var(--emerald-400));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--white);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

/* --- 4. HERO SECTION --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, var(--bg-deep) 70%);
}

.bio-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-deep) 90%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 950px;
    padding: 0 1.5rem;
}

.hero-eyebrow {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--cyan-400);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
    backdrop-filter: blur(4px);
}

.hero-headline {
    font-size: clamp(2.5rem, 6vw, 4.75rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--white);
    margin-bottom: 1.25rem;
    text-shadow: 0 0 60px rgba(34, 211, 238, 0.12);
}

.hero-lead {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.75rem;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.btn-cta {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(16, 185, 129, 0.12));
    color: var(--cyan-300);
    border: 1px solid rgba(34, 211, 238, 0.25);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.12), inset 0 0 12px rgba(34, 211, 238, 0.05);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.25), inset 0 0 20px rgba(34, 211, 238, 0.08);
    border-color: var(--cyan-400);
    color: var(--white);
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--cyan-500), var(--emerald-500));
    color: var(--bg-deep);
    font-weight: 800;
    letter-spacing: 0.12em;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

/* Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
}

.mouse-icon {
    width: 20px;
    height: 30px;
    border: 2px solid var(--text-muted);
    border-radius: 10px;
    position: relative;
}

.mouse-wheel {
    width: 4px;
    height: 6px;
    background: var(--cyan-400);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}

/* --- 5. SECTION HEADERS --- */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 4rem;
}

.section-label {
    display: inline-block;
    color: var(--cyan-400);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    color: var(--white);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.7;
}

/* --- 6. SYSTEMS / ABOUT --- */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 40px rgba(34, 211, 238, 0.06);
}

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
}

.icon-cyan {
    color: var(--cyan-400);
}

.icon-emerald {
    color: var(--emerald-400);
}

.card-title {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* --- 7. STATS STRIP --- */
.stats {
    padding: 5rem 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.025), rgba(16, 185, 129, 0.025));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.stat-suffix {
    font-size: 1.25rem;
    color: var(--cyan-400);
    font-weight: 700;
    margin-top: 0.25rem;
}

.stat-label {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* --- 8. PROGRAMS --- */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.program-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.program-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.program-number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.program-title {
    color: var(--white);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-right: 3rem;
}

.program-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.program-features li {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.program-features li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--emerald-400);
    font-weight: 700;
}

/* --- 9. MEDTECH LAB --- */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    transition: var(--transition);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan-500), var(--emerald-500));
    opacity: 0.6;
    transition: opacity 0.3s ease;
    border-radius: var(--radius) var(--radius) 0 0;
}

.project-card:hover::before {
    opacity: 1;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}

.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(34, 211, 238, 0.12);
}

.project-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--emerald-400);
    font-weight: 700;
}

.project-name {
    font-size: 1.4rem;
    color: var(--white);
    margin: 0.5rem 0 1.5rem;
    font-weight: 700;
}

.project-detail {
    margin-bottom: 1.25rem;
}

.meta-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    letter-spacing: 0.08em;
}

.meta-value {
    color: var(--cyan-300);
    font-weight: 600;
    font-size: 0.95rem;
}

.feature-list li {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-left: 1.1rem;
    position: relative;
    margin-bottom: 0.4rem;
}

.feature-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--emerald-400);
}

/* --- 10. CONTACT --- */
.contact-panel {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
}

.hologram-scan {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan-400), var(--emerald-400), transparent);
    animation: scan 4s linear infinite;
    opacity: 0.8;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem;
    position: relative;
    z-index: 2;
}

.contact-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--white);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.contact-desc {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.contact-address {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    font-style: normal;
}

.contact-block {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-block a,
.contact-block span {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.contact-block a:hover {
    color: var(--cyan-300);
}

.contact-icon {
    width: 20px;
    height: 20px;
    color: var(--emerald-400);
    flex-shrink: 0;
}

/* Form */
.contact-form label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cyan-400);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.125rem;
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid var(--glass-border);
    border-bottom: 3px solid var(--glass-border);
    color: var(--white);
    font-size: 1rem;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: var(--transition);
    margin-bottom: 1.25rem;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    background: rgba(2, 6, 23, 0.85);
    border-bottom-color: var(--cyan-400);
    box-shadow: 0 6px 24px rgba(34, 211, 238, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* --- 11. FOOTER --- */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 2.5rem 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy,
.footer-location {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- 12. ANIMATIONS & SCROLL REVEAL --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.systems-grid .reveal:nth-child(1) { transition-delay: 0.1s; }
.systems-grid .reveal:nth-child(2) { transition-delay: 0.2s; }
.systems-grid .reveal:nth-child(3) { transition-delay: 0.3s; }
.systems-grid .reveal:nth-child(4) { transition-delay: 0.4s; }

.programs-grid .reveal:nth-child(1) { transition-delay: 0.1s; }
.programs-grid .reveal:nth-child(2) { transition-delay: 0.2s; }
.programs-grid .reveal:nth-child(3) { transition-delay: 0.3s; }
.programs-grid .reveal:nth-child(4) { transition-delay: 0.4s; }

.lab-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.lab-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.lab-grid .reveal:nth-child(3) { transition-delay: 0.15s; }
.lab-grid .reveal:nth-child(4) { transition-delay: 0.2s; }
.lab-grid .reveal:nth-child(5) { transition-delay: 0.25s; }
.lab-grid .reveal:nth-child(6) { transition-delay: 0.3s; }

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

@keyframes scrollWheel {
    0%, 100% { transform: translate(-50%, 0); opacity: 1; }
    50% { transform: translate(-50%, 6px); opacity: 0.5; }
}

/* --- 13. RESPONSIVE --- */
@media (max-width: 1024px) {
    .contact-content {
        gap: 3rem;
        padding: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: rgba(11, 17, 32, 0.98);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 4rem 2.5rem;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--glass-border);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.1rem;
    }

    body.menu-open {
        overflow: hidden;
    }

    .section {
        padding: 4rem 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
        padding: 2.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .stats-grid {
        gap: 2.5rem;
    }

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

@media (max-width: 480px) {
    .hero-headline {
        font-size: 2.25rem;
    }

    .btn {
        width: 100%;
    }

    .program-number {
        font-size: 3rem;
    }

    .contact-content {
        padding: 2rem;
    }

    .glass-card,
    .program-card,
    .project-card {
        padding: 1.75rem;
    }
}