/* ═══════════════════════════════════════════════════════════════════════
   IMPERIAL SOCIETY OF SCIENCES — PRODUCTION STYLESHEET
   Design Paradigm: Cinematic Minimalism / Invisible Design
   ═══════════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
    /* Colour Palette */
    --clr-onyx:          #0A0A0A;
    --clr-onyx-light:    #111111;
    --clr-onyx-surface:  #161616;
    --clr-onyx-elevated: #1C1C1C;
    --clr-gold:          #C5A880;
    --clr-gold-dim:      rgba(197, 168, 128, 0.45);
    --clr-gold-glow:     rgba(197, 168, 128, 0.08);
    --clr-text-primary:  #E8E4DE;
    --clr-text-muted:    #A1A1A6;
    --clr-text-dim:      #6A6A6E;
    --clr-border:        rgba(197, 168, 128, 0.12);
    --clr-border-hover:  rgba(197, 168, 128, 0.30);
    --clr-glass:         rgba(10, 10, 10, 0.72);
    --clr-glass-border:  rgba(197, 168, 128, 0.08);

    /* Typography */
    --ff-serif:   'Cinzel', 'Playfair Display', Georgia, serif;
    --ff-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --fs-display:  clamp(2.4rem, 5.5vw, 5rem);
    --fs-h2:       clamp(1.6rem, 3vw, 2.6rem);
    --fs-h3:       clamp(1rem, 1.5vw, 1.25rem);
    --fs-body:     clamp(0.9rem, 1.1vw, 1.05rem);
    --fs-small:    clamp(0.7rem, 0.85vw, 0.82rem);
    --fs-micro:    clamp(0.62rem, 0.7vw, 0.72rem);

    --fw-light:    300;
    --fw-regular:  400;
    --fw-medium:   500;
    --fw-semibold: 600;

    /* Spacing */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  6.5rem;
    --space-2xl: 10rem;

    /* Layout */
    --max-width:   1200px;
    --header-h:    72px;
    --border-radius: 2px;

    /* Transitions */
    --ease-smooth:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --duration:     0.4s;
    --duration-slow: 0.7s;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--ff-sans);
    font-weight: var(--fw-light);
    font-size: var(--fs-body);
    line-height: 1.75;
    color: var(--clr-text-primary);
    background-color: var(--clr-onyx);
    overflow-x: hidden;
}

::selection {
    background: var(--clr-gold-dim);
    color: var(--clr-onyx);
}

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

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

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ── Shared Typography ── */
.section-tag {
    font-family: var(--ff-sans);
    font-size: var(--fs-micro);
    font-weight: var(--fw-medium);
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--clr-gold);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--ff-serif);
    font-size: var(--fs-h2);
    font-weight: var(--fw-regular);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--clr-text-primary);
    margin-bottom: var(--space-md);
}

/* ── Scroll Reveal Base ── */
.wing-card,
.ops-card,
.motto-block,
.manifesto-body,
.directorate-desc,
.footer-col {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--duration-slow) var(--ease-smooth),
                transform var(--duration-slow) var(--ease-smooth);
}

.wing-card.revealed,
.ops-card.revealed,
.motto-block.revealed,
.manifesto-body.revealed,
.directorate-desc.revealed,
.footer-col.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.wing-card:nth-child(2),
.ops-card:nth-child(2),
.footer-col:nth-child(2) {
    transition-delay: 0.12s;
}

.wing-card:nth-child(3),
.ops-card:nth-child(3),
.footer-col:nth-child(3) {
    transition-delay: 0.24s;
}


/* ═══════════════════════════════════════════════════════════════════════
   A. GLOBAL HEADER & BRANDING LOCKUP
   ═══════════════════════════════════════════════════════════════════════ */

.global-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    z-index: 1000;
    transition: background var(--duration) var(--ease-smooth),
                box-shadow var(--duration) var(--ease-smooth),
                border-color var(--duration) var(--ease-smooth);
    border-bottom: 1px solid transparent;
}

