/* ============================================
   Services Page — GetLayers Tunnel-inspired
   ============================================ */

.page-services {
    background: #050101;
}

/* Header on tunnel hero */
.page-services.page-tunnel-dark .site-header:not(.scrolled) {
    background: rgba(5, 1, 1, 0.35);
    backdrop-filter: blur(16px);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.page-services.page-tunnel-dark .site-header:not(.scrolled) .logo-text {
    color: rgba(255, 255, 255, 0.9);
}

.page-services.page-tunnel-dark .site-header:not(.scrolled) .nav-list a,
.page-services.page-tunnel-dark .site-header:not(.scrolled) .nav-dropdown-trigger {
    color: rgba(255, 255, 255, 0.75);
}

.page-services.page-tunnel-dark .site-header:not(.scrolled) .nav-list a:hover,
.page-services.page-tunnel-dark .site-header:not(.scrolled) .nav-list a.active,
.page-services.page-tunnel-dark .site-header:not(.scrolled) .nav-dropdown-trigger:hover,
.page-services.page-tunnel-dark .site-header:not(.scrolled) .nav-dropdown-trigger.active {
    color: var(--white);
    background: rgba(220, 38, 38, 0.15);
}

.page-services.page-tunnel-dark .site-header:not(.scrolled) .mobile-toggle span {
    background: var(--white);
}

.page-services.page-tunnel-dark .site-header:not(.scrolled) .btn-outline {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.35);
}

/* ── Tunnel Hero ── */
.services-tunnel-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #050101;
}

#services-tunnel-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.services-tunnel-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 45% at 50% 50%, transparent 15%, rgba(5, 1, 1, 0.92) 70%);
    pointer-events: none;
    z-index: 1;
}

.services-tunnel-grain {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
    z-index: 2;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px;
    mix-blend-mode: overlay;
}

.services-tunnel-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 720px;
    padding: calc(var(--header-height) + 40px) 24px 80px;
}

.services-tunnel-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.services-tunnel-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 0 0 60px rgba(220, 38, 38, 0.25);
}

.services-tunnel-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--accent) 40%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.services-tunnel-sub {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.75;
    max-width: 540px;
    margin: 0 auto 32px;
}

.services-tunnel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
}

.services-tunnel-actions .btn svg {
    width: 18px;
    height: 18px;
}

.services-tunnel-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.services-tunnel-stat strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
}

.services-tunnel-stat span {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
}

.services-tunnel-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
}

.services-tunnel-scroll svg {
    width: 20px;
    height: 20px;
    animation: tunnelScrollBounce 2s ease-in-out infinite;
}

@keyframes tunnelScrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* ── Sticky pill nav (dark) ── */
.services-tunnel-nav {
    position: sticky;
    top: var(--header-height);
    z-index: 90;
    background: rgba(5, 1, 1, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(220, 38, 38, 0.15);
    padding: 14px 0;
}

.services-tunnel-nav-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0;
}

.services-tunnel-nav-track::-webkit-scrollbar {
    display: none;
}

.services-tunnel-pill {
    flex-shrink: 0;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: all 0.3s ease;
}

.services-tunnel-pill:hover,
.services-tunnel-pill:focus-visible {
    color: var(--white);
    border-color: rgba(220, 38, 38, 0.5);
    background: rgba(220, 38, 38, 0.12);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.15);
}

/* ── Portal grid — service entry points ── */
.services-portals {
    padding: 100px 0;
    background: linear-gradient(180deg, #050101 0%, #0a0202 100%);
}

.services-portals-head {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 56px;
}

.services-portals-head .section-label {
    color: var(--accent);
}

.services-portals-head h2 {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    color: var(--white);
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}

.services-portals-head p {
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.7;
}

.services-portal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.services-portal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all 0.4s ease;
    min-height: 260px;
}

.services-portal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 120%, rgba(220, 38, 38, 0.2), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
}

.services-portal-card:hover {
    border-color: rgba(220, 38, 38, 0.45);
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(220, 38, 38, 0.1);
}

.services-portal-card:hover::before {
    opacity: 1;
}

.services-portal-card.is-featured {
    grid-column: span 2;
    grid-row: span 1;
    background: linear-gradient(145deg, rgba(220, 38, 38, 0.12) 0%, rgba(255, 255, 255, 0.02) 60%);
    border-color: rgba(220, 38, 38, 0.25);
}

.services-portal-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
    position: absolute;
    top: 16px;
    right: 20px;
}

.services-portal-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 14px;
    color: var(--accent);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.services-portal-icon svg {
    width: 24px;
    height: 24px;
}

.services-portal-card h3 {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.services-portal-card > p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.65;
    flex: 1;
    position: relative;
    z-index: 1;
}

.services-portal-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 20px;
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}

.services-portal-card:hover .services-portal-link {
    color: var(--accent);
}

/* ── Deep dive — light contrast section ── */
.services-deep-tunnel {
    padding: 100px 0;
    background: #f5f3f2;
    color: var(--primary);
}

