/* ==========================================================================
   Nexus - Production Management Page Stylesheet
   OptiMES Suite / Adventis Tech
   Unified Visual Identity, Typography, Components & Micro-Animations
   ========================================================================== */

/* --------------------------------------------------
   1. Design Tokens & CSS Variables
   -------------------------------------------------- */
:root {
    --header-bg: #bfe0fa;
    --header-pill-bg: #a8d5f8;
    --header-pill-hover: #90c8f5;
    --header-text: #051a30;

    --bg-dark: #030d1a;
    --bg-dark-deep: #020811;
    --bg-navy-surface: #06284a;
    --bg-card: rgba(6, 40, 74, 0.55);
    --border-card: rgba(61, 232, 240, 0.22);
    --border-card-hover: rgba(61, 232, 240, 0.6);

    --cyan-primary: #3de8f0;
    --cyan-glow: #92faff;
    --status-green: #34d399;
    --blue-accent: #38bdf8;

    --text-white: #ffffff;
    --text-slate: #c3d0de;
    --text-muted: #8fa5bd;

    --font-heading: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --container-max: 1200px;
    --border-radius-pill: 9999px;
    --trans-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-medium: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------
   2. Reset & Global Styles
   -------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 15px;
    background-color: var(--bg-dark);
    color: var(--text-white);
}

