:root {
    --bg-color: var(--surface-background);
    --text-main: var(--content-primary);
    --text-muted: var(--content-secondary);
    --accent-color: var(--accent-brand);
    --accent-glow: color-mix(in srgb, var(--primary-neon) 40%, transparent);
    --accent-gradient: linear-gradient(135deg, var(--primary-neon) 0%, color-mix(in srgb, var(--primary-neon) 85%, white) 100%);
    --cta-height: 3rem;
    --cta-radius: 0.75rem;
    --cta-shadow-rest: 0 0.375rem 1.125rem color-mix(in srgb, var(--primary-neon) 22%, transparent);
    --cta-shadow-hover: 0 0.625rem 1.375rem color-mix(in srgb, var(--primary-neon) 32%, transparent);
    --glass-bg: color-mix(in srgb, var(--surface-panel) 80%, transparent);
    --glass-border: color-mix(in srgb, var(--accent-brand) 15%, transparent);
    --navbar-height: 102px;
    --services-sticky-header-height: 160px;
    --services-header-clearance: 24px;
    --services-card-stack-gap: 40px;
    --card-stack-offset: 6px;
    --services-card-height: clamp(220px, 24vh, 280px);
    --services-card-reserve-height: var(--services-card-height);
    --services-rail-fade-distance: clamp(180px, 28vh, 260px);
    --ambient-light-transition: 0.5s var(--ease-standard);
    --timeline-ambient-light-core: color-mix(in srgb, var(--accent-color) 11%, transparent);
    --timeline-ambient-light-falloff: color-mix(in srgb, var(--accent-color) 5%, transparent);
    --services-header-ambient-light-width: clamp(20rem, 48vw, 36rem);
    --services-header-ambient-light-height: clamp(15rem, 36vh, 22rem);
    --services-header-ambient-light-offset-x: clamp(-5rem, -8vw, -3rem);
    --services-header-ambient-light-offset-y: clamp(-4rem, -7vh, -2.5rem);
    --services-header-ambient-light-core: color-mix(in srgb, var(--accent-color) 18%, transparent);
    --services-header-ambient-light-falloff: color-mix(in srgb, var(--accent-color) 7%, transparent);
    --services-exit-opacity: 1;
    --sticky-scroll-height: 300vh;
    --services-footer-mask-overlap: clamp(160px, 32vh, 280px);
    --footer-curtain-overlap: clamp(128px, 18vh, 176px);
    --footer-curtain-rail-top: var(--navbar-height);
    --footer-curtain-track-gap: 32px;
    --horizontal-scroll-edge-fade: 150px;
    --footer-curtain-stage-tail: 100vh;
    --footer-curtain-color: var(--bg-color);
    --footer-padding-top: clamp(56px, 8vh, 96px);
    --footer-padding-bottom: clamp(24px, 4vh, 40px);
    --timeline-section-height: 300vh;
    --timeline-transition-clearance: 5rem;
    --legal-hero-centering-adjustment: 0.3125rem;
}

html {
    scroll-padding-top: var(--navbar-height);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
body[data-page-shell="document"] {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: clip;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: var(--navbar-height) !important;
}

.hero {
    height: var(--hero-fold-height, calc(100svh - var(--navbar-height)));
    min-height: var(--hero-fold-height, calc(100svh - var(--navbar-height)));
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* Added to prevent orb overflow */
}

.hero.hero--static {
    height: calc(100svh - var(--navbar-height) - var(--page-padding));
    height: calc(100dvh - var(--navbar-height) + var(--page-padding) - var(--product-shell-frame-padding));
    min-height: calc(100svh - var(--navbar-height) - var(--page-padding));
    min-height: calc(100dvh - var(--navbar-height) + var(--page-padding) - var(--product-shell-frame-padding));
    margin-top: calc(var(--navbar-height) - var(--product-shell-frame-padding) + (var(--page-padding) * 0.25));
    padding: 0;
    align-items: center;
    transform: translateY(var(--legal-hero-centering-adjustment));
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.bg-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.ambient-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    pointer-events: none;
}

.principles-page .ambient-light {
    filter: blur(8rem);
    opacity: 0.12;
}

.ambient-light--page-leading {
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: var(--accent-color);
}

.ambient-light--page-trailing {
    bottom: -150px;
    right: -100px;
    width: 800px;
    height: 400px;
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
}

.ambient-light--approach-accent {
    bottom: -180px;
    right: -180px;
    width: 800px;
    height: 400px;
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
}

.sticky-content {
    position: relative;
}

.sticky-content > .ambient-light--approach-accent {
    opacity: 0;
    transition: opacity var(--ambient-light-transition);
}

.sticky-content.is-ambient-light-active > .ambient-light--approach-accent {
    opacity: 0.63;
}

.horizontal-scroll-track {
    position: relative;
}

/* Typography & Utils */
.text-gradient {
    color: var(--accent-color);
}


/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-primary {
    min-height: var(--cta-height);
    border: 0;
    border-radius: var(--cta-radius);
    background: var(--accent-color);
    color: var(--accent-content);
    box-shadow: var(--cta-shadow-rest);
    transition: transform 180ms var(--ease-standard), box-shadow 180ms var(--ease-standard), background-color 180ms var(--ease-standard);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-brand);
    background: color-mix(in srgb, var(--secondary-bg) 78%, transparent);
    color: var(--text-main);
    cursor: pointer;
    transition: border-color 180ms var(--ease-standard), background-color 180ms var(--ease-standard), transform 180ms var(--ease-standard);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 10%, var(--secondary-bg));
    transform: translateY(-1px);
}

.theme-toggle-icon {
    font-size: 1.15rem;
    line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle {
        transition: none;
    }
}

