/* Ashton Consulting Group - Custom Styles */
/* Design system aligned with brand tokens (spices reference): deep navy + blue accent */

:root {
    --gold-light: #d4ab55;
    --navy-900: #0d1b2a;
    --navy-800: #142233;
    --navy-700: #1a2d42;
    --navy-600: #1e3a52;
    --slate-850: #1a2d42;
    --slate-750: #243044;
    --cyan-glow: #6baed6;
    --cyan-accent: #3d7ab5;
    --cyan-dim: #2d5a8a;
    --text-muted: #7a99b5;
    --blue-glow: rgba(61, 122, 181, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--navy-900);
    color: #e8edf2;
    font-family: 'Barlow', system-ui, -apple-system, sans-serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    font-weight: 600;
}

/* Spices-style hero eyebrow (line + uppercase label) */
.hero-eyebrow {
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cyan-accent);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-eyebrow::before {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background: var(--cyan-accent);
    flex-shrink: 0;
}

/* Stats band: bordered cells (spices-style) */
.stat-band {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid rgba(30, 58, 82, 0.6);
    border-radius: 4px;
    overflow: hidden;
    max-width: 42rem;
}

@media (min-width: 768px) {
    .stat-band {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.stat-band > div {
    padding: 1.25rem 1rem;
    text-align: center;
    border-right: 1px solid rgba(30, 58, 82, 0.5);
    border-bottom: 1px solid rgba(30, 58, 82, 0.5);
}

.stat-band > div:nth-child(2n) {
    border-right: none;
}

.stat-band > div:nth-last-child(-n + 2) {
    border-bottom: none;
}

@media (min-width: 768px) {
    .stat-band > div {
        border-bottom: none;
        border-right: 1px solid rgba(30, 58, 82, 0.5);
    }
    .stat-band > div:last-child {
        border-right: none;
    }
}

/* Header: client portal (outlined + pulse dot) */
.btn-portal-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    background: transparent;
    border: 1px solid var(--cyan-accent);
    color: var(--cyan-glow);
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-portal-nav::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan-accent);
    animation: portal-dot 2s ease-in-out infinite;
}

@keyframes portal-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.btn-portal-nav:hover {
    background: var(--blue-glow);
    color: #fff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--navy-900);
}

::-webkit-scrollbar-thumb {
    background: var(--slate-750);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-dim);
}

/* Glow Effects */
.shadow-cyan-glow {
    box-shadow: 0 0 20px rgba(61, 122, 181, 0.2), 0 0 40px rgba(61, 122, 181, 0.12);
}

.shadow-cyan-glow\/25 {
    box-shadow: 0 0 20px rgba(61, 122, 181, 0.25);
}

.shadow-cyan-glow\/30 {
    box-shadow: 0 0 30px rgba(61, 122, 181, 0.3);
}

.shadow-cyan-glow\/10 {
    box-shadow: 0 0 10px rgba(61, 122, 181, 0.1);
}

.shadow-cyan-glow\/20 {
    box-shadow: 0 0 20px rgba(61, 122, 181, 0.2);
}

/* Text Glow */
.text-cyan-glow {
    color: var(--cyan-glow);
    text-shadow: 0 0 12px rgba(107, 174, 214, 0.35);
}

/* Border Glow */
.border-cyan-accent\/30 {
    border-color: rgba(61, 122, 181, 0.3);
}

.border-cyan-accent\/50 {
    border-color: rgba(61, 122, 181, 0.5);
}

.border-cyan-accent\/20 {
    border-color: rgba(61, 122, 181, 0.2);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--cyan-glow), var(--cyan-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Canvas */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.42;
}

/* Modal Backdrop */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

/* Input Focus States */
input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--cyan-accent);
    box-shadow: 0 0 0 1px var(--cyan-accent);
}

/* Button Hover Animations */
button, a[href] {
    transition: all 0.2s ease;
}

/* Service Card Hover */
.group:hover .group-hover\:shadow-cyan-glow\/10 {
    box-shadow: 0 0 15px rgba(61, 122, 181, 0.12);
}

/* Video Fallback Gradient */
.hero-gradient {
    background: radial-gradient(ellipse at center bottom, rgba(61, 122, 181, 0.12) 0%, transparent 60%);
}

/* Animated Pulse Ring */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid var(--cyan-glow);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
}

/* Loading Skeleton */
@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--navy-800) 25%, var(--navy-700) 50%, var(--navy-800) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* Font Mono */
.font-mono {
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, monospace;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

/* Selection Color */
::selection {
    background-color: rgba(61, 122, 181, 0.35);
    color: white;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--cyan-accent);
    outline-offset: 2px;
}

/* Link Underline Animation */
a.animated-link {
    position: relative;
}

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

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

/* Ops ticker strip (mirrors portal DB.tickerEvents copy) */
#ops-ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    width: max-content;
    animation: ops-ticker-scroll 75s linear infinite;
}

#ops-ticker-track span {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 32px;
    border-right: 1px solid rgba(30, 58, 82, 0.55);
    flex-shrink: 0;
}

#ops-ticker-track span b {
    color: #27a76a;
}

#ops-ticker-track span.alert-ev b {
    color: #c0392b;
}

#ops-ticker-track span.warn-ev b {
    color: #e67e22;
}

@keyframes ops-ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    #ops-ticker-track {
        animation: none;
    }
}

/* Video tiles: collapse broken sources to poster only */
.video-tile.video-missing video {
    display: none;
}

.video-tile.video-missing::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--poster);
    background-size: cover;
    background-position: center;
}

.video-tile.video-missing {
    background: var(--navy-800);
}