.global-header.scrolled {
    background: var(--clr-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--clr-glass-border);
    box-shadow: 0 1px 40px rgba(0, 0, 0, 0.4);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand Lockup */
.brand-lockup {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: opacity var(--duration) var(--ease-smooth);
}

.brand-lockup:hover {
    opacity: 0.8;
}

.brand-logo {
    height: 54px;
    max-height: 54px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-name {
    font-family: var(--ff-serif);
    font-size: 0.82rem;
    font-weight: var(--fw-semibold);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--clr-text-primary);
}

.brand-suffix {
    font-family: var(--ff-sans);
    font-size: 0.62rem;
    font-weight: var(--fw-light);
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--clr-text-muted);
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-link {
    font-family: var(--ff-sans);
    font-size: var(--fs-micro);
    font-weight: var(--fw-medium);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--clr-text-muted);
    position: relative;
    padding: 4px 0;
    transition: color var(--duration) var(--ease-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--clr-gold);
    transition: width var(--duration) var(--ease-smooth);
}

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

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-bar {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--clr-text-muted);
    transition: transform var(--duration) var(--ease-smooth),
                opacity var(--duration) var(--ease-smooth);
}

.mobile-menu-toggle.active .menu-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.active .menu-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .menu-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}


/* ═══════════════════════════════════════════════════════════════════════
   B. HERO OVERVIEW & SYSTEM DECLARATION
   ═══════════════════════════════════════════════════════════════════════ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--clr-onyx);
}

/* Subtle grid pattern */
.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(197, 168, 128, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(197, 168, 128, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

/* Radial gold glow */
.hero-radial {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--clr-gold-glow) 0%, transparent 65%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    max-width: 800px;
    animation: heroFadeIn 1.2s var(--ease-smooth) both;
}

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


.hero-title {
    font-family: var(--ff-serif);
    font-size: var(--fs-display);
    font-weight: var(--fw-regular);
    line-height: 1.15;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--clr-text-primary);
    margin-bottom: var(--space-md);
}

.hero-title-line {
    display: block;
}

.hero-title-line.accent {
    color: var(--clr-gold);
}

/* Decorative Divider */
.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin: var(--space-md) auto;
    width: 200px;
}

.hero-divider::before,
.hero-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--clr-gold-dim), transparent);
}

.divider-diamond {
    width: 6px;
    height: 6px;
    background: var(--clr-gold);
    transform: rotate(45deg);
    flex-shrink: 0;
}

.hero-subtitle {
    font-family: var(--ff-sans);
    font-size: var(--fs-body);
    font-weight: var(--fw-light);
    color: var(--clr-text-muted);
    line-height: 1.9;
    max-width: 560px;
    margin: 0 auto var(--space-lg);
    letter-spacing: 0.5px;
}

.hero-cta {
    display: inline-block;
    font-family: var(--ff-sans);
    font-size: var(--fs-micro);
    font-weight: var(--fw-medium);
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--clr-gold);
    border: 1px solid var(--clr-border);
    padding: 14px 40px;
    transition: all var(--duration) var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.hero-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--clr-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration) var(--ease-smooth);
    z-index: -1;
}

.hero-cta:hover {
    color: var(--clr-onyx);
    border-color: var(--clr-gold);
}

.hero-cta:hover::before {
    transform: scaleX(1);
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    animation: scrollPulse 2.5s var(--ease-smooth) infinite;
}

.scroll-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, var(--clr-gold-dim), transparent);
}

.scroll-label {
    font-family: var(--ff-sans);
    font-size: 0.55rem;
    font-weight: var(--fw-medium);
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--clr-text-dim);
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}


