/* =========================================================== */
/* KWIKO HOME PAGE STYLES */
/* Extracted from index_v8 final animated updates.html */
/* =========================================================== */


/* ─── HERO SECTION ─── */
/* ─── CSS VARIABLES ─── */
:root {
    --hero-min-height: 100svh;
    /* Small viewport height - better mobile support */
    --hero-padding-top: 120px;
    /* Reduced to move headline UP */
    --hero-padding-bottom: 80px;
}

/* ─── HERO BASE ─── */
.k-hero {
    position: relative;
    min-height: var(--hero-min-height);
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--hero-padding-top) 0 var(--hero-padding-bottom);
    overflow: hidden;

    /* Fallback for browsers without svh */
    min-height: 100vh;
    min-height: var(--hero-min-height);
}

/* ─── CANVAS WRAPPER ─── */
.hero-canvas-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
}

#canvas-container {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Canvas fallback - shows until Three.js loads */
.hero-canvas-fallback {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url('https://kwiko.io/wp-content/uploads/2025/12/Kwiko-O-background-scaled.webp') no-repeat center center;
    background-size: cover;
    transition: opacity 1s ease;
}

/* Hide fallback when canvas is ready */
.k-hero.canvas-ready .hero-canvas-fallback {
    opacity: 0;
    pointer-events: none;
}

/* ─── GRAIN OVERLAY ─── */
.hero-grain {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ─── VIGNETTE ─── */
.hero-vignette {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 60% at 50% 40%,
            transparent 0%,
            rgba(5, 5, 5, 0.4) 70%,
            rgba(5, 5, 5, 0.8) 100%);
}

/* ─── GRID LINES ─── */
.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* ─── CONTAINER ─── */
.hero-container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    /* Fill vertical space */
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ─── CONTENT LAYOUT ─── */
.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: stretch;
    /* Grow to fill container */
    flex: 1;
}

/* ─── HEADLINE ─── */
.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.4vw, 4.4rem) !important;
    line-height: 1.05;
    margin: 0;
    font-weight: 400;
    /* LCP FIX: Default to visible so Lighthouse sees text immediately */
    opacity: 1;
    transform: translateY(0);
    white-space: nowrap;
}

/* Animation only triggers when body.is-loading is present (loader sets this) */
body.is-loading .hero-headline {
    opacity: 0;
    transform: translateY(40px);
}

.hero-headline br {
    display: block;
}

.hero-headline em {
    font-style: italic;
    color: var(--k-orange);
}

/* Animation states (applied via JS) */


/* ─── SUPPORT CONTENT ─── */
.hero-support {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 32px;
    padding-bottom: 40px;
    /* Reduced to allow text to sit lower */
    align-self: stretch;
    text-align: right;
    /* Optical alignment with headline baseline */
}

.js .hero-support {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s,
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.js .hero-support.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── LEAD TEXT ─── */
.hero-lead-wrapper {
    position: relative;
    padding-right: 24px;
    padding-left: 0;
    margin-top: 180px;
}

.hero-lead-wrapper::before {
    content: '';
    position: absolute;
    left: auto;
    right: 0;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: linear-gradient(to bottom, var(--k-orange), transparent);
    border-radius: 1px;
}

.hero-lead {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--k-grey-light);
    margin: 0;
    max-width: 520px;
}

.hero-lead strong {
    color: #fff;
    font-weight: 500;
}

/* ─── BUTTONS ─── */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Primary Button */
.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    background: var(--k-orange);
    color: #000;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s ease;
}

/* Shine effect */
.hero-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(243, 112, 33, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.hero-btn-primary:hover::before {
    left: 100%;
}

.hero-btn-primary:active {
    transform: translateY(0);
}

.hero-btn-primary .btn-icon {
    display: flex;
    transition: transform 0.25s ease;
}

.hero-btn-primary:hover .btn-icon {
    transform: translateX(3px);
}

/* Secondary Button */
.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 4px;
    background: transparent;
    color: var(--k-grey-light);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.25s ease;
}

.hero-btn-secondary::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 4px;
    right: 4px;
    height: 1px;
    background: currentColor;
    opacity: 0.3;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hero-btn-secondary:hover {
    color: #fff;
}

.hero-btn-secondary:hover::after {
    transform: scaleX(1);
    transform-origin: left;
    opacity: 0.6;
}

.hero-btn-secondary .btn-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}

.hero-btn-secondary:hover .btn-arrow {
    transform: translateX(4px);
}

/* ─── SCROLL CUE ─── */
/* ─── SCROLL CENTER ─── */
.hero-scroll-center {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10;
    opacity: 0;
    transition: opacity 1s ease 1s;
}

.k-hero.content-visible .hero-scroll-center {
    opacity: 1;
}

