/* =========================================
   QUANTUM AI REAL ESTATE INSTITUTE
   styles.css
   ========================================= */

/* ---------- 00. RESET & BASE ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Surface System */
    --surface-900: #0a0e12;   /* Deepest charcoal */
    --surface-800: #101419;   /* Primary base */
    --surface-700: #151b21;
    --surface-600: #1c242c;
    --surface-500: #232e37;
    --surface-400: #2d3b47;

    /* Text System */
    --text-100: #ffffff;
    --text-200: #d4dbe0;
    --text-300: #9fb0bd;
    --text-400: #6b7f8e;

    /* Accent System */
    --accent-emerald: #00dca0;
    --accent-cyan: #00e0ff;
    --accent-emerald-dim: #00a676;
    --accent-cyan-dim: #00aabe;

    /* Glass System */
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-bg: rgba(16, 20, 25, 0.82);
    --glass-bg-light: rgba(255, 255, 255, 0.03);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Glow System */
    --glow-emerald: 0 0 50px rgba(0, 220, 160, 0.12);
    --glow-cyan: 0 0 50px rgba(0, 224, 255, 0.12);

    /* Typography */
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;

    /* Motion */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Spacing */
    --container-max: 1280px;
    --container-pad: 24px;
}

html {
    scroll-behavior: smooth;
    background: var(--surface-900);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-200);
    background: var(--surface-900);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page-ready {
    overflow-y: auto;
}

::selection {
    background: rgba(0, 220, 160, 0.25);
    color: var(--text-100);
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ---------- 01. ACCESSIBILITY ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- 02. LAYOUT ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

.section {
    position: relative;
    padding: 120px 0;
    overflow-x: hidden;
}

.section-container {
    position: relative;
    z-index: 1;
}

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

.max-w-xl {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

/* ---------- 03. SCROLL PROGRESS ---------- */
.scaffold-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
}

.scaffold-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--scroll-pct, 0%);
    background: var(--accent-emerald);
    box-shadow: 0 0 15px var(--accent-emerald);
    transition: width 0.1s linear;
}

