/* ==========================================================================
   Technology — 2026 cinematic-dark rebuild
   Mirrors the home (index.html) visual system: ink canvas, hairlines,
   Fraunces italic display, JetBrains Mono caps eyebrows, red accent.
   Service pages share this exact structure (see services-marketing.css and
   services-ai-research.css). Body class scopes any per-page tweaks.
   ========================================================================== */

/* ==================== BODY ==================== */
.service-page {
    background: var(--ink);
    color: var(--on-black);
    font-family: var(--font-body);
}

.service-page main {
    background: var(--ink);
}

/* ==================== HAS-VIDEO UTILITIES ====================
   Mirror of home.css §SECTION BACKGROUND VIDEO. Local copy so the service
   pages don't have to load all of home.css.
   ============================================================ */
.has-video {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.has-video .section-bg-video {
    background: var(--ink);
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    filter: contrast(1.05) saturate(0.92);
}

.has-video .section-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            to bottom,
            rgba(10, 10, 10, 0.55) 0%,
            rgba(10, 10, 10, 0.78) 55%,
            rgba(10, 10, 10, 0.92) 100%
        );
}

/* Tech hero: diagonal gradient — text zone LEFT, server rack visible RIGHT */
.service-tech .svc-hero .section-bg-overlay {
    background:
        linear-gradient(
            105deg,
            rgba(10, 10, 10, 0.96) 0%,
            rgba(10, 10, 10, 0.88) 25%,
            rgba(10, 10, 10, 0.55) 50%,
            rgba(10, 10, 10, 0.18) 72%,
            transparent 90%
        );
}

.service-tech .svc-hero .section-bg-video {
    object-position: 68% center;
}

.has-video > *:not(.section-bg-video):not(.section-bg-overlay) {
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .has-video .section-bg-video { display: none; }
    .has-video .section-bg-overlay { background: var(--ink); }
}
@media (prefers-reduced-data: reduce) {
    .has-video .section-bg-video { display: none; }
}

/* ==================== HERO ==================== */

.svc-hero {
    position: relative;
    min-height: 82vh;
    display: flex;
    align-items: flex-end;
    padding: 0;
    background: var(--ink);
}

.svc-hero__inner {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 176px 32px 144px;
}

.service-tech .svc-hero__inner--left {
    max-width: 680px; /* constrain to left half */
}

.service-tech .svc-hero__inner--left::before {
    content: "";
    display: block;
    width: 2px;
    height: 64px;
    background: linear-gradient(to bottom, var(--red), transparent);
    margin-bottom: 40px;
    opacity: 0.7;
}

/* Subtle red ember from the right — held back, atmosphere only */
.svc-hero::after {
    content: "";
    position: absolute;
    right: -10%;
    bottom: -20%;
    width: 60%;
    height: 80%;
    background: radial-gradient(
        ellipse at center,
        rgba(200, 16, 46, 0.12) 0%,
        rgba(200, 16, 46, 0.04) 40%,
        transparent 75%
    );
    pointer-events: none;
    z-index: 1;
    filter: blur(48px);
}

.svc-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: var(--text-xs);
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
    margin: 0 0 36px;
}

.svc-hero__eyebrow::before {
    content: "";
    width: 36px;
    height: 1px;
    background: var(--red);
    opacity: 0.85;
}

.svc-hero h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.75rem, 6.4vw, 5.25rem);
    line-height: 1.0;
    color: var(--on-black);
    letter-spacing: -0.028em;
    font-variation-settings: 'opsz' 144;
    margin: 0;
    max-width: 17ch;
}

.svc-hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: color-mix(in oklab, var(--red) 78%, var(--on-black));
}

.svc-hero .svc-positioning {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.25rem, 1.55vw, 1.5rem);
    line-height: 1.4;
    color: var(--on-black);
    margin: 44px 0 0;
    max-width: 38ch;
}

.svc-hero .svc-detail {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-base);
    line-height: 1.75;
    color: var(--on-black-mute);
    margin: 28px 0 0;
    max-width: 58ch;
}

/* Seam between hero and thesis — faint red mist, no hairline */
.svc-seam {
    position: relative;
    height: 200px;
    margin-top: -100px;
    margin-bottom: -100px;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(200, 16, 46, 0.04) 35%,
        rgba(200, 16, 46, 0.08) 50%,
        rgba(200, 16, 46, 0.04) 65%,
        transparent 100%
    );
    filter: blur(8px);
}