.mouse-icon {
    width: 24px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.wheel {
    width: 2px;
    height: 6px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: mouse-wheel 1.5s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes mouse-wheel {
    0% {
        top: 6px;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

.scroll-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.scroll-arrows span {
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
    animation: arrow-scroll 2s infinite;
    opacity: 0;
}

.scroll-arrows span:nth-child(1) {
    animation-delay: 0s;
}

.scroll-arrows span:nth-child(2) {
    animation-delay: 0.15s;
}

.scroll-arrows span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes arrow-scroll {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-5px, -5px);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: rotate(45deg) translate(5px, 5px);
    }
}

/* ─── FOCUS STATES ─── */
.hero-btn-primary:focus-visible,
.hero-btn-secondary:focus-visible {
    outline: 2px solid var(--k-orange);
    outline-offset: 3px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-support {
        padding-bottom: 0;
        justify-content: flex-start;
        text-align: left;
    }

    .hero-lead-wrapper {
        padding-right: 0;
        padding-left: 24px;
    }

    .hero-lead-wrapper::before {
        right: auto;
        left: 0;
    }

    .hero-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    :root {
        --hero-padding-top: 120px;
        --hero-padding-bottom: 60px;
    }

    .hero-headline {
        font-size: clamp(2.4rem, 4.4vw, 4.4rem) !important;
        white-space: nowrap;
    }

    .hero-headline br {
        display: block;
    }

    .hero-lead {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    /* ─── REDUCED MOTION ─── */
    @media (prefers-reduced-motion: reduce) {

        .js .hero-headline,
        .js .hero-support {
            opacity: 1;
            transform: none;
            transition: none;
        }

        .scroll-dot {
            animation: none;
            top: 50%;
            opacity: 1;
        }

        .hero-btn-primary::before {
            display: none;
        }
    }

    /* ─── PRINT ─── */
    @media print {
        .k-hero {
            min-height: auto;
            padding: 40px 0;
        }

        .hero-canvas-wrapper,
        .hero-grain,
        .hero-vignette,
        .hero-grid,
        .hero-scroll-cue {
            display: none;
        }

        .hero-headline {
            color: #000;
        }

        .hero-headline em {
            color: #000;
            font-style: italic;
        }
    }

    .hero-btn-primary {
        width: 100%;
        justify-content: center;
    }

    .hero-scroll-cue {
        display: none;
    }

    .hero-grid {
        background-size: 40px 40px;
    }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {

    .js .hero-support {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-headline {
        opacity: 1;
        transform: none;
    }

    .scroll-dot {
        animation: none;
        top: 50%;
        opacity: 1;
    }

    .hero-btn-primary::before {
        display: none;
    }
}

/* ─── NO-JS FALLBACK ─── */
.no-js .hero-headline,
.no-js .hero-support {
    opacity: 1;
    transform: none;
}

.no-js .hero-scroll-cue {
    opacity: 1;
}

/* ─── PRINT ─── */
@media print {
    .k-hero {
        min-height: auto;
        padding: 40px 0;
    }

    .hero-canvas-wrapper,
    .hero-grain,
    .hero-vignette,
    .hero-grid,
    .hero-scroll-cue {
        display: none;
    }

    .hero-headline {
        color: #000;
    }

    .headline-accent em {
        color: #000;
        font-style: italic;
    }
}



/* ─── TRUST BAR ─── */
.trust-bar-section {
    background-color: var(--k-bg);
    padding: 60px 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.trust-label {
    font-family: var(--font-mono);
    color: var(--k-orange);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 40px;
}

.trust-logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 60px;
}

.trust-logo-img {
    height: 32px;
    width: auto;
    opacity: 0.7;
    filter: brightness(0) invert(1);
    transition: 0.4s;
}

.trust-logo-img:hover {
    opacity: 1;
    transform: scale(1.05);
}



/* ─── ABOUT SECTION ─── */
/* ─── ABOUT BASE ─── */
.k-about {
    position: relative;
    background: var(--k-bg);
    padding: 160px 0;
    overflow: hidden;
}

/* ─── BACKGROUND ACCENT ─── */
.about-accent {
    position: absolute;
    top: 50%;
    left: -15%;
    width: 50%;
    height: 80%;
    transform: translateY(-50%);
    background: radial-gradient(ellipse at center,
            rgba(243, 112, 33, 0.12) 0%,
            transparent 70%);
    filter: blur(80px);
    opacity: 0;
    transition: opacity 1.5s ease;
    pointer-events: none;
}

.k-about.is-visible .about-accent {
    opacity: 1;
}

/* ─── GRID BACKGROUND ─── */
.about-grid-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.4;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(to right, black 20%, transparent 60%);
    -webkit-mask-image: linear-gradient(to right, black 20%, transparent 60%);
}

/* ─── PROGRESS INDICATOR ─── */
.about-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(255, 255, 255, 0.05);
}

.about-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, var(--k-orange), transparent);
    transition: height 0.1s ease-out;
}

/* ─── CONTAINER ─── */
.about-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ─── LAYOUT ─── */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 100px;
    align-items: start;
}

/* ─── LEFT COLUMN ─── */
.about-left {
    position: relative;
}

/* Label */
.about-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--k-orange);
    margin-bottom: 24px;

    /* Animation */
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.k-about.is-visible .about-label {
    opacity: 1;
    transform: translateY(0);
}

/* ─── HEADLINE ─── */
.about-headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4.5vw, 4rem);
    font-weight: 400;
    line-height: 1.15;
    margin: 0;
}

.headline-line-wrap {
    display: block;
    overflow: hidden;
    padding-bottom: 0.05em;
}

.headline-line {
    display: block;
    color: var(--k-grey-dark);
    transition:
        color 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        text-shadow 0.8s ease,
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);

    /* Initial state for animation */
    transform: translateY(100%);
}

.k-about.is-visible .headline-line {
    transform: translateY(0);
}

/* Stagger the line reveals */
.headline-line[data-line="0"] {
    transition-delay: 0.1s;
}

.headline-line[data-line="1"] {
    transition-delay: 0.2s;
}

.headline-line[data-line="2"] {
    transition-delay: 0.3s;
}

/* Lit state - progressive lighting */
.headline-line.is-lit {
    color: var(--k-white);
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.15);
    background: none;
    -webkit-text-fill-color: var(--k-white);
}

/* Partial lighting via CSS custom property */
.headline-line {
    --light-progress: 0;
    background: linear-gradient(90deg,
            var(--k-white) calc(var(--light-progress) * 100%),
            var(--k-grey-dark) calc(var(--light-progress) * 100%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fallback for browsers that don't support background-clip well */
@supports not (-webkit-background-clip: text) {
    .headline-line {
        background: none;
        -webkit-text-fill-color: currentColor;
    }
}

/* ─── DIVIDER ─── */
.about-divider {
    width: 60px;
    height: 2px;
    margin-top: 40px;
    background: linear-gradient(90deg, var(--k-orange), transparent);
    border-radius: 1px;

    /* Animation */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    transition-delay: 0.4s;
    opacity: 0.3;
    /* Start dim */
}

.about-divider.is-lit {
    opacity: 1;
    /* Light up */
    box-shadow: 0 0 15px var(--k-orange);
    /* Add glow */
}

.k-about.is-visible .about-divider {
    transform: scaleX(1);
}

/* ─── STATS ROW ─── */
.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);

    /* Animation */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}

.k-about.is-visible .about-stats {
    opacity: 1;
    transform: translateY(0);
}

.about-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--k-white);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--k-grey-mid);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ─── RIGHT COLUMN ─── */
.about-right {
    padding-top: 56px;
    /* Optical alignment with headline */
}