.btn-primary:hover {
    box-shadow: var(--cta-shadow-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    background: color-mix(in srgb, var(--primary-neon) 5%, transparent);
    border-color: var(--accent-color);
}

@keyframes cta-glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px color-mix(in srgb, var(--primary-neon) 50%, transparent);
    }

    50% {
        box-shadow: 0 0 35px color-mix(in srgb, var(--primary-neon) 65%, transparent), 0 0 60px color-mix(in srgb, var(--primary-neon) 20%, transparent);
    }
}

.btn-neon {
    background: var(--primary-neon);
    color: var(--bg-color);
    border: none;
    box-shadow: 0 0 20px color-mix(in srgb, var(--primary-neon) 50%, transparent);
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: cta-glow-pulse 3s ease-in-out infinite;
}

.btn-neon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--text-color) 40%, transparent) 0%, transparent 50%);
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-neon:hover {
    animation: none;
    box-shadow: 0 0 35px color-mix(in srgb, var(--primary-neon) 80%, transparent);
    transform: translateY(-2px) scale(1.02);
}

.btn-neon:hover::after {
    opacity: 0.8;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.glass-panel a:not(.btn) {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: text-shadow 0.3s ease;
}

.glass-panel a:not(.btn):hover {
    text-shadow: 0 0 8px var(--accent-glow);
    text-decoration: underline;
}

/* Navbar */
.navbar {
    padding: 24px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg-color) 85%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    font-weight: 300;
    color: var(--text-muted);
}

.logo a {
    color: inherit;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
    min-width: 0;
}

@media (min-width: 769px) and (max-width: 1180px) {
    .nav-links {
        gap: 16px;
    }

    .nav-links .nav-link {
        font-size: 0.95rem;
    }

    .nav-links .btn-primary {
        padding-left: 18px;
        padding-right: 18px;
        white-space: nowrap;
    }
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.burger-line {
    width: 24px;
    height: 2px;
    background: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
}

/* Hero Section */
.hero {
    padding: 60px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--primary-neon) 10%, transparent);
    border: 1px solid var(--glass-border);
    color: var(--accent-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    background: color-mix(in srgb, var(--primary-neon) 6%, transparent);
    border-color: color-mix(in srgb, var(--primary-neon) 30%, transparent);
    padding: 5px 14px;
}

#hero-badge-text {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#hero-badge-text.fade-out {
    opacity: 0;
    transform: translateY(-5px);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle strong {
    color: var(--text-main);
    font-weight: 600;
}

.principles-page .hero-content {
    max-width: 760px;
}

.principles-page .hero-title {
    font-size: clamp(3rem, 5vw, 3.65rem);
    letter-spacing: -0.04em;
}

.principles-page .hero-title .text-gradient {
    color: var(--primary-neon);
    text-shadow: none;
}

.principles-page .hero-subtitle:first-of-type {
    color: var(--text-main);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.principles-page .hero-subtitle:nth-of-type(2) {
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 0;
}

.hero-scroll-cue {
    position: fixed;
    left: 50%;
    bottom: var(--services-header-clearance);
    z-index: 3;
    width: 24px;
    height: 32px;
    transform: translateX(-50%);
    color: var(--accent-color);
    opacity: 0.72;
    pointer-events: none;
    transition: opacity 0.24s var(--ease-standard), visibility 0s linear 0.24s;
}

.hero-scroll-cue.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.hero-scroll-cue span {
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateX(-50%) rotate(45deg);
    animation: hero-scroll-cue 2.4s ease-in-out infinite;
}

.hero-scroll-cue.is-hidden span {
    animation-play-state: paused;
}

.hero+.services-section {
    position: relative;
}

.hero+.services-section::before {
    content: '';
    position: absolute;
    top: -56px;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(to bottom, transparent, var(--bg-color));
    pointer-events: none;
    z-index: 1;
}

@keyframes hero-scroll-cue {

    0%,
    100% {
        opacity: 0.55;
        transform: translate(-50%, 0) rotate(45deg);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, var(--card-stack-offset)) rotate(45deg);
    }
}

/* Sections General */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 60px;
}

.model-proof-section {
    position: relative;
    isolation: isolate;
    z-index: 1;
    min-height: calc(100svh - var(--navbar-height));
    display: flex;
    align-items: flex-start;
    background: var(--bg-color);
    padding: clamp(4rem, 10vh, 7rem) 0 clamp(3rem, 6vh, 5rem);
    border-top: 1px solid var(--border-strong);
    border-bottom: 1px solid color-mix(in srgb, var(--primary-neon) 6%, transparent);
}

.model-proof-section > .container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.model-proof-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.model-proof-section {
    box-shadow: 0 24px 56px color-mix(in srgb, var(--primary-neon) 5%, transparent);
}

.model-proof-section--carousel .model-proof-carousel-content {
    min-width: 0;
}