/* ---------- 04. AMBIENT EFFECTS ---------- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

.ambient-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ambient-lines > div {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(0, 220, 160, 0.03) 20%,
        rgba(0, 224, 255, 0.03) 50%,
        rgba(0, 220, 160, 0.03) 80%,
        transparent 100%);
    animation: lineDrift 15s ease-in-out infinite alternate;
}

.ambient-lines > div:nth-child(1) { left: 10%; animation-delay: 0s; }
.ambient-lines > div:nth-child(2) { left: 22%; animation-delay: 2s; }
.ambient-lines > div:nth-child(3) { left: 35%; animation-delay: 4s; }
.ambient-lines > div:nth-child(4) { left: 48%; animation-delay: 1s; }
.ambient-lines > div:nth-child(5) { left: 60%; animation-delay: 3s; }
.ambient-lines > div:nth-child(6) { left: 73%; animation-delay: 5s; }
.ambient-lines > div:nth-child(7) { left: 85%; animation-delay: 1.5s; }
.ambient-lines > div:nth-child(8) { left: 95%; animation-delay: 3.5s; }
.ambient-lines > div:nth-child(9) { left: 5%; animation-delay: 6s; }
.ambient-lines > div:nth-child(10) { left: 92%; animation-delay: 0.5s; }

@keyframes lineDrift {
    0% { transform: translateY(0); opacity: 0.4; }
    100% { transform: translateY(30px); opacity: 0.8; }
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    opacity: 0.15;
    z-index: 0;
}

.ambient-glow-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-emerald);
    top: -100px;
    right: -100px;
    animation: glowPulse 8s ease-in-out infinite alternate;
}

.ambient-glow-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-cyan);
    bottom: -100px;
    left: -100px;
    animation: glowPulse 10s ease-in-out infinite alternate-reverse;
}

@keyframes glowPulse {
    0% { opacity: 0.12; transform: scale(1); }
    100% { opacity: 0.2; transform: scale(1.15); }
}

/* ---------- 05. NAVIGATION ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    transition:
        background 0.4s var(--ease-out-quart),
        backdrop-filter 0.4s var(--ease-out-quart),
        box-shadow 0.4s var(--ease-out-quart),
        padding 0.4s var(--ease-out-quart);
}

.nav.stuck {
    background: rgba(10, 14, 18, 0.92);
    backdrop-filter: blur(30px) saturate(1.5);
    -webkit-backdrop-filter: blur(30px) saturate(1.5);
    box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 25px 50px rgba(0,0,0,0.3);
    padding: 14px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    display: flex;
    color: var(--accent-emerald);
    filter: drop-shadow(0 0 10px rgba(0, 220, 160, 0.3));
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-quantum {
    color: var(--text-100);
}

.logo-ai {
    color: var(--accent-emerald);
}

.logo-estate {
    color: var(--text-400);
    font-weight: 400;
    font-size: 0.8em;
    opacity: 0;
    max-width: 0;
    transition: opacity 0.3s, max-width 0.3s ease-out;
    white-space: nowrap;
    overflow: hidden;
}

.nav.stuck .logo-estate {
    opacity: 1;
    max-width: 100px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-300);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    padding: 4px 0;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-emerald);
    transition: width 0.3s var(--ease-out-quart);
}

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

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 10;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-100);
    transition: transform 0.3s var(--ease-out-quart), opacity 0.3s;
    transform-origin: center;
}

/* ---------- 06. BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 10px;
    transition: all 0.3s var(--ease-out-quart);
    position: relative;
    overflow: hidden;
}

.btn svg {
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-out-quart);
}

.btn:hover svg {
    transform: translateX(3px);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-emerald);
    color: var(--surface-900);
    box-shadow: 0 0 0 1px rgba(0, 220, 160, 0.2), 0 4px 20px rgba(0, 220, 160, 0.2);
}

.btn-primary:hover {
    background: #00f0ac;
    box-shadow: 0 0 0 1px rgba(0, 220, 160, 0.3), 0 8px 30px rgba(0, 220, 160, 0.3);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-200);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-100);
}

/* ---------- 07. HERO SECTION ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 160px var(--container-pad) 80px;
    overflow: hidden;
    --scan-line: transparent;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 20% 30%, rgba(0, 220, 160, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 70%, rgba(0, 224, 255, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 100% 60% at 50% 100%, rgba(0, 220, 160, 0.03) 0%, transparent 50%);
    z-index: 0;
    animation: heroBgDrift 20s ease-in-out infinite alternate;
}

@keyframes heroBgDrift {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.hero-dashboard {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 24px;
    padding: 140px var(--container-pad) 40px;
    pointer-events: none;
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
}

.dashboard-panel {
    background: rgba(16, 20, 25, 0.55);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.panel-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-400);
    letter-spacing: 0.15em;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
    padding-top: 20px;
}

.bar-chart .bar {
    flex: 1;
    height: var(--h);
    background: rgba(0, 220, 160, 0.15);
    border: 1px solid rgba(0, 220, 160, 0.2);
    border-radius: 3px 3px 0 0;
    position: relative;
    animation: barGrow 2s var(--ease-out-expo) forwards;
    animation-delay: var(--d);
    transform-origin: bottom;
}

@keyframes barGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.bar-val {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--accent-emerald);
    opacity: 0;
    animation: barValIn 0.5s ease forwards;
    animation-delay: calc(var(--d) + 1.5s);
}

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

.bar-chart .bar:nth-child(4),
.bar-chart .bar:nth-child(6) {
    background: rgba(0, 220, 160, 0.35);
}

.panel-center {
    align-items: center;
    justify-content: center;
    position: relative;
}

.scanner-line {
    position: absolute;
    top: 10%;
    left: 15%;
    right: 15%;
    height: 1px;
    background: var(--accent-emerald);
    box-shadow: 0 0 12px var(--accent-emerald);
    animation: scan 4s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes scan {
    0%, 100% { top: 10%; opacity: 0.3; }
    50% { top: 85%; opacity: 0.7; }
}

.hud-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 1px solid rgba(0, 220, 160, 0.15);
    position: relative;
    animation: ringRotate 20s linear infinite;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hud-ring::before,
.hud-ring::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 224, 255, 0.1);
}

.hud-ring::before {
    inset: 20px;
}

.hud-ring::after {
    inset: 50px;
    border-color: rgba(0, 220, 160, 0.2);
    border-top-color: transparent;
    animation: ringRotate 10s linear infinite reverse;
}

.hud-ring-inner {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 220, 160, 0.2);
    animation: ringRotate 15s linear infinite reverse;
}

.hex-grid {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0.2;
}

.hex-row {
    display: flex;
    gap: 4px;
}

.hex {
    width: 20px;
    height: 23px;
    border: 1px solid rgba(0, 220, 160, 0.2);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hex.active {
    background: rgba(0, 220, 160, 0.1);
    border-color: var(--accent-emerald);
    box-shadow: 0 0 8px rgba(0, 220, 160, 0.15);
    animation: hexFlash 3s ease-in-out infinite;
}

@keyframes hexFlash {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes hexFlash {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.scan-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--accent-emerald);
    letter-spacing: 0.2em;
    margin-top: 16px;
}

.scan-status {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-400);
    margin-top: 4px;
}

.wave-chart {
    height: 60px;
    position: relative;
}

.wave-line {
    width: 100%;
    height: 100%;
}

.wave-line path {
    stroke: var(--accent-cyan);
    stroke-width: 1.5;
    opacity: 0.5;
    animation: waveDraw 3s ease-in-out infinite alternate;
}

@keyframes waveDraw {
    0% { d: path('M0,45 Q20,35 40,40 T80,30 T120,35 T160,20 T200,25'); }
    50% { d: path('M0,35 Q20,45 40,30 T80,40 T120,25 T160,35 T200,20'); }
    100% { d: path('M0,40 Q20,25 40,35 T80,20 T120,40 T160,30 T200,35'); }
}

.stat-badges {
    display: flex;
    gap: 8px;
}

.badge {
    background: rgba(0, 224, 255, 0.05);
    border: 1px solid rgba(0, 224, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
}

.badge-val {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-cyan);
}

.badge-label {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-400);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 220, 160, 0.06);
    border: 1px solid rgba(0, 220, 160, 0.1);
    border-radius: 100px;
    padding: 8px 20px;
    margin-bottom: 32px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-300);
    letter-spacing: 0.06em;
}

.tag-date {
    color: var(--accent-emerald);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6.5vw, 5.2rem);
    font-weight: 700;
    line-height: 1.05;
    color: var(--text-100);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.title-line {
    display: block;
}

.title-accent {
    background: var(--accent-emerald);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--accent-emerald);
    position: relative;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-300);
    max-width: 540px;
    margin: 0 auto 36px;
    line-height: 1.8;
    font-weight: 300;
}

.hero-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---------- 08. ABOUT SECTION ---------- */
.about {
    background: var(--surface-800);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 30% 50%, rgba(0, 224, 255, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 70% 80%, rgba(0, 220, 160, 0.03) 0%, transparent 50%);
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-emerald);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.section-tag.center {
    justify-content: center;
}

