:root,
[data-theme="dark"] {
    --color-obsidian: #070708;
    --color-charcoal: #111113;
    --color-soft-white: #F3F4F6;
    --color-muted-gray: #97979F;
    --color-electric-blue: #2F6BFF;
    --color-ice-blue: #72D6FF;
    --color-accent-text: #A8AEB6;
    --color-link-text: #E8EAED;
    --color-border: rgba(243, 244, 246, 0.08);
    --color-border-hover: rgba(243, 244, 246, 0.15);
    --color-surface: rgba(17, 17, 19, 0.8);
    --color-surface-solid: #1a1a1d;
    --color-nav-scrolled: rgba(7, 7, 8, 0.85);
    --color-overlay: rgba(7, 7, 8, 0.72);
    --color-nav-backdrop: rgba(7, 7, 8, 0.28);
    --color-vignette: rgba(7, 7, 8, 0.45);
    --color-hero-vignette: rgba(7, 7, 8, 0.35);
    --color-code-bg: #0c0c0f;
    --color-input-bg: rgba(7, 7, 8, 0.6);
    --color-modal-overlay: rgba(7, 7, 8, 0.9);
    --color-logo-filter: none;
    --color-bg-accent-1: rgba(47, 107, 255, 0.14);
    --color-bg-accent-2: rgba(114, 214, 255, 0.08);
    --color-bg-accent-3: rgba(47, 107, 255, 0.07);
    --color-panel-bg: rgba(17, 17, 19, 0.35);
    --color-panel-bg-strong: rgba(17, 17, 19, 0.45);
    --font-heading: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --z-grain: 90;
    --z-loader: 1000;
    --z-nav: 100;
    --z-modal: 200;
    --z-content: 1;
    --z-site-bg: -1;
}

[data-theme="light"] {
    --color-obsidian: #F4F5F7;
    --color-charcoal: #FFFFFF;
    --color-soft-white: #111318;
    --color-muted-gray: #5B6170;
    --color-link-text: #1A2233;
    --color-accent-text: #5B6170;
    --color-border: rgba(17, 19, 24, 0.1);
    --color-border-hover: rgba(17, 19, 24, 0.18);
    --color-surface: rgba(255, 255, 255, 0.88);
    --color-surface-solid: #FFFFFF;
    --color-nav-scrolled: rgba(255, 255, 255, 0.92);
    --color-overlay: rgba(17, 19, 24, 0.45);
    --color-nav-backdrop: rgba(17, 19, 24, 0.18);
    --color-vignette: rgba(244, 245, 247, 0.5);
    --color-hero-vignette: rgba(244, 245, 247, 0.4);
    --color-code-bg: #ECEEF2;
    --color-input-bg: rgba(255, 255, 255, 0.95);
    --color-modal-overlay: rgba(17, 19, 24, 0.45);
    --color-logo-filter: none;
    --color-bg-accent-1: rgba(47, 107, 255, 0.08);
    --color-bg-accent-2: rgba(47, 107, 255, 0.05);
    --color-bg-accent-3: rgba(47, 107, 255, 0.04);
    --color-panel-bg: rgba(255, 255, 255, 0.92);
    --color-panel-bg-strong: rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .site-bg-canvas,
[data-theme="light"] .site-bg-rain { opacity: 0.35; }
[data-theme="light"] .grain { opacity: 0.02; mix-blend-mode: multiply; }
[data-theme="light"] .about { background: rgba(255, 255, 255, 0.72); }
[data-theme="light"] .contact-form { background: var(--color-panel-bg-strong); }
[data-theme="light"] .footer { background: rgba(255, 255, 255, 0.78); }
[data-theme="light"] .btn-secondary:hover { background-color: rgba(17, 19, 24, 0.05); }
[data-theme="light"] .note { background: rgba(17, 19, 24, 0.03); }
[data-theme="light"] .tech-tag { background: rgba(17, 19, 24, 0.04); }

html { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); background-color: transparent; color: var(--color-soft-white); line-height: 1.6; overflow-x: hidden; min-height: 100vh; transition: color var(--transition-base), background-color var(--transition-base); }

/* ===================== SITE-WIDE ANIMATED BACKGROUND ===================== */
.site-bg {
    position: fixed;
    inset: 0;
    z-index: var(--z-site-bg);
    pointer-events: none;
    overflow: hidden;
    background-color: var(--color-obsidian);
}
.site-bg::before {
    content: '';
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(ellipse 80% 60% at 72% 38%, var(--color-bg-accent-1) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 28% 72%, var(--color-bg-accent-2) 0%, transparent 55%),
        radial-gradient(ellipse 120% 100% at 50% 120%, var(--color-bg-accent-3) 0%, transparent 60%);
    animation: bg-gradient-shift 14s ease-in-out infinite alternate;
}
.site-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 100% 80% at 50% 50%, transparent 40%, var(--color-vignette) 100%);
}
.site-bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.95; }
.site-bg-rain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.65; z-index: 1; }
.site-bg-glow {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 107, 255, 0.12) 0%, rgba(47, 107, 255, 0.04) 40%, transparent 70%);
    top: 40%;
    left: 60%;
    transform: translate(-50%, -50%);
    filter: blur(2px);
    transition: top 0.4s ease, left 0.4s ease;
}
.site-bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    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.9' 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;
    animation: bg-noise-drift 8s steps(4) infinite;
}
@media (prefers-reduced-motion: reduce) {
    .site-bg::before, .site-bg-noise { animation: none; }
    .site-bg-canvas, .site-bg-rain { display: none; }
    .site-bg-glow { display: none; }
}

.nav, .hero, .strip, .services, .work, .process, .about, .contact, .footer { position: relative; z-index: var(--z-content); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
::selection { background-color: var(--color-electric-blue); color: #FFFFFF; }
:focus-visible { outline: 2px solid var(--color-electric-blue); outline-offset: 2px; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-obsidian); }
::-webkit-scrollbar-thumb { background: var(--color-charcoal); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-muted-gray); }

.grain {
    position: fixed; inset: 0; pointer-events: none; z-index: var(--z-grain); opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat; background-size: 200px;
}

/* ===================== LOADER ===================== */
.loader { position: fixed; inset: 0; z-index: var(--z-loader); background-color: var(--color-obsidian); display: flex; align-items: center; justify-content: center; transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s; }
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); }
.loader-q { width: min(520px, 86vw); height: auto; }
.loader-q img { width: 100%; height: auto; object-fit: contain; animation: loader-pulse 1.6s ease-in-out infinite; }
@keyframes loader-pulse { 0%, 100% { transform: scale(0.9); opacity: 0.55; } 50% { transform: scale(1); opacity: 1; } }
.loader-percentage { font-family: var(--font-heading); font-size: 0.875rem; color: var(--color-muted-gray); letter-spacing: 0.05em; }
@media (prefers-reduced-motion: reduce) { .loader-q img { animation: none; opacity: 1; transform: none; } }