@media (min-width: 769px) {
    .model-proof-section--carousel .model-proof-carousel-content {
        display: contents;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 86px;
    }

    .model-proof-section--carousel {
        min-height: 300vh;
        height: 300vh;
        padding: 0;
    }

    .model-proof-section--carousel > .container {
        position: sticky;
        top: var(--navbar-height);
        height: calc(100svh - var(--navbar-height));
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .model-proof-section--carousel .model-proof-carousel-track {
        display: block;
        width: 100%;
        overflow: hidden;
        min-width: 0;
    }

    .model-proof-section--carousel .model-proof-carousel-content {
        display: flex;
        gap: 24px;
        width: max-content;
        padding: 0;
        will-change: transform;
        transform: translateZ(0);
    }

    .model-proof-section--carousel .model-proof-item {
        width: calc(100vw - 48px);
        flex-shrink: 0;
        min-width: 0;
    }
}

.model-proof-item {
    border-top: 1px solid color-mix(in srgb, var(--primary-neon) 14%, transparent);
    padding-top: 1.25rem;
    min-width: 0;
}

.model-proof-index {
    color: var(--primary-neon);
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 1.5rem;
}

.model-proof-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.model-proof-item p {
    color: var(--text-muted);
    line-height: 1.6;
}

.sticky-scroll-section .section-title {
    margin-bottom: 8px;
}

.sticky-scroll-section .sticky-wrapper {
    justify-content: center;
    padding-top: 0;
    transform: none;
}

@media (min-width: 769px) {
    #approche .sticky-content > .container {
        transform: translateY(calc(-1 * clamp(0px, 50vh - 384px, 220px)));
    }
}

@media (max-width: 768px) {
    #approche .sticky-content > .container {
        transform: translateY(-3rem);
    }
}

.services-section--compact {
    padding-top: 0;
}

/* Timeline */
/* TIMELINE SECTION (SPLIT LAYOUT) */
.timeline-section {
    position: relative;
    padding: 0;
    height: var(--timeline-section-height, 300vh);
    background: var(--bg-color);
    margin-bottom: 0;
}

.timeline-container {
    position: sticky;
    top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    align-items: start;
    overflow: visible;
    isolation: isolate;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc((100% - 100vw) / 2);
    width: 100vw;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 42% 90% at 2% 8%, var(--timeline-ambient-light-core) 0%, var(--timeline-ambient-light-falloff) 38%, transparent 76%);
    opacity: 0;
    transition: opacity var(--ambient-light-transition);
}

.timeline-header.sticky-header {
    position: relative;
    /* was sticky, but now the container is sticky */
    z-index: 10;
    min-height: calc(100vh - var(--navbar-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.timeline-container.timeline-container--active::before {
    opacity: 1;
}

.timeline-header-copy {
    transform: translateY(36px);
}

.timeline-header .section-title,
.timeline-header .section-subtitle {
    text-align: center;
}

@media (min-width: 769px) {
    .timeline-header.sticky-header {
        align-items: flex-start;
    }

    .timeline-header-copy {
        width: min(100%, 24rem);
        transform: translateX(clamp(-2rem, -2vw, -0.75rem)) translateY(36px);
    }

    .timeline-header .section-title,
    .timeline-header .section-subtitle {
        text-align: left;
    }
}

.timeline-content {
    position: relative;
    z-index: 1;
    min-width: 0;
    padding-left: 0;
    will-change: transform;
    padding-top: 0;
    padding-bottom: 0;
    /* add some padding so cards have room to translate */
}

.timeline-line {
    position: absolute;
    left: 23px;
    /* 24px - 1px (half of 2px width) to center on 48px dot */
    top: 0;
    /* start above the first step number */
    bottom: 100px;
    width: 2px;
    background: color-mix(in srgb, var(--text-main) 10%, transparent);
    z-index: 1;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0px;
    /* controlled by JS */
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-item {
    position: relative;
    min-width: 0;
    padding-left: 80px;
    margin-bottom: 40px;
    z-index: 2;
    transition: all 0.4s ease;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Card Styling */
.timeline-item .timeline-card {
    opacity: 0.62;
    background-color: color-mix(in srgb, var(--bg-color) 70%, transparent) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    border: 1px solid color-mix(in srgb, var(--text-main) 5%, transparent);
}

.timeline-item:not(.active) .timeline-card {
    background-color: color-mix(in srgb, var(--bg-color) 84%, var(--surface-panel)) !important;
    border-color: color-mix(in srgb, var(--text-main) 18%, transparent);
}

.timeline-item:not(.active) .timeline-card h3 {
    color: color-mix(in srgb, var(--text-main) 86%, var(--bg-color));
}

.timeline-item:not(.active) .timeline-card p {
    color: color-mix(in srgb, var(--text-muted) 90%, var(--bg-color));
}

.timeline-item.active .timeline-card {
    opacity: 1;
    transform: translateY(0);
    border-color: color-mix(in srgb, var(--text-main) 30%, transparent);
    box-shadow: 0 10px 40px -10px color-mix(in srgb, var(--text-color) 5%, transparent);
}

.timeline-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
    transition: all 0.6s ease;
}

.timeline-item.active .timeline-card h3 {
    text-shadow: 0 0 20px color-mix(in srgb, var(--text-color) 20%, transparent);
}

/* Dot Styling */
.timeline-dot {
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(calc(-50% + 20px));
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid color-mix(in srgb, var(--text-main) 10%, transparent);
    color: color-mix(in srgb, var(--text-main) 30%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    z-index: 3;
    transition: all 0.4s ease;
}

.timeline-item.active .timeline-dot {
    transform: translateY(-50%);
    border-color: var(--text-color);
    color: var(--background-color);
    background-color: var(--text-color) !important;
    background: var(--text-color) !important;
    box-shadow: 0 0 15px var(--text-color);
}

@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes border-spin-once {
    0% {
        --border-angle: 0deg;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        --border-angle: 360deg;
        opacity: 0;
    }
}


@keyframes border-neon-fade-in {

    0%,
    50% {
        border-color: color-mix(in srgb, var(--text-main) 30%, transparent);
        box-shadow: 0 10px 40px -10px color-mix(in srgb, var(--text-color) 5%, transparent);
    }

    90%,
    100% {
        border-color: var(--primary-neon);
        box-shadow: 0 0 20px -5px var(--primary-neon);
    }
}

.animate-border-glow .timeline-card {
    position: relative;
}

.animate-border-glow.active .timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 1.5px;
    background: conic-gradient(from var(--border-angle), transparent 20%, color-mix(in srgb, var(--primary-neon) 20%, transparent) 60%, var(--primary-neon) 85%, transparent 100%);
    -webkit-mask: linear-gradient(var(--text-color) 0 0) content-box, linear-gradient(var(--text-color) 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(var(--text-color) 0 0) content-box, linear-gradient(var(--text-color) 0 0);
    mask-composite: exclude;
    z-index: 10;
    animation: border-spin-once 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
    opacity: 0;
}

.animate-border-glow.active .timeline-card {
    animation: border-neon-fade-in 1.5s ease-out forwards;
}


@media (max-width: 768px) {
    .timeline-container::before {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 100%;
        background: color-mix(in srgb, var(--bg-color) 95%, transparent);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 100;
    }

    .nav-links.active {
        right: 0;
    }

    .burger-menu.active .burger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .burger-menu.active .burger-line:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active .burger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .timeline-container {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: clamp(210px, 32svh, 260px);
    }

    .timeline-header.sticky-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        min-height: auto;
        padding: 32px 16px 48px;
        background: linear-gradient(to bottom, var(--bg-color) 60%, transparent);
        justify-content: flex-start;
        pointer-events: none;
        /* Let clicks pass through if needed */
    }

    .timeline-header-copy {
        transform: none;
    }

    .timeline-header .section-title,
    .timeline-header .section-subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .timeline-content {
        padding-left: 0;
    }

    .timeline-line {
        left: 24px;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-dot {
        transition: none;
    }

    .sticky-scroll-section .sticky-wrapper {
        padding-top: 0;
    }

    .horizontal-scroll-track {
        padding: 0 0 12px;
    }
}

.services-section {
    --services-card-rail-top: calc(var(--navbar-height) + var(--services-sticky-header-height) + var(--services-header-clearance));
    padding: 72px 0;
    margin-bottom: calc(var(--navbar-height, 85px) - var(--services-card-rail-top) - var(--services-card-height) - 72px - 80px);
    position: relative;
}

.footer-curtain-stage--expertise {
    --footer-curtain-visible-cards: 2;
    --footer-curtain-card-width: min(460px, calc(100vw - 120px));
    --footer-curtain-track-width: min(1152px, calc(100vw - 48px));
    --horizontal-scroll-edge-fade: clamp(48px, 5vw, 72px);
    --expertise-mobile-card-height: 28.25rem;
}

.footer-curtain-stage--guarantees {
    --footer-curtain-visible-cards: 2;
    --footer-curtain-card-width: min(460px, calc((100vw - 120px) / 2));
    --footer-curtain-track-width: min(984px, calc(100vw - 48px));
}

.principles-page #principes-du-modele .horizontal-scroll-content .service-card {
    height: var(--services-card-height);
    min-height: var(--services-card-height);
    justify-content: flex-start;
}

.principles-page #principes-du-modele {
    margin-bottom: 0;
}

.legal-page .services-section {
    margin-bottom: 0;
}

.footer-curtain-source {
    position: relative;
    z-index: 1;
}

.footer-curtain-stage--carousel {
    --services-card-rail-top: calc(var(--navbar-height) + var(--services-sticky-header-height) + var(--services-header-clearance));
}

#principes-du-modele::before,
.footer-curtain-source::before {
    content: '';
    position: absolute;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary-neon) 26%, transparent), transparent);
    pointer-events: none;
}

