/* =============================================
   Innovative College — Design System
   Author: Antigravity
   Theme: Dark (default) / Light (toggled)
   ============================================= */

/* ─── Dark Mode (Default) ─────────────────── */
:root {
    --primary:        #2563eb;
    --primary-dark:   #1e40af;
    --accent:         #38bdf8;

    --bg-main:        #020617;
    --bg-secondary:   #0f172a;
    --bg-card:        rgba(30, 41, 59, 0.75);

    --text-main:      #f8fafc;
    --text-muted:     #94a3b8;

    --border:         rgba(255, 255, 255, 0.1);
    --shadow:         0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --hero-overlay:   radial-gradient(circle at center, rgba(15, 23, 42, 0.3) 0%, rgba(2, 6, 23, 0.88) 100%);

    --font-heading:   'Outfit', sans-serif;
    --font-body:      'Inter', sans-serif;
    --ease-spring:    cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Light Mode ──────────────────────────── */
body.light-theme {
    --primary:        #2563eb;
    --primary-dark:   #1d4ed8;
    --accent:         #2563eb;

    --bg-main:        #f1f5f9;
    --bg-secondary:   #ffffff;
    --bg-card:        #ffffff;

    --text-main:      #0f172a;
    --text-muted:     #64748b;

    --border:         rgba(0, 0, 0, 0.09);
    --shadow:         0 20px 40px -8px rgba(0, 0, 0, 0.08);
    --hero-overlay:   radial-gradient(circle at center, rgba(241, 245, 249, 0.15) 0%, rgba(15, 23, 42, 0.72) 100%);
}

/* Light mode: remove hero image, go pure white */
body.light-theme .hero-section {
    background-image: none;
    background-color: #ffffff;
}

body.light-theme .hero-overlay {
    display: none;
}

/* ─── Reset ───────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; /* GSAP handles smooth scroll */ }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow: hidden; /* Snap engine controls scrolling */
    transition: background-color 0.35s ease, color 0.35s ease;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─── Scroll Dots ─────────────────────────── */
.scroll-dots {
    position: fixed;
    right: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.35s var(--ease-spring);
    opacity: 0.5;
}

.scroll-dot:hover {
    opacity: 1;
    border-color: var(--accent);
}

.scroll-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.4);
    opacity: 1;
}

@media (max-width: 640px) { .scroll-dots { display: none; } }

/* ─── Header ──────────────────────────────── */

.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: background 0.35s ease, border-color 0.35s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.logo-icon {
    width: 38px;
    height: 38px;
    color: var(--accent);
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 50%, transparent));
    flex-shrink: 0;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.site-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* Nav */
.header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

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

/* Theme Toggle */
.theme-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, color 0.35s ease, border-color 0.35s ease;
    flex-shrink: 0;
}

.theme-btn:hover {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    transform: scale(1.06);
}

.theme-btn svg { width: 19px; height: 19px; }

/* Show sun in light mode, moon in dark mode */
.sun-icon  { display: none; }
.moon-icon { display: block; }

body.light-theme .sun-icon  { display: block; }
body.light-theme .moon-icon { display: none; }

/* ─── Main / Hero ─────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding-top: 76px;
}

.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* No background-image here — moved to parallax child */
}

/* Parallax background layer — GSAP drives the Y transform */
.hero-bg-parallax {
    position: absolute;
    inset: -15% 0;
    background-image: url('https://images.unsplash.com/photo-1541339907198-e08756ebafe3?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
    will-change: transform;
}

body.light-theme .hero-bg-parallax {
    display: none;
}

/* ─── Hero Image Mosaic Grid ──────────────────
   Sits between parallax-bg (z:0) and overlay (z:3)
   Hero card stays at z-index:10 — untouched
─────────────────────────────────────────────── */
.hero-image-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.25fr 1fr 1.15fr;
    grid-template-rows: 37% 31% 32%;
    gap: 5px;
    pointer-events: none; /* grid itself: pass-through */
}

/* cells can receive hover */
.hig-cell {
    pointer-events: auto;
}


