/* =================================================================
   Everspan Technologies - Chrome Metallic Enterprise Design System
   Fortune-500 Visual Architecture (with Light/Dark Mode Toggle)
   ================================================================= */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root,
html[data-bs-theme="light"] {
    --est-bg-primary: #e8edf3;
    --est-bg-surface: #f8fafc;
    --est-bg-elevated: #d8e0ea;
    --est-bg-glass: rgba(241, 245, 249, 0.92);
    --est-border: rgba(71, 85, 105, 0.24);
    --est-border-strong: rgba(51, 65, 85, 0.55);
    --est-text-main: #0f172a;
    --est-text-muted: #334155;
    --est-accent-primary: #334155;
    --est-accent-secondary: #0284c7;
    --est-accent-tertiary: #475569;
    --est-btn-grad: linear-gradient(135deg, #1e293b 0%, #475569 50%, #334155 100%);
    --est-hero-grad: linear-gradient(135deg, #0f172a 0%, #475569 45%, #0284c7 100%);
    --est-shadow-md: 0 10px 26px -4px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --est-shadow-lg: 0 22px 46px -10px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 1);
    --est-grid-pattern:
        linear-gradient(to right, rgba(71, 85, 105, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(71, 85, 105, 0.08) 1px, transparent 1px);
    --est-grid-size: 28px 28px;
    --est-radius-md: 16px;
    --est-radius-lg: 22px;
    --est-font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    --est-font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-bs-theme="dark"] {
    --est-bg-primary: #161b22;
    --est-bg-surface: #1f2630;
    --est-bg-elevated: #2a3340;
    --est-bg-glass: rgba(31, 38, 48, 0.92);
    --est-border: rgba(148, 163, 184, 0.22);
    --est-border-strong: rgba(56, 189, 248, 0.50);
    --est-text-main: #f8fafc;
    --est-text-muted: #cbd5e1;
    --est-accent-primary: #38bdf8;
    --est-accent-secondary: #94a3b8;
    --est-accent-tertiary: #e2e8f0;
    --est-btn-grad: linear-gradient(135deg, #0284c7 0%, #334155 100%);
    --est-hero-grad: linear-gradient(135deg, #f8fafc 0%, #94a3b8 45%, #38bdf8 100%);
    --est-shadow-md: 0 12px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --est-shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.60), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --est-grid-pattern:
        linear-gradient(to right, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
}

/* Base Body & Typography */
body {
    background-color: var(--est-bg-primary);
    color: var(--est-text-main);
    font-family: var(--est-font-sans);
    background-image: var(--est-grid-pattern);
    background-size: var(--est-grid-size);
    overflow-x: clip;
    min-height: 100vh;
    transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, .est-hero-title {
    font-family: var(--est-font-display);
}

.font-mono {
    font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
    letter-spacing: -0.01em;
}

.text-accent {
    color: var(--est-accent-primary) !important;
}

/* Sticky Top Corporate Navigation */
#estHeaderMount,
.est-sticky-shell {
    position: sticky;
    top: 0;
    z-index: 1050;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: var(--est-bg-glass);
    border-bottom: 1px solid var(--est-border);
}

.est-top-telemetry-strip {
    background: var(--est-bg-elevated);
    border-bottom: 1px solid var(--est-border);
    padding: 0.35rem 0;
    font-size: 0.74rem;
}

/* Material Cards & Spacious Visual Surfaces */
.est-card {
    background: var(--est-bg-surface);
    color: var(--est-text-main);
    border: 1px solid var(--est-border);
    border-radius: var(--est-radius-md);
    box-shadow: var(--est-shadow-md);
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.est-card:hover {
    border-color: var(--est-border-strong);
    box-shadow: var(--est-shadow-lg);
    transform: translateY(-2px);
}

.est-card-elevated {
    background: var(--est-bg-elevated);
    color: var(--est-text-main);
    border: 1px solid var(--est-border-strong);
    border-radius: var(--est-radius-md);
    box-shadow: var(--est-shadow-lg);
}

/* Visual Metric / Icon Feature Tile */
.est-visual-tile {
    background: var(--est-bg-surface);
    border: 1px solid var(--est-border);
    border-radius: var(--est-radius-md);
    padding: 1.35rem;
    height: 100%;
    box-shadow: var(--est-shadow-md);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.est-visual-tile:hover {
    border-color: var(--est-border-strong);
    transform: translateY(-2px);
}

.est-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: var(--est-bg-elevated);
    color: var(--est-accent-primary);
    border: 1px solid var(--est-border-strong);
}

/* Technical Badges & Telemetry Chips */
.est-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--est-bg-elevated);
    color: var(--est-accent-primary);
    border: 1px solid var(--est-border-strong);
}

.est-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--est-accent-secondary);
    box-shadow: 0 0 8px var(--est-accent-secondary);
    display: inline-block;
    animation: estPulseDot 2s infinite ease-in-out;
}

/* Hero Sections & Gradient Text */
.est-hero-title {
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

.est-gradient-text {
    background: var(--est-hero-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* SVG Stage Containers */
.est-svg-stage {
    position: relative;
    background: var(--est-bg-surface);
    border: 1px solid var(--est-border-strong);
    border-radius: var(--est-radius-lg);
    box-shadow: var(--est-shadow-lg);
    overflow: hidden;
}

.est-svg-stage svg {
    width: 100%;
    height: auto;
    display: block;
}

/* SVG Keyframe Animations */
@keyframes estPulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(1.22); }
}

@keyframes estDashFlow {
    to { stroke-dashoffset: -120; }
}

@keyframes estDashFlowReverse {
    to { stroke-dashoffset: 120; }
}

.svg-flow-line {
    stroke-dasharray: 8 8;
    animation: estDashFlow 3.4s linear infinite;
}

.svg-flow-fast {
    stroke-dasharray: 6 10;
    animation: estDashFlow 1.8s linear infinite;
}

.svg-flow-reverse {
    stroke-dasharray: 10 8;
    animation: estDashFlowReverse 2.8s linear infinite;
}

.svg-interactive-node {
    cursor: pointer;
    transition: filter 0.2s ease, stroke-width 0.2s ease;
}

.svg-interactive-node:hover {
    filter: drop-shadow(0 0 8px var(--est-accent-secondary));
    stroke-width: 2.5px;
}

/* Buttons */
.btn-est-primary {
    background: var(--est-btn-grad);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-weight: 600;
    box-shadow: var(--est-shadow-md);
}

.btn-est-primary:hover {
    filter: brightness(1.08);
    color: #ffffff !important;
    box-shadow: var(--est-shadow-lg);
}

.btn-est-outline {
    background: var(--est-bg-surface);
    color: var(--est-text-main);
    border: 1px solid var(--est-border-strong);
    border-radius: 12px;
    font-weight: 600;
}

.btn-est-outline:hover {
    background: var(--est-bg-elevated);
    color: var(--est-accent-primary);
    border-color: var(--est-accent-primary);
}

/* Legal & Compliance Layout */
.est-legal-doc h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 0.65rem;
    color: var(--est-text-main);
}

.est-legal-doc p,
.est-legal-doc li {
    color: var(--est-text-muted);
    font-size: 0.94rem;
    line-height: 1.68;
}

/* Themed Notification Toast */
.est-toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1090;
    max-width: 420px;
}
