/* ==========================================================
   SERVICES PAGE — ECOSYSTEM LAYOUT
   Full rebuild: animated diagram, layer indicator, visuals,
   deliverables accordion, connection diagram, scroll polish.
========================================================== */

/* ----------------------------------------------------------
   EYEBROW CONTRAST
---------------------------------------------------------- */
.services-page .eyebrow {
    color: rgba(255,255,255,0.62);
}

/* ----------------------------------------------------------
   LAYER INDICATOR — fixed right-side navigator
---------------------------------------------------------- */
.layer-indicator {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.layer-indicator.visible {
    opacity: 1;
    pointer-events: all;
}

.layer-dot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-direction: row-reverse;
}

.layer-dot-num {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.25);
    transition: color 0.3s ease;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.layer-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
    flex-shrink: 0;
}

.layer-dot:hover .layer-dot-num,
.layer-dot.active .layer-dot-num {
    opacity: 1;
    transform: translateX(0);
}

.layer-dot:hover::after {
    background: rgba(255,255,255,0.5);
    transform: scale(1.4);
}

.layer-dot.active::after {
    width: 10px;
    height: 10px;
    background: var(--color-red);
    box-shadow: 0 0 8px rgba(227,28,61,0.5);
}

.layer-dot.active .layer-dot-num {
    color: rgba(255,255,255,0.7);
}

@media (max-width: 1100px) {
    .layer-indicator { display: none; }
}

/* ----------------------------------------------------------
   HERO
---------------------------------------------------------- */
.services-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 10rem;
    padding-bottom: 8rem;
    background: linear-gradient(180deg, #000000, #02131b 100%);
    overflow: hidden;
}

.services-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 50%, rgba(var(--color-teal-rgb),.07), transparent 45%),
        radial-gradient(circle at 20% 70%, rgba(var(--color-red-rgb),.05), transparent 40%);
    pointer-events: none;
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.services-hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.services-hero .container {
    position: relative;
    z-index: 1;
}

.hero-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(11,148,150,0.4);
    animation: particleDrift linear infinite;
}

@keyframes particleDrift {
    0%   { transform: translateY(100vh) translateX(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-100px) translateX(var(--drift,20px)); opacity: 0; }
}

.services-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.services-hero-copy {
    max-width: 600px;
}

.services-hero-copy h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.0;
    letter-spacing: -.04em;
    margin: 1rem 0 1.75rem;
}

.services-hero-copy p {
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

/* Layer pills in hero */
.hero-layer-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.layer-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-round);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.3s ease;
}

.layer-pill:hover {
    border-color: var(--color-red);
    color: #fff;
    background: rgba(227,28,61,0.08);
}

/* ----------------------------------------------------------
   ECOSYSTEM DIAGRAM (hero right)
---------------------------------------------------------- */
.ecosystem-diagram {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    /* Was 440px — getting lost against the new starfield, and there's
       plenty of room in this column to go bigger. */
    max-width: 620px;
    margin: 0 auto;
}

.diagram-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    transition: border-color 0.4s ease, background 0.4s ease, transform 0.6s cubic-bezier(0.16,1,0.3,1);
    opacity: 0;
    transform: scale(0.7);
}

.diagram-ring.visible {
    opacity: 1;
    transform: scale(1);
}

.ring-1 { inset: 30%; background: rgba(227,28,61,0.06); border-color: rgba(227,28,61,0.25); transition-delay: 0s; }
.ring-2 { inset: 18%; background: rgba(11,148,150,0.04); border-color: rgba(11,148,150,0.15); transition-delay: 0.1s; }
.ring-3 { inset: 8%; background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.07); transition-delay: 0.2s; }
.ring-4 { inset: 0%; background: transparent; border-color: rgba(255,255,255,0.04); transition-delay: 0.3s; }

.ring-1[data-active] { border-color: rgba(227,28,61,0.6); background: rgba(227,28,61,0.1); }
.ring-2[data-active] { border-color: rgba(11,148,150,0.5); background: rgba(11,148,150,0.07); }
.ring-3[data-active] { border-color: rgba(11,148,150,0.3); background: rgba(11,148,150,0.04); }
.ring-4[data-active] { border-color: rgba(255,255,255,0.15); }

.ring-label {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 0.4rem 0.7rem;
    transition: color 0.4s ease;
}

.ring-1 .ring-label { color: rgba(227,28,61,0.7); }
.ring-2 .ring-label { color: rgba(11,148,150,0.7); }