#principes-du-modele::before,
.footer-curtain-source::before {
    top: 0;
    box-shadow: 0 -18px 42px color-mix(in srgb, var(--primary-neon) 10%, transparent);
    z-index: 3;
}

.principles-page > .services-section.footer-curtain-source,
.services-grid-section.footer-curtain-source {
    padding-top: 0;
}

.services-grid-section.footer-curtain-source {
    align-items: flex-start;
    padding-bottom: 0;
}

.footer-curtain-source:not(#champ-action) {
    margin-bottom: calc(-1 * var(--footer-curtain-stage-tail) + var(--navbar-height));
}

.footer-curtain-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
}

.footer-curtain-source .container,
.footer-curtain-rail {
    min-width: 0;
}

.footer-curtain-source.sticky-scroll-section > .container,
.footer-curtain-stage--carousel {
    min-height: 100%;
}

.footer-curtain-source.sticky-scroll-section > .container {
    height: 100%;
}

.footer-curtain-stage::after {
    content: '';
    display: block;
    height: var(--footer-curtain-stage-tail);
    pointer-events: none;
}

.footer-curtain-rail {
    position: sticky;
    top: var(--footer-curtain-rail-top);
    z-index: 2;
    padding-top: clamp(56px, 8vh, 96px);
}

@media (min-width: 769px) {
    .footer-curtain-stage--carousel .footer-curtain-rail {
        min-height: calc(100svh - var(--navbar-height));
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-top: 0;
    }
}

.footer-curtain-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--footer-curtain-visible-cards) - 1) * var(--footer-curtain-track-gap)) / var(--footer-curtain-visible-cards));
    gap: var(--footer-curtain-track-gap);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.footer-curtain-track::-webkit-scrollbar {
    display: none;
}

.footer-curtain-stage--carousel .footer-curtain-track {
    display: block;
    width: var(--footer-curtain-track-width);
    max-width: 100%;
    overflow: hidden;
    padding: 24px 0;
    scroll-snap-type: none;
    -webkit-mask-image: none;
    mask-image: none;
}

.footer-curtain-stage--carousel .horizontal-scroll-content {
    display: flex;
    gap: var(--footer-curtain-track-gap);
    padding: 0 24px;
    width: max-content;
    will-change: transform;
    transform: translateZ(0);
}

