/* ============================================
   QUEEN FORMA — Premium Animated Styles
   Dark theme + Gold accents + Advanced animations
   ============================================ */

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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --bg-card-hover: #1a1a1a;
    --gold: #c9a84c;
    --gold-light: #e0c76a;
    --gold-dark: #a68a3a;
    --gold-glow: rgba(201, 168, 76, 0.15);
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: #222222;
    --border-light: #2a2a2a;
    --white: #ffffff;
    --success: #4ade80;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
    --nav-height: 72px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: none; border: none; background: none; font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
::selection { background: var(--gold); color: var(--bg-primary); }

/* --- Custom Cursor --- */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-elastic), height 0.3s var(--ease-elastic), background 0.3s ease;
    mix-blend-mode: difference;
}

.cursor.active {
    width: 40px;
    height: 40px;
    background: rgba(201, 168, 76, 0.3);
}

.cursor-follower {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99998;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-elastic), height 0.4s var(--ease-elastic), border-color 0.3s ease, opacity 0.3s ease;
}

.cursor-follower.active {
    width: 60px;
    height: 60px;
    border-color: rgba(201, 168, 76, 0.6);
}

/* --- Scroll Progress --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
    z-index: 10001;
    width: 0%;
    transition: none;
    box-shadow: 0 0 10px rgba(201, 168, 76, 0.5);
}

/* --- Loader --- */
#loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.loader-content {
    text-align: center;
}

.loader-logo {
    margin-bottom: 2.5rem;
    animation: loaderReveal 1.5s var(--ease-out) forwards;
}

.loader-logo-svg {
    width: 280px;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 0 30px rgba(201, 168, 76, 0.3));
    animation: loaderGlow 2s ease-in-out infinite;
}

.loader-logo-img {
    width: 280px;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 0 30px rgba(201, 168, 76, 0.3));
    animation: loaderGlow 2s ease-in-out infinite;
}

@keyframes loaderReveal {
    0% { opacity: 0; transform: scale(0.8) translateY(20px); filter: blur(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

@keyframes loaderGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.2)); }
    50% { filter: drop-shadow(0 0 40px rgba(201, 168, 76, 0.5)); }
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
    animation: loaderFill 2s var(--ease-out) forwards;
}

@keyframes loaderFill {
    to { width: 100%; }
}

/* --- Container --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* --- Navigation --- */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease, background 0.4s ease;
}

#header.scrolled {
    border-bottom-color: var(--border);
    background: rgba(10, 10, 10, 0.92);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    display: flex;
    gap: 0;
    position: relative;
}

.logo-queen { color: var(--gold); }
.logo-forma { color: var(--text-primary); }

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.4s var(--ease-out);
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

.nav-cta {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    background: var(--gold);
    color: var(--bg-primary);
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.nav-cta:hover::before { transform: translateX(100%); }
.nav-cta:hover { background: var(--gold-light); }

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.nav-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem 2rem 2rem;
    border-top: 1px solid var(--border);
}

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

.mobile-link {
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    transition: color 0.3s ease;
}

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

.mobile-cta {
    margin-top: 1rem;
    padding: 0.8rem;
    background: var(--gold);
    color: var(--bg-primary);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    border: none;
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: calc(var(--nav-height) + 2rem) 2rem 4rem;
    overflow: hidden;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(201, 168, 76, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 168, 76, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
    animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Animated Orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: orbFloat 20s ease-in-out infinite;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.12), transparent 70%);
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.08), transparent 70%);
    bottom: -5%;
    left: -5%;
    animation-delay: -7s;
    animation-duration: 25s;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.06), transparent 70%);
    top: 40%;
    left: 50%;
    animation-delay: -14s;
    animation-duration: 18s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

/* Hero Spotlight */
.hero-spotlight {
    position: absolute;
    top: -40%;
    left: -10%;
    width: 100%;
    height: 170%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    animation: spotlightReveal 2s ease 2.5s forwards;
}

@keyframes spotlightReveal {
    to { opacity: 1; }
}

/* Hero Split Layout */
.hero-split {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1280px;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    text-align: left;
    position: relative;
    z-index: 2;
}

/* 3D Robot Section */
.hero-3d {
    flex: 1;
    height: 600px;
    position: relative;
    z-index: 2;
}

.hero-3d canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 16px;
}