/* ===================== NAVIGATION ===================== */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav); padding: var(--space-sm) var(--space-md); transition: background-color var(--transition-base), backdrop-filter var(--transition-base); }
.nav.scrolled { background-color: var(--color-nav-scrolled); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.nav-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; transition: opacity var(--transition-fast); }
.nav-logo:hover { opacity: 0.8; }
.nav-logo img { display: block; width: min(248px, 62vw); height: auto; filter: none; }
@media (min-width: 1400px) { .nav-logo img { width: 280px; } }
@media (max-width: 480px) { .nav-logo img { width: min(210px, 64vw); } }
.nav-links { display: flex; align-items: center; gap: var(--space-sm); }
.nav-link { font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; color: var(--color-soft-white); text-decoration: none; padding: 0.5rem 0.75rem; border-radius: 6px; transition: color var(--transition-fast), background-color var(--transition-fast); position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: 0.25rem; left: 0.75rem; right: 0.75rem; height: 1px; background-color: var(--color-electric-blue); transform: scaleX(0); transform-origin: left; transition: transform var(--transition-base); }
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); }
.nav-link:hover { color: var(--color-soft-white); }
.nav-cta { font-family: var(--font-body); font-size: 0.875rem; font-weight: 600; color: var(--color-obsidian); background-color: var(--color-soft-white); text-decoration: none; padding: 0.625rem 1.25rem; border-radius: 8px; margin-left: 0.5rem; transition: background-color var(--transition-fast), transform var(--transition-fast); }
.nav-cta:hover { background-color: var(--color-ice-blue); transform: translateY(-1px); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 0.5rem; z-index: calc(var(--z-nav) + 25); position: relative; }
.nav-toggle-line { display: block; width: 24px; height: 2px; background-color: var(--color-soft-white); transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dim page behind open mobile menu */
body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--color-nav-backdrop);
    z-index: calc(var(--z-nav) - 1);
    pointer-events: none;
}

@media (max-width: 1080px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 320px;
        background-color: var(--color-charcoal);
        flex-direction: column;
        align-items: stretch;
        padding: 5rem 1.5rem 2rem;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: calc(var(--z-nav) + 20);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-left: 1px solid var(--color-border);
        box-shadow: -16px 0 48px rgba(0, 0, 0, 0.55);
    }
    .nav-links.active { transform: translateX(0); }
    .nav-link {
        display: block;
        font-size: 1.125rem;
        line-height: 1.45;
        padding: 1rem 0;
        width: 100%;
        flex-shrink: 0;
        border-bottom: 1px solid var(--color-border);
        color: var(--color-soft-white);
    }
    .nav-link::after { display: none; }
    .nav-cta {
        display: block;
        margin-left: 0;
        margin-top: 1.25rem;
        width: 100%;
        text-align: center;
        padding: 0.875rem 1.25rem;
        flex-shrink: 0;
    }
    .nav-logo,
    .nav-toggle {
        position: relative;
        z-index: calc(var(--z-nav) + 30);
    }
}

/* ===================== BUTTONS ===================== */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: all var(--transition-fast); position: relative; overflow: hidden; }
.btn-primary { background-color: var(--color-electric-blue); color: var(--color-soft-white); padding: 0.875rem 1.75rem; border-radius: 10px; }
.btn-primary:hover { background-color: var(--color-ice-blue); color: var(--color-obsidian); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(47, 107, 255, 0.25); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background-color: transparent; color: var(--color-soft-white); padding: 0.875rem 1.75rem; border-radius: 10px; border: 1px solid var(--color-border); }
.btn-secondary:hover { border-color: var(--color-border-hover); background-color: rgba(243, 244, 246, 0.05); transform: translateY(-2px); }
.btn-text { background: none; color: var(--color-muted-gray); padding: 0.5rem 0; font-weight: 500; }
.btn-text::after { content: ''; position: absolute; bottom: 0.25rem; left: 0; right: 0; height: 1px; background-color: var(--color-electric-blue); transform: scaleX(0); transform-origin: left; transition: transform var(--transition-base); }
.btn-text:hover { color: var(--color-soft-white); }
.btn-text:hover::after { transform: scaleX(1); }
.btn-small { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
.btn-full { width: 100%; justify-content: center; }
.btn svg { width: 18px; height: 18px; transition: transform var(--transition-fast); }
.btn:hover svg { transform: translateX(3px); }

/* ===================== SECTIONS COMMON ===================== */
.section-header { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-md); margin-bottom: var(--space-lg); }
.section-label { font-family: var(--font-heading); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: var(--color-muted-gray); margin-bottom: var(--space-sm); }
.section-title { font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.1; color: var(--color-soft-white); }

/* ===================== HERO ===================== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 6rem var(--space-md) var(--space-lg); overflow: hidden; }
.hero-container { max-width: 1400px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: center; position: relative; z-index: var(--z-content); }
.hero-content { max-width: 600px; }
.hero-tagline { display: inline-flex; align-items: center; gap: 0.75rem; font-family: var(--font-heading); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.05em; color: var(--color-muted-gray); margin-bottom: var(--space-md); text-transform: uppercase; }
.hero-tagline-line { display: inline-block; width: 40px; height: 1px; background-color: var(--color-electric-blue); }
.hero-headline { font-family: var(--font-heading); font-size: clamp(2.5rem, 5.5vw, 4.5rem); font-weight: 700; line-height: 1.05; margin-bottom: var(--space-md); }
.hero-headline-line { display: block; overflow: hidden; }
.hero-headline-line span { display: inline-block; }
.hero-subhead { font-size: 1.125rem; line-height: 1.7; color: var(--color-muted-gray); max-width: 520px; margin-bottom: var(--space-md); }
.hero-ctas { display: flex; gap: var(--space-sm); flex-wrap: wrap; }

/* Hero Animated Background */
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-bg-gradient { position: absolute; inset: -10%; background:
    radial-gradient(ellipse 80% 60% at 72% 38%, rgba(47, 107, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 28% 72%, rgba(114, 214, 255, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 120% 100% at 50% 120%, rgba(47, 107, 255, 0.06) 0%, transparent 60%); animation: bg-gradient-shift 14s ease-in-out infinite alternate; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 55%, var(--color-hero-vignette) 100%); pointer-events: none; z-index: 2; }
@keyframes bg-noise-drift { 0% { transform: translate(0,0); } 100% { transform: translate(-10px, 8px); } }
@keyframes bg-gradient-shift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-2%, 2%) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .hero-bg-gradient { animation: none; } }

.hero-bg-particles { position: absolute; inset: 0; z-index: 1; }
.hero-bg-particles .particle { position: absolute; width: 2px; height: 2px; background: rgba(114, 214, 255, 0.5); border-radius: 50%; box-shadow: 0 0 6px rgba(47, 107, 255, 0.35); animation: particle-float 15s linear infinite; }
@keyframes particle-float { 0% { transform: translateY(100vh) translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-20vh) translateX(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-bg-particles .particle { animation: none; opacity: 0.3; } }

.hero-bg-radial { position: absolute; width: 700px; height: 700px; border-radius: 50%; background: radial-gradient(circle, rgba(47, 107, 255, 0.14) 0%, rgba(47, 107, 255, 0.04) 40%, transparent 70%); top: 50%; left: 70%; transform: translate(-50%, -50%); pointer-events: none; z-index: 1; filter: blur(2px); transition: top 0.4s ease, left 0.4s ease; }

/* Hero Visual / 3D */
.hero-visual { position: relative; height: 500px; display: flex; align-items: center; justify-content: center; z-index: var(--z-content); }
.hero-canvas-container { position: absolute; inset: 0; width: 100%; height: 100%; }
#hero-canvas { width: 100%; height: 100%; display: block; }
.hero-static-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.5s ease; }
.hero-static-fallback.visible { opacity: 1; }
.hero-static-fallback img { width: min(100%, 720px); height: auto; object-fit: contain; filter: drop-shadow(0 20px 60px rgba(47, 107, 255, 0.25)); }

