/* ==========================================================================
   EDGE.BLUE — SOVEREIGN ATTESTED EDGE INFRASTRUCTURE
   Design System: Obsidian Cyan / Electric Cobalt / Silicon HUD
   Strict Zero-Jump Motion Invariant (Cards stay 100% stationary)
   ========================================================================== */

:root {
    --bg-dark: #030712;
    --bg-card: rgba(11, 19, 43, 0.75);
    --bg-card-hover: rgba(15, 23, 50, 0.90);
    --border: rgba(56, 189, 248, 0.18);
    --border-hover: rgba(0, 240, 255, 0.55);
    --border-active: #00f0ff;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --muted: #64748b;
    --dim: #475569;
    
    --cyan: #00f0ff;
    --sky: #38bdf8;
    --blue: #2563eb;
    --emerald: #10b981;
    --amber: #fbbf24;
    --rose: #f43f5e;
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Orbitron', 'Chakra Petch', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --glow-cyan: 0 0 25px rgba(0, 240, 255, 0.22);
    --glow-blue: 0 0 25px rgba(37, 99, 235, 0.25);
    --glow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color-scheme: dark;
}

body {
    background: radial-gradient(circle at 50% 0%, #0c1a3a 0%, #030712 60%, #02040a 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Top Bar removed per Rule 25: Clean, uncluttered, header-first architecture */
.edge-top-bar {
    display: none !important;
}

/* ==========================================================================
   NAVIGATION (Rule 25: Bold initial size, jitter-free scroll shrink, animated hover flare)
   ========================================================================== */
.edge-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 26px 48px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(3, 7, 18, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: padding;
    contain: layout;
}

.edge-nav.scrolled {
    padding: 14px 48px;
    background: rgba(3, 7, 18, 0.94);
    border-bottom-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.brand-title {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.08em;
    transition: font-size 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-icon {
    width: 32px;
    height: 32px;
    transition: width 0.3s ease, height 0.3s ease;
}

.edge-nav.scrolled .brand-title {
    font-size: 20px;
}

.edge-nav.scrolled .brand-icon {
    width: 26px;
    height: 26px;
}

.brand-title .accent {
    color: var(--cyan);
    text-shadow: 0 0 16px rgba(0, 240, 255, 0.45);
}

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

/* Rule 25: Signature Animated Hover Flare */
.nav-links a {
    position: relative;
    color: #94a3b8;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 8px 16px;
    border-radius: 6px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), #38bdf8, transparent);
    box-shadow: 0 0 10px var(--cyan);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
}

.nav-links a:hover {
    color: #ffffff;
    background: rgba(0, 240, 255, 0.06);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 80%;
    left: 10%;
}

.nav-links a.active {
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.08);
}

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */
.edge-main {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 24px 80px 24px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ==========================================================================
   STATIONARY CARD ARCHITECTURE (ZERO-JUMP HOVER RULE 3)
   ========================================================================== */
.stationary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--glow-card);
    backdrop-filter: blur(12px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    position: relative;
    /* HARD INVARIANT: Zero card displacement on hover (Rule 3) */
    transform: none !important;
}

.stationary-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow-card), var(--glow-cyan);
    background: var(--bg-card-hover);
    transform: none !important;
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.hero-banner {
    padding: 48px;
    background: radial-gradient(ellipse at top left, rgba(0, 240, 255, 0.12) 0%, rgba(11, 19, 43, 0.85) 60%);
    border: 1px solid rgba(0, 240, 255, 0.25);
    box-shadow: var(--glow-cyan);
    position: relative;
    overflow: hidden;
}

.hero-banner.has-bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-banner.has-bg-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.76) 0%, rgba(2, 6, 23, 0.94) 85%);
    pointer-events: none;
    z-index: 1;
}

.hero-banner.has-bg-image > * {
    position: relative;
    z-index: 2;
}

.hero-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--cyan);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-banner h1 {
    font-family: var(--font-heading);
    font-size: 42px;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-thesis {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-primary);
    max-width: 880px;
    margin-bottom: 16px;
    font-weight: 500;
}

.hero-thesis em {
    color: var(--cyan);
    font-style: normal;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 820px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cyan);
    color: #020617;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn-action:hover {
    background: #38bdf8;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.5);
}