.hero-3d-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hero-3d-fallback {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 40px rgba(201, 168, 76, 0.2));
}

/* Stats bar */
.hero-stats-bar {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1280px;
    margin-top: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--gold-glow);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gold-light);
    margin-bottom: 2.5rem;
    font-family: var(--font-mono);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4); }
    50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(201, 168, 76, 0); }
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.title-line { display: block; }

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

.title-accent .char,
.title-accent .word {
    color: var(--gold);
    -webkit-text-fill-color: var(--gold);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.4s var(--ease-out);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gold);
    color: var(--bg-primary);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::before { transform: translateX(100%); }

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.35);
}

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

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.1);
}

.btn-large { padding: 1rem 2.5rem; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }

/* --- Hero Stats --- */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.stat { text-align: center; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.stat-suffix {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Hero Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* --- Marquee --- */
.marquee {
    padding: 1.25rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

/* Blur fade edges */
.marquee::before,
.marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-secondary), transparent);
}

.marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-secondary), transparent);
}

.marquee-track {
    display: flex;
    gap: 2rem;
    animation: marquee 30s linear infinite;
    width: max-content;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-track span {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.marquee-dot {
    color: var(--gold) !important;
    font-size: 0.5rem !important;
}

.marquee:hover .marquee-track span:not(.marquee-dot) {
    color: var(--text-secondary);
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* --- Sections --- */
.section { padding: 8rem 0; }

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 4rem;
    line-height: 1.7;
}

.text-gold { color: var(--gold); }
.link-gold { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* --- Section Background Images --- */
.section-bg-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.section-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.07;
    filter: blur(2px) saturate(0.3);
    transition: opacity 1.5s ease, transform 8s ease;
    transform: scale(1.05);
    animation: bgImageDrift 20s ease-in-out infinite alternate;
}

.section-bg-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        var(--bg-primary) 0%,
        transparent 15%,
        transparent 85%,
        var(--bg-primary) 100%
    );
    z-index: 1;
}

/* Brain image - about section */
.section-bg-brain img {
    object-position: center 30%;
    animation-duration: 25s;
}

.section-bg-brain::after {
    background: linear-gradient(
        180deg,
        var(--bg-primary) 0%,
        rgba(10, 10, 10, 0.7) 20%,
        rgba(10, 10, 10, 0.6) 50%,
        rgba(10, 10, 10, 0.7) 80%,
        var(--bg-primary) 100%
    );
}

/* Lab image - formations section */
.section-bg-lab img {
    object-position: center 40%;
    animation-delay: -10s;
}

.section-bg-lab::after {
    background: linear-gradient(
        180deg,
        var(--bg-secondary) 0%,
        rgba(17, 17, 17, 0.75) 20%,
        rgba(17, 17, 17, 0.65) 50%,
        rgba(17, 17, 17, 0.75) 80%,
        var(--bg-secondary) 100%
    );
}

@keyframes bgImageDrift {
    0% { transform: scale(1.05) translate(0, 0); }
    33% { transform: scale(1.08) translate(-8px, 5px); }
    66% { transform: scale(1.06) translate(5px, -3px); }
    100% { transform: scale(1.1) translate(-3px, 8px); }
}

/* Hover reveal - images become slightly more visible on section hover */
.about:hover .section-bg-image img,
.formations:hover .section-bg-image img {
    opacity: 0.12;
    filter: blur(1px) saturate(0.4);
}

/* --- About --- */
.about { background: var(--bg-primary); position: relative; overflow: hidden; }

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.section-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.about-feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.about-feature:hover {
    background: rgba(201, 168, 76, 0.05);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-glow);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: 10px;
    color: var(--gold);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.about-feature:hover .feature-icon {
    background: rgba(201, 168, 76, 0.2);
    border-color: rgba(201, 168, 76, 0.4);
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.15);
}

.about-feature h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.about-feature p { font-size: 0.9rem; color: var(--text-muted); }

/* --- Formations --- */
.formations { background: var(--bg-secondary); position: relative; overflow: hidden; }