.hero-scroll-indicator { position: absolute; bottom: var(--space-md); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.75rem; opacity: 0.6; z-index: var(--z-content); }
.hero-scroll-text { font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted-gray); }
.hero-scroll-line { width: 1px; height: 40px; background-color: var(--color-border); position: relative; overflow: hidden; }
.hero-scroll-line-inner { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--color-electric-blue); animation: scroll-line 2s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
@keyframes scroll-line { 0% { transform: translateY(-100%); } 50% { transform: translateY(0); } 100% { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .hero-scroll-line-inner { animation: none; transform: translateY(0); opacity: 0.5; } }

@media (max-width: 968px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-content { max-width: 100%; order: 2; }
    .hero-visual { order: 1; height: 300px; }
    .hero-tagline { justify-content: center; }
    .hero-subhead { margin-left: auto; margin-right: auto; }
    .hero-ctas { justify-content: center; }
    .hero-bg-radial { width: 300px; height: 300px; left: 50%; }
}
@media (max-width: 480px) {
    .hero { padding-top: 5rem; }
    .hero-ctas { flex-direction: column; align-items: center; }
    .hero-ctas .btn { width: 100%; max-width: 280px; justify-content: center; }
}

/* ===================== MOVING STRIP ===================== */
.strip { padding: var(--space-lg) 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); overflow: hidden; }
.strip-marquee { overflow: hidden; white-space: nowrap; margin-bottom: var(--space-sm); }
.strip-track { display: inline-flex; align-items: center; gap: 1.5rem; animation: marquee 40s linear infinite; will-change: transform; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .strip-track { animation: none; justify-content: center; width: 100%; } }
.strip-item { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 600; color: var(--color-soft-white); letter-spacing: -0.02em; }
.strip-separator { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2.5rem); color: var(--color-muted-gray); opacity: 0.45; }
.strip-subtitle { text-align: center; font-size: 0.9375rem; color: var(--color-muted-gray); max-width: 600px; margin: 0 auto; padding: 0 var(--space-md); }

/* ===================== SERVICES, editorial stack (no cards) ===================== */
.services { padding: var(--space-xl) 0; position: relative; }
.section-intro { font-size: 1.0625rem; line-height: 1.7; color: var(--color-muted-gray); max-width: 640px; margin-top: var(--space-sm); }

.svc-stack { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-md); border-top: 1px solid var(--color-border); }

.svc-item { position: relative; border-bottom: 1px solid var(--color-border); }
.svc-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--color-electric-blue), var(--color-ice-blue)); transform: scaleY(0); transform-origin: top; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.svc-item.is-active::before, .svc-item:hover::before { transform: scaleY(1); }

.svc-item-trigger { width: 100%; min-width: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-md); padding: clamp(1.25rem, 3vw, 2rem) 0; background: none; border: none; cursor: pointer; text-align: left; color: inherit; font: inherit; transition: padding-left 0.4s cubic-bezier(0.16, 1, 0.3, 1); box-sizing: border-box; }
.svc-item:hover .svc-item-trigger, .svc-item.is-active .svc-item-trigger { padding-left: 0.75rem; }

.svc-item-num { font-family: var(--font-heading); font-size: 0.8125rem; font-weight: 600; color: var(--color-muted-gray); letter-spacing: 0.05em; min-width: 2rem; transition: opacity var(--transition-base), color var(--transition-base); }
.svc-item:hover .svc-item-num, .svc-item.is-active .svc-item-num { color: var(--color-soft-white); opacity: 1; }

.svc-item-name { font-family: var(--font-heading); font-size: clamp(1.5rem, 4vw, 2.75rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; color: var(--color-soft-white); transition: color var(--transition-base), transform var(--transition-base); min-width: 0; overflow-wrap: break-word; word-wrap: break-word; }

.svc-item-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--color-muted-gray); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color var(--transition-base); }
.svc-item-icon svg { width: 20px; height: 20px; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.svc-item.is-active .svc-item-icon { color: var(--color-soft-white); }
.svc-item.is-active .svc-item-icon svg { transform: rotate(45deg); }

.svc-item-panel { max-height: 0; overflow: hidden; padding-left: calc(2rem + var(--space-md)); padding-right: 3.5rem; transition: max-height 0.55s cubic-bezier(0.16, 1, 0.3, 1), padding-bottom 0.4s ease; box-sizing: border-box; width: 100%; }
.svc-item.is-active .svc-item-panel { max-height: 720px; padding-bottom: clamp(1rem, 2vw, 1.75rem); }
.svc-item-desc { font-size: 1.0625rem; line-height: 1.7; color: var(--color-muted-gray); max-width: 720px; padding-bottom: 0.75rem; opacity: 0; transform: translateY(8px); transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s; overflow-wrap: break-word; word-wrap: break-word; max-width: 100%; }
.svc-item-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 2.5rem;
    list-style: none;
    max-width: 820px;
    margin: 0;
    padding: 0;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease 0.12s, transform 0.4s ease 0.12s;
}
.svc-item-list li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--color-soft-white);
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.svc-item-list li::before {
    content: '';
    position: absolute;
    left: 0.15rem;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-muted-gray);
    opacity: 0.75;
    box-shadow: none;
}
@media (max-width: 640px) { .svc-item-list { grid-template-columns: 1fr; gap: 0.5rem; } }

@media (max-width: 768px) {
    .svc-stack { padding: 0 1.25rem; }
    .svc-item-trigger {
        gap: 0.75rem;
        padding: 1.35rem 0 1.35rem 0.75rem;
        align-items: flex-start;
    }
    .svc-item:hover .svc-item-trigger,
    .svc-item.is-active .svc-item-trigger { padding-left: 0.75rem; }
    .svc-item-num { min-width: 1.75rem; flex-shrink: 0; padding-top: 0.15rem; }
    .svc-item-name {
        font-size: clamp(1.2rem, 4.5vw, 1.65rem);
        line-height: 1.25;
    }
    .svc-item-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }
    .svc-item-icon svg { width: 18px; height: 18px; }
    .svc-item-panel {
        padding-left: 1.25rem !important;
        padding-right: 0 !important;
    }
    .svc-item.is-active .svc-item-panel {
        max-height: 960px;
        padding-bottom: 1.5rem;
    }
    .svc-item-desc {
        font-size: 1rem;
        line-height: 1.65;
        padding-bottom: 1rem;
    }
    .svc-item-list { max-width: 100%; margin-top: 0.25rem; }
    .svc-item-list li {
        font-size: 0.9rem;
        line-height: 1.65;
        padding-left: 1.35rem;
        margin-bottom: 0.15rem;
    }
    .svc-item-list li::before {
        left: 0.2rem;
        top: 0.62em;
    }
}
.svc-item.is-active .svc-item-desc, .svc-item.is-active .svc-item-list { opacity: 1; transform: translateY(0); }
.svc-item.is-active .svc-item-list li { opacity: 0.9; }

/* Desktop: hover preview without locking open */
@media (hover: hover) and (pointer: fine) {
    .svc-item:hover .svc-item-panel { max-height: 720px; padding-bottom: clamp(1rem, 2vw, 1.75rem); }
    .svc-item:hover .svc-item-desc, .svc-item:hover .svc-item-list { opacity: 1; transform: translateY(0); }
    .svc-item:hover .svc-item-icon svg { transform: rotate(45deg); }
    .svc-item:hover .svc-item-icon { color: var(--color-soft-white); }
}

@media (prefers-reduced-motion: reduce) {
    .svc-item-panel, .svc-item-desc, .svc-item-list, .svc-item-trigger, .svc-item-icon svg, .svc-item::before { transition: none; }
}

