/* ========================================
   AGH Analytica – Styles
   ======================================== */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #8585a0;
    --accent-1: #00d4aa;
    --accent-2: #7c3aed;
    --accent-3: #3b82f6;
    --gradient-main: linear-gradient(135deg, #00d4aa, #7c3aed, #3b82f6);
    --gradient-text: linear-gradient(135deg, #00d4aa 0%, #7c3aed 50%, #3b82f6 100%);
    --gradient-card: linear-gradient(135deg, rgba(0,212,170,0.08), rgba(124,58,237,0.08));
    --border-color: rgba(255,255,255,0.06);
    --border-glow: rgba(0,212,170,0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 40px rgba(0,212,170,0.15);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --nav-height: 72px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-1);
    text-decoration: none;
    transition: color 0.3s;
}
a:hover { color: #33e0be; }
a:focus-visible {
    outline: 2px solid var(--accent-1);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--accent-1);
    color: #000;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    z-index: 10000;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 12px;
    outline: 3px solid #fff;
    outline-offset: 2px;
    color: #000;
}

img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.accent { color: var(--accent-1); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-main);
}

.btn:focus-visible {
    outline: 2px solid var(--accent-1);
    outline-offset: 3px;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,212,170,0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,212,170,0.4);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
}
.btn-outline:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(0,212,170,0.05);
}

.btn-full { width: 100%; justify-content: center; }

/* ---- Navbar ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: all 0.4s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10,10,15,0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}
.nav-logo:hover { color: var(--text-primary); }

.logo-img {
    height: 40px;
    width: auto;
    filter: invert(1) brightness(1.1);
    transition: filter 0.3s, opacity 0.3s;
}

.nav-logo:hover .logo-img {
    opacity: 0.85;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav-cta {
    padding: 10px 24px;
    background: var(--gradient-main);
    color: #fff !important;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,212,170,0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle:focus-visible {
    outline: 2px solid var(--accent-1);
    outline-offset: 3px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

#hexCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0,212,170,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(124,58,237,0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(59,130,246,0.06) 0%, transparent 50%);
    z-index: 1;
    animation: heroGlow 15s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-5%, -5%) scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-tech-stack {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.tech-tag {
    padding: 6px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: all 0.3s;
}
.tech-tag:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(0,212,170,0.05);
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: fadeInUp 0.8s ease 0.5s both;
}

.hero-scroll a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.scroll-dot {
    width: 4px;
    height: 8px;
    background: var(--accent-1);
    border-radius: 4px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(12px); opacity: 0.3; }
}

/* ---- Sections ---- */
.section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-label {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0,212,170,0.1);
    border: 1px solid rgba(0,212,170,0.2);
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-1);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 16px auto 0;
}

/* ---- About ---- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-main);
    opacity: 0;
    transition: opacity 0.4s;
}

.about-card:hover {
    border-color: rgba(0,212,170,0.2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}
.about-card:hover::before { opacity: 1; }

.about-card--main {
    grid-column: 1 / -1;
    background: var(--gradient-card);
    border-color: rgba(0,212,170,0.15);
}

.about-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,212,170,0.1);
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    color: var(--accent-1);
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---- Projects ---- */
.projects {
    background: var(--bg-secondary);
}

.projects-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: rgba(124,58,237,0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(124,58,237,0.1);
}

.project-card--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0,212,170,0.05), rgba(124,58,237,0.05));
    border-color: rgba(0,212,170,0.15);
}

.project-card--featured:hover {
    border-color: rgba(0,212,170,0.35);
    box-shadow: 0 8px 40px rgba(0,212,170,0.1);
}

.project-card-visual {
    position: relative;
    min-height: 350px;
    background: #0d1f2d;
    overflow: hidden;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.map-real-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    filter: saturate(0.3) brightness(0.45) hue-rotate(120deg);
}

.map-overlay-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(13,31,45,0.6) 0%, transparent 30%, transparent 70%, rgba(26,26,62,0.7) 100%),
        linear-gradient(90deg, rgba(13,31,45,0.4) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
}

.map-search-bar { z-index: 2; }
.map-results-panel { z-index: 2; }
.map-pins { z-index: 2; }
.map-scan-line { z-index: 2; }