.about-content {
    max-width: 540px;
}

/* Lead Text */
.about-lead {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--k-grey-light);
    margin: 0 0 24px 0;

    /* Animation */
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.k-about.is-visible .about-lead {
    opacity: 1;
    transform: translateY(0);
}

/* Body Text */
.about-body {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--k-grey-mid);
    margin: 0 0 40px 0;

    /* Animation */
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease 0.35s, transform 0.6s ease 0.35s;
}

.k-about.is-visible .about-body {
    opacity: 1;
    transform: translateY(0);
}

/* ─── CTA LINK ─── */
.about-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--k-grey-light);
    text-decoration: none;
    padding: 12px 0;
    position: relative;
    transition: color 0.3s ease;

    /* Animation */
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s ease 0.45s,
        transform 0.6s ease 0.45s,
        color 0.3s ease;
}

.k-about.is-visible .about-cta {
    opacity: 1;
    transform: translateY(0);
}

.about-cta::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--k-orange);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-cta:hover {
    color: var(--k-white);
}

.about-cta:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.cta-arrow {
    display: flex;
    transition: transform 0.3s ease;
}

.about-cta:hover .cta-arrow {
    transform: translateX(4px);
}

/* ─── FOCUS STATES ─── */
.about-cta:focus-visible {
    outline: 2px solid var(--k-orange);
    outline-offset: 4px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .k-about {
        padding: 120px 0;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-right {
        padding-top: 0;
    }

    .about-progress {
        display: none;
    }
}

@media (max-width: 768px) {
    .k-about {
        padding: 80px 0;
    }

    .about-headline {
        font-size: clamp(2rem, 7vw, 2.5rem);
    }

    .about-stats {
        flex-wrap: wrap;
        gap: 24px 40px;
    }

    .about-grid-bg {
        display: none;
    }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {

    .about-label,
    .about-lead,
    .about-body,
    .about-cta,
    .about-stats,
    .headline-line,
    .about-divider {
        opacity: 1;
        transform: none;
        transition: color 0.3s ease;
    }

    .about-accent {
        opacity: 1;
        transition: none;
    }

    .about-progress-bar {
        transition: none;
    }

    /* Disable scroll-linked lighting */
    .headline-line {
        --light-progress: 1;
        color: var(--k-white);
    }
}

/* ─── NO-JS FALLBACK ─── */
.no-js .about-label,
.no-js .about-lead,
.no-js .about-body,
.no-js .about-cta,
.no-js .about-stats,
.no-js .headline-line,
.no-js .about-divider,
.no-js .about-accent {
    opacity: 1;
    transform: none;
}

.no-js .headline-line {
    color: var(--k-white);
    --light-progress: 1;
}



/* ─── SERVICES SECTION ─── */
.k-services {
    position: relative;
    background: var(--k-bg);
    padding: 140px 0;
    /* More breathing room */
    overflow: hidden;
    /* PERFORMANCE: Skip layout calculation until near viewport */
    content-visibility: auto;
    contain-intrinsic-size: auto 1000px;
}

.k-services::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 140, 26, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(46, 92, 255, 0.03) 0%, transparent 40%);
}

.k-services-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    position: relative;
    z-index: 2;
}

.k-services-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Balanced 50/50 split */
    gap: 60px;
    align-items: end;
    /* Align to bottom for solid baseline */
    margin-bottom: 80px;
    /* Increased separation */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle anchor line */
    padding-bottom: 40px;
}

.k-services-headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    /* Larger, more commanding */
    font-weight: 400;
    line-height: 1.1;
    color: var(--k-white);
    margin: 0;
    letter-spacing: -0.02em;
}

.k-italic {
    font-family: var(--font-display);
    /* Ensure consistent font */
    font-style: italic;
    color: var(--k-grey-mid);
    font-weight: 300;
}

.k-services-right {
    padding-bottom: 8px;
    /* Optical alignment with headline */
    max-width: 540px;
    justify-self: end;
}

.k-services-intro {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--k-grey-mid);
    margin: 0 0 32px 0;
}

.k-services-intro strong {
    color: var(--k-white);
    font-weight: 500;
}

/* Magnetic CTA */
.k-services-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--k-orange);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 12px 0;
    border-bottom: 1px solid transparent;
}

.k-services-cta:hover {
    color: #fff;
    border-bottom-color: var(--k-orange);
    gap: 16px;
    /* Expand gap */
}

.k-services-cta svg {
    transition: transform 0.3s ease;
}

.k-services-cta:hover svg {
    transform: translateX(4px);
}

.k-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    /* Consistent gap */
}

/* ─── PREMIUM SERVICE CARD (Glass Strategy B) ─── */
.k-service-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 50%), #1a1a1c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    min-height: 420px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 -1px 0 rgba(0, 0, 0, 0.2) inset,
        0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s, border-color 0.3s;

    /* Performance optimization */
    contain: layout style;
    will-change: transform;
}

/* Spotlight Removed per user request */
.k-service-card:hover {
    border-color: rgba(243, 112, 33, 0.4);
    transform: translateY(-8px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(243, 112, 33, 0.1);
}

/* Focus State for Accessibility */
.k-service-card:focus-visible {
    outline: 2px solid var(--k-orange);
    outline-offset: 4px;
}

.k-service-card:focus-within .k-card-reveal,
.k-service-card:focus-within .k-reveal-label,
.k-service-card:focus-within .k-svc-list li {
    opacity: 1;
    transform: none;
}

/* ─── Card Front ─── */
.k-card-front {
    position: relative;
    z-index: 2;
    padding: 40px 32px;
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: opacity 0.4s ease;
}

.k-card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 32px;
    color: var(--k-orange);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.4s;
}

.k-service-card:hover .k-card-icon {
    transform: scale(1.1);
    color: #fff;
    /* Icon turns white on hover */
}

.k-card-icon svg {
    width: 100%;
    height: 100%;
}