.diagram-core {
    position: absolute;
    /* Was inset:40% (core = 20% of diagram width). Tightened slightly
       so the core itself claims more of the now-larger diagram. */
    inset: 37%;
    border-radius: 50%;
    background: var(--color-red);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 0 50px rgba(227,28,61,0.35);
    animation: coreBreath 3s ease-in-out infinite;
}

@keyframes coreBreath {
    0%, 100% { box-shadow: 0 0 30px rgba(227,28,61,0.25); }
    50%       { box-shadow: 0 0 55px rgba(227,28,61,0.45); }
}

@media (max-width: 980px) {
    .services-hero-inner {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }
    .ecosystem-diagram {
        max-width: 320px;
        order: -1;
    }
    .hero-layer-pills { justify-content: center; }
    .services-hero-copy p { margin-inline: auto; }
}

/* ----------------------------------------------------------
   ECOSYSTEM SECTIONS (shared)
---------------------------------------------------------- */
.ecosystem-section {
    position: relative;
    padding: 9rem 0;
    overflow: hidden;
}

.ecosystem-section .container { position: relative; z-index: 2; }

.ecosystem-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.ecosystem-split.reverse .ecosystem-visual { order: -1; }

/* Section backgrounds */
.territory-section {
    background: var(--color-black);
}
.territory-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 50%, rgba(var(--color-teal-rgb),.06), transparent 55%);
    pointer-events: none;
}

.habitat-section {
    background: var(--color-surface-1);
}
.habitat-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 50%, rgba(var(--color-red-rgb),.04), transparent 55%);
    pointer-events: none;
}

.reach-section {
    background: var(--color-black);
}
.reach-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(var(--color-teal-rgb),.05), transparent 50%);
    pointer-events: none;
}

.nest-section {
    background: var(--color-surface-1);
}
.nest-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 50%, rgba(var(--color-teal-rgb),.05), transparent 55%);
    pointer-events: none;
}

/* ----------------------------------------------------------
   LAYER BADGE
---------------------------------------------------------- */
.layer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0.45rem 1rem 0.45rem 0.5rem;
    border-radius: var(--radius-round);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.badge-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-red);
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
}

.badge-label {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

/* ----------------------------------------------------------
   ECOSYSTEM CONTENT TEXT
---------------------------------------------------------- */
.ecosystem-content h2 {
    font-size: clamp(2.2rem, 3.5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -.03em;
    margin: 0 0 1rem;
}

.ecosystem-content .subhead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 0 0 1.75rem;
    line-height: 1.55;
}

.ecosystem-content p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    max-width: 560px;
}

/* ----------------------------------------------------------
   DELIVERABLES ACCORDION
---------------------------------------------------------- */
.deliverables-block {
    margin: 2rem 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.deliverables-toggle {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: none;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: background 0.25s ease;
    text-align: left;
}

.deliverables-toggle:hover {
    background: rgba(255,255,255,0.05);
}

.deliverables-icon {
    font-size: 1.4rem;
    color: var(--color-red);
    transition: transform 0.3s ease;
    line-height: 1;
}

.deliverables-block.open .deliverables-icon {
    transform: rotate(45deg);
}

.deliverables-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16,1,0.3,1);
}

.deliverables-block.open .deliverables-list {
    max-height: var(--list-height, 400px);
}

.deliverables-list ul {
    list-style: none;
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.deliverables-list li {
    padding: 0.75rem 0 0.75rem 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

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

.deliverables-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.1rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-red);
}

/* ----------------------------------------------------------
   CTAs
---------------------------------------------------------- */
.ecosystem-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-eco-primary,
.btn-eco-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-eco-primary {
    background: var(--color-red);
    color: #fff;
    border-color: var(--color-red);
}

.btn-eco-primary:hover {
    background: var(--color-red-dark);
    border-color: var(--color-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(227,28,61,0.3);
}

.btn-eco-outline {
    background: transparent;
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.18);
}

.btn-eco-outline:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.04);
    transform: translateY(-2px);
}

