@import url('brand-colors.css');

/* Stitch Dark — shared layout, home carousel, chrome */
body.stitch-dark,
html.dark body {
    background-color: var(--cd-background);    color: #e1e2eb;
    font-family: 'Space Grotesk', sans-serif;
    scroll-behavior: smooth;
}

.tonal-border {
    border: 1px solid rgba(196, 199, 202, 0.1);
}

.glacial-glow:hover {
    box-shadow: inset 0 0 0 2px var(--cd-accent);
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0b0e14; }
::-webkit-scrollbar-thumb { background: #2d3748; border-radius: 3px; }

/* Stitch header / footer (all pages — light bar matches index) */
.stitch-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: 10px;
    background: rgba(247, 249, 251, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 97, 147, 0.12);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 24px rgba(0, 40, 80, 0.06);
}

/* Home hero only: float header over carousel */
.stitch-header--overlay {
    position: absolute;
    top: 0;
    left: 0;
}

.stitch-header .stitch-nav-link {
    color: #2d3748;
}

.stitch-header .stitch-nav-link:hover,
.stitch-header .stitch-nav-link.is-active {
    color: var(--cd-brand);
}

.stitch-header-inner {
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

@media (min-width: 768px) {
    .stitch-header-inner { padding: 0 64px; }
}

.stitch-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.stitch-brand img.stitch-logo-full,
.stitch-brand img.stitch-logo-icon,
.stitch-footer .stitch-logo-full {
    height: 44px;
    width: auto;
    max-width: min(240px, 55vw);
    object-fit: contain;
    background: transparent;
    display: block;
}

.stitch-brand img.stitch-logo-icon {
    height: 36px;
    max-width: 40px;
}

.stitch-brand .stitch-logo-icon { display: block; }
.stitch-brand .stitch-logo-full { display: none; }

@media (min-width: 640px) {
    .stitch-brand .stitch-logo-icon { display: none; }
    .stitch-brand .stitch-logo-full { display: block; }
}

.stitch-header-inner .stitch-cta.hidden-mobile-cta {
    display: none;
}

@media (min-width: 768px) {
    .stitch-header-inner .stitch-cta.hidden-mobile-cta {
        display: inline-flex;
        align-items: center;
    }
}

.stitch-nav {
    display: none;
    align-items: center;
    gap: 24px;
}

@media (min-width: 768px) {
    .stitch-nav { display: flex; }
}

.stitch-nav-link {
    font-size: 16px;
    transition: color 0.2s;
}

.stitch-cta {
    background: var(--cd-brand);
    color: var(--col-on-primary);
    padding: 10px 24px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
    border-radius: var(--cd-radius-pill, 999px);
}

.stitch-cta:hover {
    background: var(--col-navy-900);
}

.stitch-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(0, 97, 147, 0.2);
    color: var(--cd-brand);
    width: 40px;
    height: 40px;
    cursor: pointer;
}

@media (min-width: 768px) {
    .stitch-menu-btn { display: none; }
}

.stitch-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(11, 14, 20, 0.85);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.stitch-drawer.is-open {
    opacity: 1;
    visibility: visible;
}

.stitch-drawer-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(320px, 88vw);
    background: var(--cd-surface);
    border-left: 1px solid rgba(196, 199, 202, 0.1);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.3s;
}

.stitch-drawer.is-open .stitch-drawer-panel {
    transform: translateX(0);
}

.stitch-drawer .stitch-nav-link {
    padding: 12px 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(196, 199, 202, 0.08);
}

.stitch-footer {
    background: var(--cd-surface);
    border-top: 1px solid rgba(196, 199, 202, 0.1);
    margin-top: 48px;
}

.stitch-footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 768px) {
    .stitch-footer-grid {
        padding: 48px 64px;
        grid-template-columns: 1.3fr repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    .stitch-footer-grid { gap: 24px; }
}

.stitch-footer h5 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cd-accent);
    margin-bottom: 16px;
}

.stitch-footer a {
    display: block;
    font-size: 14px;
    color: #c4c7ca;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.stitch-footer a:hover { color: var(--cd-accent); }

.stitch-footer-copy {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 64px 24px;
    border-top: 1px solid rgba(196, 199, 202, 0.05);
    font-size: 14px;
    color: #859398;
    text-align: center;
}

@media (max-width: 767px) {
    .stitch-footer-copy { padding: 16px; }
}

/* Hero carousel (home) */
.hero-carousel {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.carousel-slides { position: absolute; inset: 0; z-index: 0; }

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(105deg, rgba(11, 14, 20, 0.92) 0%, rgba(11, 14, 20, 0.55) 45%, rgba(11, 14, 20, 0.25) 100%);
}

.carousel-ui {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 16px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    border: 1px solid rgba(48, 144, 208, 0.5);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s, transform 0.25s;
}

.carousel-dot.active,
.carousel-dot:hover {
    background: var(--cd-accent);
    border-color: var(--cd-accent);
    transform: scale(1.15);
}

.carousel-arrow {
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    border: 1px solid rgba(196, 199, 202, 0.25);
    background: rgba(25, 28, 34, 0.75);
    backdrop-filter: blur(8px);
    color: var(--cd-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    z-index: 25;
    background: var(--cd-accent);
    width: 0%;
}

.carousel-progress.animate {
    animation: carousel-progress-bar 3s linear forwards;
}

@keyframes carousel-progress-bar {
    from { width: 0%; }
    to { width: 100%; }
}

.industry-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.industry-card.active {
    border-color: var(--cd-accent);
    background: var(--cd-surface-elevated);
    box-shadow: var(--cd-shadow-glow);
}