/* ═══════════════════════════════════════════════════════════════════════
   MANIFESTO SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.manifesto {
    padding: var(--space-2xl) 0;
    background: var(--clr-onyx);
    position: relative;
}

.manifesto .container {
    text-align: center;
}

.manifesto-body {
    max-width: 720px;
    margin: 0 auto var(--space-xl);
}

.manifesto-body p {
    font-family: var(--ff-sans);
    font-size: var(--fs-body);
    font-weight: var(--fw-light);
    color: var(--clr-text-muted);
    line-height: 2;
    letter-spacing: 0.3px;
    margin-bottom: var(--space-sm);
}

.manifesto-body strong {
    color: var(--clr-gold);
    font-weight: var(--fw-medium);
}

/* Research Wings Grid */
.wings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--clr-border);
    border: 1px solid var(--clr-border);
    margin-top: var(--space-lg);
}

.wing-card {
    background: var(--clr-onyx);
    padding: var(--space-lg) var(--space-md);
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: background var(--duration) var(--ease-smooth);
}

.wing-card:hover {
    background: var(--clr-onyx-light);
}

.wing-num {
    font-family: var(--ff-serif);
    font-size: 5.5rem;
    font-weight: var(--fw-semibold);
    color: var(--clr-text-primary);
    opacity: 0.03;
    line-height: 1;
    position: absolute;
    top: 12px;
    right: 16px;
    pointer-events: none;
    user-select: none;
    transition: opacity var(--duration) var(--ease-smooth);
}

.wing-card:hover .wing-num {
    opacity: 0.06;
}

.wing-card h3 {
    font-family: var(--ff-serif);
    font-size: var(--fs-h3);
    font-weight: var(--fw-regular);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--clr-text-primary);
    margin-bottom: var(--space-sm);
}

.wing-card p {
    font-size: var(--fs-small);
    font-weight: var(--fw-light);
    color: var(--clr-text-muted);
    line-height: 1.8;
}

.wing-line {
    position: absolute;
    bottom: 0;
    left: var(--space-md);
    right: var(--space-md);
    height: 1px;
    background: linear-gradient(90deg, var(--clr-gold), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration-slow) var(--ease-smooth);
}

.wing-card:hover .wing-line {
    transform: scaleX(1);
}


/* ═══════════════════════════════════════════════════════════════════════
   C. THE ASTRONOMY DIRECTORATE
   ═══════════════════════════════════════════════════════════════════════ */

.directorate {
    padding: var(--space-2xl) 0;
    background:
        linear-gradient(180deg, var(--clr-onyx) 0%, var(--clr-onyx-light) 50%, var(--clr-onyx) 100%);
    position: relative;
}

.directorate-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.directorate-heritage {
    font-family: var(--ff-sans);
    font-size: var(--fs-small);
    font-weight: var(--fw-light);
    font-style: italic;
    letter-spacing: 2px;
    color: var(--clr-text-dim);
    margin-top: calc(var(--space-sm) * -0.5);
}

/* Motto Block */
.motto-block {
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    text-align: center;
    padding: var(--space-lg) var(--space-md);
}

.motto-border {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--clr-gold-dim), transparent);
    margin: 0 auto var(--space-md);
}

.motto-block .motto-border:last-child {
    margin: var(--space-md) auto 0;
}

.motto-sanskrit {
    font-family: var(--ff-serif);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: var(--fw-regular);
    color: var(--clr-gold);
    letter-spacing: 3px;
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.motto-translation {
    font-family: var(--ff-sans);
    font-size: 0.8rem;
    font-weight: var(--fw-regular);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--clr-text-dim);
    line-height: 1.6;
}

/* Directorate Description */
.directorate-desc {
    text-align: center;
    max-width: 680px;
    margin: 0 auto var(--space-xl);
    font-size: var(--fs-body);
    font-weight: var(--fw-light);
    color: var(--clr-text-muted);
    line-height: 2;
    letter-spacing: 0.3px;
}

/* Operational Grid */
.ops-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.ops-card {
    border: 1px solid var(--clr-border);
    background: var(--clr-onyx);
    transition: border-color var(--duration) var(--ease-smooth),
                background var(--duration) var(--ease-smooth),
                box-shadow var(--duration) var(--ease-smooth);
}