/* ----------------------------------------------------------
   VISUAL PANELS (shared shell)
---------------------------------------------------------- */
.ecosystem-visual {
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    position: relative;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.ecosystem-visual:hover {
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 30px 70px rgba(0,0,0,0.35);
}

.visual-inner {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.visual-label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
}

/* ----------------------------------------------------------
   TERRITORY SVG ANIMATIONS
---------------------------------------------------------- */
.t-ring {
    animation: ringFadeIn 1.2s ease forwards;
    opacity: 0;
}
.t-ring-4 { animation-delay: 0.1s; }
.t-ring-3 { animation-delay: 0.25s; }
.t-ring-2 { animation-delay: 0.4s; }
.t-ring-1 { animation-delay: 0.55s; }

@keyframes ringFadeIn {
    to { opacity: 1; }
}

.t-claim-line, .t-claim-line2, .t-claim-line3 {
    stroke-dasharray: 4 4;
    animation: dashDraw 1.5s ease forwards;
    stroke-dashoffset: 200;
    opacity: 0;
}
.t-claim-line  { animation-delay: 0.8s; }
.t-claim-line2 { animation-delay: 1.0s; }
.t-claim-line3 { animation-delay: 1.2s; }

@keyframes dashDraw {
    to { stroke-dashoffset: 0; opacity: 1; }
}

.t-dot {
    animation: dotPop 0.4s cubic-bezier(0.16,1,0.3,1) forwards;
    opacity: 0;
    transform-origin: center;
}
.t-dot:nth-child(1) { animation-delay: 1.0s; }
.t-dot:nth-child(2) { animation-delay: 1.1s; }
.t-dot:nth-child(3) { animation-delay: 1.2s; }
.t-dot:nth-child(4) { animation-delay: 1.3s; }
.t-dot:nth-child(5) { animation-delay: 1.4s; }

@keyframes dotPop {
    from { opacity: 0; r: 0; }
    to   { opacity: 1; }
}

.t-pulse {
    animation: pulseRing 2.5s ease-out infinite;
    transform-origin: 200px 170px;
}
.t-pulse-2 { animation-delay: 0.8s; }

@keyframes pulseRing {
    0%   { opacity: 0.5; transform: scale(0.9); }
    100% { opacity: 0; transform: scale(1.3); }
}

/* ----------------------------------------------------------
   REACH SVG ANIMATIONS
---------------------------------------------------------- */
.r-node {
    animation: nodePop 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
    opacity: 0;
    transform-origin: center;
}
.r-node:nth-child(3) { animation-delay: 0.3s; }
.r-node:nth-child(4) { animation-delay: 0.45s; }
.r-node:nth-child(5) { animation-delay: 0.6s; }
.r-node:nth-child(6) { animation-delay: 0.75s; }
.r-node:nth-child(7) { animation-delay: 0.9s; }
.r-node:nth-child(8) { animation-delay: 1.05s; }

@keyframes nodePop {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}

.r-pulse {
    animation: pulseRing 3s ease-out infinite;
    transform-origin: 200px 170px;
}
.r-pulse-2 { animation-delay: 1s; }

/* ----------------------------------------------------------
   HABITAT BROWSER ANIMATION
---------------------------------------------------------- */
.browser-frame {
    width: 100%;
    border-radius: 12px;
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #161b22;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.browser-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}

.browser-dot:nth-child(1) { background: rgba(227,28,61,0.5); }
.browser-dot:nth-child(2) { background: rgba(255,196,0,0.4); }
.browser-dot:nth-child(3) { background: rgba(56,211,159,0.4); }

.browser-url {
    flex: 1;
    text-align: center;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.05em;
    background: rgba(255,255,255,0.04);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
}

.browser-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bc-hero { display: flex; flex-direction: column; gap: 0.6rem; }

.bc-line {
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
    height: 8px;
    animation: shimmer 2.5s ease-in-out infinite;
}
.bc-line-lg { width: 75%; height: 14px; background: rgba(255,255,255,0.14); }
.bc-line-md { width: 55%; }
.bc-line-sm { width: 40%; }
.bc-line-xs { width: 30%; height: 6px; }

@keyframes shimmer {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

.bc-cta-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.bc-btn {
    height: 22px;
    border-radius: 5px;
    width: 70px;
    animation: shimmer 2.5s ease-in-out infinite;
}

.bc-btn-red   { background: rgba(227,28,61,0.5); animation-delay: 0.2s; }
.bc-btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.15); }

.bc-cards {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 0.6rem;
}

.bc-card {
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bc-img {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    animation: shimmer 2.5s ease-in-out infinite;
}

.bc-score {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.05);
}

.bc-score-label {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bc-score-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}

.bc-score-fill {
    height: 100%;
    width: 0;
    background: var(--color-teal);
    border-radius: 2px;
    animation: fillScore 2s 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes fillScore {
    to { width: 98%; }
}

.bc-score-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-teal);
}