/* Center-fade vignette over the whole grid so the
   hero card area stays visually clear */
.hero-image-grid::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(
        ellipse 65% 65% at 50% 48%,
        rgba(2, 6, 23, 0.55) 0%,
        transparent 80%
    );
    pointer-events: none;
}

body.light-theme .hero-image-grid::after {
    background: radial-gradient(
        ellipse 65% 65% at 50% 48%,
        rgba(255, 255, 255, 0.65) 0%,
        rgba(255, 255, 255, 0.15) 80%
    );
}

/* Individual cells */
.hig-cell {
    overflow: hidden;
    position: relative;
    /* Float animation — pure CSS, compositor thread only */
    animation: floatCell var(--float-dur, 4s) ease-in-out infinite var(--float-delay, 0s);
    will-change: transform;
    /* pointer-events set per-cell */
    pointer-events: auto;
}

/* ── Float keyframe — only translateY, GPU composited ── */
@keyframes floatCell {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(var(--float-y, -8px)); }
}

/* Per-cell float config — no two cells share the same rhythm */
.hig-1 { grid-column: 1; grid-row: 1 / 3; --float-y: -10px; --float-dur: 4.2s; --float-delay:  0s;    }
.hig-2 { grid-column: 2; grid-row: 1;     --float-y:   8px; --float-dur: 3.8s; --float-delay: -1.8s; }
.hig-3 { grid-column: 3; grid-row: 1 / 3; --float-y: -13px; --float-dur: 5.1s; --float-delay: -0.8s; }
.hig-4 { grid-column: 4; grid-row: 1;     --float-y:   7px; --float-dur: 3.5s; --float-delay: -2.5s; }
.hig-5 { grid-column: 2; grid-row: 2 / 4; --float-y:  -9px; --float-dur: 4.7s; --float-delay: -3.2s; }
.hig-6 { grid-column: 4; grid-row: 2 / 4; --float-y:  11px; --float-dur: 4.9s; --float-delay: -1.1s; }
.hig-7 { grid-column: 1; grid-row: 3;     --float-y:  -6px; --float-dur: 3.6s; --float-delay: -4.0s; }
.hig-8 { grid-column: 3; grid-row: 3;     --float-y:  14px; --float-dur: 5.3s; --float-delay: -0.5s; }

/* Images — Ken-Burns ONLY, compositor thread, no GSAP */
.hig-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    will-change: transform;
    transform-origin: center;
    filter: saturate(0.82);
    /* CSS hover transition — no GSAP filter tween */
    transition: filter 0.5s ease;
    /* Ken-Burns: pure CSS scale loop */
    animation: kenBurns var(--kb-dur, 14s) ease-in-out infinite var(--kb-delay, 0s);
}

/* Per-image Ken-Burns timing — offset delays = all images in different phase */
.hig-1 img { --kb-dur: 16s; --kb-delay:  0s;  }
.hig-2 img { --kb-dur: 12s; --kb-delay: -4s;  }
.hig-3 img { --kb-dur: 18s; --kb-delay: -2s;  }
.hig-4 img { --kb-dur: 13s; --kb-delay: -6s;  }
.hig-5 img { --kb-dur: 15s; --kb-delay: -3s;  }
.hig-6 img { --kb-dur: 17s; --kb-delay: -1s;  }
.hig-7 img { --kb-dur: 14s; --kb-delay: -5s;  }
.hig-8 img { --kb-dur: 11s; --kb-delay: -7s;  }

@keyframes kenBurns {
    0%, 100% { transform: scale(1);    }
    50%      { transform: scale(1.07); }
}

/* Hover — CSS only, no GSAP */
.hig-cell:hover img {
    filter: saturate(1.05) brightness(1.08);
}

/* Light mode */
body.light-theme .hig-cell img {
    filter: saturate(0.65) brightness(1.05);
    opacity: 0.72;
}
body.light-theme .hig-cell:hover img {
    filter: saturate(0.9) brightness(1.1);
    opacity: 0.85;
}