.formations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Tilt card wrapper */
.formation-card {
    position: relative;
    border-radius: 16px;
    transition: transform 0.6s var(--ease-out);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-glow {
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: conic-gradient(from var(--card-angle, 0deg), transparent 40%, var(--gold) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.formation-card:hover .card-glow {
    opacity: 1;
    animation: cardGlowSpin 3s linear infinite;
}

@keyframes cardGlowSpin {
    from { --card-angle: 0deg; }
    to { --card-angle: 360deg; }
}

@property --card-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.card-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    height: 100%;
    transition: border-color 0.4s ease;
}

.formation-card:hover .card-inner {
    border-color: rgba(201, 168, 76, 0.3);
}

.card-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.card-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 100px;
    color: var(--gold-light);
    margin-bottom: 1rem;
    width: fit-content;
}

.card-badge-popular {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: -0.01em; }
.card-desc { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.5rem; }

.card-skills {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-skills li {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.card-skills li:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-glow);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.card-price { font-size: 0.85rem; color: var(--success); font-weight: 500; }

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    transition: gap 0.3s ease;
}

.card-link:hover { gap: 0.8rem; }

/* --- Méthode / Timeline --- */
.methode { background: var(--bg-primary); }

.timeline {
    margin-top: 4rem;
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.timeline-progress {
    position: absolute;
    left: 20px;
    top: 0;
    width: 1px;
    height: 0%;
    background: linear-gradient(to bottom, var(--gold), var(--gold-light));
    transition: height 0.1s linear;
    box-shadow: 0 0 8px rgba(201, 168, 76, 0.4);
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.5s var(--ease-out);
}

.timeline-item.active .timeline-marker {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.3);
    background: var(--bg-primary);
}

.timeline-marker span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.5s ease;
}

.timeline-item.active .timeline-marker span { color: var(--gold); }

.timeline-content { padding-left: 1.5rem; }
.timeline-content h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.timeline-content p { font-size: 1rem; color: var(--text-secondary); line-height: 1.8; max-width: 600px; }

/* --- Numbers --- */
.numbers {
    background: var(--bg-secondary);
    padding: 5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.number-card {
    padding: 2rem;
    border-radius: 16px;
    transition: all 0.4s ease;
}

.number-card:hover {
    background: rgba(201, 168, 76, 0.05);
}

.number-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--gold);
    display: inline;
    font-variant-numeric: tabular-nums;
}

.number-suffix {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    display: inline;
}

.number-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* --- Tech Ecosystem --- */
.ecosystem { background: var(--bg-secondary); }

.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}

.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    animation: techFloat 6s ease-in-out infinite;
}

.tech-card:nth-child(2) { animation-delay: -0.5s; }
.tech-card:nth-child(3) { animation-delay: -1s; }
.tech-card:nth-child(4) { animation-delay: -1.5s; }
.tech-card:nth-child(5) { animation-delay: -2s; }
.tech-card:nth-child(6) { animation-delay: -2.5s; }
.tech-card:nth-child(7) { animation-delay: -3s; }
.tech-card:nth-child(8) { animation-delay: -3.5s; }
.tech-card:nth-child(9) { animation-delay: -4s; }
.tech-card:nth-child(10) { animation-delay: -4.5s; }
.tech-card:nth-child(11) { animation-delay: -5s; }
.tech-card:nth-child(12) { animation-delay: -5.5s; }

@keyframes techFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.tech-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(201, 168, 76, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tech-card:hover {
    border-color: rgba(201, 168, 76, 0.4);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(201, 168, 76, 0.1);
    animation-play-state: paused;
}

.tech-card:hover::before { opacity: 1; }

.tech-icon {
    color: var(--text-secondary);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.tech-card:hover .tech-icon {
    color: var(--gold);
    filter: drop-shadow(0 0 10px rgba(201, 168, 76, 0.4));
    transform: scale(1.15);
}

.tech-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.tech-card:hover .tech-name { color: var(--text-primary); }

/* --- Inscription --- */
.inscription { background: var(--bg-primary); }

.inscription-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.inscription-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.info-item:hover { background: rgba(201, 168, 76, 0.05); }
.info-item svg { color: var(--gold); flex-shrink: 0; }

/* Form */
.inscription-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: border-color 0.4s ease;
}

.inscription-form:focus-within {
    border-color: rgba(201, 168, 76, 0.3);
}

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

.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
    transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-group select option { background: var(--bg-card); color: var(--text-primary); }
.form-group textarea { resize: vertical; min-height: 100px; }

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-direction: row;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.form-checkbox label {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0;
}

.form-success {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--success);
    font-size: 0.9rem;
    animation: successSlide 0.5s var(--ease-out);
}

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