@media (min-width: 769px) {
    .footer-curtain-header {
        display: contents;
    }

    .footer-curtain-stage--expertise .horizontal-scroll-content {
        align-items: stretch;
        padding-right: calc((var(--footer-curtain-track-width) - var(--footer-curtain-card-width)) / 2);
        padding-left: calc((var(--footer-curtain-track-width) - var(--footer-curtain-card-width)) / 2);
    }

    .footer-curtain-stage--expertise .horizontal-scroll-content > .service-card {
        align-self: stretch;
        height: auto;
    }

    .footer-curtain-stage--guarantees .horizontal-scroll-content {
        transform: none !important;
    }
}

.footer-curtain-stage--carousel .horizontal-scroll-content > .service-card {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    align-content: start;
    align-items: start;
    row-gap: 1rem;
    width: var(--footer-curtain-card-width);
    min-width: 0;
    flex-shrink: 0;
    justify-content: start;
}

.footer-curtain-stage--expertise .service-card-heading {
    display: contents;
}

@media (min-width: 1025px) {
    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card:nth-child(2n) {
        background: color-mix(in srgb, var(--secondary-bg) 92%, var(--primary-neon));
        border-color: color-mix(in srgb, var(--primary-neon) 24%, transparent);
        box-shadow: 0 18px 48px color-mix(in srgb, var(--background-color) 32%, transparent);
    }
}

@media (max-width: 768px) {
    .footer-curtain-stage--expertise,
    .footer-curtain-stage--guarantees {
        --footer-curtain-visible-cards: 1;
    }

    .footer-curtain-stage--expertise .footer-curtain-track > .service-card:nth-child(3n + 2),
    .footer-curtain-stage--guarantees .footer-curtain-track > .service-card:nth-child(3n + 2) {
        background: var(--glass-bg);
        border-color: var(--glass-border);
        box-shadow: none;
    }

    .footer-curtain-stage--carousel .footer-curtain-track {
        mask-image: none;
        -webkit-mask-image: none;
        padding: 0;
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content {
        gap: 24px;
        padding: 12px 0 0;
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card {
        width: calc(100vw - 48px);
    }

    .footer-curtain-stage--expertise .horizontal-scroll-content > .service-card {
        grid-template-rows: auto auto auto;
        align-content: space-between;
        height: var(--expertise-mobile-card-height);
        min-height: var(--expertise-mobile-card-height);
    }

    .footer-curtain-stage--expertise .service-card-heading {
        display: grid;
        grid-template-columns: 3rem minmax(0, 1fr);
        align-items: center;
        gap: 1rem;
        min-width: 0;
    }

    .footer-curtain-stage--expertise .service-card-heading .service-icon,
    .footer-curtain-stage--expertise .service-card-heading h3 {
        margin-bottom: 0;
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card:nth-child(2n) {
        background: var(--glass-bg);
        border-color: var(--glass-border);
        box-shadow: none;
    }
}

@media (max-height: 620px) and (min-width: 769px) {
    .footer-curtain-stage--carousel .footer-curtain-rail {
        padding-top: 24px;
    }

    .footer-curtain-stage--carousel .section-title {
        margin-bottom: 20px;
    }

    .footer-curtain-stage--carousel .section-subtitle {
        margin-bottom: 20px;
    }

    .footer-curtain-stage--carousel .footer-curtain-track {
        padding: 8px 0;
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card {
        padding: 1.25rem;
        row-gap: 0.7rem;
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card .service-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card h3 {
        margin-bottom: 8px;
        font-size: 1.08rem;
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card p {
        font-size: 0.84rem;
        line-height: 1.45;
    }
}

#champ-action.footer-curtain-source {
    --footer-curtain-overlap: calc(
        var(--services-sticky-header-height)
        + var(--services-header-clearance)
        + var(--services-card-reserve-height)
        + var(--services-card-stack-gap)
    );
    padding-bottom: 0;
    margin-bottom: calc(-1 * var(--footer-curtain-overlap));
}

#champ-action .sticky-card {
    will-change: opacity;
}

/* Timeline Overlap All Devices */
.timeline-section {
    margin-top: calc(-100vh + var(--navbar-height) + var(--timeline-transition-clearance));
    z-index: 10;
    box-shadow: 0 -30px 60px 10px var(--bg-color);
    /* Subtle top border/glow to separate */
    border-top: 1px solid color-mix(in srgb, var(--primary-neon) 10%, transparent);
}

/* Sticky Section Header */
.sticky-section-header {
    position: sticky;
    top: var(--navbar-height);
    z-index: 20;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding-right: 24px;
    padding-left: 24px;
    background: transparent;
    isolation: isolate;
    padding-top: 40px;
    margin-top: -40px;
    padding-bottom: 24px;
    will-change: transform;
    box-shadow: none;
    min-height: auto;
}

.sticky-section-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--bg-color);
    pointer-events: none;
    opacity: 1;
}

.sticky-section-header > .ambient-light--services-header-accent {
    top: var(--services-header-ambient-light-offset-y);
    left: var(--services-header-ambient-light-offset-x);
    width: var(--services-header-ambient-light-width);
    height: var(--services-header-ambient-light-height);
    border-radius: 0;
    background: radial-gradient(ellipse 74% 92% at 0% 18%, var(--services-header-ambient-light-core) 0%, var(--services-header-ambient-light-falloff) 40%, transparent 76%);
    filter: none;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--ambient-light-transition);
}

.sticky-section-header.is-ambient-light-active > .ambient-light--services-header-accent {
    opacity: var(--services-exit-opacity, 1);
}

.sticky-section-header .section-title,
.sticky-section-header .section-subtitle {
    opacity: var(--services-exit-opacity, 1);
    transition: none;
}

.sticky-section-header .section-title,
.sticky-section-header .section-subtitle {
    position: relative;
    z-index: 2;
}

.sticky-section-header .section-subtitle {
    margin-bottom: 0;
}

/* Sticky Card Stack */
.services-stack {
    display: block;
    margin-top: var(--services-header-clearance);
    position: relative;
    z-index: 1;
}

.services-stack::after {
    content: '';
    display: block;
    height: 0;
}

#champ-action .services-stack::after {
    height: max(2.5rem, calc(100svh - var(--services-card-rail-top) - var(--services-card-reserve-height) + var(--footer-curtain-overlap)));
}