body {
    font-family: var(--font-body);
    background: radial-gradient(circle at 50% 15%, #082647 0%, #030d1a 100%);
    background-attachment: fixed;
    color: var(--text-white);
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(61, 232, 240, 0.28);
    border-radius: var(--border-radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-primary);
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

:focus-visible {
    outline: 2px solid var(--cyan-primary);
    outline-offset: 3px;
    border-radius: 6px;
}

.w {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* --------------------------------------------------
   3. Header Navigation Bar (#navbar)
   -------------------------------------------------- */
.nexus-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    z-index: 1000;
    background-color: var(--header-bg);
    color: var(--header-text);
    display: flex;
    align-items: start;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.15);
    transition: var(--trans-fast);
}

.header-inner {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: start;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: start;
}

.nav-brand {
    display: flex;
    align-items: start;
    gap: 10px;
    transition: transform var(--trans-fast);
}

.nav-brand:hover {
    transform: scale(1.03);
}

.brand-logo {
    width: 36px;
    height: 28px;
    object-fit: contain;
}

.platform-hub-badge {
    padding: 4px 12px;
    background-color: var(--header-pill-bg);
    border: 1px solid rgba(5, 26, 48, 0.2);
    border-radius: var(--border-radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: var(--header-text);
    transition: var(--trans-fast);
}

.nav-brand:hover .platform-hub-badge {
    background-color: var(--header-pill-hover);
    border-color: rgba(5, 26, 48, 0.4);
}

.nav-links {
    display: flex;
    align-items: start;
    gap: 10px;
}

.nav-pill {
    padding: 6px 18px;
    background-color: var(--header-pill-bg);
    color: var(--header-text);
    border-radius: var(--border-radius-pill);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: var(--trans-fast);
    display: inline-flex;
    align-items: start;
    justify-content: center;
}

.nav-pill:hover {
    background-color: #ffffff;
    color: #031529;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 26, 48, 0.15);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--header-text);
    border-radius: 2px;
    transition: var(--trans-fast);
}

/* Module Switcher Dropdown */
.module-switch-wrap {
    position: relative;
}

.module-switch-btn {
    display: inline-flex;
    align-items: start;
    gap: 6px;
    padding: 6px 16px;
    background-color: var(--header-pill-bg);
    color: var(--header-text);
    font-size: 13.5px;
    font-weight: 700;
    border-radius: var(--border-radius-pill);
    transition: var(--trans-fast);
}

.module-switch-btn:hover,
.module-switch-wrap:hover .module-switch-btn,
.module-switch-wrap.open .module-switch-btn {
    background-color: var(--header-text);
    color: #ffffff;
}

.module-switch-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 250px;
    background: rgba(3, 14, 28, 0.98);
    border: 1px solid rgba(61, 232, 240, 0.28);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
    z-index: 150;
}

.module-switch-wrap:hover .module-switch-dropdown,
.module-switch-wrap.open .module-switch-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mod-switch-item {
    display: flex;
    align-items: start;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.2s ease;
}

.mod-switch-item:hover {
    background: rgba(61, 232, 240, 0.12);
}

.mod-switch-item .mod-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.mod-switch-item strong {
    display: block;
    font-size: 13px;
    color: #ffffff;
    line-height: 1.2;
}

.mod-switch-item small {
    display: block;
    font-size: 11px;
    color: var(--cyan-primary);
}

/* --------------------------------------------------
   4. Nexus Module Branding Bar
   -------------------------------------------------- */
.nexus-branding-bar {
    width: 100%;
    background: transparent;
    padding: 24px 24px 12px 24px;
}

.branding-inner {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.branding-left {
    display: flex;
    align-items: start;
    gap: 14px;
}

.module-icon-wrap {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: start;
    justify-content: center;
    transition: transform var(--trans-medium);
}

.branding-left:hover .module-icon-wrap {
    transform: scale(1.06) rotate(2deg);
}

.nexus-icon {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(61, 232, 240, 0.35));
}

.module-title-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.module-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    font-style: italic;
    color: var(--text-white);
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin-bottom: 1px;
}

.module-subtitle {
    font-family: var(--font-body);
    font-size: 13px;
    font-style: italic;
    color: var(--text-muted);
    font-weight: 400;
}

.live-engine-tag {
    display: flex;
    align-items: start;
    gap: 0.65rem;
    padding: 0.5rem 1.1rem;
    background: rgba(6, 40, 74, 0.6);
    border: 1px solid rgba(61, 232, 240, 0.28);
    border-radius: var(--border-radius-pill);
    font-size: 0.85rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 14px rgba(61, 232, 240, 0.15);
}

.pulse-dot {
    width: 9px;
    height: 9px;
    background-color: var(--status-green);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 8px var(--status-green);
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid var(--status-green);
    animation: pingDotNexus 2s infinite cubic-bezier(0, 0, 0.2, 1);
}

@keyframes pingDotNexus {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

.status-label {
    color: var(--text-slate);
}

.highlight-cyan {
    color: var(--cyan-primary);
    text-shadow: 0 0 8px rgba(61, 232, 240, 0.4);
}

/* Scroll Progress Bar */
.scroll-progress-container {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    z-index: 999;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #3de8f0, #92faff);
    box-shadow: 0 0 10px #3de8f0;
    transition: width 0.1s ease-out;
}

/* --------------------------------------------------
   5. Hero Section (Edge-to-Edge Banner with Vignette)
   -------------------------------------------------- */
.nexus-hero-section {
    width: 100%;
    padding: 0;
    margin-bottom: 48px;
}

.hero-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.hero-card {
    position: relative;
    width: 100%;
    height: 400px;
    min-height: 400px;
    overflow: hidden;
    display: flex;
    align-items: start;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(3, 13, 26, 0.95) 0%,
            rgba(4, 21, 43, 0.84) 42%,
            rgba(4, 21, 43, 0.35) 72%,
            rgba(4, 21, 43, 0.1) 100%);
    z-index: 2;
}

/* High-Tech Hero Laser Scanner Beam - Dimmed down for sleek elegance */
.hero-scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 194, 255, 0.65) 25%, rgba(255, 255, 255, 0.6) 50%, rgba(0, 194, 255, 0.65) 75%, transparent);
    box-shadow: 0 0 8px rgba(0, 194, 255, 0.55), 0 0 16px rgba(0, 194, 255, 0.3);
    z-index: 5;
    animation: heroScanSweep 3.5s linear infinite;
    pointer-events: none;
}

