/* ═══════════════════════════════════════════
   REUSABLE INTERACTIVE COMPONENTS
═══════════════════════════════════════════ */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-primary);
    font-weight: 600;
    border-radius: 8px;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 18px;
    font-size: .875rem;
}

.btn-lg {
    padding: 14px 26px;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary-teal);
    color: #fff;
    border: 1px solid var(--color-primary-teal);
}

.btn-primary:hover {
    background-color: var(--color-primary-teal-hover);
    border-color: var(--color-primary-teal-hover);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--surface-white);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--bg-off-white);
    border-color: var(--border-strong);
}

/* Cards (Shared) */
.card {
    background-color: var(--surface-white);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 32px;
    box-shadow: var(--shadow-md);
}

/* ═══════════════════════════════════════════
   PLATFORM & TECH STACK — CENTERED SPEC GRID
   (flex-wrap so an incomplete last row centers instead of stretching)
═══════════════════════════════════════════ */
.spec-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.spec-item {
    display: flex;
    gap: 24px;
    flex: 0 1 380px;
    max-width: 380px;
    padding: 32px 36px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    transition: background-color .2s ease;
}

.spec-item:hover {
    background-color: var(--bg-off-white);
}

.spec-item-icon {
    font-size: 1.5rem;
    color: var(--color-primary-teal);
    flex-shrink: 0;
    width: 32px;
    padding-top: 4px;
    text-align: center;
}

.spec-item-body h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    line-height: 1.3;
}

.spec-item-body p {
    font-size: .9375rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ═══════════════════════════════════════════
   TECH TICKER
═══════════════════════════════════════════ */
.tech-ticker-outer {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--bg-off-white);
    padding: 20px 0;
    overflow: hidden;
}

.tech-ticker-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 99px;
    overflow: hidden;
    /* Gradient edge fade — no jitter, pure CSS */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.tech-ticker-track {
    overflow: hidden;
    width: 100%;
}

.tech-ticker-inner {
    display: flex;
    gap: 12px;
    width: max-content;
    /* Use will-change to avoid jitter; translate3d forces GPU layer */
    will-change: transform;
    animation: scrollTicker 30s linear infinite;
}

.tech-ticker-inner:hover {
    animation-play-state: paused;
}

.ticker-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--surface-white);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    padding: 5px 14px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.ticker-pill i {
    color: var(--color-primary-teal);
    font-size: .875rem;
}

/* ═══════════════════════════════════════════
   CLOSING CTA CALLOUT
═══════════════════════════════════════════ */
.closing-callout {
    background: linear-gradient(135deg, #2f9b9b 0%, var(--color-primary-teal) 58%, #277f84 100%);
    border: 2px solid rgba(255, 255, 255, .34);
    border-radius: 16px;
    max-width: 1100px;
    min-height: 320px;
    margin: 0 auto;
    padding: 3rem 4rem;
    box-shadow: 0 22px 48px rgba(15, 23, 42, .12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
    position: relative;
}

.cta-card {
    isolation: isolate;
}

.closing-content {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    padding-right: clamp(280px, 30vw, 360px);
    position: relative;
    z-index: 2;
}

.closing-text {
    text-align: left;
}

.closing-text h2 {
    color: #fff;
    font-size: clamp(1.625rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    margin-bottom: 14px;
    line-height: 1.15;
}

.closing-text p {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, .86);
    max-width: 520px;
    line-height: 1.75;
}

.closing-btn {
    flex-shrink: 0;
    margin-top: 24px;
    background-color: #fff;
    border-color: rgba(255, 255, 255, .9);
    color: var(--color-primary-teal-hover);
    box-shadow: 0 10px 20px rgba(15, 23, 42, .16);
}

.closing-btn:hover {
    background-color: var(--bg-off-white);
    border-color: #fff;
    color: var(--color-primary-teal-hover);
    box-shadow: 0 14px 24px rgba(15, 23, 42, .20);
}

.closing-art {
    position: absolute;
    top: 0;
    right: clamp(3rem, 7vw, 5.25rem);
    bottom: 0;
    width: clamp(250px, 26vw, 330px);
    pointer-events: none;
    z-index: 1;
}

.closing-worker {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 118%;
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 22px 22px rgba(15, 23, 42, .20));
    transform: none;
    transform-origin: bottom center;
    transition: transform .35s ease, filter .35s ease;
}

.closing-callout:hover .closing-worker {
    transform: scale(1.018);
    filter: drop-shadow(0 26px 26px rgba(15, 23, 42, .22));
}

/* ═══════════════════════════════════════════
   SCROLL REVEAL / SLIDER TEXT TRANSITION
═══════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.fade-text {
    animation: fadeTextIn 0.3s ease forwards;
}

/* ═══════════════════════════════════════════
   COMPONENTS RESPONSIVE OVERRIDES
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .closing-callout {
        padding: 2.75rem 3rem;
        min-height: 300px;
    }

    .closing-content {
        max-width: 560px;
        padding-right: 210px;
    }

    .closing-art {
        right: 2rem;
        width: 210px;
    }

    .closing-worker {
        height: 112%;
    }
}

@media (max-width: 768px) {
    .spec-item {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .closing-callout {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 2.25rem 1.5rem 0;
        min-height: 0;
    }

    .closing-content {
        flex: 0 1 auto;
        padding-right: 0;
    }

    .closing-text p {
        max-width: 100%;
    }

    .closing-btn {
        margin-top: 22px;
    }

    .closing-art {
        position: relative;
        inset: auto;
        align-self: center;
        flex: 0 0 190px;
        width: min(72vw, 260px);
        min-height: 190px;
        margin-top: 8px;
    }

    .closing-worker {
        right: 50%;
        height: 116%;
        transform: translateX(50%);
    }

    .closing-callout:hover .closing-worker {
        transform: translateX(50%) scale(1.018);
    }

    .tech-ticker-container {
        max-width: 100%;
        border-radius: 0;
    }
}