.services-stack .sticky-card {
    position: sticky;
    top: var(--services-card-rail-top, calc(var(--navbar-height) + var(--services-sticky-header-height) + var(--services-header-clearance)));
    z-index: 0;
    height: var(--services-card-height);
    margin-bottom: var(--services-card-stack-gap);
    transform: none;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.card-content {
    display: flex;
    align-items: center;
    gap: 32px;
}

.services-stack .service-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
}

.services-stack .service-icon svg {
    width: 32px;
    height: 32px;
}

.services-stack .service-text {
    flex-grow: 1;
}

#champ-action .service-text {
    position: relative;
    padding-left: 96px;
    min-width: 0;
}

#champ-action .service-heading {
    display: block;
}

#champ-action .service-heading .service-icon {
    position: absolute;
    top: 50%;
    left: 0;
    margin: 0;
    transform: translateY(-50%);
}

#champ-action .sticky-card:hover .service-heading .service-icon {
    transform: translateY(-50%) scale(1.1) rotate(-5deg);
}

.services-stack .service-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.services-stack .service-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 800px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

#champ-action .service-tags {
    margin-top: 1.5rem;
}

.service-tag {
    color: var(--text-muted);
    border: 1px solid color-mix(in srgb, var(--primary-neon) 24%, transparent);
    border-radius: var(--radius-brand, 999px);
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    line-height: 1.2;
    text-decoration: none;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.service-tag:hover,
.service-tag:focus-visible {
    color: var(--text-main);
    border-color: color-mix(in srgb, var(--primary-neon) 35%, transparent);
    background-color: color-mix(in srgb, var(--primary-neon) 4%, transparent);
    text-decoration: none;
}

.glass-panel a.service-tag:hover,
.glass-panel a.service-tag:focus-visible {
    text-decoration: none;
}

.services-grid .service-card {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    align-content: start;
    align-items: start;
    row-gap: 1rem;
    scroll-margin-top: var(--navbar-height);
}

.services-grid .service-icon,
.services-grid .service-card h3 {
    margin-bottom: 0;
}

.service-card-copy {
    min-width: 0;
}

.service-card-copy p {
    margin: 0;
}

.service-card-copy .service-intervention {
    margin-top: 0.7rem;
}

.services-grid .service-outcome {
    margin-top: 0;
    padding-top: 1rem;
    border-top: 1px solid color-mix(in srgb, var(--text-main) 10%, transparent);
    font-size: 0.98rem;
}

.services-grid .service-outcome strong {
    display: block;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.services-grid .service-outcome span {
    display: block;
}

@media (max-width: 768px) {
    #champ-action {
        --services-card-reserve-height: 19rem;
        --services-card-stack-gap: 24px;
    }

    .card-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    #champ-action .card-content {
        display: block;
        height: 100%;
    }

    .services-stack .sticky-card {
        padding: 1.25rem 1rem;
        margin-bottom: var(--services-card-stack-gap);
        height: var(--services-card-height);
    }

    #champ-action .services-stack .sticky-card {
        height: var(--services-card-equal-height, auto);
        min-height: var(--services-card-equal-height, 0);
        padding: 1.25rem;
    }

    .services-stack .service-icon {
        width: 52px;
        height: 52px;
        margin-bottom: 0;
    }

    #champ-action .services-stack .service-icon {
        width: 2.75rem;
        height: 2.75rem;
    }

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

    .services-stack .service-text h3 {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }

    .services-stack .service-text p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    #champ-action .services-stack .service-text {
        position: static;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        align-self: stretch;
        column-gap: 0;
        row-gap: 0.75rem;
        height: 100%;
        padding-left: 0;
        min-width: 0;
    }

    #champ-action .service-heading {
        display: grid;
        grid-template-columns: 2.75rem minmax(0, 1fr);
        align-items: center;
        gap: 1rem;
    }

    #champ-action .service-heading .service-icon,
    #champ-action .sticky-card:hover .service-heading .service-icon,
    #champ-action .service-heading h3,
    #champ-action .service-body {
        position: static;
        grid-column: auto;
        grid-row: auto;
        transform: none;
    }

    #champ-action .services-stack .service-text h3,
    #champ-action .service-body,
    #champ-action .service-body p,
    #champ-action .service-body .service-tags {
        margin: 0;
    }

    #champ-action .service-body {
        display: flex;
        min-height: 0;
        flex-direction: column;
        justify-content: center;
        gap: 1.5rem;
        padding: 0 1.5rem;
    }

    .service-tags {
        margin-top: 1rem;
    }

}

@media (max-width: 768px) and (max-height: 700px) {
    #champ-action .sticky-section-header {
        padding-top: 1rem;
        margin-top: -1rem;
        padding-bottom: 0.75rem;
    }

    #champ-action .sticky-section-header .section-title {
        font-size: 1.75rem;
        line-height: 1.05;
    }

    #champ-action .sticky-section-header .section-subtitle {
        font-size: 0.875rem;
        line-height: 1.35;
    }
}