/* ===================== WORK / PROJECTS ===================== */
.work { padding: var(--space-xl) 0; }
.work-list { display: flex; flex-direction: column; gap: var(--space-xl); }
.project { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-md); }
.project-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: center; }
.project-layout-left .project-info { order: 1; }
.project-layout-left .project-previews { order: 2; }
.project-layout-right .project-info { order: 2; }
.project-layout-right .project-previews { order: 1; }
.project-number { font-family: var(--font-heading); font-size: 0.875rem; font-weight: 600; color: var(--color-muted-gray); margin-bottom: var(--space-xs); display: block; }
.project-name { font-family: var(--font-heading); font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.15; margin-bottom: 0.25rem; }
.project-desc { font-size: 0.9375rem; line-height: 1.65; color: var(--color-muted-gray); margin-bottom: var(--space-sm); max-width: 420px; }
.project-link { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.9375rem; }
.project-link svg { width: 14px; height: 14px; flex-shrink: 0; transition: transform var(--transition-fast); }
.project-link:hover svg { transform: translate(2px, -2px); }
.project-summary { font-size: 1rem; line-height: 1.7; color: var(--color-muted-gray); margin-bottom: var(--space-sm); }
.project-services { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--space-sm); }
.project-service { font-size: 0.75rem; font-weight: 500; color: var(--color-muted-gray); background-color: var(--color-charcoal); padding: 0.375rem 0.75rem; border-radius: 100px; border: 1px solid var(--color-border); }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--space-md); }
.project-tag { font-size: 0.75rem; font-weight: 500; color: var(--color-ice-blue); background-color: rgba(47, 107, 255, 0.1); padding: 0.375rem 0.75rem; border-radius: 100px; border: 1px solid rgba(47, 107, 255, 0.25); }
.project-actions { display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap; }
.project-previews { position: relative; display: flex; align-items: flex-start; justify-content: center; gap: 1rem; min-height: 400px; }
.browser-frame { width: 100%; max-width: 520px; background-color: var(--color-charcoal); border-radius: 12px; overflow: hidden; border: 1px solid var(--color-border); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); transition: transform var(--transition-base), box-shadow var(--transition-base); }
.browser-frame-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background-color: var(--color-surface-solid); border-bottom: 1px solid var(--color-border); }
.browser-frame-dots { display: flex; gap: 6px; }
.browser-frame-dots span { width: 10px; height: 10px; border-radius: 50%; background-color: var(--color-muted-gray); opacity: 0.3; }
.browser-frame-dots span:nth-child(1) { background-color: #ff5f57; opacity: 0.8; }
.browser-frame-dots span:nth-child(2) { background-color: #febc2e; opacity: 0.8; }
.browser-frame-dots span:nth-child(3) { background-color: #28c840; opacity: 0.8; }
.browser-frame-url { flex: 1; font-size: 0.6875rem; color: var(--color-muted-gray); text-align: center; background-color: var(--color-obsidian); padding: 0.25rem 0.75rem; border-radius: 4px; font-family: monospace; }
.browser-frame-viewport { height: 300px; overflow: hidden; position: relative; }
.browser-frame-viewport img { width: 100%; height: auto; display: block; transition: transform 8s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform; }
/* Hover auto-scroll only on real pointer devices so it never sticks on touch */
@media (hover: hover) and (pointer: fine) {
    .browser-frame:hover { transform: translateY(-4px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
    .browser-frame:hover .browser-frame-viewport img { transform: translateY(calc(-100% + 300px)); }
}
.phone-frame { width: 140px; flex-shrink: 0; background-color: var(--color-charcoal); border-radius: 24px; overflow: hidden; border: 3px solid var(--color-surface-solid); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); position: relative; align-self: flex-end; }
.phone-frame-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 18px; background-color: var(--color-surface-solid); border-radius: 0 0 12px 12px; z-index: 2; }
.phone-frame-viewport { height: 280px; overflow: hidden; }
.phone-frame-viewport img { width: 100%; height: auto; display: block; }
@media (max-width: 968px) {
    .project-layout { grid-template-columns: 1fr; gap: var(--space-md); }
    /* Screenshot stacks above the text on mobile/tablet */
    .project-layout-left .project-info, .project-layout-right .project-info { order: 2; }
    .project-layout-left .project-previews, .project-layout-right .project-previews { order: 1; }
    .project-previews { min-height: auto; }
    .phone-frame { width: 120px; }
    .phone-frame-viewport { height: 300px; }
    .browser-frame { max-width: 100%; }
    .browser-frame-viewport { height: 320px; }
    .project-info { text-align: center; }
    .project-actions { justify-content: center; }
}
@media (max-width: 480px) {
    .phone-frame { display: none; }
    .browser-frame-viewport { height: 280px; }
    .project-actions { flex-direction: column; align-items: stretch; }
    .project-actions .btn { width: 100%; justify-content: center; }
}
/* Deliberate, viewport-gated auto-scroll on touch devices (only while visible) */
@media (hover: none) and (pointer: coarse) {
    .browser-frame[data-auto-scroll].is-visible .browser-frame-viewport img { animation: auto-scroll 9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s infinite alternate; }
    @keyframes auto-scroll { 0% { transform: translateY(0); } 100% { transform: translateY(calc(-100% + 320px)); } }
}
@media (prefers-reduced-motion: reduce) { .browser-frame-viewport img { transition: none !important; animation: none !important; } }

/* ===================== CASE STUDY MODAL ===================== */
.case-modal { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: var(--space-md); }
.case-modal[hidden] { display: none; }
.case-modal-overlay { position: absolute; inset: 0; background-color: var(--color-modal-overlay); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; }
.case-modal-content { position: relative; width: 100%; max-width: 900px; max-height: 90vh; background-color: var(--color-charcoal); border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; animation: modal-in 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes modal-in { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@media (prefers-reduced-motion: reduce) { .case-modal-content { animation: none; } }
.case-modal-close { position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; border-radius: 50%; background-color: var(--color-surface-solid); border: 1px solid var(--color-border); color: var(--color-soft-white); cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; transition: background-color var(--transition-fast), color var(--transition-fast); }
.case-modal-close:hover { background-color: var(--color-electric-blue); color: var(--color-obsidian); }
.case-modal-close svg { width: 18px; height: 18px; }
.case-modal-body { overflow-y: auto; padding: var(--space-lg) var(--space-md); -webkit-overflow-scrolling: touch; }
.case-modal-body::-webkit-scrollbar { width: 4px; }
.case-modal-body::-webkit-scrollbar-thumb { background-color: var(--color-border-hover); border-radius: 2px; }
.case-study { display: flex; flex-direction: column; gap: var(--space-md); }
.case-study-header { border-bottom: 1px solid var(--color-border); padding-bottom: var(--space-md); }
.case-study-number { font-family: var(--font-heading); font-size: 0.875rem; font-weight: 600; color: var(--color-muted-gray); margin-bottom: 0.25rem; }
.case-study-title { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; margin-bottom: 0.25rem; }
.case-study-industry { font-size: 0.875rem; color: var(--color-muted-gray); font-weight: 500; }
.case-study-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); }
.case-study-overview-item h4 { font-family: var(--font-heading); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted-gray); margin-bottom: 0.5rem; }
.case-study-overview-item p { font-size: 0.9375rem; line-height: 1.6; color: var(--color-soft-white); }
.case-study-screenshots { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
.case-study-screenshots-desktop { border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; }
.case-study-screenshots-desktop img { width: 100%; height: auto; display: block; }
.case-study-screenshots-mobile { border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; max-width: 180px; margin: 0 auto; }
.case-study-screenshots-mobile img { width: 100%; height: auto; display: block; }
.case-study-actions { display: flex; gap: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid var(--color-border); }
@media (max-width: 640px) { .case-study-screenshots { grid-template-columns: 1fr; } .case-study-screenshots-mobile { max-width: 150px; } .case-modal { padding: 0.5rem; } .case-modal-body { padding: var(--space-md) var(--space-sm); } }

/* ===================== PROCESS ===================== */
.process { padding: var(--space-xl) 0; }
.process-track { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-md); position: relative; }
.process-line { position: absolute; left: 31px; top: 0; bottom: 0; width: 2px; background-color: var(--color-border); }
.process-line-progress { position: absolute; top: 0; left: 0; width: 100%; background-color: var(--color-electric-blue); height: 0%; transition: height 0.3s ease; }
.process-steps { display: flex; flex-direction: column; gap: var(--space-lg); position: relative; }
.process-step { display: flex; gap: var(--space-md); align-items: flex-start; padding-left: 0; }
.process-step-icon { width: 64px; height: 64px; flex-shrink: 0; background-color: var(--color-charcoal); border: 1px solid var(--color-border); border-radius: 12px; display: flex; align-items: center; justify-content: center; transition: border-color var(--transition-base), box-shadow var(--transition-base); }
.process-step-icon svg { width: 32px; height: 32px; }
.process-step:hover .process-step-icon, .process-step.is-active .process-step-icon { border-color: var(--color-electric-blue); box-shadow: 0 0 20px rgba(47, 107, 255, 0.1); }
.process-step-content { flex: 1; padding-top: 0.5rem; }
.process-step-number { font-family: var(--font-heading); font-size: 0.75rem; font-weight: 600; color: var(--color-muted-gray); display: block; margin-bottom: 0.25rem; }
.process-step-title { font-family: var(--font-heading); font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; color: var(--color-soft-white); margin-bottom: 0.5rem; }
.process-step-desc { font-size: 1rem; line-height: 1.7; color: var(--color-muted-gray); max-width: 500px; }
@media (max-width: 640px) { .process-line { left: 23px; } .process-step { gap: var(--space-sm); } .process-step-icon { width: 48px; height: 48px; } .process-step-icon svg { width: 24px; height: 24px; } .process-step-content { padding-top: 0.25rem; } }

/* ===================== ABOUT ===================== */
.about { padding: var(--space-xl) 0; background: rgba(17, 17, 19, 0.35); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.about-container { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-md); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: center; }
.about-headline { font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.1; margin-bottom: var(--space-md); }
.about-text { display: flex; flex-direction: column; gap: var(--space-sm); }
.about-text p { font-size: 1.0625rem; line-height: 1.7; color: var(--color-muted-gray); }
.about-visual { display: flex; justify-content: center; }
.about-image { width: 100%; max-width: 520px; border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; background-color: var(--color-surface-solid); }
.about-image img { width: 100%; height: auto; display: block; }
@media (max-width: 968px) { .about-container { grid-template-columns: 1fr; gap: var(--space-md); } .about-visual { order: -1; } .about-image { max-width: 100%; } }

/* ===================== CONTACT ===================== */
.contact { padding: var(--space-xl) 0; }
.contact-container { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-md); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: start; }
.contact-title { font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.1; margin-bottom: var(--space-sm); }
.contact-subtitle { font-size: 1.125rem; line-height: 1.7; color: var(--color-muted-gray); margin-bottom: var(--space-md); }
.contact-details { padding-top: var(--space-sm); border-top: 1px solid var(--color-border); }
.contact-email { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 500; color: var(--color-soft-white); text-decoration: none; transition: color var(--transition-fast); }
.contact-email:hover { color: var(--color-muted-gray); text-decoration: underline; }
.contact-form { display: flex; flex-direction: column; gap: var(--space-sm); background: rgba(17, 17, 19, 0.5); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--color-border); border-radius: 16px; padding: var(--space-md); }
.form-honeypot { position: absolute; left: -9999px; opacity: 0; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
.form-label { font-size: 0.8125rem; font-weight: 600; color: var(--color-soft-white); letter-spacing: 0.02em; }
.form-input, .form-select, .form-textarea { font-family: var(--font-body); font-size: 0.9375rem; color: var(--color-soft-white); background-color: var(--color-obsidian); border: 1px solid var(--color-border); border-radius: 8px; padding: 0.75rem 1rem; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); width: 100%; }
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: var(--color-border-hover); }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--color-electric-blue); box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.1); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2397979F' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.form-select option { background-color: var(--color-charcoal); color: var(--color-soft-white); }
.form-recaptcha { margin-top: 0.25rem; display: flex; justify-content: center; width: 100%; }
.form-recaptcha .g-recaptcha { transform-origin: center center; }
.form-submit.is-loading { opacity: 0.7; cursor: wait; }
.form-submit.is-success { background-color: #22c55e; }
.form-submit.is-error { background-color: #ef4444; }
.form-status { padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.875rem; font-weight: 500; }
.form-status.is-success { background-color: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.2); }
.form-status.is-error { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
@media (max-width: 968px) { .contact-container { grid-template-columns: 1fr; gap: var(--space-md); } }
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: var(--space-sm); }
  .form-recaptcha .g-recaptcha { transform: scale(0.92); }
}