.map-search-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.map-search-bar i {
    color: var(--accent-1);
}

.typing-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    white-space: nowrap;
    color: var(--accent-1);
}

.search-cursor {
    color: var(--accent-1);
    animation: blink 0.7s step-end infinite;
    font-weight: 300;
}

@keyframes blink {
    50% { color: transparent; }
}

/* Map results panel */
.map-results-panel {
    position: absolute;
    bottom: 16px;
    left: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.map-result {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(10,10,15,0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,212,170,0.15);
    border-radius: 6px;
    padding: 8px 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.4s ease;
}

.map-result.show {
    opacity: 1;
    transform: translateY(0);
}

.result-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-1);
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(0,212,170,0.5);
}

.result-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    flex: 1;
}

.result-score {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-1);
}

/* Map scan line */
.map-scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,212,170,0.6), transparent);
    box-shadow: 0 0 15px rgba(0,212,170,0.3);
    opacity: 0;
    animation: scanLine 8s ease-in-out infinite;
}

@keyframes scanLine {
    0%, 40% { top: 20%; opacity: 0; }
    45% { opacity: 1; }
    55% { top: 80%; opacity: 1; }
    60%, 100% { top: 80%; opacity: 0; }
}

.map-pin {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--accent-1);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg) scale(0);
    box-shadow: 0 0 12px rgba(0,212,170,0.5);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.map-pin.show {
    transform: rotate(-45deg) scale(1);
    opacity: 1;
}

.map-pin:nth-child(2) { transition-delay: 0.2s; }
.map-pin:nth-child(3) { transition-delay: 0.4s; }

.project-card-content {
    padding: 40px 40px 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-badge {
    display: inline-block;
    width: fit-content;
    padding: 6px 14px;
    background: rgba(0,212,170,0.1);
    border: 1px solid rgba(0,212,170,0.2);
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-1);
    margin-bottom: 16px;
}

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.project-card--featured h3 { font-size: 1.8rem; }

.project-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.project-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124,58,237,0.1);
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    color: var(--accent-2);
}

.project-links-mini {
    display: flex;
    gap: 8px;
}