.services-deep-head {
    max-width: 560px;
    margin-bottom: 56px;
}

.services-deep-head .section-label {
    color: var(--secondary);
}

.services-deep-head h2 {
    font-size: clamp(1.875rem, 3.5vw, 2.5rem);
    color: var(--primary);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.services-deep-head p {
    color: var(--gray-600);
    line-height: 1.7;
}

.services-deep-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.services-deep-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 40px;
    background: var(--white);
    border: 1px solid #e8e4e2;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(26, 5, 5, 0.05);
    scroll-margin-top: calc(var(--header-height) + 72px);
    transition: box-shadow 0.35s ease;
}

.services-deep-card:hover {
    box-shadow: 0 16px 48px rgba(26, 5, 5, 0.1);
}

.services-deep-card.is-reversed .services-deep-copy {
    order: 2;
}

.services-deep-card.is-reversed .services-deep-panel {
    order: 1;
}

.services-deep-num {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--secondary);
    margin-bottom: 12px;
}

.services-deep-copy h2 {
    font-size: 1.625rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.services-deep-copy > p {
    color: var(--gray-600);
    line-height: 1.75;
    margin-bottom: 20px;
}

.services-deep-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.services-deep-tag {
    padding: 6px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
}

.services-deep-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.services-deep-panel {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e8e4e2;
    background: var(--primary);
    min-height: 280px;
}

.services-deep-panel-head {
    display: flex;
    gap: 6px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.services-deep-panel-head span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.services-deep-panel-head span:nth-child(1) { background: #ef4444; }
.services-deep-panel-head span:nth-child(2) { background: #f59e0b; }
.services-deep-panel-head span:nth-child(3) { background: #22c55e; }

.services-deep-panel-body {
    padding: 24px;
}

.services-deep-panel-label {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(220, 38, 38, 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.services-deep-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-deep-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.services-deep-benefits li svg {
    width: 16px;
    height: 16px;
    color: #4ade80;
    flex-shrink: 0;
}

/* ── Process — dark vertical tunnel timeline ── */
.services-process-tunnel {
    padding: 100px 0;
    background: #0a0202;
    position: relative;
    overflow: hidden;
}

.services-process-tunnel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(220, 38, 38, 0.4), transparent);
    opacity: 0.5;
}

.services-process-head {
    text-align: center;
    max-width: 520px;
    margin: 0 auto 56px;
    position: relative;
    z-index: 1;
}

.services-process-head h2 {
    color: var(--white);
    font-size: clamp(1.75rem, 3.5vw, 2.375rem);
}

.services-process-head p {
    color: rgba(255, 255, 255, 0.45);
}

.services-process-head .section-label {
    color: var(--accent);
}

.services-process-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.services-process-step {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.services-process-step:last-child {
    border-bottom: none;
}

.services-process-step-num {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.12);
    border: 2px solid rgba(220, 38, 38, 0.35);
    border-radius: 50%;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent);
    box-shadow: 0 0 24px rgba(220, 38, 38, 0.2);
}

.services-process-step strong {
    display: block;
    font-size: 1.125rem;
    color: var(--white);
    margin-bottom: 6px;
}

.services-process-step span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.65;
}

/* ── Tech terminal ── */
.services-tech-tunnel {
    padding: 64px 0;
    background: #111;
    border-top: 1px solid #222;
}

.services-tech-terminal {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #333;
    background: #0d0d0d;
}

.services-tech-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.services-tech-bar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.services-tech-bar span:nth-child(1) { background: #ef4444; }
.services-tech-bar span:nth-child(2) { background: #f59e0b; }
.services-tech-bar span:nth-child(3) { background: #22c55e; }

.services-tech-bar code {
    margin-left: 12px;
    font-size: 0.8125rem;
    color: #22c55e;
    font-family: ui-monospace, monospace;
}

.services-tech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 24px;
}

.services-tech-chip {
    padding: 6px 12px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #a3a3a3;
    font-family: ui-monospace, monospace;
}

/* ── CTA band ── */
.services-cta-tunnel {
    padding: 88px 0;
    background: linear-gradient(135deg, #991b1b, #dc2626, #b91c1c);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.services-cta-tunnel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(200px) rotateX(60deg);
    transform-origin: center top;
    opacity: 0.5;
    pointer-events: none;
}

.services-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
}

.services-cta-inner h2 {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    color: var(--white);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.services-cta-inner p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 28px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .services-portal-grid {
        grid-template-columns: 1fr 1fr;
    }

    .services-portal-card.is-featured {
        grid-column: span 2;
    }

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

    .services-deep-card.is-reversed .services-deep-copy,
    .services-deep-card.is-reversed .services-deep-panel {
        order: unset;
    }
}

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

    .services-portal-card.is-featured {
        grid-column: span 1;
    }

    .services-tunnel-stats {
        gap: 20px;
    }

    .services-deep-card {
        padding: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .services-tunnel-scroll svg {
        animation: none;
    }
}