/* ===================== FOOTER ===================== */
.footer { padding: var(--space-xl) 0 var(--space-md); border-top: 1px solid var(--color-border); background: rgba(17, 17, 19, 0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.footer-inner { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-md); }
.footer-main { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); margin-bottom: var(--space-lg); padding-bottom: var(--space-lg); border-bottom: 1px solid var(--color-border); }
.footer-brand .footer-logo { width: min(420px, 100%); max-width: 100%; height: auto; margin-bottom: var(--space-sm); filter: none; }
.footer-tagline { font-size: 1rem; color: var(--color-soft-white); margin-bottom: 0.5rem; max-width: 300px; }
.footer-availability { font-size: 0.875rem; color: var(--color-muted-gray); font-style: italic; }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); justify-content: end; }
.footer-links-col { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links-title { font-family: var(--font-heading); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted-gray); margin-bottom: 0.25rem; }
.footer-link { font-size: 0.9375rem; color: var(--color-soft-white); text-decoration: none; transition: color var(--transition-fast); }
.footer-link:hover { color: var(--color-soft-white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-sm); }
.footer-copyright { font-size: 0.875rem; color: var(--color-muted-gray); }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal .footer-link { font-size: 0.8125rem; color: var(--color-muted-gray); }
.footer-legal .footer-link:hover { color: var(--color-soft-white); }
@media (max-width: 768px) { .footer-main { grid-template-columns: 1fr; gap: var(--space-md); } .footer-links { justify-content: start; } .footer-bottom { flex-direction: column; text-align: center; } .footer-legal { justify-content: center; } }

/* ===================== REVEAL ANIMATIONS ===================== */
[data-reveal] { opacity: 0; transform: translateY(30px); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } [data-reveal].is-visible { transition: none; } }

/* ===================== MAGNETIC BUTTONS ===================== */
.magnetic-btn { transition: transform 0.15s ease-out; }

/* ===================== 3D HERO SPECIFIC ===================== */
@media (max-width: 968px) { .hero-canvas-container { opacity: 0.7; } }

/* ===================== UTILITY ===================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ===================== SKIP LINK ===================== */
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: calc(var(--z-nav) + 5); background: var(--color-electric-blue); color: #fff; padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600; transition: top 0.2s ease; }
.skip-link:focus { top: 1rem; }

/* ===================== CONTENT SUB-PAGES (shared shell) ===================== */
.page { position: relative; z-index: var(--z-content); padding: calc(var(--space-xl) + 1rem) 0 var(--space-xl); }
.page-container { max-width: 1100px; margin: 0 auto; padding: 0 var(--space-md); }
.page-narrow { max-width: 820px; }
.page-header { margin-bottom: var(--space-lg); }
.page-eyebrow { font-family: var(--font-heading); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: var(--color-muted-gray); margin-bottom: var(--space-sm); }
.page-title { font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; color: var(--color-soft-white); }
.page-lead { font-size: 1.125rem; line-height: 1.7; color: var(--color-muted-gray); max-width: 680px; margin-top: var(--space-sm); }
.page-meta { font-size: 0.8125rem; color: var(--color-muted-gray); margin-top: var(--space-sm); }

/* ===================== BREADCRUMBS ===================== */
.breadcrumbs { font-size: 0.8125rem; color: var(--color-muted-gray); margin-bottom: var(--space-md); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: 0.4rem; }
.breadcrumbs li + li::before { content: '/'; color: var(--color-border-hover); }
.breadcrumbs a { color: var(--color-muted-gray); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-soft-white); }
.breadcrumbs [aria-current="page"] { color: var(--color-soft-white); }