@media (max-width: 768px) and (max-height: 550px),
    (max-width: 359px) and (max-height: 700px) {
    #champ-action.footer-curtain-source {
        margin-bottom: 0;
    }

    #champ-action .sticky-section-header,
    #champ-action .services-stack .sticky-card {
        position: relative;
        top: auto;
    }

    #champ-action .services-stack::after {
        height: 0;
    }
}

/* Base classes for cleaned inline styles */
.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--text-main);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-muted);
}

.legal-content h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
    margin-top: 2rem;
    text-decoration: underline;
    color: var(--accent-color);
}

/* Sticky Scroll Animation for Approche */
.sticky-scroll-section {
    height: var(--sticky-scroll-height, 300vh);
    /* gives room to scroll */
    padding: 0;
    position: relative;
    background-color: var(--bg-color);
    z-index: 2;
}

@media (min-width: 769px) {
    .services-grid-section.footer-curtain-source {
        height: 400vh;
    }
}

@media (min-width: 769px) {
    .footer-curtain-source--compact {
        height: 200vh;
    }
}

.sticky-scroll-section--extended {
    --sticky-scroll-height: 400vh;
}

#principes-du-modele {
    --principles-card-width: 400px;
    position: relative;
    isolation: isolate;
    background: color-mix(in srgb, var(--bg-color) 96%, var(--secondary-bg));
}

#principes-du-modele .sticky-wrapper {
    justify-content: center;
    padding-top: 0;
    z-index: 1;
}


.sticky-scroll-section .sticky-wrapper {
    position: sticky;
    top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
}



.horizontal-scroll-track {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 24px 0;
}

.horizontal-scroll-track,
.footer-curtain-stage--expertise .footer-curtain-track {
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        black var(--horizontal-scroll-edge-fade),
        black calc(100% - var(--horizontal-scroll-edge-fade)),
        transparent
    );
    mask-image: linear-gradient(
        to right,
        transparent,
        black var(--horizontal-scroll-edge-fade),
        black calc(100% - var(--horizontal-scroll-edge-fade)),
        transparent
    );
}

.horizontal-scroll-content {
    display: flex;
    gap: 32px;
    /* Center the first and last card in the track to avoid the blur */
    padding-left: calc(50% - 200px);
    padding-right: calc(50% - 200px);
    width: max-content;
    will-change: transform;
    /* Hardware acceleration */
    transform: translateZ(0);
}

.horizontal-scroll-content .service-card {
    width: 400px;
    flex-shrink: 0;
}

#principes-du-modele .horizontal-scroll-content .service-card {
    width: var(--principles-card-width);
}

@media (min-width: 1200px) {
    .horizontal-scroll-content {
        /* On large screens, center the space between the first two cards (original behavior) */
        padding-left: max(24px, calc(50% - 416px));
        padding-right: calc(50% - 200px);
    }
}

.nav-link.active {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .services-section {
        --services-card-height: 250px;
        padding: 56px 0;
        margin-bottom: calc(var(--navbar-height, 85px) - var(--services-card-rail-top) - var(--services-card-height) - 56px - 80px);
    }

    .legal-page .services-section {
        margin-bottom: 0;
    }

    .horizontal-scroll-track,
    .footer-curtain-stage--expertise .footer-curtain-track {
        mask-image: none;
        -webkit-mask-image: none;
        padding: 0;
    }

    .horizontal-scroll-content {
        display: flex;
        gap: 24px;
        padding-top: 12px;
        padding-bottom: 0;
        padding-left: calc(50vw - 42.5vw);
        padding-right: calc(50vw - 42.5vw);
        width: max-content;
    }

    .horizontal-scroll-content .service-card {
        width: 85vw;
        flex-shrink: 0;
    }

    #principes-du-modele {
        --principles-card-width: min(85vw, 400px);
    }

    #principes-du-modele .horizontal-scroll-content {
        padding-right: calc(50vw - (var(--principles-card-width) / 2));
        padding-left: calc(50vw - (var(--principles-card-width) / 2));
    }
}