.k-card-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--k-white);
    margin: 0 0 16px 0;
    line-height: 1.2;
    min-height: 3.8rem;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.k-card-desc {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--k-grey-light);
    margin: 0;
    flex-grow: 1;
    opacity: 1;
    transition: opacity 0.3s;
}

.k-service-card:hover .k-card-desc {
    opacity: 0.3;
}

/* Footer with Link & Dot */
.k-card-footer {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.k-service-card:hover .k-card-footer {
    opacity: 1;
}

.k-hover-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--k-grey-light);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.k-service-card:hover .k-hover-link {
    color: var(--k-white);
}

.k-dot {
    width: 6px;
    height: 6px;
    background: var(--k-orange);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.k-service-card:hover .k-dot {
    opacity: 1;
    transform: scale(1);
}

/* Hide old hint */
.k-card-hint {
    display: none;
}

/* ─── Card Reveal Layer ─── */
.k-card-reveal {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: rgba(5, 5, 5, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.k-reveal-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--k-orange);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: block;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease 0.1s;
}

.k-service-card:hover .k-reveal-label {
    opacity: 1;
    transform: translateY(0);
}

.k-svc-list {
    list-style: none;
    padding: 0;
    margin: 0 0 auto 0;
}

.k-svc-list li {
    position: relative;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--k-grey-light);
    padding: 10px 0;
    padding-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.k-svc-list li:last-child {
    border-bottom: none;
}

/* Stagger delays */
.k-svc-list li:nth-child(1) {
    transition-delay: 0.05s;
}

.k-svc-list li:nth-child(2) {
    transition-delay: 0.1s;
}

.k-svc-list li:nth-child(3) {
    transition-delay: 0.15s;
}

.k-svc-list li:nth-child(4) {
    transition-delay: 0.2s;
}

.k-svc-list li:nth-child(5) {
    transition-delay: 0.25s;
}

.k-service-card:hover .k-svc-list li {
    opacity: 1;
    transform: translateX(0);
}

/* Highlight flash on appear */
.k-svc-list li::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--k-orange), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.k-service-card:hover .k-svc-list li::before {
    animation: flash 0.4s ease forwards;
}

@keyframes flash {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0;
    }
}

.k-svc-list li::after {
    content: '▸';
    color: var(--k-orange);
    margin-right: 8px;
    font-size: 0.8em;
}

.k-svc-list li:hover {
    color: var(--k-white);
    padding-left: 8px;
    /* Slide interaction */
    border-bottom-color: rgba(255, 140, 26, 0.3);
}



.k-card-metric {
    margin-top: 24px;
    padding: 20px;
    /* Added padding */
    background: rgba(255, 255, 255, 0.03);
    /* Subtle background */
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Border */
    border-radius: 8px;
    /* Rounded corners */
    display: flex;
    align-items: center;
    /* Align side-by-side */
    justify-content: space-between;
    gap: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.3s;
}

.k-card-metric .metric-val {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff;
    /* Fallback */
}

.k-card-metric .metric-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--k-grey-mid);
    text-align: right;
    line-height: 1.4;
}

.k-service-card:hover .k-card-metric {
    opacity: 1;
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.06);
    /* Slightly lighter on hover */
    border-color: rgba(255, 255, 255, 0.15);
}