/* ===================== DOC / ARTICLE PROSE ===================== */
.doc-layout { display: grid; grid-template-columns: 240px 1fr; gap: var(--space-lg); align-items: start; }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; } }
.toc { position: sticky; top: calc(var(--space-xl) - 2rem); font-size: 0.875rem; }
.toc-title { font-family: var(--font-heading); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-muted-gray); margin-bottom: 0.75rem; }
.toc ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; border-left: 1px solid var(--color-border); }
.toc a { display: block; padding: 0.2rem 0 0.2rem 0.85rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--color-muted-gray); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--color-soft-white); }
.toc a.is-active { color: var(--color-soft-white); border-left-color: var(--color-border-hover); }
@media (max-width: 900px) { .toc { position: static; margin-bottom: var(--space-md); border: 1px solid var(--color-border); border-radius: 12px; padding: var(--space-sm); } .toc ol { border-left: 0; } }

.prose { color: var(--color-soft-white); }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { font-family: var(--font-heading); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; margin-top: var(--space-lg); scroll-margin-top: 6rem; color: var(--color-soft-white); }
.prose h3 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; margin-top: var(--space-md); scroll-margin-top: 6rem; color: var(--color-soft-white); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 1.0625rem; line-height: 1.75; color: var(--color-muted-gray); }
.prose strong { color: var(--color-soft-white); font-weight: 600; }
.prose a { color: var(--color-link-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(232, 234, 237, 0.35); }
.prose a:hover { color: var(--color-soft-white); text-decoration-color: var(--color-soft-white); }
.prose ul, .prose ol { padding-left: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 1.4rem; }
.prose ul > li::before { content: ''; position: absolute; left: 0.1rem; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--color-muted-gray); }
.prose ol { list-style: decimal; }
.prose blockquote { border-left: 3px solid var(--color-border-hover); padding: 0.25rem 0 0.25rem 1.25rem; color: var(--color-soft-white); font-style: italic; }
.prose figure { margin: var(--space-md) 0; }
.prose figure img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--color-border); }
.prose figcaption { font-size: 0.8125rem; color: var(--color-muted-gray); margin-top: 0.5rem; text-align: center; }
.prose hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-lg) 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.prose th { color: var(--color-soft-white); font-family: var(--font-heading); font-weight: 600; }
.prose td { color: var(--color-muted-gray); }
.prose .lead { font-size: 1.2rem; color: var(--color-soft-white); line-height: 1.6; }

/* Callout / note box (neutral, used for "key takeaways", not alarming) */
.note { border: 1px solid var(--color-border); background: rgba(243, 244, 246, 0.03); border-left: 3px solid var(--color-border-hover); border-radius: 10px; padding: var(--space-sm) var(--space-md); }
.note p, .note li { color: var(--color-soft-white); }
.note-title { font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.4rem; color: var(--color-soft-white); }

/* Code blocks + copy button */
.prose pre { position: relative; background: var(--color-code-bg); border: 1px solid var(--color-border); border-radius: 12px; padding: 1rem 1rem; overflow-x: auto; }
.prose pre code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; line-height: 1.6; color: var(--color-soft-white); }
.prose :not(pre) > code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: rgba(243,244,246,0.08); padding: 0.12em 0.4em; border-radius: 5px; color: var(--color-soft-white); }
.code-copy { position: absolute; top: 0.5rem; right: 0.5rem; font-size: 0.7rem; font-weight: 600; color: var(--color-muted-gray); background: var(--color-surface-solid); border: 1px solid var(--color-border); border-radius: 6px; padding: 0.25rem 0.6rem; cursor: pointer; transition: color var(--transition-fast), border-color var(--transition-fast); }
.code-copy:hover { color: var(--color-soft-white); border-color: var(--color-border-hover); }

/* ===================== SERVICE PAGES ===================== */
.svc-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-lg); align-items: start; }
@media (max-width: 900px) { .svc-hero { grid-template-columns: 1fr; } }
.svc-hero-card { border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-panel-bg-strong); padding: var(--space-md); }
.svc-hero-card h2 { font-family: var(--font-heading); font-size: 1rem; margin-bottom: var(--space-sm); color: var(--color-soft-white); }
.svc-section { margin-top: var(--space-xl); }
.svc-section > h2 { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: var(--space-md); color: var(--color-soft-white); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-md); }
.svc-card { border: 1px solid var(--color-border); border-radius: 14px; padding: var(--space-md); background: var(--color-panel-bg); }
.svc-card h3 { font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--color-soft-white); }
.svc-card h3 a { color: var(--color-soft-white); text-decoration: none; transition: color var(--transition-fast); }
.svc-card h3 a:hover { color: var(--color-muted-gray); }
.svc-card p { font-size: 0.95rem; color: var(--color-muted-gray); line-height: 1.6; }
.svc-steps { counter-reset: step; display: flex; flex-direction: column; gap: var(--space-sm); }
.svc-step { display: grid; grid-template-columns: auto 1fr; gap: var(--space-sm); align-items: start; }
.svc-step h3 { color: var(--color-soft-white); }
.svc-step-num { counter-increment: step; font-family: var(--font-heading); font-weight: 700; color: var(--color-muted-gray); }
.svc-step-num::before { content: counter(step, decimal-leading-zero); }
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-tag { font-size: 0.8rem; color: var(--color-soft-white); background: rgba(243, 244, 246, 0.05); border: 1px solid var(--color-border); border-radius: 100px; padding: 0.35rem 0.8rem; }

/* FAQ via <details> */
.faq { display: flex; flex-direction: column; gap: 0.75rem; }
.faq details { border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-panel-bg); overflow: hidden; }
.faq summary { cursor: pointer; list-style: none; padding: 1rem var(--space-md); font-family: var(--font-heading); font-weight: 600; font-size: 1.02rem; color: var(--color-soft-white); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--color-muted-gray); font-size: 1.4rem; line-height: 1; transition: transform var(--transition-base); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { padding: 0 var(--space-md) var(--space-md); color: var(--color-muted-gray); line-height: 1.7; margin: 0; }

/* Shared CTA band */
.cta-band { margin-top: var(--space-xl); border: 1px solid var(--color-border); border-radius: 18px; padding: var(--space-lg) var(--space-md); text-align: center; background: var(--color-panel-bg-strong); }
.cta-band h2 { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; margin-bottom: var(--space-sm); color: var(--color-soft-white); }
.cta-band p { color: var(--color-muted-gray); max-width: 560px; margin: 0 auto var(--space-md); }

/* ===================== BLOG ===================== */
.blog-toolbar { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); }
.blog-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { font-size: 0.8125rem; font-weight: 500; color: var(--color-muted-gray); background: transparent; border: 1px solid var(--color-border); border-radius: 100px; padding: 0.4rem 0.9rem; cursor: pointer; transition: all var(--transition-fast); }
.chip:hover { color: var(--color-soft-white); border-color: var(--color-border-hover); }
.chip[aria-pressed="true"] { color: var(--color-obsidian); background: var(--color-soft-white); border-color: var(--color-soft-white); }
.blog-search { font-family: var(--font-body); font-size: 0.9rem; color: var(--color-soft-white); background: var(--color-input-bg); border: 1px solid var(--color-border); border-radius: 10px; padding: 0.6rem 0.9rem; min-width: 220px; }
.blog-search:focus { outline: none; border-color: var(--color-electric-blue); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-md); }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; background: var(--color-panel-bg); transition: transform var(--transition-base), border-color var(--transition-base); }
.post-featured { border: 1px solid var(--color-border); border-radius: 18px; padding: var(--space-lg) var(--space-md); margin-bottom: var(--space-lg); background: var(--color-panel-bg-strong); }
.post-card:hover { transform: translateY(-4px); border-color: var(--color-border-hover); }
.post-card-body { padding: var(--space-md); display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.post-card-cat { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted-gray); }
.post-card h3 { font-family: var(--font-heading); font-size: 1.2rem; line-height: 1.25; color: var(--color-soft-white); }
.post-card h3 a { color: var(--color-soft-white); text-decoration: none; }
.post-card h3 a:hover { color: var(--color-muted-gray); }
.post-card p { font-size: 0.95rem; color: var(--color-muted-gray); line-height: 1.6; flex: 1; }
.post-card-meta { font-size: 0.78rem; color: var(--color-muted-gray); display: flex; gap: 0.75rem; flex-wrap: wrap; }
.post-featured .post-card-cat { margin-bottom: 0.5rem; }
.post-featured h2 { font-family: var(--font-heading); font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: var(--space-sm); color: var(--color-soft-white); }
.post-featured h2 a { color: var(--color-soft-white); text-decoration: none; }
.post-featured h2 a:hover { color: var(--color-muted-gray); }
.blog-empty { text-align: center; color: var(--color-muted-gray); padding: var(--space-xl) 0; }