@media (max-width: 768px) {
    .footer-curtain-source.sticky-scroll-section > .container {
        position: relative;
        top: auto;
        height: auto;
        min-height: 0;
        display: block;
    }

    .services-grid-section.footer-curtain-source {
        height: auto;
    }

    .footer-curtain-source--compact {
        height: auto;
    }

    .footer-curtain-stage--carousel::after {
        height: 0;
    }

    .footer-curtain-stage--carousel .footer-curtain-rail {
        position: relative;
        top: auto;
        display: block;
        min-height: 0;
        padding-top: 0;
    }

    .footer-curtain-stage--carousel .footer-curtain-header {
        position: sticky;
        top: var(--navbar-height);
        z-index: 20;
        display: flex;
        min-height: var(--services-sticky-header-height);
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        margin-right: calc(50% - 50vw);
        margin-left: calc(50% - 50vw);
        padding: 16px 24px;
        background: var(--bg-color);
        box-shadow: 0 1px 0 color-mix(in srgb, var(--primary-neon) 12%, transparent);
    }

    .footer-curtain-stage--carousel .footer-curtain-header .section-title,
    .footer-curtain-stage--carousel .footer-curtain-header .section-subtitle {
        width: min(100%, 720px);
        margin: 0 auto;
    }

    .footer-curtain-stage--carousel .footer-curtain-track {
        overflow: visible;
        max-width: none;
        padding-top: var(--services-header-clearance);
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content {
        display: block;
        width: 100%;
        padding: 0;
        transform: none !important;
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content::after {
        content: '';
        display: block;
        height: var(--footer-curtain-stage-tail);
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card {
        position: sticky;
        top: var(--services-card-rail-top);
        width: 100%;
        min-height: var(--services-card-height);
        margin-bottom: 40px;
        transform: none;
        transition: box-shadow 0.4s ease, border-color 0.4s ease;
        background: color-mix(in srgb, var(--secondary-bg) 96%, var(--bg-color));
        box-shadow: 0 18px 44px color-mix(in srgb, var(--background-color) 44%, transparent);
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card:hover {
        transform: none;
    }
}

@media (max-width: 768px) and (max-height: 650px) {
    .footer-curtain-stage--carousel {
        --services-sticky-header-height: 135px;
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card {
        position: relative;
        top: auto;
        row-gap: 10px;
        padding: 18px 32px;
    }

    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card .service-icon,
    .footer-curtain-stage--carousel .horizontal-scroll-content > .service-card h3 {
        margin-bottom: 0;
    }
}

.services-grid-section {
    min-height: calc(100vh - var(--navbar-height));
    display: flex;
    align-items: center;
    padding: 60px 0 100px;
}

.services-grid-title {
    margin-bottom: 48px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    width: 100%;
}

.services-grid .service-card:nth-child(3n + 2) {
    background: color-mix(in srgb, var(--secondary-bg) 92%, var(--primary-neon));
    border-color: color-mix(in srgb, var(--primary-neon) 24%, transparent);
    box-shadow: 0 18px 48px color-mix(in srgb, var(--background-color) 32%, transparent);
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid .service-card:nth-child(3n + 2) {
        background: var(--glass-bg);
        border-color: var(--glass-border);
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .model-proof-section {
        padding: 4rem 0;
    }

    .model-proof-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

}

.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: color-mix(in srgb, var(--primary-neon) 30%, transparent);
    box-shadow: 0 15px 30px color-mix(in srgb, var(--background-color) 40%, transparent), 0 0 20px color-mix(in srgb, var(--primary-neon) 5%, transparent);
}

.services-stack .sticky-card:hover {
    transform: none;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary-neon) 10%, transparent);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
}



.service-card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer */
dmg-footer {
    display: block;
}

.footer {
    position: relative;
    z-index: 30;
    isolation: isolate;
    background: var(--footer-curtain-color);
    box-shadow: 0 -1px 1px color-mix(in srgb, var(--bg-color) 90%, transparent);
    min-height: calc(100svh - var(--navbar-height));
    height: calc(100svh - var(--navbar-height));
    display: grid;
}

.footer.footer--static {
    box-shadow: none;
}

.footer.footer--curtain {
    box-shadow: 0 -24px 56px color-mix(in srgb, var(--primary-neon) 8%, transparent);
}

.footer .container {
    flex-grow: 1;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
}

dmg-footer-cta {
    display: block;
    position: relative;
    width: 100%;
    grid-row: 2;
}

dmg-footer-cta[layout="static"] {
    margin: 0 auto;
}

.footer-cta {
    margin-bottom: 0;
    border-color: color-mix(in srgb, var(--primary-neon) 45%, transparent);
    box-shadow: 0 0 28px color-mix(in srgb, var(--primary-neon) 14%, transparent);
    text-align: center;
}

.footer-cta h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.footer-cta p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.footer-cta .btn {
    margin-top: 1.5rem;
}

.footer-bottom {
    grid-row: 3;
    margin-top: auto;
    margin-bottom: var(--footer-padding-bottom);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid color-mix(in srgb, var(--text-color) 5%, transparent);
    padding-top: 24px;
}

@media (max-width: 768px) {
    .footer {
        height: calc(100dvh - var(--navbar-height));
        min-height: calc(100dvh - var(--navbar-height));
        overflow: clip;
    }

    .footer .container {
        position: relative;
        width: 100%;
        min-height: 100%;
        grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
        padding-bottom: 0;
    }

    .footer-cta {
        padding: 1.5rem;
    }

    .footer-cta h2 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .footer-cta .btn {
        width: 100%;
        margin-top: 1rem;
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .footer-bottom {
        position: absolute;
        right: 1.5rem;
        bottom: max(0.75rem, env(safe-area-inset-bottom));
        left: 1.5rem;
        margin: 0;
        padding-top: 1rem;
    }

    .footer-link {
        display: inline-block;
        margin-left: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .ambient-light {
        transition: none !important;
    }

    .hero-scroll-cue {
        animation: none !important;
        opacity: 0.72;
    }

    .sticky-section-header .section-title,
    .sticky-section-header .section-subtitle {
        opacity: 1 !important;
    }

    .services-stack .sticky-card {
        transition: none !important;
    }

    .footer::before,
    .footer .container,
    .footer-cta,
    .footer-bottom {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }
}

@media (max-width: 768px) {
    .ambient-light {
        filter: blur(72px);
    }

    .ambient-light--page-leading {
        top: -60px;
        left: -60px;
        width: 240px;
        height: 240px;
    }

    .ambient-light--page-trailing,
    .ambient-light--approach-accent {
        right: -140px;
        bottom: -140px;
        width: 480px;
        height: 240px;
    }

    .hero+.services-section::before {
        top: -40px;
        height: 40px;
    }

    .hero {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.05;
        margin-bottom: 18px;
    }

    .principles-page .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 28px;
    }

    .principles-page .hero-subtitle:first-of-type {
        font-size: 1.05rem;
        margin-bottom: 1rem;
    }

    .principles-page .hero-subtitle:nth-of-type(2) {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2.1rem;
        line-height: 1.1;
    }

    .section-subtitle {
        font-size: 1rem;
        line-height: 1.45;
        margin-bottom: 40px;
    }

    .sticky-scroll-section .section-title {
        margin-bottom: 4px;
    }
}