.k-service-card:hover .k-card-reveal {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ─── Mobile / Reduced Motion ─── */
.k-card-toggle {
    width: 24px;
    height: 24px;
    color: var(--k-grey-mid);
    transition: transform 0.3s ease, color 0.3s ease;
}

.k-service-card:hover .k-card-toggle {
    color: var(--k-orange);
}

/* ─── Mobile Accordion Styles ─── */
@media (max-width: 768px) {
    .k-service-card {
        min-height: auto;
        height: auto;
        padding: 0;
        flex-direction: column;
    }

    .k-card-front {
        padding: 24px;
        flex: 0 0 auto;
    }

    .k-services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .k-card-desc {
        display: block;
        opacity: 1 !important;
    }

    .k-card-footer {
        opacity: 1 !important;
        margin-top: 20px;
        padding-top: 20px;
    }

    /* Disable hover effects on touch */
    .k-service-card:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .k-service-card:hover .k-card-icon {
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.03);
        color: var(--k-orange);
    }

    /* Accordion Reveal */
    .k-card-reveal {
        position: relative;
        inset: auto;
        background: rgba(255, 255, 255, 0.02);
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        transform: none;
        opacity: 1;
        /* Always opaque container */
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        display: block;
        /* Ensure it's not none */
    }

    .k-reveal-inner {
        padding: 24px;
        opacity: 1 !important;
        /* Force content valid */
        transform: none !important;
        /* No slide up on mobile */
    }

    .k-service-card.is-expanded .k-card-reveal {
        max-height: 1000px;
        /* Safe buffer */
        pointer-events: auto;
    }

    .k-service-card.is-expanded .k-card-toggle {
        transform: rotate(180deg);
        color: var(--k-orange);
    }

    /* Reset metric styling for mobile */
    .k-card-metric {
        margin-top: 24px;
        flex-direction: row;
        align-items: center;
        opacity: 1 !important;
        transform: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    .k-service-card,
    .k-card-icon,
    .k-svc-list li,
    .k-card-reveal,
    .k-reveal-label,
    .k-card-metric {
        transition: none !important;
        animation: none !important;
    }

    .k-service-card:hover {
        transform: none;
    }

    .k-service-card::before,
    .k-service-card::after {
        display: none;
    }
}

/* ─── Hover States (Desktop Only) ─── */
@media (hover: hover) and (pointer: fine) {
    .k-service-card:hover {
        transform: translateY(-6px);
        border-color: rgba(255, 140, 26, 0.4);
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    }

    .k-service-card:hover .k-card-icon {
        transform: scale(0.9);
        opacity: 0.6;
    }

    .k-service-card:hover .k-card-front {
        opacity: 0.3;
        transform: translateY(-10px);
    }

    .k-service-card:hover .k-card-hint {
        opacity: 0;
    }

    .k-service-card:hover .k-card-reveal {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* ─── Tech Card Variant ─── */
.k-service-card.is-tech {
    background: linear-gradient(to bottom, var(--k-panel-alt), #0a0d14);
    border-color: rgba(46, 92, 255, 0.2);
}

.k-service-card.is-tech .k-card-icon {
    color: var(--k-blue);
}

.k-service-card.is-tech .k-reveal-label {
    color: var(--k-blue);
}

.k-service-card.is-tech .k-svc-list li {
    border-left-color: var(--k-blue);
}

.k-service-card.is-tech .metric-label {
    color: var(--k-blue);
}

@media (hover: hover) and (pointer: fine) {
    .k-service-card.is-tech:hover {
        border-color: rgba(46, 92, 255, 0.5);
    }
}

/* ─── CTA Button ─── */
.k-services-cta {
    display: flex;
    justify-content: center;
}



/* ─── Responsive: Tablet ─── */
@media (max-width: 1200px) {
    .k-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .k-service-card {
        min-height: 360px;
    }
}

/* ─── Responsive: Mobile (Show All Content) ─── */
@media (max-width: 900px) {
    .k-services {
        padding: 80px 0;
    }

    .k-services-header {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .k-services-grid {
        grid-template-columns: 1fr;
    }

    .k-services-right {
        padding-top: 0;
    }

    /* On mobile: show everything, no reveal animation needed */
    .k-service-card {
        min-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        background: rgba(10, 10, 10, 0.95) !important;
        /* Consistent dark theme */
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .k-card-front {
        padding: 28px 24px 20px !important;
        position: relative;
        opacity: 1 !important;
        transform: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .k-card-icon {
        width: 40px !important;
        height: 40px !important;
        margin-bottom: 20px !important;
    }

    .k-card-title {
        font-size: 1.5rem !important;
        margin-bottom: 14px !important;
    }

    .k-card-desc {
        font-size: 0.95rem !important;
        line-height: 1.65 !important;
    }

    .k-card-hint {
        display: none !important;
    }

    .k-card-reveal {
        position: relative !important;
        inset: auto !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        background: transparent !important;
        padding: 20px 24px 28px !important;
        margin-top: 0;
        border-top: none !important;
    }

    .k-reveal-label {
        font-size: 0.65rem !important;
        margin-bottom: 18px !important;
        opacity: 0.8;
    }

    .k-card-icon {
        opacity: 1 !important;
        transform: none !important;
    }
}

@media (max-width: 640px) {
    .k-services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .k-btn-ghost {
        width: 100%;
    }
}



/* ─── DIAGNOSTICS SECTION ─── */
/* ═══════════════════════════════════════════════════════
           DIAGNOSTICS CSS OVERHAUL
           ═══════════════════════════════════════════════════════ */

.k-diagnostics {
    padding: 120px 0;
    background: var(--k-bg);
    color: var(--k-white);
}

.diag-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

/* HEADER */
.diag-header {
    margin-bottom: 60px;
}

.diag-label {
    font-family: var(--font-mono);
    color: var(--k-orange);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}

.diag-headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    font-weight: 400;
    margin-bottom: 1rem;
}

.diag-subhead {
    font-size: 1.1rem;
    color: var(--k-grey-mid);
}

/* GRID */
.diag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* CARD 3D SETUP */
.diag-card {
    perspective: 1200px;
    cursor: pointer;
    height: 480px;
    /* Contain layout for performance */
    contain: layout style;
}

/* Focus state */
.diag-card:focus-visible {
    outline: 2px solid var(--k-orange);
    outline-offset: 4px;
    border-radius: 16px;
}

.diag-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Flip Triggers */
@media (hover: hover) {
    .diag-card:hover .diag-card-inner {
        transform: rotateY(180deg);
    }

    /* Hint for hover capable devices */
    .diag-card {
        will-change: transform;
    }
}

.diag-card.is-flipped .diag-card-inner {
    transform: rotateY(180deg);
}

/* FRONT & BACK FACES */
.diag-card-front,
.diag-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--k-border);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ─── PROBLEM STATE (FRONT) ─── */
.diag-card-front {
    background: linear-gradient(145deg, #0a0a0a 0%, #141414 100%);
    /* Desaturated feel */
    filter: grayscale(80%) brightness(0.9);
    transition: filter 0.3s ease;
}

.diag-card:hover .diag-card-front {
    filter: grayscale(60%) brightness(1);
}

/* Scanline Overlay */
.diag-card-front::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px);
    pointer-events: none;
    opacity: 0.5;
    z-index: 1;
}

/* Static Noise */
.diag-card-front::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.04;
    mix-blend-mode: overlay;
    pointer-events: none;
    animation: noise-drift 0.5s steps(5) infinite;
    z-index: 2;
}

@keyframes noise-drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-5%, -5%);
    }
}

/* ─── SOLUTION STATE (BACK) ─── */
.diag-card-back {
    background: linear-gradient(145deg, #0f1115 0%, #1a1d24 100%);
    transform: rotateY(180deg);
}

/* Animated Border Gradient */
.diag-card-back::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
            rgba(243, 112, 33, 0.5),
            transparent 50%,
            rgba(243, 112, 33, 0.2));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ─── CARD CONTENT STYLES ─── */
.card-screen {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 240px;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-screen--live {
    background: rgba(0, 20, 10, 0.2);
    border-color: rgba(34, 197, 94, 0.1);
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 400;
    z-index: 3;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--k-grey-mid);
    z-index: 3;
}

/* Badges */
.error-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--k-red);
    border: 1px solid rgba(255, 75, 75, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 0, 0, 0.1);
}

.status-online {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-online::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 8px #22c55e;
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 16px #22c55e;
    }
}

/* Glitch Text */
.glitch-text {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--k-white);
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {

    0%,
    90%,
    100% {
        transform: translateX(0);
        opacity: 1;
    }

    92% {
        transform: translateX(-2px);
        opacity: 0.8;
    }

    94% {
        transform: translateX(2px);
        opacity: 1;
    }

    96% {
        transform: translateX(-1px);
        opacity: 0.9;
    }
}

/* Bars */
.broken-bar,
.live-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 12px 0;
}

.bar-fill {
    height: 100%;
    background: var(--k-red);
}