/* Article meta / share / nav / related */
.article-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.85rem; color: var(--color-muted-gray); margin-top: var(--space-sm); }
.article-meta strong { color: var(--color-soft-white); }
.article-share { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: var(--space-lg) 0; padding-top: var(--space-md); border-top: 1px solid var(--color-border); }
.article-share span { font-size: 0.85rem; color: var(--color-muted-gray); margin-right: 0.25rem; }
.article-share a { font-size: 0.8125rem; color: var(--color-soft-white); border: 1px solid var(--color-border); border-radius: 8px; padding: 0.4rem 0.8rem; text-decoration: none; transition: border-color var(--transition-fast); }
.article-share a:hover { border-color: var(--color-border-hover); }
.article-review { font-size: 0.85rem; color: var(--color-muted-gray); border: 1px dashed var(--color-border); border-radius: 10px; padding: var(--space-sm) var(--space-md); }
.article-sources ol { padding-left: 1.2rem; }
.article-sources a { word-break: break-word; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); margin-top: var(--space-lg); }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav a { border: 1px solid var(--color-border); border-radius: 12px; padding: var(--space-sm) var(--space-md); text-decoration: none; color: var(--color-soft-white); transition: border-color var(--transition-fast); }
.post-nav a:hover { border-color: var(--color-border-hover); }
.post-nav .dir { font-size: 0.75rem; color: var(--color-muted-gray); }
.post-nav .next { text-align: right; }

