/* ─── Enterprise Design System Extensions ─── */

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger-children.revealed > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.stagger-children.revealed > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
.stagger-children.revealed > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.19s; }
.stagger-children.revealed > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.26s; }
.stagger-children.revealed > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.33s; }
.stagger-children.revealed > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.40s; }
.stagger-children.revealed > *:nth-child(7) { opacity: 1; transform: translateY(0); transition-delay: 0.47s; }
.stagger-children.revealed > *:nth-child(8) { opacity: 1; transform: translateY(0); transition-delay: 0.54s; }
.stagger-children.revealed > *:nth-child(9) { opacity: 1; transform: translateY(0); transition-delay: 0.61s; }

/* Hero particle canvas */
#hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
}

[data-theme="dark"] #hero-particles {
    mix-blend-mode: screen;
    filter: saturate(1.15) brightness(1.05);
}

[data-theme="light"] #hero-particles {
    mix-blend-mode: normal;
    opacity: 1;
    filter: none;
}

/* Hero gradient mesh */
.hero-mesh {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 70% 55% at 15% 30%, rgba(15, 107, 120, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 55% 45% at 85% 75%, rgba(15, 107, 120, 0.07) 0%, transparent 55%);
}
[data-theme="light"] .hero-mesh {
    background:
        radial-gradient(ellipse 70% 55% at 15% 30%, rgba(15, 107, 120, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 55% 45% at 85% 75%, rgba(15, 107, 120, 0.04) 0%, transparent 55%);
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(15, 107, 120, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 107, 120, 0.018) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, black 5%, transparent 72%);
    pointer-events: none;
}

[data-theme="dark"] .hero-grid-overlay {
    background-image:
        linear-gradient(rgba(64, 200, 220, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(64, 200, 220, 0.04) 1px, transparent 1px);
}

/* Rotating word animation */
.rotating-word {
    display: inline-block;
    position: relative;
    color: var(--primary);
    min-width: 0;
}
.rotating-word-inner {
    display: inline-block;
    animation: wordFade 3s ease-in-out infinite;
}
@keyframes wordFade {
    0%, 100% { opacity: 1; transform: translateY(0); }
    45%, 55% { opacity: 1; transform: translateY(0); }
}

/* Marquee */
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}
.marquee-wrap:hover .marquee-track {
    animation-play-state: paused;
}

/* Tech pill marquee */
@keyframes tech-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.tech-marquee-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: tech-marquee 50s linear infinite;
}

/* Stat counter */
.stat-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

/* Enterprise card hover */
.enterprise-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease,
                border-color 0.3s ease;
}
.enterprise-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 107, 120, 0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.enterprise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(15, 107, 120, 0.15);
}
.enterprise-card:hover::before {
    opacity: 1;
}
[data-theme="dark"] .enterprise-card:hover {
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
}

/* Pipeline flow animation */
.pipeline-node {
    position: relative;
    transition: all 0.3s ease;
}
.pipeline-node.active {
    border-color: var(--primary) !important;
    box-shadow: 0 0 20px rgba(15, 107, 120, 0.25);
}
.pipeline-connector {
    position: relative;
    overflow: hidden;
}
.pipeline-connector::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: flowPulse 2s ease-in-out infinite;
}
@keyframes flowPulse {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Agent console typing */
@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.console-cursor {
    animation: blink-cursor 1s step-end infinite;
}

/* Live pulse dot */
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Section label */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--primary);
}
.section-label::before {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: var(--primary);
}

/* Gradient text */
.gradient-heading {
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Process step line */
.process-line {
    position: absolute;
    top: 2rem;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border), var(--primary), var(--border), transparent);
    z-index: 0;
}