/* ==================== SECTION SHELL ==================== */

.svc-section {
    position: relative;
    padding: 128px 0;
    background: var(--ink);
    color: var(--on-black);
}

.svc-section__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

.svc-section__grid {
    display: grid;
    grid-template-columns: 4fr 8fr;
    gap: 96px;
    align-items: start;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

.svc-section h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 3.4vw, 2.875rem);
    line-height: 1.05;
    color: var(--on-black);
    letter-spacing: -0.022em;
    font-variation-settings: 'opsz' 144;
    margin: 0 0 28px;
    max-width: 22ch;
}

.svc-section h2 em {
    font-style: italic;
    font-weight: 400;
    color: color-mix(in oklab, var(--red) 70%, var(--on-black));
}

.svc-section__lede {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-lg);
    line-height: 1.65;
    color: var(--on-black-mute);
    margin: 0 0 56px;
    max-width: 56ch;
}

/* ==================== SECTION ANCHOR (sticky chapter mark) ==================== */

.section-anchor {
    position: sticky;
    top: 112px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 8px;
    border-top: 1px solid rgba(245, 241, 232, 0.10);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: var(--text-xs);
    line-height: 1;
    color: var(--on-black-mute);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-anchor .anchor-figure {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--red);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.section-anchor .anchor-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.section-anchor .anchor-label::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--red);
    opacity: 0.85;
}

/* ==================== THESIS ==================== */

.svc-thesis__body p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-lg);
    line-height: 1.7;
    color: var(--on-black);
    margin: 0 0 24px;
    max-width: 60ch;
}

.svc-thesis__body p:last-child {
    margin-bottom: 0;
}

.svc-thesis__body em {
    font-style: italic;
    color: color-mix(in oklab, var(--red) 70%, var(--on-black));
    font-family: var(--font-display);
}

/* ==================== CAPABILITIES — practice-block list ==================== */

.svc-section--tinted {
    background:
        linear-gradient(to bottom,
            rgba(200, 16, 46, 0.018) 0%,
            transparent 25%,
            transparent 75%,
            rgba(200, 16, 46, 0.012) 100%
        ),
        var(--ink);
}

.practice-list {
    list-style: none;
    padding: 0;
    margin: 72px 0 0;
    border-top: 1px solid rgba(245, 241, 232, 0.14);
}

.practice-list .practice-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 40px;
    padding: 40px 0;
    border-bottom: 1px solid rgba(245, 241, 232, 0.10);
    align-items: baseline;
    transition: padding-left 420ms cubic-bezier(0.22, 1, 0.36, 1),
                background 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.practice-list .practice-item:hover {
    padding-left: 16px;
    background: linear-gradient(to right, rgba(200, 16, 46, 0.05), transparent 40%);
}

.practice-list .practice-num {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: var(--text-xs);
    line-height: 1.6;
    color: var(--red);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

.practice-list .practice-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.375rem, 1.8vw, 1.625rem);
    line-height: 1.15;
    color: var(--on-black);
    letter-spacing: -0.022em;
    font-variation-settings: 'opsz' 96;
    margin: 0 0 14px;
}

.practice-list .practice-desc {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-base);
    line-height: 1.75;
    color: var(--on-black-mute);
    max-width: 62ch;
    margin: 0;
}

.practice-list .practice-item:last-child {
    border-bottom: none;
}

@media (min-width: 1024px) {
    .service-tech .practice-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 64px;
        border-top: none; /* remove full-width top border — handled per-item */
    }

    .service-tech .practice-list .practice-item {
        border-top: 1px solid rgba(245, 241, 232, 0.10);
    }

    /* Each item spans only its own column so borders render correctly */
    .service-tech .practice-list .practice-item:nth-child(2n) {
        padding-left: 32px;
        border-left: 1px solid rgba(245, 241, 232, 0.07);
    }

    /* Last items in each column: no bottom border */
    .service-tech .practice-list .practice-item:nth-last-child(-n+2):nth-child(2n-1),
    .service-tech .practice-list .practice-item:nth-last-child(-n+2):nth-child(2n) {
        border-bottom: none;
    }
}