/* ===================== COOKIE CONSENT ===================== */
.consent-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: calc(var(--z-modal) + 10); transform: translateY(120%); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); padding: var(--space-sm); }
.consent-banner.is-visible { transform: translateY(0); }
.consent-banner-inner { max-width: 1100px; margin: 0 auto; background: rgba(12,12,15,0.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--color-border); border-radius: 16px; padding: var(--space-md); display: flex; gap: var(--space-md); align-items: center; justify-content: space-between; flex-wrap: wrap; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.consent-banner-title { font-family: var(--font-heading); font-size: 1rem; margin-bottom: 0.35rem; }
.consent-banner-text { flex: 1; min-width: 260px; }
.consent-banner-text p { font-size: 0.9rem; color: var(--color-muted-gray); line-height: 1.6; }
.consent-banner-text a { color: var(--color-link-text); }
.consent-gpc-note { display: inline-block; margin-top: 0.35rem; color: var(--color-soft-white); }
.consent-banner-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
@media (max-width: 600px) { .consent-banner-actions { width: 100%; } .consent-banner-actions .btn { flex: 1; } }

.consent-modal { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 20); display: flex; align-items: center; justify-content: center; padding: var(--space-md); }
.consent-modal[hidden] { display: none; }
.consent-modal-overlay { position: absolute; inset: 0; background: var(--color-modal-overlay); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.consent-modal-card { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--color-charcoal); border: 1px solid var(--color-border); border-radius: 16px; padding: var(--space-md); }
.consent-modal-close { position: absolute; top: 0.75rem; right: 0.75rem; width: 36px; height: 36px; border-radius: 50%; background: var(--color-surface-solid); border: 1px solid var(--color-border); color: var(--color-soft-white); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.consent-modal-close:hover { background: var(--color-electric-blue); }
.consent-modal-title { font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 0.5rem; }
.consent-modal-intro { font-size: 0.9rem; color: var(--color-muted-gray); margin-bottom: var(--space-md); }
.consent-cats { display: flex; flex-direction: column; gap: var(--space-sm); margin-bottom: var(--space-md); }
.consent-cat { border: 1px solid var(--color-border); border-radius: 12px; padding: var(--space-sm) var(--space-md); }
.consent-cat-row { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.consent-cat-row input { width: 18px; height: 18px; accent-color: var(--color-electric-blue); }
.consent-cat-name { font-family: var(--font-heading); font-weight: 600; }
.consent-cat-name em { font-style: normal; font-weight: 400; color: var(--color-muted-gray); font-size: 0.8rem; }
.consent-cat-desc { font-size: 0.85rem; color: var(--color-muted-gray); margin: 0.4rem 0 0; line-height: 1.5; }
.consent-modal-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: flex-end; }
body.consent-modal-open { overflow: hidden; }

/* In-content links on sub-pages (main.page = <main class="page">) */
main.page a:not(.btn):not(.nav-link):not(.nav-cta):not(.nav-logo):not(.footer-link):not(.chip) {
  color: var(--color-link-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(232, 234, 237, 0.35);
}
main.page a:not(.btn):not(.nav-link):not(.nav-cta):not(.nav-logo):not(.footer-link):not(.chip):hover {
  color: var(--color-soft-white);
  text-decoration-color: var(--color-soft-white);
}
main.page a:not(.btn):not(.nav-link):not(.nav-cta):not(.nav-logo):not(.footer-link):not(.chip):visited {
  color: var(--color-link-text);
}
main.page .breadcrumbs a {
  color: var(--color-muted-gray);
  text-decoration: none;
}
main.page .breadcrumbs a:hover {
  color: var(--color-soft-white);
  text-decoration: none;
}
main.page .toc a {
  color: var(--color-muted-gray);
  text-decoration: none;
}
main.page .toc a:hover,
main.page .toc a.is-active {
  color: var(--color-soft-white);
  text-decoration: none;
}
main.page .post-nav a,
main.page .article-share a {
  color: var(--color-soft-white);
  text-decoration: none;
}
main.page .svc-card h3 a,
main.page .post-card h3 a,
main.page .post-featured h2 a {
  color: var(--color-soft-white);
  text-decoration: none;
}
main.page .svc-card h3 a:hover,
main.page .post-card h3 a:hover,
main.page .post-featured h2 a:hover {
  color: var(--color-muted-gray);
  text-decoration: none;
}

/* ===================== PRINT ===================== */
@media print {
  .site-bg, .grain, .nav, .footer, .consent-banner, .consent-modal, .article-share, .cta-band, .toc, .skip-link, .post-nav { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .page { padding: 0 !important; }
  .doc-layout { grid-template-columns: 1fr !important; }
  .prose, .prose p, .prose li, .prose td, .page-title, .page-lead, .breadcrumbs { color: #000 !important; }
  .prose a { color: #000 !important; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; word-break: break-all; }
}

/* ===================== NAV: CARE BADGE + SECONDARY CTA ===================== */
/* `gap` (not margin) keeps the badge on the correct side in RTL automatically. */
.nav-link-badged { display: inline-flex; align-items: center; gap: 0.4rem; }

.nav-badge {
    font-family: var(--font-body);
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.4rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    /* Dark is the default theme. Ice blue clears 4.5:1 on the dark nav;
       electric blue would only reach ~3.6:1 at this size. */
    color: var(--color-ice-blue);
    background-color: rgba(114, 214, 255, 0.12);
    border: 1px solid rgba(114, 214, 255, 0.32);
}
[data-theme="light"] .nav-badge {
    color: var(--color-electric-blue);
    background-color: rgba(47, 107, 255, 0.10);
    border-color: rgba(47, 107, 255, 0.30);
}
/* The underline sweep is sized for text-only links; it would run under the pill. */
.nav-link-badged::after { display: none; }
.nav-link-badged:hover, .nav-link-badged:focus-visible { color: var(--color-ice-blue); }

/* Ghost twin of .nav-cta. Padding is reduced by the border width so both
   buttons keep an identical outer height. */
.nav-cta-secondary {
    background-color: transparent;
    color: var(--color-soft-white);
    border: 1px solid var(--color-border-hover);
    padding: calc(0.625rem - 1px) calc(1.25rem - 1px);
}
.nav-cta-secondary:hover {
    background-color: transparent;
    border-color: var(--color-electric-blue);
    color: var(--color-electric-blue);
}

@media (max-width: 1080px) {
    /* .nav-link turns block in the drawer; the badged link must stay a flex row
       (for the pill) while still filling the width so its divider matches. */
    .nav-link-badged { display: flex; width: 100%; justify-content: flex-start; }
    /* Group the two stacked buttons instead of double-spacing them. */
    .nav-cta-secondary + .nav-cta { margin-top: 0.75rem; }
}

/* Two extra items crowd the bar between the hamburger breakpoint and ~1100px. */
@media (min-width: 1081px) and (max-width: 1280px) {
    .nav-links { gap: 0.15rem; }
    .nav-link { padding: 0.5rem 0.45rem; }
    .nav-cta { padding: 0.625rem 0.85rem; }
    .nav-cta-secondary { padding: calc(0.625rem - 1px) calc(0.85rem - 1px); }
}

/* ===================== NAV UTILITIES (theme + language) ===================== */
.nav-utilities { display: flex; align-items: center; gap: 0.35rem; margin-left: 0.25rem; }
.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: transparent;
    color: var(--color-soft-white);
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}
.nav-icon-btn:hover { color: var(--color-soft-white); border-color: var(--color-border-hover); background: rgba(243, 244, 246, 0.05); }
[data-theme="light"] .nav-icon-btn:hover { background: rgba(17, 19, 24, 0.05); }
.nav-icon-btn > svg { width: 18px; height: 18px; display: block; }
.theme-toggle > svg:not(:first-of-type) { display: none !important; }
.theme-toggle .theme-icon { width: 18px; height: 18px; display: block; flex-shrink: 0; }

.lang-switcher { position: relative; }
.lang-switcher-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    min-width: 148px;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: var(--color-surface-solid);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    z-index: calc(var(--z-nav) + 40);
}
.lang-switcher-menu[hidden] { display: none; }
.lang-switcher-btn {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--color-soft-white);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}
.lang-switcher-btn:hover { background: rgba(243, 244, 246, 0.06); }
[data-theme="light"] .lang-switcher-btn:hover { background: rgba(17, 19, 24, 0.06); }
.lang-switcher-btn.is-active { color: var(--color-electric-blue); font-weight: 600; }

.footer-logo { filter: none; }
/* Light pages need dark lettering. The blue TECH stays in both files. */
[data-theme="light"] .nav-logo img,
[data-theme="light"] .footer-logo,
[data-theme="light"] .loader-q img,
[data-theme="light"] .hero-static-fallback img,
[data-theme="light"] .marketing-logo,
[data-theme="light"] .marketing-logo-sm {
    content: url("assets/logo-horizontal-light.png?v=20261025");
}

@media (max-width: 1080px) {
  .nav-utilities {
    width: 100%;
    margin: 0.75rem 0 0;
    padding: 0.75rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    justify-content: flex-start;
    gap: 0.5rem;
  }
  .lang-switcher-menu {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: none;
  }
  .lang-switcher-menu[hidden] { display: none; }
  .lang-switcher:has(.lang-switcher-menu:not([hidden])) { width: 100%; flex-direction: column; align-items: stretch; }
}

/* ===================== RTL (Arabic) ===================== */
html[dir="rtl"] body.is-rtl { font-family: 'Noto Sans Arabic', var(--font-body); text-align: right; }
html[dir="rtl"] .nav-inner { flex-direction: row-reverse; }
html[dir="rtl"] .nav-links { flex-direction: row-reverse; }
html[dir="rtl"] .nav-cta { margin-left: 0; margin-right: 0.5rem; }
html[dir="rtl"] .nav-utilities { margin-left: 0; margin-right: 0.25rem; flex-direction: row-reverse; }
html[dir="rtl"] .lang-switcher-menu { right: auto; left: 0; }
html[dir="rtl"] .lang-switcher-btn { text-align: right; }
html[dir="rtl"] .hero-container { direction: rtl; }
html[dir="rtl"] .hero-ctas { flex-direction: row-reverse; }
html[dir="rtl"] .section-header { text-align: right; }
html[dir="rtl"] .svc-item-trigger { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .svc-item-panel { text-align: right; }
html[dir="rtl"] .svc-item-list { padding-right: 1.25rem; padding-left: 0; }
html[dir="rtl"] .project-layout-left,
html[dir="rtl"] .project-layout-right { direction: rtl; }
html[dir="rtl"] .project-info { text-align: right; }
html[dir="rtl"] .process-steps { direction: rtl; }
html[dir="rtl"] .process-step { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .about-container { direction: rtl; }
html[dir="rtl"] .about-content { text-align: right; }
html[dir="rtl"] .contact-container { direction: rtl; }
html[dir="rtl"] .contact-info { text-align: right; }
html[dir="rtl"] .form-row { direction: rtl; }
html[dir="rtl"] .footer-main { direction: rtl; }
html[dir="rtl"] .footer-brand { text-align: right; }
html[dir="rtl"] .footer-bottom { flex-direction: row-reverse; }
html[dir="rtl"] .breadcrumbs ol { flex-direction: row-reverse; justify-content: flex-end; }
html[dir="rtl"] .page-header { text-align: right; }
html[dir="rtl"] .doc-layout { direction: rtl; }
html[dir="rtl"] .toc ol { border-left: 0; border-right: 1px solid var(--color-border); }
html[dir="rtl"] .toc a { padding: 0.2rem 0.85rem 0.2rem 0; margin-left: 0; margin-right: -1px; border-left: 0; border-right: 2px solid transparent; }
html[dir="rtl"] .toc a.is-active { border-right-color: var(--color-border-hover); }
html[dir="rtl"] .prose ul > li { padding-left: 0; padding-right: 1.4rem; }
html[dir="rtl"] .prose ul > li::before { left: auto; right: 0.1rem; }
html[dir="rtl"] .prose ol { padding-left: 0; padding-right: 1.4rem; }
html[dir="rtl"] .prose blockquote { border-left: 0; border-right: 3px solid var(--color-border-hover); padding: 0.25rem 1.25rem 0.25rem 0; }
html[dir="rtl"] .note { border-left: 1px solid var(--color-border); border-right: 3px solid var(--color-border-hover); }
html[dir="rtl"] .svc-grid,
html[dir="rtl"] .svc-steps,
html[dir="rtl"] .faq,
html[dir="rtl"] .tech-tags { direction: rtl; }
html[dir="rtl"] .svc-step { direction: rtl; text-align: right; }
html[dir="rtl"] .post-nav .next { text-align: left; }
html[dir="rtl"] .cta-band { text-align: center; }
html[dir="rtl"] .btn svg { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover svg { transform: scaleX(-1) translateX(-3px); }
@media (max-width: 1080px) {
  html[dir="rtl"] .nav-links { flex-direction: column; align-items: flex-end; }
  html[dir="rtl"] .lang-switcher { flex-direction: row-reverse; justify-content: flex-end; }
}