/* Industry card icon glow */
.industry-icon {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.enterprise-card:hover .industry-icon {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(15, 107, 120, 0.2);
}

/* Floating animation for hero cards */
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.float-slow { animation: floatY 6s ease-in-out infinite; }
.float-slow-delay { animation: floatY 6s ease-in-out 2s infinite; }

/* Glow orb */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

/* Premium button */
.btn-enterprise {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, #0a5a66 100%);
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(15, 107, 120, 0.35);
}
.btn-enterprise:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(15, 107, 120, 0.45);
}
.btn-enterprise::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-enterprise:hover::after {
    opacity: 1;
}

/* Glass panel */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .glass-panel {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 107, 120, 0.12);
}

/* Navbar scrolled state */
#navbar.nav-scrolled {
    background: rgba(3, 19, 28, 0.92) !important;
    border-color: rgba(30, 58, 68, 0.8) !important;
}
[data-theme="light"] #navbar.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--border) !important;
}

/* ═══════════════════════════════════════════
   HERO V2 — Clean enterprise
═══════════════════════════════════════════ */
.hero-v2 {
    background: var(--bg);
    min-height: calc(100vh - 5rem);
    display: flex;
    align-items: center;
}

.hero-v2__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 70% 20%, rgba(15, 107, 120, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(15, 107, 120, 0.05) 0%, transparent 50%);
}
[data-theme="dark"] .hero-v2__bg {
    background:
        radial-gradient(ellipse 80% 50% at 70% 20%, rgba(15, 107, 120, 0.14) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(232, 177, 45, 0.03) 0%, transparent 50%);
}

.hero-v2__particles-zone {
    position: absolute;
    inset: 0;
    z-index: 1;
    clip-path: polygon(45% 0, 100% 0, 100% 100%, 30% 100%);
    pointer-events: none;
}
@media (max-width: 1024px) {
    .hero-v2__particles-zone {
        clip-path: polygon(0 40%, 100% 20%, 100% 100%, 0 100%);
        opacity: 0.55;
    }
}

.hero-v2__vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to right, var(--bg) 0%, transparent 38%, transparent 100%);
}
[data-theme="dark"] .hero-v2__vignette {
    background: linear-gradient(to right, var(--bg) 0%, rgba(3, 19, 28, 0.75) 42%, transparent 100%);
}

.hero-v2__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0 5rem;
    width: 100%;
}
@media (min-width: 1024px) {
    .hero-v2__inner {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 4rem;
        padding: 5rem 0 6rem;
        min-height: calc(100vh - 5rem);
    }
}

.hero-v2__content {
    max-width: 36rem;
    position: relative;
    z-index: 10;
}

.hero-v2__eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.hero-v2__title {
    font-size: clamp(2.5rem, 5.5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.035em;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.hero-v2__title-accent {
    display: inline;
    background: linear-gradient(135deg, var(--primary) 0%, #0E9AAC 60%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-v2__lead {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--muted);
    max-width: 32rem;
}

.hero-v2__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

.hero-v2__cta-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
}
.hero-v2__cta-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-v2__inline-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 2.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.hero-v2__inline-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hero-v2__inline-stat-num {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.hero-v2__inline-stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-v2__cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

.hero-v2__card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.hero-v2__card:hover {
    transform: translateX(4px);
    border-color: rgba(15, 107, 120, 0.35);
    box-shadow: 0 12px 32px -8px rgba(15, 107, 120, 0.12);
}
[data-theme="dark"] .hero-v2__card:hover {
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.35);
}

.hero-v2__card--2 { margin-left: 1.5rem; }
.hero-v2__card--3 { margin-left: 3rem; }
@media (max-width: 1023px) {
    .hero-v2__card--2,
    .hero-v2__card--3 { margin-left: 0; }
}

.hero-v2__card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(15, 107, 120, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.hero-v2__card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.hero-v2__card-desc {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
}

.hero-v2 .revealed {
    opacity: 1 !important;
    transform: none !important;
}

@media (max-width: 640px) {
    .hero-v2__title { font-size: 2.25rem; }
    .hero-v2__inline-stats { gap: 1.5rem; }
    .hero-v2__inline-stat-num { font-size: 1.5rem; }
}