.form-success svg { flex-shrink: 0; }

/* --- FAQ --- */
.faq { background: var(--bg-secondary); }

.faq-list {
    max-width: 800px;
    margin-top: 3rem;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease;
}

.faq-item:hover {
    background: rgba(201, 168, 76, 0.02);
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    cursor: pointer;
    list-style: none;
    font-size: 1.05rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { color: var(--gold); }

.faq-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.faq-item[open] .faq-num { color: var(--gold); }

.faq-chevron {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform 0.4s var(--ease-out), color 0.3s ease;
    flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
    color: var(--gold);
}

.faq-answer {
    padding: 0 0 1.5rem 3.5rem;
    animation: faqSlide 0.4s var(--ease-out);
}

@keyframes faqSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.faq-answer p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* --- CTA Contact --- */
.contact { background: var(--bg-primary); }

.cta-block {
    text-align: center;
    padding: 5rem 2rem;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(201, 168, 76, 0.02));
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.cta-orb {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.08), transparent 60%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(40px);
    animation: ctaOrbPulse 4s ease-in-out infinite;
}

@keyframes ctaOrbPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.cta-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    position: relative;
}

.cta-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    position: relative;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* --- Footer --- */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 300px;
    margin-bottom: 1.5rem;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.social-link:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-glow);
    transform: translateY(-2px);
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.footer-col a {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.3rem 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-col a:hover {
    color: var(--gold);
    transform: translateX(4px);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); transition: color 0.3s ease; }
.footer-links a:hover { color: var(--gold); }

/* --- Reveal Animations --- */
.reveal-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Split text - words and chars */
.split-text .word {
    display: inline-block;
    white-space: nowrap;
}

.split-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) rotateX(-40deg);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.split-text.visible .char {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .section-grid,
    .inscription-grid { grid-template-columns: 1fr; gap: 3rem; }
    .formations-grid { grid-template-columns: 1fr; }
    .numbers-grid { grid-template-columns: repeat(2, 1fr); }
    .tech-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    body { cursor: auto; }
    .cursor, .cursor-follower { display: none; }

    .nav-links { display: none; }
    .nav-cta { display: none; }
    .nav-burger { display: flex; }

    .hero { padding-top: calc(var(--nav-height) + 3rem); }
    .hero-split { flex-direction: column; }
    .hero-content { text-align: center; }
    .hero-3d { height: 350px; width: 100%; }
    .hero-title { font-size: clamp(2.25rem, 10vw, 3.5rem); }
    .hero-actions { justify-content: center; }
    .hero-stats { gap: 1.5rem; }
    .stat-divider { display: none; }
    .stat-number { font-size: 2rem; }
    .hero-scroll { display: none; }
    .hero-spotlight { display: none; }

    .section { padding: 5rem 0; }
    .card-inner { padding: 2rem; }

    .timeline { padding-left: 2.5rem; }
    .timeline::before { left: 15px; }
    .timeline-progress { left: 15px; }
    .timeline-marker { left: -2.5rem; width: 32px; height: 32px; }

    .tech-grid { grid-template-columns: repeat(3, 1fr); }
    .tech-card { animation: none; }

    .inscription-form { padding: 1.5rem; }
    .form-row { grid-template-columns: 1fr; }

    .faq-question { font-size: 0.95rem; gap: 1rem; }
    .faq-answer { padding-left: 2.5rem; }

    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }

    .cta-block { padding: 3rem 1.5rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 1.25rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .btn { width: 100%; justify-content: center; }
    .hero-stats { flex-direction: column; gap: 1rem; }
    .number-value { font-size: 2.5rem; }
    .tech-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- CRITICAL: JS fallback — auto-reveal after 4s if JS fails --- */
@keyframes fallbackReveal {
    to { opacity: 1; transform: none; }
}

.reveal-up,
.split-text {
    animation: fallbackReveal 0s var(--ease-out) 4s forwards;
}

/* When JS adds .visible, the animation is overridden by the class */
.reveal-up.visible,
.split-text.visible {
    animation: none;
}

/* Also auto-hide loader after 4s as safety net */
@keyframes loaderAutoHide {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}

#loader {
    animation: loaderAutoHide 0.8s ease 3.5s forwards;
}