.live-bar .bar-fill {
    background: #22c55e;
    width: 0%;
    /* JS animates this */
}

.bar-fill--animated {
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Terminal */
.terminal-style {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #ef4444;
}

.terminal-style.clean {
    color: #22c55e;
}

.term-line {
    margin-bottom: 4px;
}

.term-block {
    background: currentColor;
    opacity: 0.5;
}

.term-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Charts */
.chart-svg {
    width: 100%;
    height: 60px;
    overflow: visible;
}

.chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.metrics-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.metric-row {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.metric-row.down {
    color: var(--k-grey-mid);
}

.metric-row.up {
    color: var(--k-white);
}

/* Checkmarks */
.checkmarks {
    display: flex;
    gap: 12px;
    margin-top: auto;
    font-size: 0.75rem;
    color: var(--k-grey-mid);
}

.check {
    color: #22c55e;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .diag-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .diag-grid {
        grid-template-columns: 1fr;
    }

    .diag-card {
        height: 400px;
    }

    /* Touch Hint */
    .diag-card::after {
        content: 'Tap to flip';
        position: absolute;
        bottom: 16px;
        right: 16px;
        font-size: 0.7rem;
        color: var(--k-grey-mid);
        opacity: 0.6;
        pointer-events: none;
        z-index: 5;
    }

    .diag-card.is-flipped::after {
        content: 'Tap to close';
    }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    .diag-card-inner {
        transform: none !important;
        transition: none;
    }

    .diag-card-back {
        transform: none;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }

    .diag-card.is-flipped .diag-card-back {
        opacity: 1;
        pointer-events: auto;
    }

    .diag-card.is-flipped .diag-card-front {
        opacity: 0;
    }
}



/* ─── WORK / DRAGGABLE SECTION ─── */
.work-scope {
    background-color: var(--k-bg);
    padding: 120px 0;
    overflow: hidden;
    position: relative;
}

.work-scope::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(255, 140, 26, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 0% 100%, rgba(46, 92, 255, 0.04) 0%, transparent 40%);
}

.kw-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.kw-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--k-border);
}

.kw-headline {
    font-family: var(--font-display);
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    font-weight: 400;
    margin: 0;
}

.kw-headline em {
    color: var(--k-grey-mid);
    font-style: normal;
}

.kw-scroll-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--k-grey-mid);
    letter-spacing: 1px;
}

@media (hover: none) {
    .kw-scroll-hint {
        display: none;
    }
}

.hint-arrow {
    animation: kw-bounce 2s infinite;
    display: flex;
    align-items: center;
}

.hint-arrow svg {
    width: 20px;
    height: 20px;
}

@keyframes kw-bounce {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(5px);
    }
}

.kw-track-wrapper {
    margin-right: calc(-50vw + 50%);
    overflow-x: auto;
    padding-bottom: 40px;
    scrollbar-width: none;
    cursor: grab;
    /* OPTIMIZATION: Scroll Snap */
    scroll-snap-type: x mandatory;
    /* scroll-behavior: smooth;  <-- REMOVED: Conflicts with native drag/swipe momentum */
    touch-action: pan-x;
    /* Explicitly allow horizontal pan */
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar but keep functionality */
    -ms-overflow-style: none;
}

.kw-track-wrapper::-webkit-scrollbar {
    display: none;
}

.kw-track-wrapper.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    /* Disable snap while dragging for smoothness */
    scroll-behavior: auto;
}

.kw-track {
    display: flex;
    gap: 32px;
    padding-right: 100px;
}

.kw-card {
    flex: 0 0 400px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--k-border);
    background: var(--k-card-bg);
    transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
    /* OPTIMIZATION: Snap Align */
    scroll-snap-align: center;
    position: relative;
}

.kw-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.kw-visual {
    height: 300px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--k-border);
}

.kw-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.6s ease, transform 0.6s ease;
}

.kw-card:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.kw-year {
    position: absolute;
    top: 16px;
    right: 16px;
    font-family: var(--font-mono);
    font-size: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 1px;
}

.kw-telemetry {
    padding: 24px;
    background: var(--k-panel-bg);
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-grow: 1;
}

.tele-header {
    border-bottom: 1px solid var(--k-border);
    padding-bottom: 16px;
}

.t-type {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--k-grey-mid);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 6px;
}

.t-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.1;
    color: var(--k-white);
}

.tele-viz {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.viz-label {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--k-grey-mid);
    opacity: 0.7;
    letter-spacing: 1px;
}

.viz-metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 8px;
}

.viz-metric .val {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 2rem;
    color: var(--k-white);
    line-height: 1;
}

.viz-metric .unit {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--k-orange);
    text-transform: uppercase;
}

.viz-graphic {
    height: 32px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.volume-bars {
    gap: 4px;
}

.v-bar {
    flex: 1;
    background: #333;
    border-radius: 2px;
    height: 20%;
    transition: height 0.4s ease, background 0.4s;
}

.kw-card:hover .v-bar {
    height: var(--h);
    background: #555;
}

.kw-card:hover .v-bar.active {
    background: var(--k-orange);
}

.trend-curve svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.active-path {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    transition: stroke-dashoffset 1s ease;
}

.active-dot {
    opacity: 0;
    transition: opacity 0.5s ease 0.8s;
}

.kw-card:hover .active-path {
    stroke-dashoffset: 0;
}

.kw-card:hover .active-dot {
    opacity: 1;
}

.timeline-bar {
    align-items: center;
}

.t-track {
    width: 100%;
    height: 2px;
    background: #333;
    position: absolute;
    border-radius: 2px;
}

.t-progress {
    width: 0%;
    height: 2px;
    background: var(--k-orange);
    position: absolute;
    transition: width 0.8s ease;
    border-radius: 2px;
}

.t-marker {
    width: 8px;
    height: 8px;
    background: #555;
    border-radius: 50%;
    position: absolute;
    z-index: 2;
    transition: background 0.4s;
}

.t-marker.start {
    left: -2px;
}

.t-marker.end {
    right: -2px;
}

.kw-card:hover .t-progress {
    width: 100%;
}

.kw-card:hover .t-marker {
    background: var(--k-white);
}

.kw-card.is-cta {
    background-color: #0F1115;
    border: 1px solid var(--k-border);
    min-height: 500px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.kw-card.is-cta:hover {
    border-color: var(--k-orange);
    background: #111;
}

.cta-sub {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--k-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    display: block;
}

.cta-head {
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: 1;
    margin: 0 0 32px;
    font-weight: 400;
}

.cta-circle {
    width: 64px;
    height: 64px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: 0.3s var(--ease-out);
}

.cta-circle svg {
    width: 24px;
    height: 24px;
    transition: 0.3s var(--ease-out);
}

.kw-card.is-cta:hover .cta-circle {
    background: var(--k-orange);
    border-color: var(--k-orange);
    color: #000;
    transform: scale(1.1);
}

.kw-card.is-cta:hover svg {
    transform: translateX(4px);
}

@media (max-width: 900px) {
    .kw-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .kw-card {
        flex: 0 0 320px;
    }
}



/* ─── TEAM SECTION ─── */
.team-scope {
    background-color: var(--k-bg);
    padding: 100px 5%;
    position: relative;
}

.team-scope::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 80% 30%, rgba(147, 51, 234, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 20% 70%, rgba(255, 140, 26, 0.04) 0%, transparent 40%);
}

.kt-grid-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
}