.section-tag svg {
    color: var(--accent-emerald);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-100);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.text-gradient {
    background: var(--accent-emerald);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--accent-emerald);
}

.section-desc {
    color: var(--text-300);
    max-width: 520px;
    margin-bottom: 20px;
    font-weight: 300;
    line-height: 1.8;
}

.about-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s var(--ease-out-quart);
}

.about-card:hover {
    transform: perspective(1000px) rotateX(-2deg) rotateY(2deg) translateY(-4px);
}

.about-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-400);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 12px var(--accent-emerald);
    animation: dotPulse 3s ease-in-out infinite;
}

.dot.online {
    background: #00e676;
    box-shadow: 0 0 12px #00e676;
}

.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 80px;
    margin-bottom: 24px;
    padding-top: 10px;
}

.mini-bar {
    flex: 1;
    height: var(--h);
    background: rgba(0, 220, 160, 0.2);
    border-radius: 2px 2px 0 0;
    animation: barGrow 2s var(--ease-out-expo) forwards;
    animation-delay: calc(var(--h) * 0.02s);
    transform-origin: bottom;
}

.mini-bar:nth-child(3n) {
    background: rgba(0, 224, 255, 0.25);
}

.about-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.metric-val {
    display: block;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-emerald);
    margin-bottom: 2px;
}

.metric-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-400);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-floater {
    position: absolute;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-300);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    animation: floaterBob 5s ease-in-out infinite;
    box-shadow: var(--glass-shadow);
}

.floater-icon {
    color: var(--accent-cyan);
}