@keyframes heroScanSweep {
    0% {
        top: 0%;
        opacity: 0;
    }

    4% {
        opacity: 0.65;
    }

    94% {
        opacity: 0.65;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 4;
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    padding: 48px 24px;
}

.hero-headline {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 800;
    font-style: italic;
    color: var(--text-white);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
}

.hero-subtext {
    display: flex;
    align-items: start;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 18px;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 24px;
    max-width: 680px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.hero-optimes-wordmark {
    display: inline-block;
    height: 21px;
    width: auto;
    object-fit: contain;
    transform: translateY(-1px);
}

.hero-actions {
    display: flex;
    align-items: start;
    gap: 18px;
    flex-wrap: wrap;
}

.btn-try-demo {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: start;
    justify-content: center;
    padding: 12px 28px;
    background: var(--cyan-primary);
    color: #031529;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(61, 232, 240, 0.35);
    transition: transform var(--trans-fast), box-shadow var(--trans-fast);
}

.btn-try-demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    animation: btnShimmer 3.5s infinite;
}

@keyframes btnShimmer {

    0%,
    65% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.btn-try-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(61, 232, 240, 0.55);
    color: #031529;
}

.cta-note {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

/* --------------------------------------------------
   6. Flow & Production Steps Section
   -------------------------------------------------- */
.flow {
    padding: 40px 0 70px;
}

.flow h2,
.t {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(26px, 3.2vw, 42px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-align: center;
    color: var(--text-white);
}

.steps {
    list-style: none;
    margin: 36px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 10px;
    align-items: start;
}

.steps li {
    font-weight: 700;
    font-size: 13.5px;
    letter-spacing: 0.08em;
    padding: 9px 18px;
    border-radius: var(--border-radius-pill);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-white);
    transition: transform var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.steps li:nth-child(1) {
    animation: stepWave 7s ease-in-out infinite 0s;
}

.steps li:nth-child(2) {
    animation: stepWave 7s ease-in-out infinite 1s;
}

.steps li:nth-child(3) {
    animation: stepWave 7s ease-in-out infinite 2s;
}

.steps li:nth-child(4) {
    animation: stepWave 7s ease-in-out infinite 3s;
}

.steps li:nth-child(5) {
    animation: stepWave 7s ease-in-out infinite 4s;
}

.steps li:nth-child(6) {
    animation: stepWave 7s ease-in-out infinite 5s;
}

.steps li:nth-child(7) {
    animation: stepWave 7s ease-in-out infinite 6s;
}

@keyframes stepWave {

    0%,
    100% {
        border-color: var(--border-card);
        box-shadow: none;
    }

    15% {
        border-color: var(--cyan-primary);
        box-shadow: 0 0 16px rgba(61, 232, 240, 0.45);
        transform: translateY(-2px);
    }

    30% {
        border-color: var(--border-card);
        box-shadow: none;
        transform: translateY(0);
    }
}

.steps li:hover {
    transform: translateY(-2px);
    border-color: var(--cyan-primary);
    box-shadow: 0 4px 16px rgba(61, 232, 240, 0.2);
}

.steps li:not(:last-child)::after {
    content: "→";
    color: var(--cyan-primary);
    margin-left: 14px;
    letter-spacing: 0;
}

.steps li:last-child {
    background: var(--cyan-primary);
    color: #031529;
    border-color: var(--cyan-primary);
    box-shadow: 0 4px 16px rgba(61, 232, 240, 0.35);
}

.tog {
    margin: 32px auto 0;
    max-width: 820px;
    text-align: center;
    color: var(--text-slate);
}

.tog p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

.chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.chips li {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-card);
    font-size: 14px;
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.04);
    transition: transform var(--trans-fast), border-color var(--trans-fast);
}

.chips li:hover {
    transform: translateY(-1px);
    border-color: var(--cyan-primary);
    background: rgba(61, 232, 240, 0.08);
}

/* --------------------------------------------------
   7. Capabilities Grid Section
   -------------------------------------------------- */
.sec {
    padding: clamp(48px, 6vw, 84px) 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-top: clamp(32px, 4vw, 52px);
}

.c {
    grid-column: span 2;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 18px;
    padding: 28px;
    backdrop-filter: blur(8px);
    transition: transform var(--trans-medium), border-color var(--trans-medium), box-shadow var(--trans-medium);
}

.c:hover {
    transform: translateY(-4px);
    border-color: var(--border-card-hover);
    box-shadow: 0 12px 32px rgba(61, 232, 240, 0.16);
}

.ic {
    width: 46px;
    height: 46px;
    padding: 11px;
    border-radius: 12px;
    background: rgba(61, 232, 240, 0.1);
    color: var(--cyan-primary);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--trans-fast);
}

.c:hover .ic {
    transform: scale(1.08);
}

.c h3 {
    margin: 18px 0 8px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--text-white);
}

.c p {
    margin: 0;
    color: var(--text-slate);
    font-size: 15px;
    line-height: 1.5;
}

.c.ai {
    grid-column: span 6;
    background: linear-gradient(120deg, rgba(61, 232, 240, 0.14), rgba(6, 40, 74, 0.55));
    border-color: rgba(61, 232, 240, 0.35);
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 26px;
    align-items: start;
}

.c.ai .ic {
    grid-row: span 2;
    width: 60px;
    height: 60px;
    padding: 14px;
}

.c.ai h3 {
    margin: 0 0 6px;
    font-size: 24px;
    color: var(--cyan-primary);
}