.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-overlay);
    transition: background 0.35s ease;
}

/* Hero Card */
.hero-card {
    position: relative;
    z-index: 10;
    max-width: 880px;
    width: calc(100% - 3rem);
    padding: 3rem;
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: 2rem;
    box-shadow: var(--shadow);
    /* Theme transitions only — GSAP handles entrance */
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.75rem;
}

/* Title */
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.08;
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

.hero-title span {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Description */
.hero-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 560px;
    margin-bottom: 2.25rem;
    transition: color 0.35s ease;
}

/* Buttons */
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 0.875rem 1.875rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.45);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(37, 99, 235, 0.55);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: color-mix(in srgb, var(--text-main) 8%, transparent);
    transform: translateY(-2px);
}

/* ─── Programs Section ────────────────────── */
.programs-section {
    padding: 6rem 2rem;
    background: var(--bg-main);
    transition: background 0.35s ease;
}

.programs-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-badge {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.1;
    transition: color 0.35s ease;
}

.section-title span {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
    transition: color 0.35s ease;
}

/* Programs Grid */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Program Card */
.prog-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    cursor: pointer;
    transition:
        background 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.3s ease;
    /* GSAP sets initial opacity/transform */
}

.prog-card:hover {
    transform: translateY(-4px) !important;
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    box-shadow: 0 12px 28px -6px color-mix(in srgb, var(--accent) 15%, transparent);
}

/* Icon bubble */
.prog-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: background 0.35s ease, color 0.35s ease;
}

.prog-icon svg {
    width: 24px;
    height: 24px;
}

.prog-card:hover .prog-icon {
    background: var(--accent);
    color: #fff;
}

/* Program Info */
.prog-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.prog-info h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    transition: color 0.35s ease;
}

.prog-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    transition: color 0.35s ease;
}

/* UG / PG Badge */
.prog-level {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.18rem 0.6rem;
    border-radius: 100px;
    width: fit-content;
    margin-bottom: 0.2rem;
}

.prog-level.ug {
    background: color-mix(in srgb, #22c55e 12%, transparent);
    color: #22c55e;
    border: 1px solid color-mix(in srgb, #22c55e 25%, transparent);
}

.prog-level.pg {
    background: color-mix(in srgb, #f59e0b 12%, transparent);
    color: #f59e0b;
    border: 1px solid color-mix(in srgb, #f59e0b 25%, transparent);
}

/* Duration tag */
.prog-duration {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.15rem;
    transition: color 0.35s ease;
}

/* Responsive */
@media (max-width: 968px) {
    .programs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
    .programs-grid { grid-template-columns: 1fr; }
    .programs-section { padding: 4rem 1.25rem; }
}

/* ─── Footer ──────────────────────────────── */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    transition: background 0.35s ease, border-color 0.35s ease;
}

.footer-wide { padding: 4.5rem 2rem; }

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 4rem;
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    transition: color 0.35s ease;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    transition: color 0.35s ease;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 0.625rem; }

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-col ul li a:hover {
    color: var(--accent);
    padding-left: 4px;
}

/* Social Icons */
.social-links { display: flex; gap: 0.75rem; }

.social-links a {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.social-links a:hover {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    transform: translateY(-3px);
}

/* Contact info */
.contact-info p {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

/* Copyright bar */
.footer-copyright {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    transition: background 0.35s ease, border-color 0.35s ease;
}

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

.footer-copyright p {
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: color 0.35s ease;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s ease;
}

.footer-legal a:hover { color: var(--accent); }

.separator {
    width: 3px;
    height: 3px;
    background: var(--text-muted);
    border-radius: 50%;
    opacity: 0.4;
}

/* ─── Responsive ──────────────────────────── */
@media (max-width: 968px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .footer-grid        { grid-template-columns: 1fr; gap: 2.5rem; }
    .header-nav         { gap: 1rem; }
    .nav-menu           { display: none; }
    .hero-card          { padding: 2rem 1.5rem; }
    .footer-copyright .footer-container { flex-direction: column; gap: 0.75rem; text-align: center; }
}