.ops-card:hover {
    border-color: var(--clr-border-hover);
    background: var(--clr-onyx-surface);
    box-shadow: 0 8px 60px rgba(197, 168, 128, 0.04);
}

.ops-card-inner {
    padding: var(--space-lg) var(--space-md);
}

.ops-icon {
    width: 48px;
    height: 48px;
    color: var(--clr-gold);
    margin-bottom: var(--space-md);
    opacity: 0.7;
    transition: opacity var(--duration) var(--ease-smooth);
}

.ops-card:hover .ops-icon {
    opacity: 1;
}

.ops-label {
    display: block;
    font-family: var(--ff-sans);
    font-size: var(--fs-micro);
    font-weight: var(--fw-medium);
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--clr-gold-dim);
    margin-bottom: var(--space-xs);
}

.ops-card h3 {
    font-family: var(--ff-serif);
    font-size: var(--fs-h3);
    font-weight: var(--fw-regular);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--clr-text-primary);
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.ops-card p {
    font-size: var(--fs-small);
    font-weight: var(--fw-light);
    color: var(--clr-text-muted);
    line-height: 1.85;
}


/* ═══════════════════════════════════════════════════════════════════════
   D. ARCHIVAL FOOTER
   ═══════════════════════════════════════════════════════════════════════ */

.archive-footer {
    padding: var(--space-xl) 0 var(--space-lg);
    background: var(--clr-onyx);
    border-top: 1px solid var(--clr-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: var(--space-lg);
}

.footer-col {
    padding: 0 var(--space-lg);
    border-right: 1px solid rgba(197, 168, 128, 0.1);
}

.footer-col:first-child {
    padding-left: 0;
}

.footer-col:last-child {
    border-right: none;
    padding-right: 0;
}

.footer-heading {
    font-family: var(--ff-serif);
    font-size: var(--fs-small);
    font-weight: var(--fw-regular);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--clr-gold);
    margin-bottom: var(--space-md);
}

.footer-link-list li {
    margin-bottom: var(--space-xs);
}

.footer-link-list a {
    font-size: var(--fs-small);
    font-weight: var(--fw-light);
    color: var(--clr-text-dim);
    letter-spacing: 0.5px;
    transition: color var(--duration) var(--ease-smooth);
}

.footer-link-list a:hover {
    color: var(--clr-gold);
}


/* Footer Bottom */
.footer-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--clr-border), transparent);
    margin-bottom: var(--space-md);
}

.copyright {
    font-family: var(--ff-sans);
    font-size: var(--fs-micro);
    font-weight: var(--fw-light);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--clr-text-dim);
    text-align: center;
}


/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 960px)
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 960px) {
    .wings-grid {
        grid-template-columns: 1fr;
    }

    .ops-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .footer-col {
        border-right: none;
        border-bottom: 1px solid rgba(197, 168, 128, 0.1);
        padding: var(--space-md) 0;
    }

    .footer-col:last-child {
        border-bottom: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 640px)
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    :root {
        --header-h: 60px;
    }

    .brand-text {
        display: none;
    }

    .brand-logo {
        height: 40px;
        max-height: 40px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--clr-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--clr-glass-border);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: var(--space-lg);
        gap: var(--space-md);
        transform: translateX(100%);
        transition: transform var(--duration) var(--ease-smooth);
    }

    .header-nav.open {
        transform: translateX(0);
    }

    .nav-link {
        font-size: var(--fs-small);
        letter-spacing: 4px;
    }

    .hero-content {
        padding: var(--space-xl) var(--space-sm);
    }

    .hero-title {
        letter-spacing: 2px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-col {
        border-right: none;
        border-bottom: 1px solid rgba(197, 168, 128, 0.1);
        padding: var(--space-md) 0;
    }

    .footer-col:last-child {
        border-bottom: none;
    }

    .motto-sanskrit {
        letter-spacing: 1px;
    }

    .motto-translation {
        letter-spacing: 3px;
    }
}
