/* ============================================
   BLACKBOX LEARNING - DESIGN SYSTEM (V2)
   Premium Cinematic Dark UI
   ============================================ */

/* --- Variables --- */
:root {
    --accent: #ff8c32;
    --accent-glow: rgba(255, 140, 50, 0.4);
    --bg: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
    --font-heading: 'Big Shoulders Display', sans-serif;
    --font-body: 'Outfit', 'Space Grotesk', sans-serif;
}

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

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1), visibility 0.8s;
}

.preloader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader--hidden .preloader__content {
    transform: scale(1.1) translateY(-20px);
    filter: blur(10px);
    transition: all 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.preloader__content {
    width: 600px;
    height: auto;
    max-width: 90%;
    transition: all 0.5s ease;
}

/* --- Hero Reveal State --- */
.hero {
    opacity: 0;
    transform: scale(1.05);
    filter: blur(10px);
    transition: opacity 1.2s ease, transform 1.5s cubic-bezier(0.2, 0.8, 0.2, 1), filter 1.2s ease;
}

.hero.is-visible {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.preloader-active {
    overflow: hidden;
}

em {
    font-style: normal;
    color: var(--accent);
}

/* --- Utilities --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- Hero Section (Existing Style Refined) --- */
.hero {
    position: sticky;
    top: 0;
    z-index: 1;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #000;
}

.hero__bg-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 1;
}

.hero__bg-layer.active { opacity: 1; }

.hero__bg-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
}

.hero__bg-layer.ken-burns img {
    transform: scale(1.1);
    transition: transform 12s linear;
}

.hero__glitch-canvas {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
}

.hero__scanlines {
    position: absolute;
    inset: 0;
    z-index: 6;
    background: repeating-linear-gradient(0deg, transparent 0px, transparent 2px, rgba(0, 0, 0, 0.05) 2px, rgba(0, 0, 0, 0.05) 4px);
    pointer-events: none;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 7;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.8));
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 10;
    height: 100%;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- Nav --- */
.hero__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    padding: 10px 24px;
    border-radius: 50px;
}

.hero__nav-logo {
    display: flex;
    align-items: center;
}

.hero__nav-logo-img {
    height: 38px;
    /* filter: brightness(0) invert(1); */
}

.hero__nav-links {
    display: flex;
    gap: 30px;
}

.hero__nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    transition: 0.3s;
}

.hero__nav-link:hover { color: #fff; }

.hero__nav-actions {
    display: flex;
    gap: 15px;
}

.hero__nav-login, .hero__nav-signup {
    padding: 8px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: 0.3s;
}

.hero__nav-login { border: 1px solid var(--border); color: #fff; }
.hero__nav-signup { background: var(--accent); color: #000; font-weight: 700; }

/* --- Hero Text --- */
.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(80px, 15vw, 180px);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.02em;
}

.hero__title-word { display: block; }

.hero__subtitle {
    margin-top: 20px;
    font-size: 16px;
    letter-spacing: 5px;
    color: var(--text-dim);
}

.hero__cta-btn {
    display: inline-flex;
    margin-top: 40px;
    padding: 18px 36px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    gap: 10px;
    transition: 0.3s;
}

.hero__cta-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }

.hero__scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}




/* --- Explosion Section --- */
.explosion-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #0a0a0a, #111111);
    overflow: hidden;
}

.explosion-section__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.explosion-section__content {
    position: relative;
    z-index: 10;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

.explosion-section.is-active .explosion-section__content {
    opacity: 1;
    transform: translateY(0);
}

.explosion-section__title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: #ff6f3b;
    margin-bottom: 20px;
    text-shadow: 0 0 40px rgba(255, 111, 59, 0.5);
}

.explosion-section__subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}


/* --- CTA Section --- */
.cta-section {
    padding: 150px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section__bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40vw;
    font-family: var(--font-heading);
    font-weight: 900;
    opacity: 0.03;
    pointer-events: none;
}

.cta-section__title {
    font-family: var(--font-heading);
    font-size: clamp(50px, 8vw, 120px);
    line-height: 0.9;
    margin: 20px 0 40px;
}

.cta-section__btn {
    padding: 20px 48px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    margin: 0 10px;
    transition: 0.3s;
}

