/* ========================================
   FRACTUS HEALTH v2 - Premium Style System
   ======================================== */

:root {
    --bg-deep: #060a14;
    --bg-surface: #0b1120;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.055);
    --border-glass: rgba(255, 255, 255, 0.07);
    --border-glass-hover: rgba(255, 255, 255, 0.14);
    --text-primary: #eef1f6;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --text-tertiary: rgba(255, 255, 255, 0.3);
    --accent: #00f0d4;
    --accent-dim: rgba(0, 240, 212, 0.15);
    --accent-glow: rgba(0, 240, 212, 0.06);
    --purple: #7b61ff;
    --purple-dim: rgba(123, 97, 255, 0.08);
    --font-heading: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* Grain overlay */
.grain {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.028;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   NAVIGATION
   ======================================== */

.nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 24px;
    transition: all 0.5s var(--ease-smooth);
}

.nav.scrolled {
    background: rgba(6, 10, 20, 0.85);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-bottom: 1px solid var(--border-glass);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-mark { width: 32px; height: 32px; }

.logo-text { display: flex; flex-direction: column; line-height: 1; }

.logo-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.2em;
}

.logo-sub {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 8.5px;
    letter-spacing: 0.35em;
    color: var(--accent);
    margin-top: 2px;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.03em;
    transition: color 0.3s;
    position: relative;
}

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

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 32px; height: 24px;
    position: relative;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 100%; height: 1.5px;
    background: var(--text-primary);
    transition: all 0.3s;
    position: absolute;
    left: 0;
}

.nav-toggle span:first-child { top: 6px; }
.nav-toggle span:last-child { bottom: 6px; }
.nav-toggle.active span:first-child { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-toggle.active span:last-child { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ========================================
   HERO
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#heroCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.8;
}

.hero-aurora {
    position: absolute;
    top: -20%; left: -10%;
    width: 120%; height: 80%;
    background:
        radial-gradient(ellipse 60% 50% at 20% 50%, rgba(0, 240, 212, 0.07) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 70% 30%, rgba(123, 97, 255, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 80% 40% at 50% 80%, rgba(0, 240, 212, 0.04) 0%, transparent 60%);
    animation: auroraDrift 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes auroraDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(30px, -20px) rotate(1deg) scale(1.02); }
    66% { transform: translate(-20px, 15px) rotate(-1deg) scale(0.98); }
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-orb-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0, 240, 212, 0.12) 0%, transparent 70%);
    top: 10%; right: 5%;
    filter: blur(80px);
    animation: orbFloat1 10s ease-in-out infinite;
}

.hero-orb-2 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(123, 97, 255, 0.1) 0%, transparent 70%);
    bottom: 15%; left: 5%;
    filter: blur(60px);
    animation: orbFloat2 13s ease-in-out infinite;
}

.hero-orb-3 {
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(0, 240, 212, 0.08) 0%, transparent 70%);
    top: 40%; left: 30%;
    filter: blur(50px);
    animation: orbFloat3 8s ease-in-out infinite;
}

@keyframes orbFloat1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 20px); } }
@keyframes orbFloat2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(25px, -15px); } }
@keyframes orbFloat3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(15px, 25px); } }

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 36px;
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(12px);
}

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

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

.hero-title {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: 28px;
}

.hero-line {
    display: block;
    font-size: clamp(42px, 7vw, 76px);
}