.floater-1 {
    top: -20px;
    right: -20px;
    animation-delay: 0s;
}

.floater-2 {
    bottom: -16px;
    left: -16px;
    animation-delay: 1s;
}

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

/* ---------- 09. STATS BAR ---------- */
.stats-bar {
    padding: 60px 0;
    position: relative;
    background: var(--surface-900);
}

.stats-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 220, 160, 0.08);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.stat-item {
    text-align: center;
    position: relative;
}

.stat-num-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.stat-num {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--text-100);
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-emerald);
}

.stat-caption {
    display: block;
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ---------- 10. PROGRAMS SECTION ---------- */
.programs {
    background: var(--surface-800);
    position: relative;
}

.programs::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 80% 20%, rgba(0, 220, 160, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 20% 80%, rgba(0, 224, 255, 0.03) 0%, transparent 50%);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.program-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: transform 0.5s var(--ease-out-quart), box-shadow 0.5s var(--ease-out-quart);
    transform-style: preserve-3d;
}

.program-card:hover,
.program-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.card-perspective {
    position: relative;
    z-index: 1;
}

.card-bg-accent {
    position: absolute;
    top: -60%;
    right: -40%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 0;
}

.program-card:hover .card-bg-accent {
    opacity: 0.2;
}

.program-accent-1 { background: var(--accent-emerald); }
.program-accent-2 { background: var(--accent-cyan); }
.program-accent-3 { background: var(--accent-emerald); }
.program-accent-4 { background: var(--accent-cyan); }

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: rgba(0, 220, 160, 0.06);
    border: 1px solid rgba(0, 220, 160, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-emerald);
    margin-bottom: 24px;
    position: relative;
    transition: transform 0.4s var(--ease-spring);
}

.program-card:nth-child(2) .card-icon,
.program-card:nth-child(4) .card-icon {
    color: var(--accent-cyan);
    background: rgba(0, 224, 255, 0.06);
    border-color: rgba(0, 224, 255, 0.08);
}

.program-card:hover .card-icon {
    transform: scale(1.08) rotate(-3deg);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-100);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.card-desc {
    color: var(--text-300);
    font-size: 0.92rem;
    line-height: 1.75;
    margin-bottom: 24px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-emerald);
    letter-spacing: 0.04em;
    transition: gap 0.3s;
}

.card-link:hover {
    gap: 14px;
}

/* ---------- 11. PROPERTY LAB ---------- */
.lab {
    background: var(--surface-900);
    position: relative;
}

.lab::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0, 224, 255, 0.02) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 10% 100%, rgba(0, 220, 160, 0.02) 0%, transparent 50%);
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.lab-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.5s var(--ease-out-quart), box-shadow 0.5s var(--ease-out-quart);
    position: relative;
}

.lab-card:hover,
.lab-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.lab-card-media-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.lab-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out-quart), filter 0.5s;
    filter: saturate(0.85) contrast(1.05);
}

.lab-card:hover .lab-card-img {
    transform: scale(1.08);
    filter: saturate(1) contrast(1.1);
}

.lab-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 18, 0.55);
    display: flex;
    align-items: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.4s;
}

.lab-card:hover .lab-card-overlay {
    opacity: 1;
}

.lab-tech-grid {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.lab-tech {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 5px 10px;
    border-radius: 6px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.neural { background: rgba(0, 220, 160, 0.15); color: var(--accent-emerald); border: 1px solid rgba(0, 220, 160, 0.2); }
.nlp { background: rgba(0, 224, 255, 0.12); color: var(--accent-cyan); border: 1px solid rgba(0, 224, 255, 0.15); }
.iot { background: rgba(0, 220, 160, 0.15); color: var(--accent-emerald); border: 1px solid rgba(0, 220, 160, 0.2); }
.energy { background: rgba(255, 170, 0, 0.12); color: #ffaa00; border: 1px solid rgba(255, 170, 0, 0.2); }
.geo { background: rgba(0, 224, 255, 0.12); color: var(--accent-cyan); border: 1px solid rgba(0, 224, 255, 0.15); }
.satellite { background: rgba(0, 220, 160, 0.15); color: var(--accent-emerald); border: 1px solid rgba(0, 220, 160, 0.2); }

.lab-card-body {
    padding: 24px;
    position: relative;
}

.lab-num {
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.03);
    line-height: 1;
    pointer-events: none;
}

.lab-card-body h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-100);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.lab-card-body p {
    font-size: 0.88rem;
    color: var(--text-300);
    line-height: 1.7;
    margin-bottom: 16px;
}

.lab-meta {
    display: flex;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-400);
    letter-spacing: 0.06em;
    align-items: center;
}

.meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-emerald);
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
}

/* ---------- 12. CONTACT SECTION ---------- */
.contact {
    background: var(--surface-800);
    position: relative;
    padding: 140px 0;
}

.contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 60% at 50% 0%, rgba(0, 220, 160, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 100%, rgba(0, 224, 255, 0.03) 0%, transparent 50%);
}

.contact-bg-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.radar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    border: 1px solid rgba(0, 220, 160, var(--a));
    transform: translate(-50%,-50%);
    animation: radarPulse 6s ease-in-out infinite;
    animation-delay: var(--d);
}

@keyframes radarPulse {
    0%, 100% { opacity: 0.1; transform: translate(-50%,-50%) scale(0.95); }
    50% { opacity: 0.4; transform: translate(-50%,-50%) scale(1.05); }
}

.orbit-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 1px;
    background: rgba(255,255,255,0.03);
    transform: translate(-50%,-50%) rotate(var(--angle));
    animation: orbitSpin var(--dr) linear infinite;
}

@keyframes orbitSpin {
    from { transform: translate(-50%,-50%) rotate(var(--angle)); }
    to { transform: translate(-50%,-50%) rotate(calc(var(--angle) + 180deg)); }
}

.data-packet {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 6px var(--accent-emerald);
    animation: dataPacket var(--dr) ease-in-out infinite;
}

@keyframes dataPacket {
    0%, 100% { opacity: 0; transform: translateY(0) scale(1); }
    30% { opacity: 1; transform: translateY(-15px) scale(1.5); }
    70% { opacity: 0.3; transform: translateY(-30px) scale(1); }
}

.contact-grid {
    max-width: 1000px;
    margin: 56px auto 0;
}

.contact-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(30px) saturate(1.2);
    -webkit-backdrop-filter: blur(30px) saturate(1.2);
    box-shadow: var(--glass-shadow);
}

.contact-card-inner {
    display: grid;
    grid-template-columns: 360px 1fr;
}

.contact-side {
    padding: 40px;
}

.contact-info-side {
    background: rgba(255,255,255,0.02);
    border-right: 1px solid rgba(255,255,255,0.04);
    display: flex;
    flex-direction: column;
}

.contact-form-side {
    display: flex;
    flex-direction: column;
}

.contact-subtitle {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-100);
    margin-bottom: 32px;
    letter-spacing: -0.01em;
}

.contact-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.contact-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.contact-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 220, 160, 0.06);
    border: 1px solid rgba(0, 220, 160, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-emerald);
    margin-top: 2px;
}

.contact-link {
    font-size: 0.9rem;
    color: var(--text-200);
    line-height: 1.6;
    transition: color 0.3s;
}

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

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-400);
    transition: all 0.3s;
}

.social-link:hover {
    background: rgba(0, 220, 160, 0.08);
    border-color: rgba(0, 220, 160, 0.15);
    color: var(--accent-emerald);
    transform: translateY(-2px);
}

/* ---------- 13. FORM ---------- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-fieldset {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-400);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: var(--text-100);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent-emerald);
}

.field-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-emerald);
    transition: width 0.4s var(--ease-out-expo);
}

.form-group input:focus ~ .field-line,
.form-group textarea:focus ~ .field-line {
    width: 100%;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    appearance: none;
    cursor: pointer;
    padding-right: 32px;
}

.select-arrow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-400);
    pointer-events: none;
    transition: transform 0.3s;
}

.select-wrapper select:focus + .select-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: var(--accent-emerald);
}

.field-error {
    display: block;
    font-size: 0.7rem;
    color: #ff6b6b;
    margin-top: 6px;
    min-height: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.field-error.visible {
    opacity: 1;
}

.btn-submit {
    position: relative;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    overflow: hidden;
}

.btn-spinner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(10, 14, 18, 0.2);
    border-top-color: var(--surface-900);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    pointer-events: none;
}

.btn-text {
    transition: opacity 0.3s, transform 0.3s;
}

.btn-success {
    position: absolute;
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
    transition: opacity 0.3s, transform 0.3s var(--ease-spring);
}

form.submitting .btn-text {
    opacity: 0;
    transform: translateY(-8px);
}

form.submitting .btn-spinner {
    opacity: 1;
}

form.success .btn-text,
form.success .btn-spinner {
    opacity: 0;
}

form.success .btn-success {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

form.success .btn-primary {
    background: #00a676;
}

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

.form-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-400);
    margin-top: 8px;
}

/* ---------- 14. FOOTER ---------- */
.footer {
    background: var(--surface-900);
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 72px 0 32px;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 48px;
    margin-bottom: 56px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-100);
    margin-bottom: 16px;
}