/* ----------------------------------------------------------
   NEST SVG ANIMATIONS
---------------------------------------------------------- */
.n-flow {
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}
.n-flow:nth-child(7)  { animation-delay: 0.1s; }
.n-flow:nth-child(8)  { animation-delay: 0.2s; }
.n-flow:nth-child(9)  { animation-delay: 0.3s; }
.n-flow:nth-child(10) { animation-delay: 0.4s; }
.n-flow:nth-child(11) { animation-delay: 0.5s; }
.n-flow:nth-child(12) { animation-delay: 0.6s; }
.n-flow:nth-child(13) { animation-delay: 0.7s; }
.n-flow:nth-child(14) { animation-delay: 0.8s; }
.n-flow:nth-child(15) { animation-delay: 0.9s; }
.n-flow:nth-child(16) { animation-delay: 1.0s; }
.n-flow:nth-child(17) { animation-delay: 1.1s; }
.n-flow:nth-child(18) { animation-delay: 1.2s; }

@keyframes fadeIn { to { opacity: 1; } }

.n-node {
    opacity: 0;
    animation: nodePop 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
}
.n-node:nth-child(1) { animation-delay: 0.0s; }
.n-node:nth-child(2) { animation-delay: 0.1s; }
.n-node:nth-child(3) { animation-delay: 0.2s; }
.n-node:nth-child(4) { animation-delay: 0.3s; }
.n-node:nth-child(5) { animation-delay: 0.4s; }
.n-node:nth-child(6) { animation-delay: 0.5s; }
.n-node:nth-child(7) { animation-delay: 0.6s; }
.n-node:nth-child(8) { animation-delay: 0.7s; }
.n-node:nth-child(9) { animation-delay: 0.8s; }

/* Travelling dot animation */
.n-traveller {
    offset-path: path('M 200 60 L 200 150 L 200 240');
    animation: travel 3s ease-in-out infinite;
    opacity: 0;
}

@keyframes travel {
    0%   { offset-distance: 0%;   opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}

/* ----------------------------------------------------------
   CONNECTION SECTION
---------------------------------------------------------- */
.connection-section {
    position: relative;
    padding: 9rem 0;
    background: linear-gradient(180deg, var(--color-surface-1), #000);
    overflow: hidden;
}

.connection-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(var(--color-teal-rgb),.05), transparent 60%);
    pointer-events: none;
}

.connection-section .container {
    position: relative;
    z-index: 2;
}

.connection-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 5rem;
}

.connection-header h2 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    line-height: 1;
    letter-spacing: -0.04em;
    margin: 1rem 0 1.5rem;
}

.connection-header p {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

/* Connection diagram */
.connection-diagram {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 0;
    max-width: 900px;
    margin: 0 auto 4rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.conn-layer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2.5rem 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.06);
    position: relative;
    transition: background 0.35s ease;
    cursor: default;
}

.conn-layer:last-child { border-right: none; }

.conn-layer:hover {
    background: rgba(255,255,255,0.03);
}

.conn-num {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--color-red);
    opacity: 0.8;
}

.conn-content {
    text-align: center;
}

.conn-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #fff;
}

.conn-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.conn-arrow {
    position: absolute;
    right: -0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.15);
    z-index: 2;
    background: var(--color-surface-1);
    padding: 0.2rem;
}

/* Animate in sequentially */
.conn-layer {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease, background 0.35s ease;
}
.conn-layer.visible {
    opacity: 1;
    transform: none;
}
.conn-layer[data-conn="1"] { transition-delay: 0s; }
.conn-layer[data-conn="2"] { transition-delay: 0.1s; }
.conn-layer[data-conn="3"] { transition-delay: 0.2s; }
.conn-layer[data-conn="4"] { transition-delay: 0.3s; }

.connection-note {
    text-align: center;
}

.connection-note p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.connection-note strong { color: #fff; }

.connection-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ----------------------------------------------------------
   MOBILE
---------------------------------------------------------- */
@media (max-width: 980px) {
    .ecosystem-split {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    .ecosystem-split.reverse .ecosystem-visual { order: 0; }
    .ecosystem-visual { order: -1; }

    .connection-diagram {
        grid-template-columns: 1fr 1fr;
    }
    .conn-layer:nth-child(2) { border-right: none; }
    .conn-layer:nth-child(3) { border-top: 1px solid rgba(255,255,255,0.06); }
    .conn-arrow { display: none; }
}

@media (max-width: 640px) {
    .connection-diagram { grid-template-columns: 1fr; }
    .conn-layer { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .ecosystem-section { padding: 6rem 0; }
    .ecosystem-cta { flex-direction: column; }
    .btn-eco-primary, .btn-eco-outline { width: 100%; justify-content: center; }
}