.hero-line-accent {
    background: linear-gradient(135deg, var(--accent) 0%, #5ce0ff 40%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 300;
}

.hero-scroll-cue {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.hero-scroll-cue span {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.scroll-line-wrap {
    width: 1px;
    height: 48px;
    overflow: hidden;
}

.scroll-line {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

/* ========================================
   SECTION SHARED
   ======================================== */

.section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.section-glow {
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    pointer-events: none;
    opacity: 0.5;
}

.section-glow-center {
    background: radial-gradient(circle, rgba(0, 240, 212, 0.04), transparent 70%);
    top: 20%; left: 50%;
    transform: translateX(-50%);
}

.section-glow-left {
    background: radial-gradient(circle, rgba(123, 97, 255, 0.035), transparent 70%);
    top: 10%; left: -10%;
}

.section-header { margin-bottom: 48px; }

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

.section-header-center .section-title,
.section-header-center .section-desc {
    text-align: center;
}

.section-header-center .section-desc {
    margin-left: auto;
    margin-right: auto;
}

.section-label {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(32px, 4.5vw, 48px);
    line-height: 1.15;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.75;
    font-weight: 300;
}

.section-desc-center {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Dividers */
.section-divider {
    display: flex;
    justify-content: center;
    padding: 0 24px;
}

.divider-line {
    width: 100%;
    max-width: 1200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-glass), rgba(0,240,212,0.08), var(--border-glass), transparent);
}

/* ========================================
   OVERVIEW - Glass Cards
   ======================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.glass-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 40px 32px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.5s var(--ease-smooth);
    overflow: hidden;
}

.glass-card-glow {
    position: absolute;
    top: -50%; left: 50%;
    transform: translateX(-50%);
    width: 200%; height: 200%;
    background: radial-gradient(ellipse at center top, rgba(0,240,212,0.03) 0%, transparent 60%);
    pointer-events: none;
    transition: opacity 0.5s;
    opacity: 0.5;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.glass-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-6px);
    background: var(--bg-card-hover);
}

.glass-card:hover .glass-card-glow { opacity: 1; }

/* ICON SIZING - Critical fix */
.card-icon-wrap {
    width: 56px;
    height: 56px;
    margin-bottom: 28px;
    flex-shrink: 0;
}

.card-icon-wrap svg {
    width: 56px;
    height: 56px;
    display: block;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.75;
    font-weight: 300;
}

/* ========================================
   CAPABILITIES - Row Layout
   ======================================== */

.stats-bar {
    display: flex;
    align-items: center;
    gap: 36px;
    padding: 32px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    margin-bottom: 48px;
    backdrop-filter: blur(16px);
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.stats-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,240,212,0.15), transparent);
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-num {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #5ce0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 400;
}

.stat-badge {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

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

.cap-list {
    display: flex;
    flex-direction: column;
}

.cap-row {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--border-glass);
    transition: all 0.4s var(--ease-smooth);
    cursor: default;
}

.cap-row:first-child {
    border-top: 1px solid var(--border-glass);
}

.cap-row:hover {
    padding-left: 16px;
    background: linear-gradient(90deg, rgba(0,240,212,0.02), transparent 60%);
}

.cap-num {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.1em;
    opacity: 0.6;
    min-width: 32px;
    padding-top: 4px;
}

.cap-content { flex: 1; }

.cap-content h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.cap-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 300;
    max-width: 600px;
}

/* ========================================
   NETWORK
   ======================================== */

.network-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.network-highlights {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 28px;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 300;
}

.highlight-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,240,212,0.4);
    flex-shrink: 0;
}

.map-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1.6;
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255,255,255,0.01);
}

.map-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80%; height: 80%;
    background: radial-gradient(ellipse, rgba(0,240,212,0.06) 0%, transparent 70%);
    pointer-events: none;
}

#mapCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ========================================
   LEADERSHIP
   ======================================== */

.leader-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.leader-card {
    position: relative;
    padding: 48px 32px 40px;
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    background: var(--bg-card);
    text-align: center;
    transition: all 0.5s var(--ease-smooth);
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.leader-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.leader-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-4px);
    background: var(--bg-card-hover);
}

/* ICON SIZING - Critical fix */
.leader-icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 28px;
}

.leader-icon-wrap svg {
    width: 64px;
    height: 64px;
    display: block;
}

.leader-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.leader-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.75;
    font-weight: 300;
}

/* ========================================
   CONTACT
   ======================================== */

.contact {
    padding-bottom: 80px;
    position: relative;
}

.contact-glow {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 800px; height: 400px;
    background: radial-gradient(ellipse, rgba(0,240,212,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.contact-inner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-title {
    font-size: clamp(36px, 5vw, 56px);
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 18px 40px;
    background: rgba(0, 240, 212, 0.04);
    border: 1px solid rgba(0, 240, 212, 0.15);
    border-radius: 100px;
    color: var(--accent);
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: all 0.5s var(--ease-smooth);
    position: relative;
    overflow: hidden;
    margin-top: 40px;
}

.contact-btn-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0,240,212,0.06) 0%, transparent 50%);
    pointer-events: none;
    transition: opacity 0.5s;
    opacity: 0;
}

.contact-btn svg {
    width: 20px; height: 20px;
    transition: transform 0.3s var(--ease-out);
}

.contact-btn:hover {
    background: rgba(0, 240, 212, 0.08);
    border-color: rgba(0, 240, 212, 0.3);
    box-shadow: 0 0 60px rgba(0, 240, 212, 0.1), inset 0 0 30px rgba(0,240,212,0.03);
    transform: translateY(-2px);
}

.contact-btn:hover .contact-btn-glow { opacity: 1; }
.contact-btn:hover svg { transform: translateX(4px); }

/* ========================================
   FOOTER
   ======================================== */

.footer {
    border-top: 1px solid var(--border-glass);
    padding: 24px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer span {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 300;
}

/* ========================================
   ANIMATIONS (GSAP targets)
   ======================================== */

.anim-in {
    opacity: 0;
    transform: translateY(30px);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .network-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0; right: 0;
        width: 280px; height: 100vh;
        background: rgba(6, 10, 20, 0.95);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        padding: 100px 36px 36px;
        gap: 28px;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-out);
        border-left: 1px solid var(--border-glass);
    }

    .nav-links.open { transform: translateX(0); }
    .nav-links a { font-size: 16px; }
    .nav-toggle { display: block; }

    .section { padding: 80px 0; }

    .card-grid,
    .leader-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 24px;
    }

    .stat-divider { width: 100%; height: 1px; }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .cap-row { flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
    .hero-line { font-size: 34px; }
    .section-title { font-size: 28px; }
    .glass-card, .leader-card { padding: 28px 24px; }
}