.c.ai p {
    max-width: 52em;
}

/* --------------------------------------------------
   8. Intelligent Production Scheduling & Pinned Scrollytelling
   -------------------------------------------------- */
.workflow-pin-sec {
    position: relative;
    min-height: 400vh;
    padding: 0 !important;
}

.workflow-sticky-frame {
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    display: flex;
    align-items: start;
    overflow: hidden;
    padding: clamp(20px, 3vw, 40px) 0;
    box-sizing: border-box;
    z-index: 10;
}

.workflow-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(28px, 5vw, 70px);
    width: 100%;
    align-items: start;
}

.workflow-aside h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(26px, 3vw, 38px);
    font-style: italic;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--cyan-primary);
}

.workflow-aside p {
    color: var(--text-slate);
    margin: 20px 0 0;
    font-size: 16px;
    line-height: 1.6;
}

/* Right Main Content & Viewport */
.workflow-main {
    position: relative;
    display: flex;
    flex-direction: column;
}

.workflow-header-wrap {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(61, 232, 240, 0.15);
}

.workflow-scroll-prompt {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cyan-primary);
    display: flex;
    align-items: start;
    gap: 6px;
    opacity: 0.8;
}

.prompt-arrow {
    display: inline-block;
    animation: promptArrowBounce 1.5s infinite;
}

@keyframes promptArrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

.workflow-viewport {
    position: relative;
    height: min(600px, calc(100vh - 210px));
    overflow: hidden;
    /* Generous left padding and negative margin so glowing pulse ring and halo never clip on the left */
    padding: 16px 20px 30px 48px;
    margin-left: -48px;
    width: calc(100% + 48px);
    box-sizing: border-box;
    /* Soft top fade mask only - NO bottom fade so final step is 100% crisp and readable */
    mask-image: linear-gradient(to bottom, transparent 0%, black 28px, black 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 28px, black 100%);
}

