/* about.css - Strict modern black aesthetic for MUN-Key About Page */

:root {
    --black-bg: #050505;
    --card-bg: rgba(20, 20, 25, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6; /* Blue accent */
    --primary-glow: rgba(59, 130, 246, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--black-bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Layout */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Ambient Background */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--black-bg);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    mix-blend-mode: screen;
}

.orb-1 { top: -20%; left: -10%; width: 50vw; height: 50vw; background: rgba(59, 130, 246, 0.3); }
.orb-2 { bottom: -10%; right: -10%; width: 60vw; height: 60vw; background: rgba(139, 92, 246, 0.2); }

/* Navigation */
.nav-glass {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
}

.nav-brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px var(--primary-glow);
}

/* Hero Section */
.hero-section {
    padding-top: 180px;
    padding-bottom: 100px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    margin: 0 0 1.5rem 0;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.35rem);
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
}

/* Feature Grid */
.features-section {
    margin-bottom: 6rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* Glass Cards */
.glass-card {
    padding: 3rem 2.5rem;
    border-radius: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.glass-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
}

.glass-card p {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    font-size: 1.05rem;
}

/* Scrollytelling Section */
.scrolly-section {
    padding: 6rem 0 10rem 0;
    position: relative;
    border-top: 1px solid var(--border-color);
}

.scrolly-header {
    text-align: center;
    margin-bottom: 4rem;
}

.scrolly-header h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0 0 1.5rem 0;
}

.scrolly-header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.scrolly-container {
    display: flex;
    flex-direction: column-reverse; /* Image on top for mobile */
    gap: 2rem;
}

@media (min-width: 992px) {
    .scrolly-container {
        flex-direction: row;
        gap: 4rem;
        align-items: flex-start;
    }
}

.scroll-text {
    flex: 1;
    padding-bottom: 50vh; /* gives room to scroll past the last item */
}

.scroll-phase {
    margin-bottom: 6rem;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.scroll-phase.phase-active {
    opacity: 1;
}

.scroll-phase h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 1.5rem 0;
}

.scroll-phase p, .scroll-phase li {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.scroll-phase ul {
    padding-left: 1.5rem;
}

.trigger-phrase {
    color: #fff;
    font-weight: 800; /* Bold the feature name only */
    cursor: pointer;
    border-bottom: none; /* Removed dashed border for cleaner look */
    transition: all 0.3s ease;
    padding: 0.1rem 0.25rem;
    margin: 0 -0.25rem;
    border-radius: 4px;
}

.trigger-phrase.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: none;
}

.sticky-visuals {
    position: sticky;
    top: 80px;
    height: auto;
    max-height: 40vh; /* Limit height on mobile */
    aspect-ratio: 4 / 3; /* Square/tight crop ratio to focus on content */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black-bg);
    border: 1px solid rgba(255,255,255,0.05); /* Subtle container border */
    border-radius: 24px;
    padding: 0;
    z-index: 50;
    margin-bottom: 2rem;
    overflow: hidden; /* Crucial for the merciless crop */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Add a gradient fade out below the image on mobile */
@media (max-width: 991px) {
    .sticky-visuals::after {
        content: '';
        position: absolute;
        bottom: -40px;
        left: -10vw;
        width: 120vw;
        height: 60px;
        background: linear-gradient(to bottom, var(--black-bg) 20%, transparent);
        pointer-events: none;
    }
}

@media (min-width: 992px) {
    .sticky-visuals {
        flex: 1.4;
        top: 120px;
        max-height: calc(100vh - 160px);
        background: transparent;
        margin-bottom: 0;
    }
    .sticky-visuals::after {
        display: none;
    }
}

.sticky-visuals img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: var(--img-fit, cover);
    object-position: center;
    transform-origin: var(--img-origin, 60% 50%);
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: scale(var(--img-scale, 1.35)) translateY(15px);
    border-radius: 0;
    border: none;
}

.sticky-visuals img.active {
    opacity: 1;
    transform: scale(var(--img-scale, 1.35)) translateY(0);
}

.image-caption {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    z-index: 60;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    pointer-events: none;
}

.image-caption.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 24px;
    left: 24px;
    display: flex;
    gap: 8px;
    z-index: 60;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.carousel-indicators.visible {
    opacity: 1;
}

.carousel-dot {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}

.carousel-dot.active {
    background: var(--primary);
    width: 36px;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 60;
    opacity: 0; 
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.carousel-btn.visible {
    opacity: 0.25; /* Very faint until clicked */
    pointer-events: auto;
}

.carousel-btn.visible:hover {
    opacity: 0.6; 
}

/* When manual override is engaged (paused), they are fully opaque */
.sticky-visuals.is-paused .carousel-btn.visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.75);
    border-color: rgba(255, 255, 255, 0.3);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

/* Footer */
.about-footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.5);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--text-main);
}
