/* Cyber Void Design System - NextGen IT */

body {
    background-color: #050507;
    color: #E4E7EB;
    font-family: 'Inter', sans-serif;
    background-image: linear-gradient(rgba(0, 242, 254, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 242, 254, 0.03) 1px, transparent 1px);
    background-size: 100px 100px;
}

/* Glow effects */
.glow-primary-strong:hover {
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

/* Terminal dots (sidebar header) */
.terminal-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

/* Subgrid alignment for card rows */
.grid-subgrid-rows {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
}

/* Trust metrics: fluid card grid for home page */
.trust-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.75rem, 2vw, 1.5rem);
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

.trust-metric-card {
    min-width: 0;
    min-height: clamp(6.5rem, 10vw, 8.5rem);
    padding: clamp(1rem, 2vw, 1.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.trust-metrics-grid[data-animate="ready"] .trust-metric-card {
    opacity: 0;
    transform: translateX(2.5rem);
}

.trust-metrics-grid[data-animate="ready"].is-visible .trust-metric-card {
    opacity: 1;
    transform: none;
    animation: trustMetricSlideLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.trust-metrics-grid[data-animate="ready"].is-visible .trust-metric-card:nth-child(2) {
    animation-delay: 0.08s;
}

.trust-metrics-grid[data-animate="ready"].is-visible .trust-metric-card:nth-child(3) {
    animation-delay: 0.16s;
}

.trust-metrics-grid[data-animate="ready"].is-visible .trust-metric-card:nth-child(4) {
    animation-delay: 0.24s;
}

.trust-metrics-grid[data-animate="ready"].is-visible .trust-metric-card:nth-child(5) {
    animation-delay: 0.32s;
}

.trust-metrics-grid[data-animate="ready"].is-visible .trust-metric-card:nth-child(6) {
    animation-delay: 0.4s;
}

@keyframes trustMetricSlideLeft {
    from {
        opacity: 0;
        transform: translateX(2.5rem);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.trust-metric-value,
.trust-metric-label {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    text-wrap: balance;
    letter-spacing: 0;
    line-height: 1.1;
}

.trust-metric-value {
    margin-bottom: clamp(0.375rem, 1vw, 0.5rem);
    font-size: 1.05rem;
}

.trust-metric-value-nowrap {
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: normal;
}

.trust-metric-value-long {
    font-size: 0.95rem;
}

.trust-metric-label {
    font-size: 0.625rem;
    line-height: 1.25;
}

@media (max-width: 360px) {
    .trust-metric-card {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .trust-metric-value {
        font-size: 0.95rem;
    }

    .trust-metric-value-long {
        font-size: 0.8rem;
    }

    .trust-metric-label {
        font-size: 0.58rem;
    }
}

@media (min-width: 640px) {
    .trust-metric-value {
        font-size: 1.25rem;
    }

    .trust-metric-value-long {
        font-size: 1.05rem;
    }

    .trust-metric-label {
        font-size: 0.6875rem;
    }
}

@media (min-width: 768px) {
    .trust-metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .trust-metric-value {
        font-size: 1.5rem;
    }

    .trust-metric-value-long {
        font-size: 1.2rem;
    }

    .trust-metric-label {
        font-size: 0.75rem;
    }
}

@media (min-width: 1280px) {
    .trust-metrics-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .trust-metric-card {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .trust-metric-value {
        font-size: 1.25rem;
    }

    .trust-metric-value-long {
        font-size: 1.05rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .trust-metrics-grid[data-animate="ready"] .trust-metric-card,
    .trust-metrics-grid[data-animate="ready"].is-visible .trust-metric-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Nav pill - fluid responsive scaling */
.nav-pill {
    padding: clamp(0.2rem, 0.4vw, 0.375rem) clamp(0.3rem, 0.5vw, 0.5rem);
    gap: clamp(0rem, 0.2vw, 0.25rem);
}

.nav-logo {
    font-size: clamp(0.7rem, 1vw, 0.875rem);
    padding: clamp(0.2rem, 0.4vw, 0.375rem) clamp(0.5rem, 1vw, 1rem);
    gap: clamp(0.3rem, 0.5vw, 0.5rem);
}

.nav-logo .material-symbols-outlined {
    font-size: clamp(0.9rem, 1.3vw, 1.125rem);
}

.nav-link-desktop {
    font-size: clamp(0.55rem, 0.75vw, 0.75rem);
    padding: clamp(0.2rem, 0.4vw, 0.375rem) clamp(0.4rem, 0.8vw, 1rem);
    white-space: nowrap;
}

.nav-cta-desktop {
    font-size: clamp(0.5rem, 0.7vw, 0.75rem);
    padding: clamp(0.3rem, 0.5vw, 0.5rem) clamp(0.5rem, 1vw, 1rem);
    letter-spacing: clamp(0.05em, 0.1vw, 0.1em);
    white-space: nowrap;
}

/* Language selector */
.language-switcher {
    position: relative;
    font-family: 'JetBrains Mono', monospace;
}

.language-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.25rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(0, 242, 254, 0.28);
    background: rgba(18, 20, 27, 0.92);
    color: #E4E7EB;
    font-size: 0.75rem;
    line-height: 1;
    white-space: nowrap;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.language-toggle:hover,
.language-toggle[aria-expanded="true"] {
    border-color: #00F2FE;
    color: #00F2FE;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.16);
}

.language-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

.flag-icon {
    display: inline-block;
    width: 1.45rem;
    height: 0.95rem;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0.12rem;
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.language-toggle .flag-icon {
    width: 1.6rem;
    height: 1.05rem;
}

.flag-de {
    background: linear-gradient(to bottom, #000 0 33.333%, #dd0000 33.333% 66.666%, #ffce00 66.666% 100%);
}

.flag-fr {
    background: linear-gradient(to right, #0055a4 0 33.333%, #fff 33.333% 66.666%, #ef4135 66.666% 100%);
}

.flag-en {
    background:
        linear-gradient(0deg, transparent 39%, #fff 39% 61%, transparent 61%),
        linear-gradient(90deg, transparent 42%, #fff 42% 58%, transparent 58%),
        linear-gradient(0deg, transparent 45%, #c8102e 45% 55%, transparent 55%),
        linear-gradient(90deg, transparent 46%, #c8102e 46% 54%, transparent 54%),
        linear-gradient(32deg, transparent 43%, #fff 43% 48%, #c8102e 48% 53%, #fff 53% 58%, transparent 58%),
        linear-gradient(-32deg, transparent 43%, #fff 43% 48%, #c8102e 48% 53%, #fff 53% 58%, transparent 58%),
        #012169;
}

.language-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 10rem;
    padding: 0.35rem;
    border: 1px solid rgba(0, 242, 254, 0.22);
    background: rgba(10, 12, 16, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 18px rgba(0, 242, 254, 0.08);
    opacity: 0;
    transform: translateY(-0.25rem);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 80;
}

.language-switcher.is-open .language-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    color: #9CA3AF;
    font-size: 0.75rem;
    line-height: 1.2;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.language-option:hover,
.language-option:focus-visible {
    background: rgba(0, 242, 254, 0.08);
    color: #00F2FE;
}

.language-option[aria-selected="true"] {
    display: none;
}

.language-name {
    color: inherit;
}

@media (max-width: 767px) {
    .language-menu {
        right: -2.5rem;
        min-width: 3.75rem;
    }

    .language-option {
        justify-content: center;
    }

    .language-name {
        display: none;
    }
}

/* Nav link animation - top dot + bottom bar + glow */
.nav-item {
    position: relative;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Active State */
.nav-item.nav-link-active {
    color: #00F2FE;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.6);
}

/* Hover State - Less intense to differentiate */
.nav-item:not(.nav-link-active):hover {
    color: rgba(0, 242, 254, 0.8);
    text-shadow: 0 0 6px rgba(0, 242, 254, 0.3);
}

/* Boule lumineuse en haut, collee au bord superieur de la nav pill */
.nav-item::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 6px;
    height: 6px;
    background: #00F2FE;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.9), 0 0 16px rgba(0, 242, 254, 0.5);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.nav-link-active::before {
    top: -10px;
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.nav-item:not(.nav-link-active):hover::before {
    top: -10px;
    transform: translateX(-50%) scale(0.85);
    opacity: 0.5;
    box-shadow: 0 0 6px rgba(0, 242, 254, 0.5), 0 0 10px rgba(0, 242, 254, 0.3);
}

/* Barre lumineuse en bas */
.nav-item::after {
    content: '';
    position: absolute;
    bottom: -14px; /* Flush with the bottom edge of the navbar */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #00F2FE;
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.8), 0 2px 12px rgba(0, 242, 254, 0.4);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.nav-item.nav-link-active::after {
    width: 70%;
    opacity: 1;
}

.nav-item:not(.nav-link-active):hover::after {
    width: 60%;
    opacity: 0.5;
    box-shadow: 0 0 4px rgba(0, 242, 254, 0.4), 0 2px 6px rgba(0, 242, 254, 0.2);
}

/* Mobile menu: active state uses left bar instead of top dot + bottom bar */
@media (max-width: 767px) {
    .nav-item::before,
    .nav-item::after {
        display: none;
    }

    .nav-item.nav-link-active {
        border-left: 2px solid #00F2FE;
        box-shadow: inset 4px 0 8px rgba(0, 242, 254, 0.15);
        background: rgba(0, 242, 254, 0.05);
    }
}

/* Typewriter cursor blink */
.typewriter::after {
    content: '█';
    animation: blink 0.8s step-end infinite;
    color: #00F2FE;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Card hover glow + 3D tilt */
.card-cyan-hover {
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, border-color 0.3s, box-shadow 0.3s;
    will-change: transform;
}

.card-cyan-hover:hover {
    border-color: #00F2FE;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
}

.glow-only-hover {
    position: relative;
    overflow: hidden;
}

/* Cursor-reactive spotlight overlay */
.cursor-glow-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #050507;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #32353F;
}

/* Terminal typing animation (Home page) */
.typing-container {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: .15em solid #39FF14;
    animation: typing 3.5s steps(40, end), blink .75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Focus visible - keyboard accessibility (WCAG 2.4.7) */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #00F2FE;
    outline-offset: 2px;
}

.glow-primary-strong:focus-visible {
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.8), 0 0 40px rgba(0, 242, 254, 0.4);
    outline: 2px solid #00F2FE;
    outline-offset: 2px;
}

.nav-item:focus-visible {
    outline: 2px solid #00F2FE;
    outline-offset: 4px;
}

/* ─── SVG Draw Timeline Section ─── */
.svgdraw-timeline {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* SVG path overlay — spans full height of timeline, behind cards */
.svgdraw-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

.svgdraw-svg-overlay path {
    fill: none;
    stroke: #00F2FE;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.4))
           drop-shadow(0 0 20px rgba(0, 242, 254, 0.15));
}

/* Each service node: dot column + card */
.svgdraw-node {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    position: relative;
    z-index: 1;
}

/* Dot column — wider strip so path can snake left/right */
.svgdraw-dot-col {
    flex: 0 0 100px;
    display: flex;
    padding-top: 28px; /* vertically center dot with card content */
}

/* Alternate dots left/right within the column for winding effect */
.svgdraw-node:nth-child(odd) .svgdraw-dot-col  { justify-content: flex-start; padding-left: 8px; }
.svgdraw-node:nth-child(even) .svgdraw-dot-col { justify-content: flex-end; padding-right: 8px; }

/* The dot itself */
.svgdraw-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00F2FE;
    opacity: 0;
    box-shadow: none;
    flex-shrink: 0;
}

/* dot glow states controlled by JS — opacity, scale, box-shadow set inline */

/* Service card */
.svgdraw-card {
    flex: 1;
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 28px;
    background: #18181E;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.3s, box-shadow 0.3s;
    /* opacity + transform controlled by JS scroll logic — no CSS transition */
}

.svgdraw-card:hover {
    border-color: rgba(0, 242, 254, 0.35);
    box-shadow: 0 0 24px rgba(0, 242, 254, 0.12);
}

.svgdraw-icon {
    color: #00F2FE;
    font-size: 36px;
    margin-bottom: 12px;
    display: inline-block;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.4));
}

/* ─── SVG Draw Responsive ─── */
@media (max-width: 640px) {
    .svgdraw-timeline {
        gap: 36px;
    }

    .svgdraw-dot-col {
        flex: 0 0 60px;
        padding-top: 22px;
    }

    .svgdraw-node:nth-child(odd) .svgdraw-dot-col  { padding-left: 4px; }
    .svgdraw-node:nth-child(even) .svgdraw-dot-col { padding-right: 4px; }

    .svgdraw-dot {
        width: 14px;
        height: 14px;
    }

    .svgdraw-card {
        padding: 20px;
    }
}

/* K8s SVG animated data lines (DevOps page) */
.svg-line-animated {
    stroke-dasharray: 10;
    stroke-dashoffset: 100;
    animation: dash 3s linear infinite;
}

@keyframes dash {
    to { stroke-dashoffset: 0; }
}