.tl {
    list-style: none;
    margin: 0;
    padding: 0 0 0 68px;
    position: relative;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Old ::before override */
.tl::before {
    display: none !important;
}

/* Background Guide Line (Behind steps) */
.tl-track-bg {
    position: absolute;
    left: 33px;
    width: 2px;
    border-radius: 2px;
    background: rgba(61, 232, 240, 0.12);
    z-index: 1;
}

/* Dynamic Active Progress Bar (Behind badges, under step content) */
.tl-progress-bar {
    position: absolute;
    left: 33px;
    width: 2px;
    height: 0;
    border-radius: 2px;
    background: linear-gradient(to bottom, #00c2ff 0%, #3de8f0 100%);
    box-shadow: 0 0 8px rgba(61, 232, 240, 0.8), 0 0 16px rgba(0, 194, 255, 0.5);
    z-index: 2;
    transition: height 0.15s ease-out;
}

.tl-progress-head {
    position: absolute;
    bottom: -4px;
    left: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px 3px #00c2ff, 0 0 20px 6px rgba(61, 232, 240, 0.7);
    z-index: 2;
}

/* Step Item (z-index 3 to sit cleanly in front of the progress line) */
.tl-step {
    position: relative;
    padding: 0 0 clamp(24px, 2.8vw, 36px);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 3;
}

.tl-step:last-child {
    padding-bottom: 20px;
}

.tl-step.unlocked {
    opacity: 1;
    transform: translateY(0);
}

.tl-step.completed {
    opacity: 0.88;
}

.tl-step.active-step {
    opacity: 1;
}

/* Step Badge (z-index 4, solid opaque dark background so the line never cuts through) */
.step-badge {
    position: absolute;
    left: -46px;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #030e1d !important;
    border: 2px solid rgba(61, 232, 240, 0.35);
    color: rgba(61, 232, 240, 0.6);
    font-size: 12px;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    z-index: 4;
    transition: border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.step-badge .badge-num {
    position: relative;
    z-index: 5;
}

/* Pulse Ring Element (Spreads out freely without being clipped) */
.badge-pulse-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid #3de8f0;
    opacity: 0;
    pointer-events: none;
    z-index: 3;
}

/* Checkpoint Hit Animations */
.step-badge.checkpoint-hit {
    border-color: #3de8f0;
    color: #3de8f0;
    box-shadow: 0 0 14px rgba(61, 232, 240, 0.7), inset 0 0 6px rgba(61, 232, 240, 0.3);
    animation: badgeCheckpointFlash 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-badge.checkpoint-hit .badge-pulse-ring {
    animation: ringCheckpointPulse 0.9s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes badgeCheckpointFlash {
    0% {
        transform: scale(0.6);
        border-color: #ffffff;
        color: #ffffff;
        box-shadow: 0 0 25px 8px rgba(0, 194, 255, 0.95);
    }
    40% {
        transform: scale(1.35);
        border-color: #3de8f0;
        color: #ffffff;
        box-shadow: 0 0 28px 10px rgba(0, 194, 255, 0.9), 0 0 45px rgba(61, 232, 240, 0.6);
    }
    75% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        border-color: #3de8f0;
        color: #3de8f0;
        box-shadow: 0 0 14px rgba(61, 232, 240, 0.7), inset 0 0 6px rgba(61, 232, 240, 0.3);
    }
}

@keyframes ringCheckpointPulse {
    0% {
        transform: scale(1);
        opacity: 0.95;
        border-color: #ffffff;
        box-shadow: 0 0 16px #00c2ff;
    }
    100% {
        transform: scale(2.8);
        opacity: 0;
        border-color: #3de8f0;
        box-shadow: 0 0 30px rgba(0, 194, 255, 0);
    }
}

/* Step Content */
.step-title {
    margin: 0 0 6px;
    color: var(--cyan-primary);
    font-family: var(--font-heading);
    font-size: clamp(17px, 1.7vw, 20px);
    font-weight: 700;
    line-height: 1.25;
    display: flex;
    align-items: start;
    flex-wrap: wrap;
    min-height: 26px;
}

.step-desc {
    margin: 0;
    color: var(--text-slate);
    font-size: 14.5px;
    line-height: 1.55;
    min-height: 22px;
}

/* Typing Caret */
.tl-cursor {
    display: inline-block;
    color: #3de8f0;
    margin-left: 2px;
    font-weight: 300;
    font-size: 1.05em;
    animation: tlCursorBlink 0.55s infinite;
    text-shadow: 0 0 8px rgba(61, 232, 240, 0.85);
    vertical-align: baseline;
}

.tl-cursor.fading {
    opacity: 0;
    transition: opacity 0.4s ease;
}

@keyframes tlCursorBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Gate Tag Pill */
.gate-tag {
    display: inline-flex;
    align-items: start;
    margin-left: 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #031529;
    background: #3de8f0;
    padding: 2px 8px;
    border-radius: 9999px;
    box-shadow: 0 0 10px rgba(61, 232, 240, 0.4);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gate-tag.visible {
    opacity: 1;
    transform: scale(1);
}

/* Disable old static gate ::after */
.tl .g h3::after {
    display: none !important;
}

/* --------------------------------------------------
   9. Key Benefits Section
   -------------------------------------------------- */
.bn {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: clamp(32px, 4vw, 52px);
}

.b {
    padding: 26px 28px;
    border-radius: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-top: 3px solid var(--cyan-primary);
    transition: transform var(--trans-medium), box-shadow var(--trans-medium);
}

.b:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(61, 232, 240, 0.14);
}

.b h3 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    color: var(--text-white);
}

.b p {
    margin: 0;
    color: var(--text-slate);
    font-size: 14.5px;
    line-height: 1.5;
}

/* Ecosystem Integration */
.int {
    margin-top: clamp(36px, 5vw, 60px);
    padding: clamp(28px, 4vw, 52px);
    border-radius: 24px;
    text-align: center;
    background: linear-gradient(160deg, rgba(61, 232, 240, 0.12), rgba(6, 40, 74, 0.55));
    border: 1px solid var(--border-card);
}

.int h2 {
    margin: 0;
}

.int .lab {
    margin: 14px 0 20px;
    color: var(--text-slate);
    font-size: 15px;
}

.int .chips li {
    font-size: 15px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 10px;
    background: rgba(3, 13, 26, 0.75);
    border: 1px solid var(--border-card);
}

.int .chips li.hl {
    border-color: var(--cyan-primary);
    color: var(--cyan-primary);
    box-shadow: 0 0 12px rgba(61, 232, 240, 0.25);
}

.int .end {
    margin: 24px auto 0;
    max-width: 720px;
    color: var(--text-slate);
    font-size: 15px;
    line-height: 1.55;
}

/* --------------------------------------------------
   10. Footer & Ecosystem Navigation Bar
   -------------------------------------------------- */
footer {
    margin-top: clamp(60px, 8vw, 110px);
    background: #020b17;
    border-top: 1px solid rgba(61, 232, 240, 0.18);
    padding: clamp(48px, 6vw, 80px) 0 36px 0;
}

footer h2 {
    margin: 0 0 24px;
    font-family: var(--font-heading);
    font-size: clamp(28px, 3.2vw, 42px);
    font-weight: 300;
    font-style: italic;
    color: var(--text-white);
}

footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
}

footer a {
    display: flex;
    align-items: start;
    gap: 20px;
    font-size: clamp(17px, 1.8vw, 22px);
    font-weight: 300;
    font-style: italic;
    text-decoration: none;
    color: var(--text-slate);
    width: fit-content;
    transition: color var(--trans-fast);
}

footer a:hover {
    color: var(--cyan-primary);
    text-decoration: none;
}

footer svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
    flex: none;
}