.cta-section__btn--primary { background: var(--accent); color: #000; }
.cta-section__btn--ghost { border: 1px solid var(--border); color: #fff; }

.cta-section__btn:hover { transform: scale(1.05); }

/* --- Footer --- */
.site-footer {
    padding: 50px 60px 30px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    position: relative;
}

.site-footer__main {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
    margin-bottom: 50px;
}

/* Left Side */
.site-footer__left {
    display: flex;
    flex-direction: column;
    gap: 60px;
    flex-shrink: 0;
    margin-top: 30px;
}

.site-footer__logo { 
    height: 48px;
}

.site-footer__logo img {
    height: 100%;
    width: auto;
}

/* Links Row - Two columns */
.site-footer__links-row {
    display: flex;
    gap: 150px;
}

.site-footer__link-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-footer__link-col a { 
    display: block; 
    color: rgba(255,255,255,0.5); 
    text-decoration: none; 
    font-size: 13px;
    font-weight: 400;
    transition: color 0.3s ease;
    width: fit-content;
}

.site-footer__link-col a:hover { 
    color: #fff;
}

/* Emails Row - Three columns */
.site-footer__emails-row {
    display: flex;
    gap: 60px;
}

.site-footer__email-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-footer__email-item span {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
}

.site-footer__email-item a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.site-footer__email-item a:hover {
    color: #fff;
}

/* Right Side - Big Typography */
.site-footer__right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
}

.site-footer__big-text {
    position: relative;
    display: flex;
    flex-direction: column;
    line-height: 0.95;
    cursor: default;
}

.site-footer__big-text-line {
    font-family: var(--font-heading);
    font-size: 8rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: rgba(255,255,255,0.08);
    text-transform: capitalize;
    position: relative;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

/* Bottom Bar */
.site-footer__bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 25px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer__bottom-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-footer__bottom-left a {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.site-footer__bottom-left a:hover {
    color: #fff;
}

.site-footer__bottom-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-footer__brand-mark {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.6);
}

/* Social Links */
.site-footer__socials {
    display: flex;
    gap: 8px;
}

.site-footer__social-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    transition: all 0.3s ease;
    background: transparent;
}

.site-footer__social-link:hover {
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}

.site-footer__social-link svg {
    display: block;
}

/* Responsive */
@media (max-width: 1200px) {
    .site-footer__big-text-line {
        font-size: 7rem;
    }
}

@media (max-width: 1024px) {
    .site-footer__main {
        flex-direction: column;
        gap: 50px;
    }
    
    .site-footer__right {
        justify-content: flex-start;
        padding-top: 0;
    }
    
    .site-footer__big-text-line {
        font-size: 6rem;
    }
    
    .site-footer__links-row {
        gap: 60px;
    }
    
    .site-footer__emails-row {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 40px 30px 25px;
    }
    
    .site-footer__links-row,
    .site-footer__emails-row {
        flex-direction: column;
        gap: 25px;
    }
    
    .site-footer__big-text-line {
        font-size: 4rem;
    }
    
    .site-footer__bottom {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
}

/* --- Reveal Animations --- */
.reveal-block, .reveal-card {
    opacity: 0;
    transform: translateY(30px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .features__grid { grid-template-columns: repeat(2, 1fr); }
    .typing-section__container { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
    .features__grid { grid-template-columns: 1fr; }
    .hero__title { font-size: 60px; }
    .stats-section__container { flex-direction: column; gap: 50px; }
}

/* --- Glitch Effects --- */
.hero.is-glitching .hero__bg-layer {
    animation: rgbShift 0.3s infinite alternate;
}

.glitch-text {
    position: relative;
    color: white;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 0.3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 0.3s infinite linear alternate-reverse;
}

.hero__overlay.flash {
    animation: flashEffect 0.6s linear;
}

@keyframes flashEffect {
    0% { background: rgba(255, 255, 255, 0); }
    10% { background: rgba(255, 255, 255, 0.8); }
    20% { background: rgba(255, 255, 255, 0); }
    100% { background: rgba(255, 255, 255, 0); }
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 31px, 0); transform: translate(0); }
    20% { clip: rect(65px, 9999px, 15px, 0); transform: translate(-2px, 2px); }
    40% { clip: rect(89px, 9999px, 78px, 0); transform: translate(2px, -2px); }
    60% { clip: rect(18px, 9999px, 45px, 0); transform: translate(-2px, 2px); }
    80% { clip: rect(54px, 9999px, 89px, 0); transform: translate(2px, -2px); }
    100% { clip: rect(2px, 9999px, 66px, 0); transform: translate(0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 100px, 0); transform: translate(0); }
    20% { clip: rect(2px, 9999px, 25px, 0); transform: translate(2px, -2px); }
    40% { clip: rect(44px, 9999px, 66px, 0); transform: translate(-2px, 2px); }
    60% { clip: rect(88px, 9999px, 12px, 0); transform: translate(2px, -2px); }
    80% { clip: rect(15px, 9999px, 55px, 0); transform: translate(-2px, 2px); }
    100% { clip: rect(40px, 9999px, 80px, 0); transform: translate(0); }
}

@keyframes rgbShift {
    0% { filter: drop-shadow(4px 0px 0px red) drop-shadow(-4px 0px 0px blue); }
    50% { filter: drop-shadow(-4px 0px 0px red) drop-shadow(4px 0px 0px blue); }
    100% { filter: drop-shadow(2px 0px 0px red) drop-shadow(-2px 0px 0px blue); }
}

/* --- Features Overview Section --- */
.features-overview {
    position: relative;
    z-index: 2;
    background: #0a0a0a;
    margin-top: -150px; /* Pulls section over the hero for blending */
    padding-top: 150px;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 300px);
    mask-image: linear-gradient(to bottom, transparent, black 300px);
}

.features-overview__bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at right top, rgba(255, 140, 50, 0.03), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.features-overview__container {
    display: flex;
    justify-content: space-between;
    padding: 100px 40px;
    gap: 40px;
    max-width: 1600px;
    margin: 0 auto;
}

.features-overview__left {
    flex: 0 0 35%;
    position: relative;
}

.cube-sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-3d-container {
    width: 100%;
    height: 500px;
    max-width: 500px;
}

.features-overview__right {
    flex: 0 0 65%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.features-header {
    margin-bottom: 80px;
}

.features-tag {
    font-size: 13px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-family: var(--font-body);
}

.features-title {
    font-family: var(--font-heading);
    font-size: clamp(40px, 6vw, 80px);
    margin-top: 15px;
    line-height: 1.1;
    font-weight: 500;
}

.features-cards {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.feature-card {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08); 
    border-radius: 12px;
    padding: 40px 30px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-card--highlight {
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    border-color: rgba(255, 140, 50, 0.2) rgba(255, 255, 255, 0.08) rgba(255, 255, 255, 0.08) rgba(255, 140, 50, 0.2);
}

.feature-card__content h3 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 12px;
}

.feature-card__content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 30px;
    max-width: 100%;
}

.feature-cta {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    color: white;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1px;
    transition: 0.3s;
    text-transform: uppercase;
}

.feature-cta:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Feature Card Abstract Graphics */
.feature-card__graphic {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    opacity: 0.8;
}

.feature-svg-1 {
    opacity: 0.5;
    transform: scale(0.8);
}

.api-window {
    width: 200px;
    height: 100px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.api-window-header {
    height: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 6px;
}

.api-window-header span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.floating-particles {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.floating-particles span {
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

.docs-stack {
    position: relative;
    width: 150px;
    height: 100px;
}

.docs-page {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.docs-page-2 { transform: translate(10px, 10px); z-index: 1; border-color: rgba(255, 255, 255, 0.05); }
.docs-page-3 { transform: translate(20px, 20px); z-index: 0; border-color: rgba(255, 255, 255, 0.02); }

.docs-line {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px;
    border-radius: 2px;
}
.docs-line:nth-child(2) { width: 70%; }
.docs-line:nth-child(3) { width: 50%; }

/* Responsive */
@media (max-width: 1024px) {
    .features-overview__container {
        flex-direction: column;
    }
    .cube-sticky-wrapper {
        height: 60vh;
    }
    .features-overview__right {
        padding-top: 0;
    }
}