.footer-logo-icon {
    color: var(--accent-emerald);
}

.footer-desc {
    font-size: 0.88rem;
    color: var(--text-400);
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 320px;
}

.footer-socials {
    display: flex;
    gap: 8px;
}

.footer-heading {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-100);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-400);
    font-size: 0.85rem;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-emerald);
    transform: translateX(3px);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.footer-copyright {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-400);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-legal a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-400);
    transition: color 0.3s;
}

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

.legal-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-500);
}

/* ---------- 15. REVEAL ANIMATIONS ---------- */
.reveal-fade,
.reveal-slide-up,
.reveal-slide-in,
.reveal-scale,
.reveal-card {
    opacity: 0;
    will-change: opacity, transform;
}

.reveal-fade {
    transform: translateY(10px);
    transition: opacity 0.7s var(--ease-out-quart), transform 0.7s var(--ease-out-quart);
}

.reveal-slide-up {
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-quart), transform 0.8s var(--ease-out-quart);
}

.reveal-slide-in {
    transform: translateX(-30px);
    transition: opacity 0.6s var(--ease-out-quart), transform 0.6s var(--ease-out-quart);
}

.reveal-slide-in.center {
    transform: translateX(0) scale(0.9);
}

.reveal-scale {
    transform: scale(0.92);
    transition: opacity 0.7s var(--ease-out-quart), transform 0.7s var(--ease-out-quart);
}

.reveal-card {
    transform: translateY(30px) rotateX(5deg);
    transform-origin: center bottom;
    transition: opacity 0.8s var(--ease-out-quart), transform 0.8s var(--ease-out-quart), box-shadow 0.5s;
}

.revealed {
    opacity: 1;
    transform: none;
}

.delay-1 { transition-delay: 0.12s !important; }
.delay-2 { transition-delay: 0.24s !important; }
.delay-3 { transition-delay: 0.36s !important; }
.delay-4 { transition-delay: 0.48s !important; }

/* ---------- 16. RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .contact-card-inner {
        grid-template-columns: 1fr;
    }
    .contact-info-side {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }
}

@media (max-width: 768px) {
    :root {
        --container-pad: 20px;
    }

    .section {
        padding: 72px 0;
    }

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

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10,14,18,0.98);
        backdrop-filter: blur(40px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-out-expo);
    }

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

    .nav-link {
        font-size: 0.85rem;
    }

    .btn-sm {
        margin-top: 8px;
    }

    .hamburger-open .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger-open .hamburger-line:nth-child(2) {
        opacity: 0;
        transform: scaleX(0.3);
    }
    .hamburger-open .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .hero-dashboard {
        grid-template-columns: 1fr;
        padding-top: 100px;
        opacity: 0.6;
    }

    .dashboard-panel.panel-left,
    .dashboard-panel.panel-right {
        display: none;
    }

    .hero-title {
        font-size: clamp(2.2rem, 8vw, 3.5rem);
    }

    .hero-desc {
        font-size: 1rem;
    }

    .split-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .programs-grid {
        grid-template-columns: 1fr;
    }

    .lab-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .btn-lg {
        padding: 14px 28px;
        font-size: 0.9rem;
    }

    .contact-card-inner {
        grid-template-columns: 1fr;
    }

    .form-fieldset {
        grid-template-columns: 1fr;
    }
}

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

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .about-floater {
        display: none;
    }

    .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta-group .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .lab-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .programs-grid {
        grid-template-columns: 1fr;
    }
}