.btn-action.btn-secondary {
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-action.btn-secondary:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

/* ==========================================================================
   HUD METRIC TELEMETRY GRID
   ========================================================================== */
.hud-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.hud-card {
    padding: 20px;
}

.hud-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.hud-value {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 4px;
}

.hud-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==========================================================================
   PERSPECTIVE SELECTOR TABS
   ========================================================================== */
.perspective-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.perspective-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(3, 7, 18, 0.6);
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    min-width: 200px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    padding: 12px 16px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tab-btn .tab-num {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.tab-btn .tab-title {
    font-weight: 700;
    color: var(--text-primary);
}

.tab-btn:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
}

.tab-btn.active {
    background: rgba(0, 240, 255, 0.12);
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.tab-btn.active .tab-title {
    color: var(--cyan);
}

.perspective-panel {
    display: none;
}

.perspective-panel.active {
    display: block;
}

/* ==========================================================================
   SILICON & MEMORY TOPOLOGY VISUALIZER
   ========================================================================== */
.visualizer-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

@media (max-width: 960px) {
    .visualizer-wrapper {
        grid-template-columns: 1fr;
    }
}

.canvas-container {
    background: #02040a;
    border: 1px solid var(--border);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.canvas-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(11, 19, 43, 0.9);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 11px;
}

#siliconCanvas {
    width: 100%;
    height: 380px;
    display: block;
}

/* Register Stack Panel */
.register-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.register-card {
    background: rgba(2, 6, 23, 0.8);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.register-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.register-name {
    color: var(--cyan);
    font-weight: 700;
}

.register-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.register-value {
    color: var(--dim);
    font-size: 11px;
    word-break: break-all;
}

.register-desc {
    color: var(--text-secondary);
    font-size: 12px;
    font-family: var(--font-sans);
}

/* ==========================================================================
   TCO CALCULATOR
   ========================================================================== */
.tco-calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 880px) {
    .tco-calculator {
        grid-template-columns: 1fr;
    }
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.slider-label-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 13px;
}

.slider-label {
    color: var(--text-secondary);
}

.slider-val {
    color: var(--cyan);
    font-weight: 700;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: #0f172a;
    height: 6px;
    border-radius: 3px;
    outline: none;
    border: 1px solid var(--border);
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--cyan);
    cursor: pointer;
    box-shadow: 0 0 10px var(--cyan);
}

.tco-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 12px;
}

.tco-comparison-table th {
    text-align: left;
    padding: 10px;
    background: rgba(3, 7, 18, 0.7);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.tco-comparison-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.08);
}

.col-cloud {
    color: var(--rose);
}

.col-edge {
    color: var(--emerald);
    font-weight: 700;
}

.savings-highlight {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-top: 20px;
}

.savings-highlight .savings-num {
    font-family: var(--font-heading);
    font-size: 32px;
    color: var(--emerald);
    font-weight: 800;
}

/* ==========================================================================
   TERMINAL & CODE BLOCKS
   ========================================================================== */
.terminal-block {
    background: #02040a;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    color: #e2e8f0;
    overflow-x: auto;
    position: relative;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.12);
    font-size: 11px;
    color: var(--muted);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-amber { background: #f59e0b; }
.dot-green { background: #10b981; }

/* ==========================================================================
   PARTNER SILICON & MEMORY GRID
   ========================================================================== */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.partner-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.partner-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--cyan);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.partner-name {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--text-primary);
}

.partner-specs {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   DRY FOOTER ARCHITECTURE (RULES 2, 4, 5 COMPLIANT)
   ========================================================================== */
.edge-footer {
    background: #02040a;
    border-top: 1px solid rgba(56, 189, 248, 0.15);
    padding: 40px 24px;
    position: relative;
    margin-top: auto;
}

/* Subtle Electric Gold accent line per Rule 4 */
.edge-footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
    opacity: 0.65;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-legal {
    font-size: 13px;
    color: var(--muted);
}

.footer-posture {
    font-size: 11px;
    color: var(--dim);
    margin-top: 4px;
}

.footer-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-secondary);
    border: 1px solid rgba(56, 189, 248, 0.15);
    letter-spacing: 0.05em;
}

/* Watermark strict opacity 0.45 - 0.48 per Rule 5 */
.footer-watermark {
    opacity: 0.46;
    stroke-width: 1.0px;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.18));
}