.project-links-mini a {
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 6px;
    transition: color 0.3s;
}
.project-links-mini a:hover { color: var(--text-primary); }

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-tech span {
    padding: 4px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---- Analytica Investments card ---- */
.project-card--investments {
    border-color: rgba(124,58,237,0.15);
    background: linear-gradient(135deg, rgba(124,58,237,0.05), rgba(59,130,246,0.05));
}
.project-card--investments:hover {
    border-color: rgba(124,58,237,0.35);
    box-shadow: 0 8px 40px rgba(124,58,237,0.1);
}

.project-badge--inv {
    background: rgba(124,58,237,0.1);
    border-color: rgba(124,58,237,0.2);
    color: var(--accent-2);
}

.project-card-visual--stock {
    background: #080c18;
}

.stock-chart-mockup {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    z-index: 2;
}

.stock-ticker {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.ticker-symbol {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ticker-price {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ticker-change {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.ticker-change.positive { color: #00d4aa; background: rgba(0,212,170,0.12); }
.ticker-change.negative { color: #ff4d6a; background: rgba(255,77,106,0.12); }

.stock-indicators {
    display: flex;
    gap: 6px;
}

.indicator {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.indicator--buy { background: rgba(0,212,170,0.15); color: #00d4aa; border: 1px solid rgba(0,212,170,0.25); }
.indicator--ai { background: rgba(124,58,237,0.15); color: #a78bfa; border: 1px solid rgba(124,58,237,0.25); animation: aiPulse 2s ease-in-out infinite; }

@keyframes aiPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.stock-canvas-wrap {
    flex: 1;
    position: relative;
    min-height: 200px;
}

.stock-canvas-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.stock-bottom-bar {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    z-index: 2;
}

.stock-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.metric-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.metric-value.positive { color: #00d4aa; }

.project-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-1);
}
.project-link:hover { color: #33e0be; }

/* ---- Stats ---- */
.stats {
    padding: 80px 0;
    background:
        linear-gradient(135deg, rgba(0,212,170,0.04), rgba(124,58,237,0.04));
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-mockup-notice {
    text-align: center;
    padding: 10px 20px;
    margin-bottom: 32px;
    background: rgba(255, 193, 7, 0.08);
    border: 1px dashed rgba(255, 193, 7, 0.3);
    border-radius: var(--radius-sm);
    color: #ffc107;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}



/* ---- Join ---- */
.join {
    background: var(--bg-secondary);
}

.join-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.join-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.join-perks {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.perk {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.perk i {
    color: var(--accent-1);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.join-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.join-cta-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.join-cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-main);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.join-cta-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-card);
    border: 2px solid rgba(0,212,170,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-1);
    margin-bottom: 24px;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0,212,170,0.1); }
    50% { box-shadow: 0 0 35px rgba(0,212,170,0.25); }
}

.join-cta-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.join-cta-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 380px;
}

.join-cta-steps {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    width: 100%;
    justify-content: center;
}

.join-cta-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
    max-width: 130px;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-main);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.join-cta-btn {
    font-size: 1.1rem;
    padding: 18px 40px;
    margin-bottom: 16px;
    animation: btn-breathe 4s ease-in-out infinite;
}

@keyframes btn-breathe {
    0%, 100% { box-shadow: 0 4px 20px rgba(0,212,170,0.3); }
    50% { box-shadow: 0 6px 30px rgba(0,212,170,0.5); }
}

.join-cta-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.join-cta-hint i {
    font-size: 0.7rem;
}

/* ---- FAQ ---- */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.3s;
}

.faq-item.active {
    border-color: rgba(0,212,170,0.2);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: color 0.3s;
}

.faq-question:focus-visible {
    outline: 2px solid var(--accent-1);
    outline-offset: -2px;
}

.faq-question:hover { color: var(--accent-1); }

.faq-question i {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.4s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--accent-1);
}

.faq-answer {
    overflow: hidden;
    transition: max-height 0.4s ease;
    max-height: 0;
}

.faq-answer[hidden] {
    display: block;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ---- Contact ---- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.contact-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: all 0.4s ease;
}

.contact-item:hover {
    border-color: rgba(0,212,170,0.2);
    transform: translateY(-4px);
}

.contact-item i {
    font-size: 2rem;
    color: var(--accent-1);
    margin-bottom: 16px;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.contact-item a,
.contact-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.todo-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px dashed rgba(255, 193, 7, 0.4);
    border-radius: var(--radius-sm);
    color: #ffc107;
    font-size: 0.85rem;
    font-weight: 600;
    font-style: italic;
}

.social-links {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.social-link {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.social-link:focus-visible {
    outline: 2px solid var(--accent-1);
    outline-offset: 3px;
}

.social-link:hover {
    color: var(--accent-1);
    border-color: var(--accent-1);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,212,170,0.2);
}

/* ---- Footer ---- */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: 8px;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---- Regulamin link ---- */
.regulamin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s;
}
.regulamin-link:hover {
    color: var(--accent-1);
}

/* ---- Footer links ---- */
.footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--accent-1);
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16,1,0.3,1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Toast ---- */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--bg-card);
    border: 1px solid rgba(0,212,170,0.3);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    transform: translateY(120%);
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}

.toast.show { transform: translateY(0); }

.toast i { color: var(--accent-1); font-size: 1.3rem; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .about-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-showcase { grid-template-columns: 1fr; }
    .project-card--featured { grid-template-columns: 1fr; }
    .project-card-visual { min-height: 250px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .project-card-content { padding: 32px; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .join-wrapper { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .nav-toggle { display: flex; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(10,10,15,0.97);
        backdrop-filter: blur(20px);
        padding: 24px;
        border-bottom: 1px solid var(--border-color);
        gap: 4px;
    }

    .nav-links.open a {
        display: block;
        padding: 12px 16px;
    }

    .hero { padding: 100px 20px 60px; }

    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }


    .section { padding: 80px 0; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .btn { width: 100%; justify-content: center; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .join-cta-steps { flex-direction: column; align-items: center; gap: 12px; }
    .join-cta-step { flex-direction: row; max-width: none; }
}

/* ================================================================
   ROBODOG AI RESCUE — Unitree GO2-style animation
   ================================================================ */

.project-card--robodog {
    border-color: rgba(255, 90, 30, 0.2);
    background: linear-gradient(135deg, rgba(255,90,30,0.05), rgba(10,10,15,0.8));
}
.project-card--robodog:hover {
    border-color: rgba(255,120,40,0.4);
    box-shadow: 0 8px 40px rgba(255,90,30,0.12);
}
.project-badge--robodog {
    background: rgba(255,90,30,0.12);
    border-color: rgba(255,120,40,0.25);
    color: #ff7c3a;
}

/* ---- Scene ---- */
.project-card-visual--robodog { background: #05080f; position: relative; overflow: hidden; }
.robodog-scene {
    position: relative; width: 100%; height: 100%; min-height: 400px;
    overflow: hidden;
}

/* Sky gradient */
.rd-bg-sky {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, #0a0408 0%, #1a0a06 50%, #2a1008 100%);
    z-index: 0;
}

/* Ground */
.rd-ground {
    position: absolute; bottom: 0; left: 0; right: 0; height: 38px;
    background: linear-gradient(to top, #1a1208, #241808);
    border-top: 1px solid rgba(255,120,40,0.15);
    z-index: 1;
}

/* === BUILDING === */
.rd-building {
    position: absolute; bottom: 38px; right: 8%;
    width: 160px; display: flex; flex-direction: column; gap: 2px; z-index: 2;
}
.rd-roof {
    height: 14px; background: #141d2c;
    border: 1px solid rgba(255,255,255,0.08);
    clip-path: polygon(0 100%, 10% 0, 90% 0, 100% 100%);
}
.rd-floor {
    height: 44px; background: #131b2a;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: space-around;
    padding: 0 8px;
}
.rd-window {
    width: 26px; height: 24px;
    background: rgba(160,180,255,0.08);
    border: 1px solid rgba(160,180,255,0.15);
    border-radius: 2px;
}
.rd-window--dark { background: #0a0e18; border-color: rgba(0,0,0,0.5); }
.rd-window--glow {
    background: rgba(255,200,80,0.3);
    box-shadow: 0 0 10px rgba(255,180,50,0.6);
    animation: winGlow 2.2s ease-in-out infinite alternate;
}
.rd-window--fire {
    background: rgba(255,80,10,0.65);
    box-shadow: 0 0 14px rgba(255,70,0,0.9);
    animation: winFire 0.7s ease-in-out infinite alternate;
}
.rd-door {
    width: 24px; height: 32px;
    background: rgba(255,140,60,0.07);
    border: 1px solid rgba(255,140,60,0.25);
    border-radius: 3px 3px 0 0;
    margin-top: auto; align-self: flex-end;
}
@keyframes winGlow { from { opacity: 0.55; } to { opacity: 1; } }
@keyframes winFire {
    from { background: rgba(255,80,10,0.6); box-shadow: 0 0 10px rgba(255,60,0,0.8); }
    to   { background: rgba(255,150,10,0.8); box-shadow: 0 0 22px rgba(255,120,0,1); }
}

/* === FIRE & SMOKE === */
.rd-fire {
    position: absolute; bottom: 170px; width: 16px;
    border-radius: 50% 50% 25% 25%;
    transform-origin: bottom center;
    animation: rdFlame 1s ease-in-out infinite alternate;
    z-index: 3; pointer-events: none;
}
.rd-fire--1 { right: calc(8% + 14px);  height: 55px; background: linear-gradient(to top, #ff3800, #ffaa00); animation-duration: 0.85s; width: 14px; }
.rd-fire--2 { right: calc(8% + 34px);  height: 80px; background: linear-gradient(to top, #ff2000, #ff7700); animation-duration: 1.15s; width: 20px; bottom: 168px; }
.rd-fire--3 { right: calc(8% + 60px);  height: 60px; background: linear-gradient(to top, #ff5000, #ffcc00); animation-duration: 0.7s;  width: 13px; }
.rd-fire--4 { right: calc(8% + 88px);  height: 44px; background: linear-gradient(to top, #cc2200, #ff8800); animation-duration: 1.3s;  width: 11px; }
@keyframes rdFlame {
    from { transform: scaleX(0.8) skewX(-8deg) scaleY(0.9); opacity: 0.8; }
    to   { transform: scaleX(1.2) skewX(8deg)  scaleY(1.1); opacity: 1; }
}

.rd-smoke {
    position: absolute;
    bottom: calc(170px + var(--ss) * 0.3);
    left: var(--sx);
    width: var(--ss); height: var(--ss);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(60,55,50,0.55) 0%, transparent 70%);
    animation: rdSmoke 5s ease-out infinite;
    animation-delay: var(--sd);
    z-index: 1; pointer-events: none;
}
@keyframes rdSmoke {
    0%   { transform: translateY(0) scale(0.6); opacity: 0.5; }
    60%  { opacity: 0.35; }
    100% { transform: translateY(-140px) scale(3); opacity: 0; }
}

/* === GRUZY === */
.rd-debris {
    position: absolute; bottom: 38px; z-index: 2;
    background: #1e1810; border: 1px solid rgba(255,100,30,0.1);
}
.rd-debris--1 { left: 20%; width: 22px; height: 10px; border-radius: 2px; transform: rotate(-8deg); }
.rd-debris--2 { left: 35%; width: 14px; height: 8px;  border-radius: 2px; transform: rotate(12deg); }
.rd-debris--3 { left: 55%; width: 18px; height: 7px;  border-radius: 2px; transform: rotate(-5deg); }

/* ===================================================================
   ROBOT — Unitree GO2 proportions  (body: 70×30, legs 3-segment)
   Walk cycle: 12s — approach → pause/scan → continue → loop
   =================================================================== */
.rd-robot {
    position: absolute;
    bottom: 38px;
    left: 0;
    z-index: 5;
    /* full walk path */
    animation: rdWalkPath 12s cubic-bezier(0.4,0,0.6,1) infinite;
}
@keyframes rdWalkPath {
    0%   { left: -8%; }
    35%  { left: 30%; }   /* przybycie */
    45%  { left: 30%; }   /* pauza — skanowanie */
    80%  { left: 62%; }   /* dojście do budynku */
    95%  { left: 62%; }   /* przy wejściu */
    100% { left: -8%; }   /* reset */
}

/* Chassis bounce */
.rd-chassis {
    position: relative;
    animation: rdBounce 0.42s ease-in-out infinite;
}
@keyframes rdBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%       { transform: translateY(-3px) rotate(0.4deg); }
    75%       { transform: translateY(-2px) rotate(-0.4deg); }
}

/* Head */
.rd-head {
    position: absolute;
    top: -22px; left: 6px;
    width: 30px; height: 18px;
    background: linear-gradient(135deg, #1e2e48, #152238);
    border: 1.5px solid rgba(0,200,255,0.45);
    border-radius: 5px 5px 3px 3px;
    display: flex; align-items: center; justify-content: center;
}
.rd-head-visor {
    display: flex; gap: 5px; align-items: center;
}
.rd-eye {
    width: 7px; height: 7px; border-radius: 50%;
    background: #00e5ff;
    box-shadow: 0 0 6px rgba(0,229,255,1), 0 0 12px rgba(0,229,255,0.5);
    animation: rdEyeBlink 4s ease-in-out infinite;
}
.rd-eye--r { animation-delay: 0.2s; background: #00c8f0; }
@keyframes rdEyeBlink {
    0%, 90%, 100% { transform: scaleY(1); }
    93%            { transform: scaleY(0.07); }
}
.rd-lidar-drum {
    position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
    width: 10px; height: 6px;
    background: #2a3a50;
    border: 1px solid rgba(0,200,255,0.5);
    border-radius: 3px 3px 0 0;
    animation: lidarSpin 1.2s linear infinite;
}
@keyframes lidarSpin {
    0%   { box-shadow: 0 0 4px rgba(0,229,255,0.6); }
    50%  { box-shadow: 0 0 10px rgba(0,229,255,1); }
    100% { box-shadow: 0 0 4px rgba(0,229,255,0.6); }
}

/* Torso */
.rd-torso {
    width: 72px; height: 28px;
    background: linear-gradient(180deg, #1e2d44 0%, #162035 100%);
    border: 1.5px solid rgba(0,180,220,0.35);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 8px; position: relative; overflow: hidden;
}
.rd-torso-stripe {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
        90deg, transparent 0px, transparent 8px,
        rgba(0,180,220,0.04) 8px, rgba(0,180,220,0.04) 9px
    );
}
.rd-torso-label {
    font-family: var(--font-mono);
    font-size: 0.52rem; font-weight: 700;
    color: rgba(0,200,255,0.85); letter-spacing: 1px;
    position: relative; z-index: 1;
}
.rd-torso-sub { font-size: 0.45rem; color: #ff8040; display: block; letter-spacing: 2px; }
.rd-status-led {
    width: 6px; height: 6px; border-radius: 50%;
    background: #00ff8c;
    box-shadow: 0 0 8px rgba(0,255,140,0.9);
    animation: ledPulse 1.4s ease-in-out infinite;
    position: relative; z-index: 1;
}
@keyframes ledPulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* Tail / antenna */
.rd-tail {
    position: absolute; top: -4px; right: 8px; z-index: 1;
}
.rd-antenna {
    width: 3px; height: 14px;
    background: linear-gradient(to top, #2a3850, rgba(0,200,255,0.6));
    border-radius: 2px;
    animation: antBlink 2s ease-in-out infinite;
}
.rd-antenna::after {
    content: ''; display: block;
    width: 5px; height: 5px; border-radius: 50%;
    background: #ff4500;
    box-shadow: 0 0 6px #ff4500;
    position: absolute; top: -4px; left: -1px;
    animation: antBlink 0.8s ease-in-out infinite;
}
@keyframes antBlink { 0%,100%{ opacity:1; } 50%{ opacity:0.2; } }

/* LiDAR beam */
.rd-lidar-beam {
    position: absolute;
    top: -18px; left: 18px;
    width: 120px; height: 2px;
    background: linear-gradient(to right, rgba(0,229,255,0.8), transparent);
    transform-origin: left center;
    animation: lidarBeam 2s ease-in-out infinite;
    z-index: 6; pointer-events: none;
}
@keyframes lidarBeam {
    0%   { transform: rotate(-40deg); opacity: 0.9; }
    50%  { transform: rotate(40deg);  opacity: 0.7; }
    100% { transform: rotate(-40deg); opacity: 0.9; }
}

/* Shadow */
.rd-shadow {
    position: absolute; bottom: -6px; left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 8px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.5) 0%, transparent 70%);
    animation: rdBounce 0.42s ease-in-out infinite;
}

/* ===== LEGS — 3-segment: hip → thigh → shin → foot ===== */
.rd-legs {
    position: absolute;
    bottom: 0; left: 0;
    width: 72px; height: 38px;
}

/* Hip joints */
.rd-hip {
    position: absolute; bottom: 0;
    width: 6px; height: 6px;
    background: #2a3f60; border-radius: 50%;
    border: 1px solid rgba(0,180,220,0.4);
}
.rd-hip--fl { left: 10px; }
.rd-hip--fr { left: 18px; }
.rd-hip--bl { right: 18px; }
.rd-hip--br { right: 10px; }

/* Thighs */
.rd-thigh {
    position: absolute; top: 4px; left: 50%;
    width: 5px; height: 18px;
    background: linear-gradient(to bottom, #253650, #1a2840);
    border: 1px solid rgba(0,160,200,0.35);
    border-radius: 3px;
    transform-origin: top center;
    margin-left: -2.5px;
}
.rd-thigh--fl { animation: thighFL 0.42s ease-in-out infinite alternate; }
.rd-thigh--fr { animation: thighFR 0.42s ease-in-out infinite alternate; }
.rd-thigh--bl { animation: thighBL 0.42s ease-in-out infinite alternate; animation-delay: 0.21s; }
.rd-thigh--br { animation: thighBR 0.42s ease-in-out infinite alternate; animation-delay: 0.21s; }

@keyframes thighFL { from { transform: rotate(-28deg); } to { transform: rotate(18deg); } }
@keyframes thighFR { from { transform: rotate(18deg);  } to { transform: rotate(-28deg); } }
@keyframes thighBL { from { transform: rotate(22deg);  } to { transform: rotate(-24deg); } }
@keyframes thighBR { from { transform: rotate(-24deg); } to { transform: rotate(22deg); } }

/* Shins */
.rd-shin {
    position: absolute; top: 16px; left: 50%;
    width: 4px; height: 16px;
    background: linear-gradient(to bottom, #1e2e46, #131e30);
    border: 1px solid rgba(0,140,180,0.3);
    border-radius: 2px;
    transform-origin: top center;
    margin-left: -2px;
}
.rd-shin--fl { animation: shinFL 0.42s ease-in-out infinite alternate; }
.rd-shin--fr { animation: shinFR 0.42s ease-in-out infinite alternate; }
.rd-shin--bl { animation: shinBL 0.42s ease-in-out infinite alternate; animation-delay: 0.21s; }
.rd-shin--br { animation: shinBR 0.42s ease-in-out infinite alternate; animation-delay: 0.21s; }

@keyframes shinFL { from { transform: rotate(20deg); }  to { transform: rotate(-10deg); } }
@keyframes shinFR { from { transform: rotate(-10deg); } to { transform: rotate(20deg); } }
@keyframes shinBL { from { transform: rotate(-15deg); } to { transform: rotate(16deg); } }
@keyframes shinBR { from { transform: rotate(16deg);  } to { transform: rotate(-15deg); } }

/* Feet */
.rd-foot {
    position: absolute; bottom: -4px; left: 50%;
    width: 10px; height: 4px;
    background: #2c4060;
    border: 1px solid rgba(0,140,200,0.4);
    border-radius: 2px;
    transform: translateX(-50%);
}

/* === EVACUATION PATH arrows === */
.rd-evac-line {
    position: absolute; bottom: 24px; left: 5%;
    display: flex; gap: 22px; align-items: center; z-index: 4;
}
.rd-evac-arrow {
    width: 0; height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 9px solid #00ff8c;
    opacity: 0;
    filter: drop-shadow(0 0 4px rgba(0,255,140,0.8));
    animation: arrowPulse 2s ease-in-out infinite;
    animation-delay: calc(var(--ea) * 0.3s);
}
@keyframes arrowPulse {
    0%, 100% { opacity: 0; transform: translateX(-4px); }
    40%, 60%  { opacity: 1; transform: translateX(0); }
}

/* === HUD === */
.rd-hud {
    position: absolute; top: 10px; left: 10px;
    display: flex; flex-direction: column; gap: 5px; z-index: 7;
}
.rd-hud-row {
    background: rgba(5,8,18,0.78);
    border: 1px solid rgba(0,180,220,0.22);
    border-radius: 4px;
    padding: 3px 9px;
    display: flex; align-items: center; gap: 8px;
    backdrop-filter: blur(6px);
}
.rd-hud-label {
    font-family: var(--font-mono);
    font-size: 0.54rem; letter-spacing: 1.2px;
    color: rgba(0,180,220,0.65); text-transform: uppercase; white-space: nowrap;
}
.rd-hud-val {
    font-family: var(--font-mono);
    font-size: 0.62rem; font-weight: 700; white-space: nowrap;
}
.rd-green  { color: #00ff8c; }
.rd-red    { color: #ff4444; }
.rd-orange { color: #ff8040; }
.rd-blink  { animation: rdRedPulse 1s ease-in-out infinite; }
@keyframes rdRedPulse { 0%,100%{ opacity:1; } 50%{ opacity:0.45; } }

.rd-scan-bar {
    width: 52px; height: 4px;
    background: rgba(0,180,220,0.15);
    border-radius: 2px; overflow: hidden;
}
.rd-scan-fill {
    height: 100%; width: 0%;
    background: linear-gradient(to right, #00e5ff, #00ff8c);
    border-radius: 2px;
    animation: scanFill 3s ease-in-out infinite;
}
@keyframes scanFill {
    0%   { width: 0%; }
    55%  { width: 100%; }
    100% { width: 100%; }
}

/* === THERMAL overlay (subtle pulsing hue) === */
.rd-thermal-overlay {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse at 72% 60%, rgba(255,60,0,0.07) 0%, transparent 60%);
    animation: thermalPulse 3s ease-in-out infinite;
}
@keyframes thermalPulse {
    0%,100% { opacity: 0.6; }
    50%      { opacity: 1; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    html { scroll-behavior: auto; }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