.optimes-ecosystem-bar {
    margin: 36px 0 10px 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: start;
    text-align: center;
    width: 100%;
}

.ecosystem-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-muted);
}

.ecosystem-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.eco-pill {
    display: inline-flex;
    align-items: start;
    padding: 6px 14px;
    border-radius: var(--border-radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: all 0.2s ease;
}

.eco-pill:hover {
    background: rgba(61, 232, 240, 0.2);
    border-color: var(--cyan-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.eco-pill.active {
    background: var(--cyan-primary);
    color: #031529;
    border-color: var(--cyan-primary);
    font-weight: 700;
}

/* --------------------------------------------------
   11. Responsive Styles
   -------------------------------------------------- */
@media (max-width: 900px) {
    .workflow-pin-sec {
        min-height: 340vh;
    }

    .workflow-sticky-frame {
        height: calc(100vh - 64px);
        top: 64px;
        padding: 16px 0;
    }

    .workflow-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .workflow-aside h2 {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .workflow-aside p {
        font-size: 14px;
        margin: 8px 0 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .workflow-header-wrap {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .workflow-viewport {
        height: min(480px, calc(100vh - 200px));
        padding: 12px 14px 20px 40px;
        margin-left: -40px;
        width: calc(100% + 40px);
    }

    .tl {
        padding-left: 56px;
    }

    .step-badge {
        left: -40px;
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .tl-track-bg, .tl-progress-bar {
        left: 27px;
    }

    .step-title {
        font-size: 16px;
    }

    .step-desc {
        font-size: 13.5px;
        line-height: 1.45;
    }

    .bn {
        grid-template-columns: 1fr 1fr;
    }

    .c {
        grid-column: span 3;
    }

    .c.ai {
        grid-column: span 6;
    }

    .hero-card {
        height: auto;
        min-height: 360px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background: #030e1d;
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
        display: none;
        gap: 12px;
        z-index: 9999;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links .nav-btn {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.22);
    }

    .module-switch-dropdown {
        position: static;
        width: 100%;
        margin-top: 8px;
    }

    .hero-card {
        justify-content: center;
        text-align: center;
    }

    .hero-overlay {
        background: rgba(3, 13, 26, 0.85);
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: start;
        text-align: center;
        justify-content: center;
        margin: 0 auto;
    }

    .hero-headline {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }

    .hero-subtext {
        display: flex;
        align-items: start;
        justify-content: center;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }

    .hero-actions {
        display: flex;
        justify-content: center;
        align-items: start;
        width: 100%;
        margin: 0 auto;
    }

    .btn-try-demo {
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .bn {
        grid-template-columns: 1fr;
    }

    .c {
        grid-column: span 6;
    }

    .c.ai {
        grid-template-columns: 1fr;
    }

    .c.ai .ic {
        grid-row: auto;
        margin-bottom: 16px;
    }

    .hero-headline {
        font-size: 28px;
        text-align: center;
    }

    .hero-subtext {
        font-size: 15px;
        gap: 6px;
        justify-content: center;
        text-align: center;
    }

    .hero-optimes-wordmark {
        height: 18px;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 24px;
        line-height: 1.25;
        text-align: center;
    }

    .hero-subtext {
        font-size: 13.5px;
        line-height: 1.45;
        justify-content: center;
        text-align: center;
    }

    .c {
        padding: 16px;
        border-radius: 12px;
    }

    .pill {
        font-size: 11.5px;
        padding: 5px 10px;
    }

    .hero-actions {
        display: flex;
        justify-content: center;
        align-items: start;
        width: 100%;
        margin: 0 auto;
    }

    .btn-try-demo {
        margin: 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}