/* ==================== RECENT ENGAGEMENT ==================== */

.svc-recent .svc-thesis__body p {
    color: var(--on-black);
}

.svc-recent .svc-thesis__body p:nth-of-type(2) {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.125rem, 1.5vw, 1.375rem);
    line-height: 1.45;
    color: var(--on-black);
    max-width: 50ch;
    padding-left: 18px;
    border-left: 1px solid rgba(200, 16, 46, 0.50);
    margin-top: 32px;
}

.engagement-tag {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: var(--text-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(245, 241, 232, 0.10);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.engagement-tag::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--red);
    opacity: 0.85;
}

/* ==================== INTAKE CTA ==================== */

.svc-section--cta {
    background:
        radial-gradient(
            ellipse 50% 70% at 50% 100%,
            rgba(200, 16, 46, 0.18) 0%,
            rgba(200, 16, 46, 0.06) 35%,
            transparent 70%
        ),
        var(--ink);
    color: var(--on-black);
    position: relative;
    overflow: hidden;
}

.svc-section--cta .svc-section__inner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 144px 32px;
    text-align: center;
}

.cta-eyebrow {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: var(--text-xs);
    line-height: 1;
    color: var(--red);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 36px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.cta-eyebrow::before {
    content: "";
    width: 36px;
    height: 1px;
    background: var(--red);
    opacity: 0.85;
}

.svc-section--cta h2 {
    color: var(--on-black);
    font-size: clamp(2.5rem, 4.8vw, 3.75rem);
    line-height: 1.05;
    letter-spacing: -0.024em;
    margin: 0 auto 28px;
    max-width: 18ch;
}

.svc-section--cta h2 em {
    color: color-mix(in oklab, var(--red) 78%, var(--on-black));
}

.cta-detail {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-lg);
    line-height: 1.7;
    color: var(--on-black-mute);
    margin: 0 auto 56px;
    max-width: 52ch;
}

.intake-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 20px 36px;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--red);
    text-decoration: none;
    background: transparent;
    border: 1px solid var(--red);
    box-shadow:
        0 0 24px rgba(200, 16, 46, 0.12),
        0 0 64px rgba(200, 16, 46, 0.08);
    animation: svc-cta-breathe 6s ease-in-out infinite;
    transition:
        background-color 280ms ease-out,
        border-color 280ms ease-out,
        color 280ms ease-out,
        box-shadow 280ms ease-out;
}

.intake-cta:hover,
.intake-cta:focus-visible {
    background: var(--red);
    color: var(--on-black);
    outline: none;
    animation-play-state: paused;
    box-shadow:
        inset 0 0 16px rgba(255, 255, 255, 0.10),
        0 0 48px rgba(200, 16, 46, 0.42),
        0 0 96px rgba(200, 16, 46, 0.22);
}

.intake-cta .arrow {
    display: inline-block;
    transition: transform 320ms ease-out;
}

.intake-cta:hover .arrow,
.intake-cta:focus-visible .arrow {
    transform: translateX(6px);
}

@keyframes svc-cta-breathe {
    0%, 100% {
        box-shadow:
            0 0 24px rgba(200, 16, 46, 0.12),
            0 0 64px rgba(200, 16, 46, 0.08);
    }
    50% {
        box-shadow:
            0 0 36px rgba(200, 16, 46, 0.26),
            0 0 88px rgba(200, 16, 46, 0.16);
    }
}

@media (prefers-reduced-motion: reduce) {
    .intake-cta { animation: none; }
}

/* ==================== MOBILE ==================== */

@media (max-width: 1024px) {
    .svc-section__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .section-anchor {
        position: static;
        padding-top: 12px;
    }

    .svc-section {
        padding: 96px 0;
    }

    .svc-section--cta .svc-section__inner {
        padding: 112px 24px;
    }

    .practice-list .practice-item {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 32px 0;
    }

    .practice-list .practice-item:hover {
        padding-left: 0;
    }
}

@media (max-width: 640px) {
    .svc-hero__inner {
        padding: 144px 20px 104px;
    }

    .svc-section__inner,
    .svc-section__grid {
        padding: 0 20px;
    }

    .svc-section h2 {
        font-size: clamp(1.875rem, 7vw, 2.25rem);
    }
}