.kt-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.kt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--k-border);
}

.kt-headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 4rem);
    line-height: 1.1;
    font-weight: 400;
    margin: 0;
}

.kt-headline em {
    color: var(--k-grey-mid);
    font-style: normal;
}

.kt-desc {
    max-width: 400px;
    color: var(--k-grey-mid);
    font-size: 1rem;
    line-height: 1.5;
    text-align: right;
}

.kt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.kt-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    cursor: pointer;
}

.kt-visual {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    border: 1px solid var(--k-border);
    border-radius: 4px;
    transition: border-color 0.3s;
}

.kt-card:hover .kt-visual {
    border-color: rgba(255, 125, 0, 0.4);
}

.kt-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.8s ease;
}

.kt-card:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--k-orange);
    box-shadow: 0 0 10px var(--k-orange);
    opacity: 0;
    pointer-events: none;
}

.kt-card:hover .scan-line {
    animation: kt-scan 1.5s ease-in-out infinite;
    opacity: 0.8;
}

.cr {
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: var(--k-orange);
    border-style: solid;
    opacity: 0;
    transition: 0.3s var(--ease-out);
}

.tl {
    top: 0;
    left: 0;
    border-width: 2px 0 0 2px;
}

.tr {
    top: 0;
    right: 0;
    border-width: 2px 2px 0 0;
}

.bl {
    bottom: 0;
    left: 0;
    border-width: 0 0 2px 2px;
}

.br {
    bottom: 0;
    right: 0;
    border-width: 0 2px 2px 0;
}

.kt-card:hover .cr {
    opacity: 1;
    width: 12px;
    height: 12px;
}

.kt-dossier {
    padding-top: 8px;
}

.dossier-meta {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--k-border);
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--k-grey-mid);
    letter-spacing: 1px;
}

.kt-name {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    margin: 0;
    color: var(--k-white);
    line-height: 1.1;
}

.kt-role {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--k-orange);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin: 4px 0 12px;
}

.kt-bio {
    font-size: 0.9rem;
    color: var(--k-grey-mid);
    line-height: 1.5;
    margin-bottom: 16px;
    opacity: 0.8;
    transition: opacity 0.3s, color 0.3s;
}

.kt-card:hover .kt-bio {
    opacity: 1;
    color: var(--k-grey-light);
}

.kt-link {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--k-white);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    letter-spacing: 1px;
}

.kt-card:hover .kt-link {
    color: var(--k-orange);
    border-color: var(--k-orange);
}

@keyframes kt-scan {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .kt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .kt-desc {
        text-align: left;
    }

    .kt-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .kt-visual img {
        filter: grayscale(20%);
    }
}



/* ─── CERTS / DEPLOY SECTION ─── */
#kwiko-certs-scope {
    /* Variables */
    --k-bg: #050505;
    --k-card: #0F1115;
    --k-border: rgba(255, 255, 255, 0.08);
    --k-orange: #ff7d00;
    --k-green: #00E676;
    --k-white: #ffffff;
    --k-muted: #888888;

    /* Fonts - Mapping to global fonts to ensure consistency */
    --f-serif: var(--font-display);
    --f-sans: var(--font-body);
    --f-mono: var(--font-mono);

    background-color: var(--k-bg);
    padding: 120px 5%;
    font-family: var(--f-sans);
    color: var(--k-white);
    position: relative;
    overflow: hidden;
}

#kwiko-certs-scope *,
*::before,
*::after {
    box-sizing: border-box;
}

/* --- LAYOUT --- */
.kc-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 80px;
    align-items: center;
}

/* --- LEFT COLUMN --- */
.kc-content {
    padding-right: 40px;
}

.kc-label {
    font-family: var(--f-mono);
    color: var(--k-orange);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: block;
}

.kc-headline {
    font-family: var(--f-serif);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.1;
    font-weight: 400;
    margin: 0 0 24px 0;
}

.kc-headline em {
    color: var(--k-muted);
    font-style: normal;
}

.ks-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--k-muted);
    margin-bottom: 0;
}

.kc-stat-row {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--k-border);
}

.kc-stat {
    display: flex;
    flex-direction: column;
}

.kc-stat .val {
    font-family: var(--f-mono);
    font-size: 1.5rem;
    color: var(--k-white);
}

.kc-stat .lbl {
    font-size: 0.85rem;
    color: var(--k-muted);
    margin-top: 4px;
}

/* --- RIGHT COLUMN (LIST) --- */
.kc-modules {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--k-border);
}

/* No span needed for list */
.kc-card:nth-child(1) {
    grid-column: auto;
}

/* --- CARD DESIGN (ROW STYLE) --- */
.kc-card {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--k-border);
    height: 80px;
    border-radius: 0;
    position: relative;
    cursor: default;
    transition: background-color 0.3s ease;
    overflow: hidden;
}

.kc-card:last-child {
    border-bottom: none;
}

.kc-card:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.kc-card-inner {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: row;
    /* Horizontal alignment */
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

/* Logo */
.kc-logo {
    height: 48px;
    /* Increased from 24px */
    width: auto;
    max-width: 160px;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: all 0.4s ease;
}

.kc-card:hover .kc-logo {
    opacity: 1;
    filter: grayscale(0%);
}

/* Status Tag */
.kc-status {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.kc-card:hover .kc-status {
    opacity: 1;
}

/* --- ANIMATION UTILS --- */
.reveal-cert {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.6s ease;
}

.reveal-cert.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(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-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.kc-status span {
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--k-green);
}

.kc-status .dot {
    width: 6px;
    height: 6px;
    background-color: var(--k-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--k-green);
}

/* --- ANIMATION UTILS --- */
.reveal-cert {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.6s ease;
}

.reveal-cert.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .kc-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .kc-content {
        padding-right: 0;
        text-align: left;
    }

    .kc-headline br {
        display: block;
        /* Force break on mobile */
        content: "";
        /* Ensure it renders */
        margin-bottom: 8px;
        /* Add slight spacing */
    }
}

@media (max-width: 600px) {
    #kwiko-certs-scope {
        padding: 80px 24px;
    }

    .kc-modules {
        grid-template-columns: 1fr;
    }

    .kc-card:nth-child(1) {
        grid-column: span 1;
    }
}



/* ─── CONTACT CTA ─── */
.cta-box {
    background: #121212;
    /* Sleek dark grey */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

/* ATMOSPHERIC GLOW */
.cta-glow-mesh {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 140, 26, 0.08), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(147, 51, 234, 0.06), transparent 40%);
    filter: blur(80px);
    animation: rotate-glow 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes rotate-glow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 6vw, 6rem);
    line-height: 1;
    margin: 32px 0;
    letter-spacing: -0.02em;
}

.cta-title em {
    color: var(--k-orange);
    font-style: italic;
    background: linear-gradient(to right, var(--k-orange), #ff6b6b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-text {
    font-size: 1.25rem;
    color: var(--k-grey-light);
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.large-cta {
    background: var(--k-white);
    color: #000;
    padding: 20px 48px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    cursor: pointer;
    border: none;
}

.large-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    background: var(--k-white);
}

.cta-subtext {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--k-grey-mid);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}



/* ─── FLOATING ACTION BUTTON ─── */
.k-fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 990;
    display: flex;
    align-items: center;
    padding: 16px;
    /* Glassmorphism effect */
    background: rgba(243, 112, 33, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(243, 112, 33, 0.3);
    color: #ffffff;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(243, 112, 33, 0.2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    max-width: 56px;
    /* Initial width (icon only) */
    white-space: nowrap;
    /* Hidden by default - shown via JavaScript */
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.k-fab.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.k-fab:hover {
    max-width: 200px;
    /* Expanded width */
    padding-right: 24px;
    background: rgba(243, 112, 33, 0.25);
    border-color: rgba(243, 112, 33, 0.5);
    box-shadow: 0 12px 40px rgba(243, 112, 33, 0.3);
}

.k-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.k-fab-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.k-fab-text {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    margin-left: 12px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.k-fab:hover .k-fab-text {
    opacity: 1;
    transform: translateX(0);
}

/* Hide FAB when modal is open */
body:has(.k-modal[open]) .k-fab {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .k-fab {
        bottom: 24px;
        right: 24px;
    }
}



/* ─── MODAL ─── */
.k-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: transparent;
    border: none;
    padding: 24px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
}

.k-modal[open] {
    opacity: 1;
    pointer-events: auto;
}

.k-modal::backdrop {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.k-modal-wrap {
    width: 100%;
    max-width: 900px;
    background: var(--k-panel);
    border: 1px solid var(--k-border);
    border-radius: 24px;
    padding: 48px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s var(--ease-expo);
}

.k-modal[open] .k-modal-wrap {
    transform: scale(1) translateY(0);
}

.k-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--k-border);
    color: var(--k-grey-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.k-modal-close:hover {
    background: var(--k-red);
    border-color: var(--k-red);
    color: #fff;
}

.k-modal-close svg {
    width: 20px;
    height: 20px;
}

.k-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
}

.k-modal-label {
    font-family: var(--font-mono);
    color: var(--k-orange);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 16px;
}

.k-modal-head {
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 24px;
    color: var(--k-white);
    /* Fix readability */
}

.k-modal-head em {
    color: var(--k-grey-mid);
    font-style: italic;
}

.k-modal-desc {
    color: var(--k-grey-light);
    line-height: 1.6;
    margin-bottom: 40px;
}

.k-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-lbl {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--k-grey-mid);
    text-transform: uppercase;
}

.meta-val {
    font-size: 0.95rem;
    color: var(--k-white);
}

.status-online {
    color: var(--k-green);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-online::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--k-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--k-green);
}

.k-modal-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--k-grey-mid);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--k-border);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--k-white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--k-orange);
    background: rgba(255, 255, 255, 0.05);
    outline: none;
}

.k-btn-submit {
    background: var(--k-white);
    color: #000;
    padding: 16px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    transition: 0.2s;
}

.k-btn-submit:hover {
    background: var(--k-orange);
    color: #fff;
}

@media (max-width: 800px) {
    .k-modal-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .k-modal-info {
        display: none;
    }

    /* Hide info on mobile to save space */
    .k-modal-wrap {
        padding: 32px;
        margin: 20px;
    }
}

/* ─── MOBILE OVERRIDES (HERO SPACING) ─── */
@media (max-width: 768px) {
    .k-hero {
        padding-top: 140px;
    }

    .hero-lead-wrapper {
        margin-top: 60px;
        /* Reset from 180px */
    }

    .hero-support {
        padding-bottom: 80px;
        /* Increase from 40px for mobile thumb zone */
        text-align: left;
    }

    .hero-container {
        width: 90%;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-headline {
        white-space: normal;
        /* Allow wrapping */
        font-size: 3rem !important;
    }
}