/* LyfePixels — Tidy stylesheet (2-space indentation)
   Kept structure and rules; removed verbose comments for clarity. */

/* Google Fonts are loaded from the document head to avoid delayed @import FOUC */

:root {
  --primary: #f7e600;
  --accent: #be0cd7;
  --bg-dark: #000000;
  --bg-darker: #0a0a0a;
  --text-light: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-subtle: rgba(255, 255, 255, 0.5);

  /* Scrollbar colors */
  --scrollbar-track: #1a1a1a;
  --scrollbar-thumb: #666666;
  --scrollbar-thumb-hover: #888888;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  --space-3xl: 8rem;

  --max-width: 1200px;
  --container-padding: 1.5rem;

  --font-primary: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;

  --transition-fast: 0.2s ease;
  --transition-base: 0.45s ease;
  --transition-slow: 0.9s ease;
  --easing-lux: cubic-bezier(.2,.9,.2,1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(247, 230, 0, 0.15);
}

/* Footer: use Inter for footer text but preserve the logo font.
     - All footer text will use the site's primary UI font (Inter).
     - Any element with the `.logo` class inside the footer keeps its original
         display font (e.g., Doto) to avoid changing the brand mark. */
.site-footer,
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4,
.site-footer p, .site-footer a, .site-footer small, .site-footer nav,
.site-footer .footer-contact, .site-footer .footer-newsletter,
.site-footer .footer-brand {
    font-family: var(--font-primary);
}
.site-footer .logo, .site-footer .logo * {
    font-family: 'Doto', 'Bvllet', Arial, sans-serif !important;
}

/* Theme switcher: curated light palette (replaces the previous invert approach).
         This sets friendly colors for light mode while preserving deliberate
         treatments for images/SVGs and chrome. Removing the global `filter` avoids
         the brownish/odd colours that inversion produced. */
body.light-mode {
    /* Core palette overrides for light theme - Premium warm neutral palette */
    --primary: #6366f1;        /* Indigo - sophisticated primary */
    --accent: #ec4899;         /* Rose pink - vibrant accent */
    --bg-dark: #fafaf9;        /* Warm off-white - easier on eyes than pure white */
    --bg-darker: #f5f5f4;      /* Slightly deeper warm surfaces */
    --text-light: #1c1917;     /* Warm dark text (not pure black) */
    --text-muted: rgba(28,25,23,0.65);
    --text-subtle: rgba(28,25,23,0.45);

    /* Ensure page background flips to light */
    background-color: var(--bg-dark) !important;
    filter: none !important;
    /* Keep horizontal overflow hidden to avoid mobile right-edge scroll */
    overflow-x: hidden !important;  /* Prevent double scrollbar - scrollbar is on html only */
}

/* Header chrome for light theme */
body.light-mode .site-header,
body.light-mode .topbar {
    background: rgba(250,250,249,0.85) !important;
    border-bottom: 1px solid rgba(28,25,23,0.06);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

/* Footer chrome for light theme */
body.light-mode .site-footer { 
    background: linear-gradient(180deg, #f5f5f4 0%, #e7e5e4 100%);
    border-top: 1px solid rgba(28,25,23,0.05);
}

/* Card surfaces for light theme: Premium glass morphism with warm tones */
body.light-mode .service-card,
body.light-mode .work-card,
body.light-mode .work-card .work-image {
    /* Warm tinted glass effect */
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,249,0.95));
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid rgba(99,102,241,0.12);
    /* Soft multi-layer shadow with warm undertones */
    box-shadow: 
        0 4px 6px -1px rgba(28,25,23,0.04),
        0 10px 20px -3px rgba(99,102,241,0.08),
        0 20px 40px -5px rgba(28,25,23,0.06);
    color: var(--text-light);
    position: relative;
}

/* Make service cards slightly tinted for light theme so the glow/border reads cohesively */
body.light-mode .service-card {
    border: 1px solid rgba(99,102,241,0.1) !important;
}

body.light-mode .services .service-card::after {
    border: 1px solid rgba(99,102,241,0.15);
    opacity: 1;
}

/* Pills and small UI surfaces - Warm neutral palette */
body.light-mode .pill-box {
    border: 1px solid rgba(99,102,241,0.15) !important;
    background: rgba(255,255,255,0.95);
    color: var(--text-light);
    box-shadow: 0 2px 8px rgba(99,102,241,0.06);
}

/* Make secondary buttons show a refined border in light theme */
body.light-mode .btn-secondary {
    border: 2px solid rgba(28,25,23,0.25) !important;
    color: var(--text-light) !important;
    background: rgba(255,255,255,0.6) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.light-mode .btn-secondary:hover {
    border-color: var(--primary) !important;
    background: rgba(99,102,241,0.08) !important;
}

/* Light mode outline button - premium glass effect */
body.light-mode .btn-outline {
    background-color: rgba(255,255,255,0.7) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(99,102,241,0.25) !important;
    box-shadow: 0 4px 16px rgba(99,102,241,0.08) !important;
}

body.light-mode .btn-outline:hover {
    background-color: rgba(99,102,241,0.1) !important;
    border-color: rgba(99,102,241,0.5) !important;
    color: var(--primary) !important;
}

/* Light mode primary button - maintain contrast */
body.light-mode .btn-primary,
body.light-mode .btn-hero {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(99,102,241,0.25) !important;
}

body.light-mode .btn-primary:hover,
body.light-mode .btn-hero:hover {
    box-shadow: 0 10px 32px rgba(99,102,241,0.35) !important;
}

/* Ensure logos remain black / dark in light theme */
body.light-mode img[src*="project-logos"],
body.light-mode .work-image img,
body.light-mode .footer-brand img,
body.light-mode .snapshot img,
body.light-mode .brand img,
body.light-mode .logo img {
    /* Force a solid dark appearance for raster logos */
    filter: brightness(0) saturate(100%) !important;
    mix-blend-mode: normal !important;
}

/* Carousel logos opacity controlled in section-specific CSS below */

/* Inline SVG logos: set fill where possible */
body.light-mode svg.inline-logo, body.light-mode svg.logo-inline {
    color: var(--text-light) !important;
}


/* (reverted custom dark-mode scrollbar overrides) */

/* (reverted custom dark-mode scrollbar overrides) */

/* Ensure gradients/text still read well in the light theme */
body.light-mode .text-gradient { 
    -webkit-text-fill-color: initial; 
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Aurora background: Soft ethereal glows for light theme */
body.light-mode .bg-aurora {
    /* keep page background light but allow aurora blobs to show */
    background: transparent;
}

/* Dark (default) theme: use theme `--primary` for scrollbar thumb so it matches branding */
/* Primary #f7e600 -> rgb(247,230,0) */

/* Force dark color scheme for scrollbar in dark mode */
html {
  color-scheme: dark;
}
html.light-mode {
  color-scheme: light;
}

/* ==========================================================================
   GLOBAL SCROLLBAR STYLES
   Default = Dark theme. Light theme overrides below.
   Scrollbar is on HTML element (with overflow-y: scroll).
   Using !important to ensure scrollbar always appears.
   ========================================================================== */

/* Base scrollbar styling for dark theme (WebKit browsers) */
html::-webkit-scrollbar {
    width: 14px !important;
    height: 14px !important;
    background: #1a1a1a !important;
    display: block !important;
}

html::-webkit-scrollbar-track {
    background: #111111 !important;
}

html::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.42) !important;
    border-radius: 7px !important;
    border: 2px solid #0a0a0a !important;
    min-height: 40px !important;
}

html::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.72) !important;
}

html::-webkit-scrollbar-corner {
    background: #111111 !important;
}

/* Firefox scrollbar styling for dark theme */
html {
    scrollbar-width: auto !important;
    scrollbar-color: rgba(255, 255, 255, 0.42) #111111 !important;
}

/* ==========================================================================
   LIGHT MODE SCROLLBAR OVERRIDES
   These override the dark defaults when .light-mode class is present
   ========================================================================== */
html.light-mode {
  scrollbar-color: #a8a29e #e7e5e4 !important;
}

html.light-mode::-webkit-scrollbar {
  width: 14px !important;
  height: 14px !important;
  background: #f5f5f4 !important;
  display: block !important;
}

html.light-mode::-webkit-scrollbar-track {
  background: #e7e5e4 !important;
}

html.light-mode::-webkit-scrollbar-thumb {
  background: #a8a29e !important;
  border-radius: 7px !important;
  border: 2px solid #f5f5f4 !important;
  min-height: 40px !important;
}

html.light-mode::-webkit-scrollbar-thumb:hover {
  background: #6366f1 !important;
}

html.light-mode::-webkit-scrollbar-corner {
  background: #e7e5e4 !important;
}

body.light-mode .bg-aurora::before { mix-blend-mode: overlay; opacity: 0.03; }

body.light-mode .bg-aurora .aurora-blob {
    mix-blend-mode: screen;
    filter: blur(80px);
    opacity: 0.85;
}

body.light-mode .bg-aurora .aurora-1 {
    background: radial-gradient(closest-side at 30% 30%, rgba(99,102,241,0.45) 0%, rgba(99,102,241,0.28) 20%, rgba(99,102,241,0.1) 40%, transparent 60%);
}
body.light-mode .bg-aurora .aurora-2 {
    background: radial-gradient(closest-side at 70% 40%, rgba(236,72,153,0.42) 0%, rgba(236,72,153,0.25) 18%, rgba(236,72,153,0.08) 40%, transparent 60%);
}
body.light-mode .bg-aurora .aurora-3 {
    background: radial-gradient(closest-side at 40% 70%, rgba(139,92,246,0.38) 0%, rgba(139,92,246,0.22) 18%, rgba(139,92,246,0.08) 40%, transparent 60%);
}

/* Light-theme overrides for hero SVG abstractions */
body.light-mode .hero-abstract {
    mix-blend-mode: normal;
    opacity: 0.98;
}
body.light-mode .hero-abstract .abs-shape {
    filter: none;
    opacity: 0.12;
}
/* Premium light-theme palette for hero shapes - Indigo/Rose harmony */
body.light-mode .hero-abstract .abs-shape.s1 { fill: rgba(99,102,241,0.25); /* soft indigo */ }
body.light-mode .hero-abstract .abs-shape.s2 { fill: rgba(236,72,153,0.2); /* soft rose */ }
body.light-mode .hero-abstract .abs-shape.s3 { fill: rgba(139,92,246,0.12); /* soft violet */ }
body.light-mode .hero-abstract .abs-shape.s4 { fill: rgba(99,102,241,0.1); /* subtle indigo */ }

/* Curved paths: use brand-primary hues with clear contrast on light backgrounds */
body.light-mode .hero-abstract .abs-path {
    stroke: rgba(99,102,241,0.25) !important; /* indigo tint */
    stroke-width: 2.8px;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.96;
    filter: drop-shadow(0 6px 16px rgba(99,102,241,0.06));
}

/* Floating items become soft brand accents */
body.light-mode .hero-abstract .float-item { fill: rgba(99,102,241,0.06) !important; stroke: none !important; opacity: 0.98; }
body.light-mode .hero-abstract .ring-group circle { stroke: rgba(99,102,241,0.06) !important; }

/* Clients/matrix text: use accent for livelier contrast */
body.light-mode .clients-scramble { color: var(--accent); opacity: 0.98; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }

@media (max-width:700px) {
    body.light-mode .hero-abstract .abs-shape { opacity: 0.12; }
    body.light-mode .hero-abstract .abs-path { stroke-opacity: 0.9; }
}

/* Mobile: simplified, performant hero SVG appearance */
@media (max-width:700px) {
    .hero-abstract { display: block; opacity: 0.9; pointer-events: none; }
    .hero-abstract .abs-shape { filter: none; opacity: 0.12; transform-origin: center; transform: scale(0.82); }
    .hero-abstract .abs-path { stroke-width: 1.6; opacity: 0.8; }
    .hero-abstract .float-item { transform: scale(0.82); opacity: 0.9; }
    .hero-abstract .ring-group { opacity: 0.06; }
}

/* Ensure headings' highlighted last-word also appears in dark (default) theme
     — mirrors the light-mode behaviour so `.text-gradient` stands out. */
body:not(.light-mode) .text-gradient {
    color: var(--primary) !important;
    -webkit-text-fill-color: initial;
}

/* About section: ensure paragraph/subtext is dark in light theme */
body.light-mode .about-content p {
    color: var(--text-light) !important;
}

/* About cards cluster: make their subtext/labels dark in light theme */
body.light-mode .about-card .card-label,
body.light-mode .about-cards .about-card .card-label {
    color: var(--text-light) !important;
}


/* Theme toggle: compact icon that doesn't affect nav layout */
/* Make header container a positioning context */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Preview (temporary): make pill borders pure white so the client can review */
.pill-box { border: 1px solid rgba(255,255,255,0.1) !important; }

/* Theme switch transition: wipe + arrow animation */
.theme-wipe {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 120000;
}
.theme-wipe .wipe-inner {
    position: absolute;
    inset: -10%;
    background: var(--wipe-color, #ffffff);
    transform-origin: left center;
    transform: scaleX(0);
    animation: theme-wipe-expand 360ms cubic-bezier(.22,.88,.3,1) forwards;
    box-shadow: 0 20px 48px rgba(11,17,23,0.10);
    overflow: hidden;
}

/* Short luxury sheen for faster transitions */
.theme-wipe .wipe-inner::before {
    content: "";
    position: absolute;
    left: -32%;
    top: 0;
    width: 48%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.0), rgba(255,255,255,0.18), rgba(255,255,255,0.0));
    transform: skewX(-14deg) translateX(0);
    mix-blend-mode: overlay;
    animation: theme-sheen 420ms cubic-bezier(.25,.82,.25,1) 80ms forwards;
}

.theme-wipe .wipe-arrow {
    position: relative;
    width: 84px;
    height: 84px;
    color: var(--arrow-color, #000);
    transform: translateX(-220%);
    animation: theme-arrow-move 360ms cubic-bezier(.22,.88,.3,1) forwards;
    filter: drop-shadow(0 10px 28px rgba(0,0,0,0.26));
}
.theme-wipe .wipe-arrow path { stroke: currentColor; stroke-width: 1.6; }
.theme-wipe--out .wipe-arrow { animation: theme-arrow-out 260ms ease forwards; }
.theme-wipe--out .wipe-inner { animation: theme-wipe-shrink 260ms ease forwards; }

/* Remove the arrow exit animation so the arrow doesn't re-animate twice; fade it instead */
.theme-wipe--out .wipe-arrow { animation: none !important; opacity: 0; }

/* Logo clone shown at the theme switch midpoint */
.theme-wipe .wipe-logo {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: scale(0.92) translateY(0);
    transition: transform 260ms cubic-bezier(.2,.9,.2,1), opacity 220ms ease;
    color: var(--arrow-color, #000);
    font-size: clamp(1.2rem, 3.2vw, 1.6rem);
    letter-spacing: 0.02em;
    -webkit-text-fill-color: currentColor;
}
.theme-wipe--reveal-logo .wipe-logo { opacity: 1 !important; transform: scale(1) translateY(-4px) !important; }

@keyframes theme-wipe-expand { to { transform: scaleX(1); } }
@keyframes theme-wipe-shrink { to { transform: scaleX(0); opacity: 0; } }
@keyframes theme-arrow-move { to { transform: translateX(220%); } }
@keyframes theme-arrow-out { to { transform: translateY(-8px) scale(0.88); opacity: 0; } }
@keyframes theme-sheen { to { transform: skewX(-14deg) translateX(200%); opacity: 1; } }

/* Respect reduced motion: ensure no animations if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .theme-wipe .wipe-inner, .theme-wipe .wipe-arrow { animation: none !important; }
}

/* View Transitions API: base styles for pseudo-elements used during theme switch */
::view-transition-old(root), ::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
    will-change: opacity, filter, transform;
    backface-visibility: hidden;
}

/* Soft, luxury transition settings — tuned for a smooth handoff */
:root { --vt-duration: 900ms; --vt-easing: cubic-bezier(.22,.08,.18,1); }

::view-transition-old(root) {
    transform-origin: var(--vt-origin, center center);
    animation: vt-old var(--vt-duration) var(--vt-easing) both;
}
::view-transition-new(root) {
    transform-origin: var(--vt-origin, center center);
    animation: vt-new var(--vt-duration) var(--vt-easing) both;
}

@keyframes vt-old {
    0% {
        opacity: 1;
        filter: saturate(1) contrast(1);
        transform: scale(1);
    }
    100% {
        opacity: 0.94;
        filter: saturate(.98) contrast(.995);
        transform: scale(0.999);
    }
}
@keyframes vt-new {
    0% {
        opacity: 0.94;
        filter: saturate(.98) contrast(.995);
        transform: scale(0.999);
    }
    100% {
        opacity: 1;
        filter: saturate(1) contrast(1);
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root), ::view-transition-new(root) {
        animation: none !important;
        filter: none !important;
        transform: none !important;
    }
}

/* --------------------------------------------------------------------------
     Luxury transitions & entrance animations
     - refined easing + slightly longer durations for a premium feel
     - entrance animation for elements with `.fade-in` using the `.visible` toggle
     - reduced-motion respected
     -------------------------------------------------------------------------- */

/* Small utility to opt-in elements for the luxury motion set */
.transition-smooth { transition: all var(--transition-base) var(--easing-lux); }

/* Global interactive transitions */
a, .btn, .logo, .nav-links a, .nav-toggle span, .service-card, .work-card, .carousel-item img, .footer-brand .logo {
    transition: transform var(--transition-base) var(--easing-lux), box-shadow var(--transition-base) var(--easing-lux), color var(--transition-base) var(--easing-lux), background-color var(--transition-base) var(--easing-lux), opacity var(--transition-fast) linear;
    will-change: transform, opacity;
}

/* Buttons: gentle lift and shadow on hover */
.btn {
    transition: transform var(--transition-base) var(--easing-lux), box-shadow var(--transition-base) var(--easing-lux), background-color var(--transition-base) var(--easing-lux);
}
.btn:hover, .btn:focus {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}
.btn:active {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Nav links: color fade + micro-lift */
.nav-links a:hover, .nav-links a:focus {
    color: var(--primary);
    transform: translateY(-3px);
}

/* Hamburger lines: ensure eased changes */
.nav-toggle span { transition: transform var(--transition-base) var(--easing-lux), opacity var(--transition-base) var(--easing-lux), background-color var(--transition-base) var(--easing-lux); }

/* Cards: softer raise and warm shadow */
.service-card, .work-card {
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-md);
    transition: transform var(--transition-base) var(--easing-lux), box-shadow var(--transition-base) var(--easing-lux), opacity var(--transition-base) linear;
}
.service-card:hover, .work-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
}

/* Footer brand: small emphasis on hover */
.footer-brand .logo:hover { transform: translateY(-3px) scale(1.03); color: var(--primary); }

/* Fade-in entrance animation driven by adding/removing .visible via JS */
.fade-in { opacity: 0; transform: translateY(16px) scale(0.995); transition: opacity var(--transition-slow) var(--easing-lux), transform var(--transition-slow) var(--easing-lux); }
.fade-in.visible { opacity: 1; transform: translateY(0) scale(1); }

/* Slight stagger helper if needed */
.fade-in[data-delay="small"] { transition-delay: 0.06s; }
.fade-in[data-delay="medium"] { transition-delay: 0.12s; }
.fade-in[data-delay="large"] { transition-delay: 0.22s; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    a, .btn, .logo, .nav-links a, .nav-toggle span, .service-card, .work-card, .carousel-item img, .footer-brand .logo, .fade-in {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* --------------------------------------------------------------------------
   Fix: unify service-card animations to prevent jitter / conflicting transitions
   - promote to its own compositing layer (translateZ) for smoother transforms
   - use specific transitions (avoid `transition: all`) to prevent conflicting rules
   - include focus-within so keyboard users see the same emphasis
   -------------------------------------------------------------------------- */
.service-card {
    transform: translateZ(0) translateY(0);
    will-change: transform, box-shadow, opacity;
    transition: transform var(--transition-base) var(--easing-lux), box-shadow var(--transition-base) var(--easing-lux), opacity var(--transition-fast) linear;
}
.service-card:hover, .service-card:focus-within {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
}

@media (prefers-reduced-motion: reduce) {
    .service-card, .service-card:hover, .service-card:focus-within { transition: none !important; transform: none !important; box-shadow: none !important; }
}

/* Final authoritative overrides for .service-card to avoid conflicting rules earlier in the file
   Place at the end so these values win. Use slightly higher specificity and !important
   for properties that were causing flicker (border-color / transform / box-shadow). */
.services .service-card {
    position: relative;
    /* slightly stronger soft base border so card reads on the surface */
    border: 1px solid rgba(255,255,255,0.22) !important;
    transition: transform 600ms var(--easing-lux) !important, box-shadow 600ms var(--easing-lux) !important, opacity 200ms linear !important;
    will-change: transform, box-shadow, opacity !important;
    transform-origin: center center !important;
    backface-visibility: hidden !important;
    background-clip: padding-box;
}
/* Ensure light-mode surfaces override the dark defaults which appear later in the cascade */
body.light-mode .services .service-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,249,0.96)) !important;
    border: 1px solid rgba(99,102,241,0.1) !important;
    /* Premium multi-layer shadow with indigo tint */
    box-shadow: 
        0 4px 6px -1px rgba(28,25,23,0.03),
        0 12px 24px -4px rgba(99,102,241,0.08),
        0 24px 48px -8px rgba(28,25,23,0.05) !important;
    color: var(--text-light) !important;
}
body.light-mode .services .service-card::after { border: 1px solid rgba(99,102,241,0.08) !important; opacity: 1 !important; }

/* Override hover glow in light mode to use indigo tint */
body.light-mode .services .service-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 
        0 8px 16px -2px rgba(28,25,23,0.05),
        0 24px 48px -6px rgba(99,102,241,0.15),
        0 36px 72px -12px rgba(28,25,23,0.08) !important;
}

/* Hover stroke: stronger indigo border for light theme */
body.light-mode .services .service-card:hover::after {
    border: 1px solid rgba(99,102,241,0.25) !important;
    opacity: 1 !important;
}

/* Process cards: make them match the light glass treatment */
body.light-mode .process-step {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,249,0.96)) !important;
    border: 1px solid rgba(99,102,241,0.08) !important;
    box-shadow: 
        0 4px 6px -1px rgba(28,25,23,0.03),
        0 12px 28px -4px rgba(99,102,241,0.06) !important;
    color: var(--text-light) !important;
    border-radius: 12px !important;
}

/* Light-mode: keep the about scatter cards positioned but use a light glass treatment */
body.light-mode .about-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,250,249,0.94)) !important;
    border: 1px solid rgba(99,102,241,0.06) !important;
    box-shadow: 
        0 8px 20px -4px rgba(28,25,23,0.04),
        0 20px 40px -8px rgba(99,102,241,0.06) !important;
    color: var(--text-light) !important;
    mix-blend-mode: normal !important;
    backdrop-filter: blur(8px) saturate(140%);
}

body.light-mode .about-card .card-label {
    color: rgba(11,17,23,0.72) !important;
}
body.light-mode .about-card .card-number {
    color: var(--primary) !important;
}
body.light-mode .process-step p { color: var(--text-muted) !important; }
body.light-mode .process-step h3 { color: var(--text-light) !important; }
body.light-mode .step-number { -webkit-text-stroke-color: var(--primary) !important; color: transparent !important; }

/* Light mode: mobile timeline adjustments */
@media (max-width: 768px) {
  body.light-mode .process-timeline::before {
    background: linear-gradient(to bottom, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%) !important;
    opacity: 1 !important;
  }
  
  body.light-mode .process-step::before {
    background: var(--primary) !important;
    border-color: var(--bg-dark) !important;
    box-shadow: 0 0 0 2px var(--primary) !important;
  }
  
  body.light-mode .process-step::after {
    background: rgba(99,102,241,0.3) !important;
  }
  
  body.light-mode .process-step {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,249,0.96)) !important;
    border: 1px solid rgba(99,102,241,0.12) !important;
  }
}

.services .service-card:hover {
    /* Luxury hover: gentle lift + soft yellow glow; no halo */
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 28px 70px rgba(0,0,0,0.54), 0 6px 30px rgba(247,230,0,0.18) !important;
}

/* Keep content above decorative strokes */
.services .service-card > * { position: relative; z-index: 1; }

/* Inner faint stroke to give subtle structure — very low opacity for a soft edge */
.services .service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid rgba(247,230,0,0.32);
    opacity: 0;
    transition: opacity 420ms var(--easing-lux);
    z-index: 0;
}
.services .service-card:hover::after {
    opacity: 1;
}
.services .service-card:focus-visible, .services .service-card:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(247,230,0,0.14), 0 18px 40px rgba(0,0,0,0.45) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

/* Scroll-to-top button - circular yellow with arrow */
.scroll-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 56px;
    height: 56px;
    background: #f7e600;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border: none;
    cursor: pointer;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.scroll-top.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    pointer-events: none;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}

.scroll-top:focus {
    outline: 3px solid rgba(0,0,0,0.2);
    outline-offset: 3px;
}

.scroll-top svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
    .scroll-top { transition: none !important; }
}

/* Removed unused local fonts: Webstart, Rondira, Bvllet font-face — no longer used site-wide. Logos use Doto from Google Fonts. */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { 
  font-size: 16px; 
  scroll-behavior: smooth; 
  -webkit-text-size-adjust: 100%;
  overflow-y: scroll !important;  /* FORCE vertical scrollbar to always appear */
  overflow-x: hidden;
}
/* Note: body height handled by min-height: 100vh in body rule */

/* Hide horizontal scrollbars globally on mobile */
@media (max-width: 900px) {
  html {
    overflow-x: hidden !important;
    -ms-overflow-style: none;
    scrollbar-width: thin;
  }
    /* Body must stay vertically scrollable but hide horizontal overflow to avoid right-edge scroll */
    body {
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }
  /* Hide horizontal scrollbar track on WebKit */
  ::-webkit-scrollbar:horizontal {
    display: none;
    height: 0;
  }
}


/* ==========================================================================
     Dark-theme inline highlight for "end" words and highlighted spans
     Ensure the dark (default) theme shows the same inline highlight treatment
     used elsewhere (gradient background, radius, padding, and box-decoration-break)
     ========================================================================== */
/* Only highlight elements explicitly marked with `.highlight` in dark mode.
   Keep `.text-backdrop` transparent so paragraphs are not highlighted. */
body:not(.light-mode) .highlight {
    display: inline;
    background: linear-gradient(103.3deg, #be0cd7 -18.7%, #f7e600 90.9%);
    border-radius: 8px;
    padding: 0 0.25rem;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    color: inherit;
}

body:not(.light-mode) .text-backdrop {
    background: transparent !important;
    box-decoration-break: clone; /* allow wrapping without visible background */
    -webkit-box-decoration-break: clone;
}

/* Animated colour-changing word (used for the 'ordinary' word). Starts pink
     then transitions through multiple colours via a moving gradient. */
.animated-word {
    background-image: linear-gradient(90deg, #ff5aa5 0%, #be0cd7 25%, #f7e600 50%, #00b4ff 75%, #ff5aa5 100%);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block;
    animation: animatedWordShift 6s linear infinite;
}

@keyframes animatedWordShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Ensure the light-mode rule for .text-gradient doesn't override our animation */
.animated-word.text-gradient { color: transparent !important; -webkit-text-fill-color: transparent !important; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: visible;  /* Allow content to flow, scrollbar on html */
}

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* Prevent the global rectangular yellow outline from clipping rounded cards.
   Use a rounded box-shadow ring for cards so the highlight follows border-radius. */
.service-card:focus-visible, .service-card:focus {
    outline: none; /* remove default rectangular outline */
    /* Use a soft ring for keyboard focus but keep the card border stable to avoid visual flicker */
    box-shadow: 0 0 0 3px rgba(247,230,0,0.12), 0 18px 40px rgba(0,0,0,0.45);
    border-color: rgba(255,255,255,0.08); /* keep border neutral; ring signals focus */
}

/* Ensure keyboard focus on buttons/links remains visible and high-contrast */
a:focus-visible, button:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}
::selection { background: var(--primary); color: var(--bg-dark); }

/* Responsive utilities: box-sizing, fluid media, and touch-friendly controls */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

img, picture, video, svg { max-width: 100%; height: auto; display: block; }

/* Carousel logos and other inline logos should center and scale */
.carousel-logo, .carousel-item img { max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* Ensure buttons meet touch-target recommendations on small screens */
.btn { min-height: 44px; padding: 0.7rem 1rem; }

@media (max-width: 480px) {
    .btn { min-height: 48px; padding: 0.9rem 1rem; font-size: 1rem; }
}

/* Remove any leftover yellow-dot pseudo-element on nav links */
.nav-inner .nav-links a::before { display: none !important; }

/* Prevent nav link text from lifting on hover — keep CTA behavior untouched */
.nav-inner .nav-links a:not(.nav-contact):hover,
.nav-inner .nav-links a:not(.nav-contact):focus,
.nav-inner .nav-links a:not(.nav-contact):focus-visible {
    transform: none !important;
}

/* Make form controls span available width on narrow screens */
.form-group input, .form-group textarea { width: 100%; box-sizing: border-box; }

.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; z-index: 9999;
}
.skip-link:focus-visible,
.skip-link.visible {
    position: fixed; top: 8px; left: 8px; width: auto; height: auto; padding: 0.25rem 0.5rem;
    background: transparent; color: var(--text-light); font-weight: 600; border-radius: 6px; text-decoration: none;
    border: 1px solid rgba(255,255,255,0.06); box-shadow: 0 6px 18px rgba(0,0,0,0.5); font-size: 0.9rem;
}

.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; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--container-padding); }

main { flex: 1 0 auto; }

h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; }

.text-gradient { color: var(--text-light); }
.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: var(--space-sm);
    padding: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-radius: 0;
    border: none;
    -webkit-text-stroke: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.section-title { font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 700; margin-bottom: var(--space-md); }
.section-header { text-align: center; margin-bottom: var(--space-md); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); padding: 0.75rem 1.5rem; font-family: var(--font-primary); font-size: 0.9rem; font-weight: 600; text-decoration: none; border-radius: var(--radius-md); border: none; cursor: pointer; transition: all var(--transition-base); }
.btn-primary { background: var(--primary); color: var(--bg-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn-hero { padding: 1rem 2.2rem; font-size: 1.02rem; background: var(--primary); color: var(--bg-dark); border-radius: 10px; box-shadow: 0 6px 18px rgba(247, 230, 0, 0.12); }
.btn-hero:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(247, 230, 0, 0.3); }
.btn-secondary { padding: calc(1rem - 2px) calc(2.2rem - 2px); font-size: 1.02rem; background: transparent; color: var(--text-light); border: 2px solid rgba(255,255,255,0.3); border-radius: 10px; box-sizing: border-box; }

/* Custom cursor: compact outlined ring with a small center dot */
.cursor-invert {
    position: fixed;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;
    border: 0.9px solid rgba(255,255,255,0.32);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 140ms var(--easing-lux), opacity 120ms linear;
    z-index: 2147483646;
    opacity: 0;
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* small center dot */
.cursor-invert::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 2px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255,255,255,0.50);
    box-shadow: 0 0.4px 0.8px rgba(0,0,0,0.08) inset;
}

.cursor-invert.cursor-active { transform: translate(-50%, -50%) scale(0.96); }
.cursor-invert.cursor-hidden { opacity: 0 !important; transform: translate(-50%, -50%) scale(0.88) !important; }

/* Light mode: use dark outline and dot for contrast */
html.light-mode .cursor-invert, body.light-mode .cursor-invert {
    border-color: rgba(11,17,23,1);
    border-width: 1.5px;
    box-shadow: 0 1px 2px rgba(11,17,23,0.06);
}
html.light-mode .cursor-invert::after, body.light-mode .cursor-invert::after {
    background: rgba(11,17,23,1);
    width: 4px;
    height: 4px;
    box-shadow: none;
}

/* Accessibility / touch fallback */
@media (pointer: coarse), (hover: none), (prefers-reduced-motion: reduce) {
    .cursor-invert { display: none !important; }
    .cursor-invert::before { display: none !important; }
}

/* Disable cursor inverter on legal pages (privacy/terms). Prefer a CSS-only
   opt-out where supported (uses :has). Also include a broad fallback that
   targets when an element with class `legal` exists in the document. */
html:has(.legal) .cursor-invert,
html:has(.legal) .cursor-invert::before,
html:has(.legal) .cursor-invert::after,
html:has(.post-article) .cursor-invert,
html:has(.post-article) .cursor-invert::before,
html:has(.post-article) .cursor-invert::after,
html:has(.post-content) .cursor-invert,
html:has(.post-content) .cursor-invert::before,
html:has(.post-content) .cursor-invert::after,
body .legal ~ .cursor-invert,
body .legal ~ .cursor-invert::before,
body .legal ~ .cursor-invert::after,
body .post-article ~ .cursor-invert,
body .post-article ~ .cursor-invert::before,
body .post-article ~ .cursor-invert::after,
body .post-content ~ .cursor-invert,
body .post-content ~ .cursor-invert::before,
body .post-content ~ .cursor-invert::after {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
}
/* Small size variant (can be toggled via JS if desired) */
.cursor-invert.small { width: 48px; height: 48px; }

/* Prevent the cursor's blend effect from altering critical UI text contrast.
     Place important UI elements above the cursor and stop blending. */
/* Limit elements that opt-out of blending to only critical chrome (header/footer).
   Previously this list prevented the inverter from affecting most of the page because
   many elements created isolated stacking contexts. Narrowing the rule keeps UI
   readable while allowing the cursor-invert to work across content. */
.no-blend,
.site-header,
.site-footer {
    position: relative;
    z-index: 1000001; /* sit above the cursor overlay where necessary */
    mix-blend-mode: normal !important; /* ensure normal rendering */
    isolation: isolate; /* isolate stacking context to avoid cross-blending */
}

.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline {
    /* Make outline buttons sit on their own surface so decorative lines don't collide */
    background-color: rgba(6,6,6,0.36);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--primary);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 0.9rem 2.2rem; /* increased vertical & horizontal padding for better spacing */
    box-shadow: 0 8px 22px rgba(0,0,0,0.55);
    border-radius: 12px; /* slightly larger radius for balanced shape */
}
.btn-outline:hover {
    background-color: rgba(6,6,6,0.5);
    color: var(--bg-dark);
    border-color: rgba(247,230,0,0.9);
    transform: translateY(-3px);
}

.nav-contact.btn-primary { background: var(--primary); background-image: none; color: var(--bg-dark); box-shadow: 0 8px 28px rgba(247,230,0,0.12); border: 2px solid rgba(0,0,0,0.06); }
.nav-contact.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(247,230,0,0.18); background: #e6d500; color: var(--bg-dark); border-color: rgba(0,0,0,0.08); }

.site-header { position: sticky; position: -webkit-sticky; top: 0; z-index: 1000; background: rgba(0,0,0,0.95); }
.topbar { background: rgba(0,0,0,0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.05); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) 0; }
.site-header .nav-inner { justify-content: center; }
.site-header .nav-inner nav { justify-content: center; }
/* Desktop-only gap for nav-links */
@media (min-width: 769px) {
  .site-header .nav-inner .nav-links { gap: calc(var(--space-sm) * 1.2); }
}
.nav-inner nav { display: flex; align-items: center; position: relative; z-index: 1001; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand .logo, .footer-brand .logo { font-family: 'Bvllet', 'Helvetica Neue', Arial, sans-serif; font-size: clamp(1.4rem, 3vw, 1.8rem); letter-spacing: 0.02em; text-transform: lowercase; font-weight: 700; font-variant-ligatures: none; font-feature-settings: "ss01" 1, "ss02" 0, "ss03" 0, "salt" 0, "liga" 0; }
.site-header .brand .logo { color: var(--text-light); -webkit-text-stroke: 0; -webkit-text-fill-color: var(--text-light); font-family: 'Doto', 'Bvllet', 'Helvetica Neue', Arial, sans-serif; font-weight: 400; text-transform: uppercase; font-variant-ligatures: none; font-feature-settings: "ss01" 1, "ss02" 0, "ss03" 0, "salt" 0, "liga" 0; }
/* header image logo sizing moved/removed to avoid unused selectors */

/* Desktop-only nav-links layout - mobile handled by mobile-menu.css */
@media (min-width: 769px) {
    .nav-links { display: flex; align-items: center; gap: var(--space-xs); }
    .nav-links a { color: var(--text-light); text-decoration: none; font-family: var(--font-primary); font-size: 0.9rem; font-weight: 500; transition: color var(--transition-fast); display: inline-flex; align-items: center; line-height: 1; }
    .nav-links a:hover { color: var(--primary); }
    .nav-links .nav-contact { padding: 0.5rem 1rem; margin-left: 0 !important; }

    /* Make the Home item match the other nav links (no pill box) */
    .nav-links .nav-home {
        padding: 0;
        border-radius: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        color: var(--text-light);
        font-weight: 600;
        margin-right: 0; /* use nav's gap for consistent spacing */
    }
    .nav-links .nav-home:hover { color: var(--primary); background: transparent; }
}

/* Inline icon-only theme toggle inside nav-links */
.theme-toggle {
    background: transparent !important;
    color: var(--text-light) !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 1.05rem !important;
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.theme-toggle i { font-size: 1.05rem; line-height: 1; }
.theme-toggle:hover, .theme-toggle:focus { color: var(--primary); }
.theme-toggle:focus { outline: none; box-shadow: 0 0 0 3px rgba(247,230,0,0.08); border-radius: 6px; }

/* Desktop-only theme toggle styling in nav */
@media (min-width: 769px) {
  .nav-links .theme-toggle { margin-left: 0 !important; margin-right: 0 !important; height: auto !important; min-width: auto !important; padding: 0 !important; border-radius: 0 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; transform: translateY(0) !important; }
}
.theme-toggle i { display: inline-block; vertical-align: middle; font-size: 0.9rem; line-height: 1; }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 48px; height: 48px; background: none; border: none; cursor: pointer; padding: 10px; position: relative; z-index: 10001; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.hamburger-line { display: block; width: 100%; height: 3.5px; background: var(--text-light); border-radius: 999px; transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease, background-color 180ms ease; transform-origin: center; box-shadow: 0 1px 0 rgba(0,0,0,0.25) inset; }

@media (max-width: 800px) {
    .nav-links { margin-right: 0; }
}
.nav-toggle .hamburger-line:nth-child(2) { width: 60%; margin: 0 auto; display: block; }
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1),
.nav-toggle.active .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle::before, .nav-toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 70%; height: 4.5px; background: var(--primary); border-radius: 999px; transform-origin: center; transform: translate(-50%, -50%) scaleX(0); opacity: 0; transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 160ms ease, box-shadow 200ms ease; pointer-events: none; box-shadow: 0 4px 12px rgba(247,230,0,0.14), 0 1px 0 rgba(0,0,0,0.35) inset; filter: drop-shadow(0 6px 10px rgba(247,230,0,0.12)); }
.nav-toggle[aria-expanded="true"]::before,
.nav-toggle.active::before { transform: translate(-50%, -50%) rotate(45deg) scaleX(1.02); opacity: 1; animation: wobble-1 720ms cubic-bezier(.2,.9,.2,1) both; }
.nav-toggle[aria-expanded="true"]::after,
.nav-toggle.active::after { transform: translate(-50%, -50%) rotate(-45deg) scaleX(1.02); opacity: 1; animation: wobble-2 720ms cubic-bezier(.2,.9,.2,1) 80ms both; }
.nav-toggle[aria-expanded="true"] .hamburger-line,
.nav-toggle.active .hamburger-line { opacity: 0; transform: scaleX(0.15); }
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2),
.nav-toggle.active .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3),
.nav-toggle.active .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@keyframes wobble-1 { 0% { transform: translate(-50%, -50%) rotate(45deg) scaleX(1); } 100% { transform: translate(-50%, -50%) rotate(45deg) scaleX(1.02); } }
@keyframes wobble-2 { 0% { transform: translate(-50%, -50%) rotate(-45deg) scaleX(1); } 100% { transform: translate(-50%, -50%) rotate(-45deg) scaleX(1.02); } }

.hero { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: var(--space-3xl) 0 var(--space-2xl); position: relative; }
.hero-inner { display: grid; grid-template-columns: 56% 44%; gap: 2.2rem; align-items: center; width: 100%; max-width: 1200px; transform: translateY(-20px); }

/* Center hero title by default (mobile/tablet/split-screen) */
.hero-title { display: flex; justify-content: center; align-items: center; text-align: center; height: 100%; width: 100%; position: relative; overflow: visible; }
.hero-breathe { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; }
.hero-breathe .hero-lines { display: block; margin: 0 auto; text-align: center; width: 100%; }
.hero-breathe .line1, .hero-breathe .line2 { display: block; text-align: center; width: 100%; }

/* Tablet/Split-screen (900px and below): force single column and center */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr !important; gap: var(--space-md); justify-items: center; }
  .hero-title { justify-content: center !important; align-items: center !important; text-align: center !important; width: 100% !important; }
  .hero-breathe { justify-content: center !important; align-items: center !important; }
  .hero-breathe .hero-lines { margin: 0 auto !important; text-align: center !important; }
  .hero-breathe .line1, .hero-breathe .line2 { text-align: center !important; }
}

/* Desktop only: left-align hero content */
@media (min-width: 901px) {
  .hero-title { justify-content: flex-start; text-align: left; }
  .hero-breathe { flex-direction: column; justify-content: flex-start; align-items: flex-start; }
  .hero-breathe .hero-lines { margin: 0; text-align: left; }
  .hero-breathe .line1, .hero-breathe .line2 { text-align: left; }
}
    .hero-title svg { font-family: 'Doto', 'Bvllet', 'Helvetica Neue', Arial, sans-serif; font-size: clamp(9.2rem, 26.5vw, 30rem); line-height: 0.98; margin: 0; font-weight: 400; font-variant-ligatures: none; font-feature-settings: "ss01" 1, "ss02" 0, "ss03" 0, "salt" 0, "liga" 0; }
.desktop-hero-text, .mobile-hero-text { font-family: 'Doto', 'Bvllet', 'Helvetica Neue', Arial, sans-serif; letter-spacing: 0.04em; text-transform: none; font-weight: 400; font-variant-ligatures: none; font-feature-settings: "ss01" 1, "ss02" 0, "ss03" 0, "salt" 0, "liga" 0; }
    .hero-title svg.hero-logo--animated { width: 100%; height: auto; max-width: none; font-size: clamp(9.2rem, 26.5vw, 30rem); filter: none !important; -webkit-filter: none !important; }
.hero-attrs { display: flex; flex-direction: column; justify-content: center; }

@media (max-width: 700px) {
  .hero-inner { gap: var(--space-sm); }
  .hero-title { padding-top: var(--space-md); padding-bottom: var(--space-sm); overflow: hidden; }
  .hero-title svg.hero-logo--animated { max-width: 90%; width: 85vw; height: auto; font-size: clamp(5rem, 16vw, 9rem); overflow: visible; display: block; margin: 0 auto; }
  /* Ensure SVG text anchors center correctly on small viewports */
  .mobile-hero-text { display: block !important; opacity: 1 !important; text-anchor: middle; }
  .mobile-hero-text tspan { text-anchor: middle; }
  .desktop-hero-text { display: none !important; opacity: 0 !important; }
  .hero-attrs { align-items: center; text-align: center; padding: 0 var(--space-sm); }
  .attr-sub { text-align: center; max-width: 100%; padding: 0 var(--space-xs); }

    /* Center variable-font hero lines and ensure comfortable spacing */
    .hero-breathe { justify-content: center; align-items: center; }
    .hero-breathe .hero-lines { max-width: 95%; margin: 0 auto; padding: 0 0.5rem; }
    .hero-breathe .line1, .hero-breathe .line2 { text-align: center; display: block; }

    /* Reduce visual clutter on small screens: slightly scale down abstract shapes */
    .hero-abstract .abs-shape { transform: scale(0.78); opacity: 0.10; }
    .hero-abstract .float-item { transform: scale(0.78); opacity: 0.9; }
}

.attr-group { display: flex; flex-direction: column; gap: var(--space-sm); }
.attr-pill { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.pill-box { display: inline-block; padding: 0.36rem 0.85rem; background: rgba(255,255,255,0.03); border-radius: 8px; font-size: 0.9rem; font-weight: 700; color: var(--text-light); letter-spacing: 0.02em; border: 1px solid rgba(255,255,255,0.18); }
.pill-sep { color: var(--primary); font-weight: 700; font-size: 1rem; }
.attr-sub { font-size: 1.05rem; line-height: 1.6; color: var(--text-muted); max-width: 480px; }
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }
.hero-cta .btn { display: inline-flex; align-items: center; justify-content: center; padding: 1rem 2.2rem; min-height: 48px; box-sizing: border-box; }
.hero-cta .btn-secondary { padding: calc(1rem - 2px) calc(2.2rem - 2px); }

/* Stacked 3D rotating hero text (CodePen-inspired) */
.stack-container { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 120; width: min(80%, 700px); max-width: 95%; padding: 0.6rem 0; min-height: 110px; }
.stack-container .box { position: relative; width: 100%; height: auto; transform-style: preserve-3d; animation: stack-rotate 18s linear infinite; transform-origin: center center; }
.stack-container .box span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) rotateX(calc(var(--i) * 6deg)) translateZ(36px);
    transform-origin: center center;
    background: transparent;
    color: var(--text-light);
    text-transform: uppercase;
    line-height: 0.92em;
    font-weight: 800;
    font-size: clamp(1.6rem, 5.8vw, 3.6rem);
    white-space: normal;
    text-align: center;
    padding: 0.08rem 8px;
    letter-spacing: 0.08em; /* increased tracking for readability while rotating */
    text-shadow: 0 6px 12px rgba(0,0,0,0.64);
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    opacity: calc(1 - (var(--i) * 0.03));
    box-sizing: border-box;
}
.stack-container .box span i { font-style: normal; color: var(--primary); padding-right: 0.4rem; }

@keyframes stack-rotate {
    0% { transform: perspective(900px) rotateX(0deg) rotate(4deg); }
    50% { transform: perspective(900px) rotateX(180deg) rotate(4deg); }
    100% { transform: perspective(900px) rotateX(360deg) rotate(4deg); }
}

/* Hide stacked effect on small screens to preserve readability */
@media (max-width: 700px) {
    .stack-container { display: none !important; }
    /* On small screens, show the original SVG logo (mobile fallback) */
    .hero-title svg.hero-logo--animated { display: block !important; }
}

@media (min-width: 701px) {
    /* On desktop, hide the original SVG so the stacked text replaces it */
    .hero-title svg.hero-logo--animated { display: none !important; }
}
.hero-scroll { position: absolute; bottom: calc(var(--space-lg) + 1.2rem); left: 50%; transform: translateX(-50%); }
.scroll-indicator { display: block; width: 24px; height: 24px; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg); animation: scrollBounce 2.5s ease-in-out infinite; }
@keyframes scrollBounce { 0%,100% { transform: rotate(45deg) translate(0,0); opacity: 0.3; } 50% { transform: rotate(45deg) translate(8px,8px); opacity: 1; } }

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2,0.9,0.3,1); }
.fade-in.visible { opacity: 1; transform: none; }

.clients { padding: var(--space-xl) 0; position: relative; overflow: hidden; }
.clients-label { text-align: center; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-subtle); margin-bottom: var(--space-md); }

/* Nudge the clients scramble (matrix text) slightly upward for visual alignment */
.clients-scramble { display: inline-block; transform: translateY(-0.45rem); }
@media (max-width:700px) { .clients-scramble { transform: translateY(-0.25rem); } }
.carousel { width: 100%; max-width: 100vw; overflow: hidden; position: relative; padding: var(--space-sm) 0; }
.carousel-viewport { overflow: hidden; width: 100%; max-width: 100vw; }
.carousel-track { display: flex; gap: var(--space-lg); align-items: center; animation: carouselScroll 25s linear infinite; animation-play-state: running; will-change: transform; width: max-content; }
/* Tighten carousel item spacing for the clients row */
.clients .carousel-track {
    gap: 2rem !important;
    /* enable CSS-driven continuous scroll specifically for the clients row */
    animation: carouselScroll 30s linear infinite !important;
    animation-play-state: running !important;
    will-change: transform;
}
.clients .carousel-item { padding: 0 !important; min-width: auto !important; flex: 0 0 96px !important; width: 96px !important; box-sizing: border-box !important; }
.clients .carousel-item, .clients .carousel-item * { margin: 0 !important; }
.clients .carousel-item img, .clients .carousel-logo { width: 100% !important; max-width: 100% !important; display: block !important; height: auto !important; }
.carousel-item { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; padding: 0 var(--space-sm); min-width: calc(100% / 6); }
.carousel-item img { width: 120px; height: auto; object-fit: contain; opacity: 0.45; transition: opacity var(--transition-base); backface-visibility: hidden; }
.carousel-item img[alt="TP Logo"] { filter: none; opacity: 0.4; }
.carousel-item img.quantfi { filter: grayscale(1) brightness(0) invert(1) !important; opacity: 0.45; }
.carousel-logo { 
  width: 120px; 
  height: auto; 
  object-fit: contain; 
  opacity: 0.4;
  filter: grayscale(1) brightness(1.2);
  transition: opacity 0.3s ease;
}
.carousel:hover .carousel-track { animation-play-state: paused; }
.carousel:hover .carousel-item img { opacity: 0.7; filter: grayscale(0.5) brightness(1.1); }
.carousel:hover .carousel-logo { opacity: 0.7; filter: grayscale(0.5) brightness(1.1); }
@keyframes carouselScroll { 0% { transform: translate3d(0,0,0); } 100% { transform: translate3d(-50%,0,0); } }
.clients::before, .clients::after { display: none; }

.services { padding: var(--space-3xl) 0; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: var(--space-lg); }
.service-card { background: transparent; border: none; border-radius: 0; padding: var(--space-xl); transition: all var(--transition-base); }
.service-card:hover { background: transparent; border: none; transform: translateY(-2px); }
.service-icon { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; background: var(--primary); border-radius: var(--radius-md); margin-bottom: var(--space-md); font-size: 1.5rem; color: var(--bg-dark); }
.service-card h3 { font-size: 1.25rem; margin-bottom: var(--space-sm); }
.service-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

.process { padding: var(--space-3xl) 0; background: transparent; }
.process-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--space-lg); }
.process-step { text-align: center; padding: var(--space-lg); position: relative; }
.step-number { display: block; font-size: 3rem; font-weight: 700; color: transparent; -webkit-text-stroke: 1px var(--primary); margin-bottom: var(--space-sm); }
.process-step h3 { font-size: 1.25rem; margin-bottom: var(--space-sm); }
.process-step p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }

.work { padding: var(--space-2xl) 0; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: var(--space-lg); margin-bottom: var(--space-xl); justify-content: center; justify-items: center; }
.work-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base) var(--easing-lux), box-shadow var(--transition-base) var(--easing-lux), opacity var(--transition-fast) linear;
}
.work-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
}
.work-image { aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; padding: var(--space-xl); background: linear-gradient(180deg, rgba(6,6,6,0.6) 0%, rgba(10,10,10,0.95) 100%); }
.work-image img { max-width: 70%; max-height: 70%; object-fit: contain; filter: brightness(0.96); }
/* work-image--accent removed — unused */
.work-image--dark { background: linear-gradient(180deg, var(--bg-darker) 0%, rgba(10,10,10,0.95) 100%); }
.work-info {
    padding: calc(var(--space-sm)) var(--space-lg);
    background: linear-gradient(180deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.02) 100%);
    border-top: 1px solid rgba(255,255,255,0.03);
}
.work-info h3 { font-size: 1.15rem; margin-bottom: var(--space-xs); font-family: var(--font-primary); font-weight: 700; }
.work-info p { color: var(--text-muted); font-size: 0.9rem; letter-spacing: 0.02em; }
.work-cta { text-align: center; margin-top: 0; }

/* Scattered screenshots beneath the projects grid */
.work-snapshots { margin-top: var(--space-lg); display: block; }
.snap-flex { display:flex; gap: 1rem; flex-wrap: wrap; justify-content: center; align-items: center; padding: var(--space-sm) 0; max-width: var(--max-width); margin: 0 auto; }
.snapshot { --r: 0deg; width: clamp(140px, 18vw, 320px); height: auto; border-radius: 10px; object-fit: cover; border: 1px solid rgba(255,255,255,0.04); box-shadow: 0 12px 30px rgba(0,0,0,0.55); transform: rotate(var(--r)); transition: transform 0.36s var(--easing-lux), box-shadow 0.36s var(--easing-lux), filter 0.36s var(--easing-lux); }
.snapshot:hover { transform: rotate(0deg) translateY(-8px) scale(1.03); box-shadow: 0 36px 80px rgba(0,0,0,0.6), 0 6px 18px rgba(247,230,0,0.06); z-index: 3; filter: brightness(1.02); }
.rot-1 { --r: -6deg; }
.rot-2 { --r: 8deg; }
.rot-3 { --r: -10deg; }
.rot-4 { --r: 6deg; }
.rot-5 { --r: -3deg; }
.rot-6 { --r: 10deg; }

@media (max-width: 900px) {
    .snap-flex { gap: 0.6rem; }
    .snapshot { width: clamp(120px, 36vw, 260px); }
}


.about { padding: var(--space-3xl) 0; background: transparent; position: relative; z-index: 1; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xl); align-items: center; }

/* Use a single shared backdrop panel for the About block so the tag and
   subtext appear as one continuous surface rather than separate chips. */
.about-content {
    position: relative;
    background-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    padding: 1rem;
    border-radius: 0;
    border: none;
    text-align: left;
}

.about-content p {
    color: rgba(255,255,255,0.92);
    margin-bottom: var(--space-md);
    line-height: 1.8;
    background: transparent;
    padding: 0; /* paragraphs sit inside the shared panel */
}

/* When stats live inside the shared about panel, they should not draw
   their own translucent chip — let them sit on the panel surface. */
.about-content .stat {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0.32rem 0.6rem;
}

/* Remove the micro-backdrop on the section-tag when it's inside the about panel
   so the tag visually sits on the same surface. */
.about-content .section-tag {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

@media (max-width:700px) {
    .about-content { 
        background-color: transparent; 
        padding: 0 1rem; 
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .about-content p {
        max-width: 100%;
        padding: 0;
        text-align: center;
        word-wrap: break-word;
        overflow-wrap: break-word;
        font-size: 0.95rem;
        line-height: 1.7;
    }
    .about-content .section-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    .about { 
        padding: var(--space-xl) 0; 
    }
    .about .container {
        padding: 0 var(--container-padding);
        box-sizing: border-box;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        text-align: center;
    }
}
.about-stats {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 2rem !important;
    margin-top: var(--space-lg);
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}
.stat {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem 0;
    background-color: transparent;
    border-radius: 6px;
    border: none;
    flex: 1 1 0 !important;
    min-width: 0;
    max-width: 160px;
}
.stat-number { display: block; font-size: 1.75rem; font-weight: 700; color: var(--primary); line-height:1; }
.stat-number.stat-infinity { font-size: 1.75rem; line-height: 1; } /* Same size as other numbers for consistency */
.stat-label { display: block; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.5rem; }

@media (max-width: 700px) {
  .about-stats { 
    flex-direction: column !important;
    flex-wrap: wrap !important; 
    gap: var(--space-sm) !important; 
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
  }
  .stat { 
    padding: 0.75rem 1rem; 
    width: 100%;
    max-width: 200px;
  }
  .stat-number {
    font-size: 2rem;
  }
  .stat-number.stat-infinity {
    font-size: 2.8rem;
    line-height: 0.7;
  }
  .stat-label {
    font-size: 0.75rem;
  }
}
.about-visual { position: relative; display: flex; align-items: center; justify-content: center; }
/* removed yellow blob - replaced by stat cards */
.about-shape { display: none; }

/* About cards cluster (abstract formation on the right side) */
.about-cards {
    position: absolute;
    left: 68%; /* moved left to sit closer to the content */
    top: 50%;
    transform: translate(-50%, -50%); /* center the cluster at the chosen point */
    width: 420px;
    height: 360px;
    pointer-events: auto;
    display: block;
    z-index: 1;
}

.about-card {
    position: absolute;
    width: 180px;
    padding: 1.2rem 1.3rem;
    color: var(--text-light);
    background: linear-gradient(135deg, rgba(20,20,25,0.85) 0%, rgba(8,8,12,0.9) 100%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.6),
        0 2px 8px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transform-origin: center;
    mix-blend-mode: normal;
    backdrop-filter: blur(12px) saturate(1.2);
    pointer-events: auto;
    overflow: hidden;
}

/* Fancy top accent line */
.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary) 20%, 
        var(--primary) 80%, 
        transparent 100%
    );
    opacity: 0.6;
}

/* Subtle corner glow */
.about-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,0,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.about-card .card-number { 
    font-size: 0.95rem; 
    font-weight: 800; 
    color: var(--primary); 
    line-height: 1.2; 
    white-space: normal; 
    overflow-wrap: break-word; 
    word-break: normal;
    text-shadow: 0 0 20px rgba(255,255,0,0.15);
    letter-spacing: -0.01em;
}
.about-card .card-label { 
    font-size: 0.75rem; 
    color: rgba(255,255,255,0.7); 
    margin-top: 0.35rem; 
    text-transform: uppercase; 
    letter-spacing: 0.08em;
    font-weight: 500;
}
.about-card--a { right: 0; top: 0; transform: rotate(-6deg); animation: cardFloat1 4s ease-in-out infinite; }
.about-card--b { right: 40px; top: 120px; transform: rotate(4deg); opacity: 0.95; animation: cardFloat2 4.5s ease-in-out infinite; animation-delay: 0.5s; }
.about-card--c { right: 170px; top: 35px; transform: rotate(-2deg); opacity: 0.9; animation: cardFloat3 5s ease-in-out infinite; animation-delay: 1s; }
.about-card--d { right: 90px; top: 220px; transform: rotate(6deg); opacity: 0.9; animation: cardFloat4 4.2s ease-in-out infinite; animation-delay: 1.5s; }

/* Floating animations for cards */
@keyframes cardFloat1 {
    0%, 100% { transform: rotate(-6deg) translateY(0px); }
    50% { transform: rotate(-6deg) translateY(-12px); }
}
@keyframes cardFloat2 {
    0%, 100% { transform: rotate(4deg) translateY(0px); }
    50% { transform: rotate(4deg) translateY(-15px); }
}
@keyframes cardFloat3 {
    0%, 100% { transform: rotate(-2deg) translateY(0px); }
    50% { transform: rotate(-2deg) translateY(-10px); }
}
@keyframes cardFloat4 {
    0%, 100% { transform: rotate(6deg) translateY(0px); }
    50% { transform: rotate(6deg) translateY(-14px); }
}

/* Card hover effects - smooth scale, no glow */
.about-card {
    transition: transform 0.5s ease-out, box-shadow 0.5s ease-out;
}
.about-card:hover {
    animation-play-state: paused;
    transform: scale(1.05) !important;
    box-shadow: 
        0 16px 48px rgba(0,0,0,0.7),
        inset 0 1px 0 rgba(255,255,255,0.15);
    z-index: 10;
}
.about-card--a:hover { transform: rotate(-6deg) scale(1.05) !important; }
.about-card--b:hover { transform: rotate(4deg) scale(1.05) !important; }
.about-card--c:hover { transform: rotate(-2deg) scale(1.05) !important; }
.about-card--d:hover { transform: rotate(6deg) scale(1.05) !important; }

/* Tablet / half-screen: switch to single column and centered cards */
@media (max-width: 1100px) and (min-width: 701px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }
    
    .about-content {
        max-width: 600px;
        margin: 0 auto;
        text-align: center;
    }
    
    .about-content .section-tag,
    .about-content .section-title {
        text-align: center;
    }
    
    .about-visual {
        order: 2;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 400px;
        width: 100%;
    }
    
    .about-cards {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin: 0 auto;
    }
}

/* Mobile: show cards as a compact stacked/scrollable row below the about content */
@media (max-width: 900px) {
    .about-cards {
        display: flex !important;
        position: static;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        height: auto;
        gap: 10px;
        justify-content: center;
        align-items: stretch;
        flex-wrap: wrap;
        margin: 1.5rem 0 0;
        pointer-events: auto;
        padding: 0;
        box-sizing: border-box;
        touch-action: pan-y;
        z-index: 2;
    }

    .about-visual {
        max-width: 100%;
        width: 100%;
    }

    .about-card {
        position: relative;
        flex: 0 1 calc(50% - 8px);
        min-width: 0 !important;
        max-width: calc(50% - 5px);
        transform: none !important;
        right: auto;
        top: auto;
        opacity: 1;
        box-shadow: 0 8px 24px rgba(0,0,0,0.6);
        border-radius: 8px;
        margin: 0;
        padding: 0.75rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        mix-blend-mode: normal;
        background: rgba(6,6,6,0.85);
        border: 1px solid rgba(255,255,255,0.1);
        box-sizing: border-box;
    }

    .about-card--a, .about-card--b, .about-card--c, .about-card--d {
        transform: none !important;
        right: auto; top: auto;
    }

    .about-card .card-number { font-size: 0.9rem; white-space: normal; text-align: center; word-break: break-word; }
    .about-card .card-label { font-size: 0.7rem; color: rgba(255,255,255,0.9); text-align: center; word-break: break-word; }

    /* ensure visual flow: place the cards after the about-content on small viewports */
    .about-grid { grid-template-columns: 1fr; }
    .about-visual { order: 2; display: flex; justify-content: center; }
    .about-content { order: 1; max-width: 100%; }
}

/* Very small screens: stack cards full-width below the About content */
@media (max-width: 600px) {
    .about-cards { gap: 10px; padding: 0; }
    .about-card { width: 100% !important; max-width: 100% !important; padding: 0.9rem; flex: 1 1 100%; }
    .about-card .card-number { font-size: 1rem; }
    .about-card .card-label { font-size: 0.78rem; }
}
@keyframes pulse { 0% { transform: scale(1); opacity: 0.15; } 100% { transform: scale(1.2); opacity: 0.25; } }

.contact { padding: var(--space-xl) 0; }
.contact-inner { max-width: 700px; margin: 0 auto; }
.contact-inner {
    background-color: rgba(6,6,6,0.62);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    backdrop-filter: blur(14px) saturate(120%);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 22px 46px rgba(0,0,0,0.55);
}
.contact-header { text-align: center; margin-bottom: var(--space-xl); }
.contact-header p { color: var(--text-muted); font-size: 1.05rem; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-group { display: flex; flex-direction: column; gap: var(--space-xs); }
.form-group--full { grid-column: 1 / -1; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.form-group input, .form-group textarea { padding: var(--space-sm) var(--space-md); background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius-sm); color: var(--text-light); font-family: var(--font-primary); font-size: 0.95rem; transition: all var(--transition-fast); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-subtle); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); background: rgba(255,255,255,0.08); box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.form-group textarea { resize: none; min-height: 120px; }
.btn-submit { width: 100%; margin-top: var(--space-sm); }
.contact-alt { text-align: center; margin-top: var(--space-xl); color: var(--text-muted); }
.contact-alt a { color: var(--primary); text-decoration: none; font-weight: 600; }
.contact-alt a:hover { text-decoration: underline; }

/* Light theme: stronger, opaque glass for contact card */
body.light-mode .contact-inner {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,250,252,0.94)) !important;
    -webkit-backdrop-filter: blur(8px) saturate(115%);
    backdrop-filter: blur(8px) saturate(115%);
    border: 1px solid rgba(11,17,23,0.06) !important;
    box-shadow: 0 18px 40px rgba(11,17,23,0.06) !important;
    color: var(--text-light) !important;
}

/* Light-mode: contact form inputs use subtle dark-bordered fields */
body.light-mode .form-group input,
body.light-mode .form-group textarea {
    border: 1px solid rgba(11,17,23,0.12) !important;
    background: rgba(255,255,255,0.96) !important;
    color: var(--text-light) !important;
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
    box-shadow: 0 8px 24px rgba(30,136,229,0.08) !important;
    border-color: var(--primary) !important;
}

/* ── FAQ Section ─────────────────────────────────────────── */
.faq { padding: var(--space-xl) 0; }
.faq-header { text-align: center; margin-bottom: var(--space-lg); }
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-sm); }
.faq-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-item:hover { border-color: rgba(255,255,255,0.12); }
.faq-item[open] { border-color: var(--primary); box-shadow: 0 4px 20px rgba(247,230,0,0.06); }
.faq-item summary {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-light);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    user-select: none;
    -webkit-user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.faq-item[open] summary::after { content: '−'; transform: rotate(180deg); }
.faq-answer {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.7;
}
.faq-answer p { margin: 0; }

/* Light mode FAQ */
body.light-mode .faq-item {
    background: rgba(255,255,255,0.7);
    border-color: rgba(11,17,23,0.08);
}
body.light-mode .faq-item:hover { border-color: rgba(11,17,23,0.15); }
body.light-mode .faq-item[open] { border-color: var(--primary); box-shadow: 0 4px 20px rgba(247,230,0,0.08); }
body.light-mode .faq-item summary { color: var(--text-light); }

@media (max-width: 600px) {
    .faq-item summary { font-size: 0.97rem; padding: 1rem 1.15rem; }
    .faq-answer { padding: 0 1.15rem 1rem; font-size: 0.93rem; }
}

.site-footer { background: var(--bg-darker); padding: 0 0 var(--space-lg); border-top: 1px solid rgba(255,255,255,0.05); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; row-gap: 0.32rem; column-gap: var(--space-sm); margin-bottom: var(--space-sm); align-items: start; }
.footer-brand .logo { margin-bottom: 0.25rem; display: block; font-family: 'Doto', 'Bvllet', 'Helvetica Neue', Arial, sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-light); -webkit-text-fill-color: var(--text-light); }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; }
.footer-nav h3, .footer-contact h3, .footer-nav h4, .footer-contact h4 { font-size: 0.95rem; font-weight: 600; margin: 0 0 var(--space-sm) 0; color: var(--text-light); }
.footer-nav a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; padding: var(--space-xs) 0; transition: color var(--transition-fast); }
.footer-nav a:hover { color: var(--primary); }
.footer-contact a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.footer-contact a:hover { color: var(--primary); }
.socials { display: flex; gap: var(--space-sm); margin-top: var(--space-md); }
.socials a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(255,255,255,0.05); border-radius: 50%; color: var(--text-light); font-size: 1rem; transition: all var(--transition-base); }
.socials a:hover { background: var(--primary); color: var(--bg-dark); transform: translateY(-2px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 0.6rem; border-top: 1px solid rgba(255,255,255,0.05); flex-wrap: wrap; gap: var(--space-sm); }
.footer-bottom small { color: var(--text-subtle); font-size: 0.95rem; }
.footer-legal { display: flex; gap: var(--space-md); }
.footer-legal a { color: var(--text-subtle); text-decoration: none; font-size: 0.85rem; transition: color var(--transition-fast); }
.footer-legal a:hover { color: var(--primary); }

/* Newsletter in footer */
.footer-newsletter {
    max-width: 360px;
}
.footer-newsletter { align-self: start; margin-top: 0; grid-column: 1 / 2; }

@media (max-width: 1024px) {
    /* restore original stacking on narrower viewports */
    .footer-newsletter { grid-column: auto; }
}

/* Ensure brand sits at the top of the grid as the reference */
.footer-brand { align-self: start; }

@media (max-width: 1024px) {
    .footer-newsletter { margin-top: 0; }
}

/* Half-screen / tablet: center newsletter properly */
@media (max-width: 1024px) and (min-width: 701px) {
    .footer-newsletter {
        margin: 1.5rem auto 0;
        max-width: 400px;
        width: 100%;
    }
    
    .footer-newsletter h3,
    .footer-newsletter p {
        text-align: center;
    }
    
    .newsletter-form .newsletter-row {
        justify-content: center;
    }
    
    .newsletter-form input[type="email"] {
        min-width: 200px;
        flex: 0 1 auto;
    }
    
    .newsletter-feedback {
        text-align: center;
    }
}
.footer-newsletter p { color: var(--text-muted); margin-bottom: 0.4rem; font-size: 0.9rem; }

/* Center footer content on small/mobile viewports */
@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        justify-items: center;
        text-align: center;
        row-gap: var(--space-md);
    }
    .footer-brand, .footer-nav, .footer-contact, .footer-newsletter {
        grid-column: auto !important;
        justify-self: center !important;
        text-align: center !important;
        align-self: start;
        width: 100%;
    }
    .footer-brand { margin-bottom: var(--space-md); }
    .footer-bottom { justify-content: center !important; gap: var(--space-sm); }
    .footer-legal { justify-content: center; flex-wrap: wrap; gap: 0.5rem; }
    .socials { justify-content: center; }
}
.newsletter-form .newsletter-row { display: flex; gap: 0.5rem; align-items: center; }
.newsletter-form input[type="email"] {
    flex: 1 1 auto;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.02);
    color: var(--text-light);
    font-family: var(--font-primary);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.46); }
.newsletter-form .btn { padding: 0.5rem 0.9rem; font-size: 0.95rem; }
.newsletter-form { margin-top: 0.18rem; }
.newsletter-feedback { margin-top: 0.5rem; font-size: 0.9rem; color: var(--text-muted); }

/* Light mode overrides for newsletter */
body.light-mode .newsletter-form input[type="email"] {
    border: 1px solid rgba(11,17,23,0.08) !important;
    background: rgba(255,255,255,0.96) !important;
    color: var(--text-light) !important;
}
body.light-mode .newsletter-feedback { color: rgba(11,17,23,0.72) !important; }

@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; gap: var(--space-xl); }
  .hero-attrs { align-items: center; }
  .attr-group { align-items: center; }
  .attr-sub { text-align: center; }
  .hero-cta { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-content .section-tag, .about-content .section-title { text-align: center; }
  .about-stats { justify-content: center; }
  .about-visual { order: -1; }
  .about-shape { width: 200px; height: 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; text-align: center; margin-bottom: var(--space-md); }
}

@media (max-width: 768px) {
  :root { --container-padding: 1rem; }
  /* Mobile menu styles moved to mobile-menu.css */
  .hero { min-height: auto; min-height: 75vh; padding: var(--space-xl) 0 var(--space-lg); }
  .nav-inner { padding: 0.75rem var(--container-padding); gap: var(--space-sm); align-items: center; }
  .brand .logo { font-size: clamp(1.1rem, 5vw, 1.4rem); margin-left: 0.25rem; }
  .hero-title h1 { font-size: clamp(2.5rem, 10%, 4rem); }
  .attr-pill { justify-content: center; flex-wrap: wrap; gap: 0.5rem; }
    .pill-sep { display: none; }
    /* Show the scroll indicator on mobile and ensure it's above hero content */
    .hero-scroll { display: block; bottom: calc(var(--space-md) + 0.6rem); z-index: 3; }
    .hero-scroll .scroll-indicator { width: 20px; height: 20px; border-right-width: 2px; border-bottom-width: 2px; }
  
  /* ========================================
     MOBILE REDESIGN: Services, Process, About
     Simple flexbox stacking - no grids, no overflow
     ======================================== */
  
  /* Reset sections to simple block layout */
  .services,
  .process,
  .about {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: var(--space-xl) 0;
    box-sizing: border-box;
  }
  
  .services .container,
  .process .container,
  .about .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
  }
  
  /* Services: Stack cards vertically */
  .services-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .service-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 1.5rem 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
  }
  
  .service-card .service-icon {
    margin: 0 auto 1rem !important;
  }
  
  .service-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  
  .service-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 100%;
  }
  
  /* Process: Clean vertical timeline layout for mobile */
  .process-timeline {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    padding-left: 28px !important;
    margin: 0 !important;
  }
  
  /* Vertical timeline line - 4px wide, full height */
  .process-timeline::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 24px !important;
    bottom: 24px !important;
    width: 4px !important;
    background: linear-gradient(to bottom, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%) !important;
    border-radius: 2px !important;
    opacity: 1 !important;
    z-index: 1 !important;
  }
  
  .process-step {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    padding: 1.25rem 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 1.25rem !important;
    margin-left: 20px !important;
    position: relative !important;
  }
  
  /* Timeline dot - clearly positioned on the line */
  .process-step::before {
    content: '' !important;
    position: absolute !important;
    left: -30px !important;
    top: 28px !important;
    transform: translateY(0) !important;
    width: 14px !important;
    height: 14px !important;
    background: var(--primary) !important;
    border-radius: 50% !important;
    border: 3px solid var(--bg-dark) !important;
    box-shadow: 0 0 0 2px var(--primary) !important;
    z-index: 3 !important;
  }
  
  /* Connector line from dot to card */
  .process-step::after {
    content: '' !important;
    position: absolute !important;
    left: -16px !important;
    top: 34px !important;
    width: 16px !important;
    height: 2px !important;
    background: rgba(255,255,255,0.2) !important;
    z-index: 2 !important;
  }
  
  /* Remove margin from last step */
  .process-step:last-child {
    margin-bottom: 0 !important;
  }
  
  .process-step .step-number {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
    -webkit-text-stroke-width: 1px;
    color: transparent;
    -webkit-text-stroke-color: var(--primary);
  }
  
  .process-step h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--text-light);
  }
  
  .process-step p {
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 100%;
    color: var(--text-muted);
  }
  
    /* About: Stack content vertically on small viewports only */
    @media (max-width: 1024px) {
        .about-grid {
            display: flex !important;
            flex-direction: column !important;
            gap: 2rem !important;
            width: 100% !important;
            max-width: 100% !important;
        }

        .about-content {
            width: 100% !important;
            max-width: 100% !important;
            text-align: center !important;
            box-sizing: border-box !important;
        }

        .about-content p {
            font-size: 0.95rem;
            line-height: 1.7;
            margin-bottom: 1rem;
            text-align: center;
        }

        .about-visual {
            width: 100% !important;
            max-width: 100% !important;
            display: flex !important;
            justify-content: center !important;
            box-sizing: border-box !important;
        }
    }
  
  /* About cards: 2x2 grid on mobile */
  .about-cards {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    position: static !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    height: auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  
  .about-card {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
    text-align: center !important;
    background: rgba(6,6,6,0.85);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    opacity: 1 !important;
    right: auto !important;
    top: auto !important;
  }
  
  .about-card .card-number {
    font-size: 0.85rem !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  
  .about-card .card-label {
    font-size: 0.7rem !important;
    word-break: break-word !important;
  }
  
  /* Stats row */
  .about-stats {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }
  
  .stat {
    flex: 0 1 auto !important;
    min-width: 80px !important;
    max-width: 120px !important;
    padding: 0.75rem !important;
    text-align: center !important;
  }
  
  /* END MOBILE REDESIGN */
  
  .contact-form { grid-template-columns: 1fr; gap: var(--space-sm); }
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: var(--space-lg); }

/* Ensure the about/stats row remains inline on desktop widths —
     fixes accidental stacking introduced by overrides. */
@media (min-width: 1025px) {
    .about-stats {
        display: flex !important;
        flex-wrap: nowrap !important;
        /* center the group on larger screens */
        width: 560px !important;
        max-width: 90% !important;
        margin: 0 auto !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .about-stats .stat {
        flex: 0 0 auto !important;
        min-width: 120px !important;
        max-width: 260px !important;
        padding: 0.6rem 0.9rem !important;
    }
}

@media (min-width: 1400px) {
    .about-stats { width: 680px !important; }
    .about-stats .stat { min-width: 140px !important; }
}
  .footer-nav, .footer-contact { text-align: center; }
  .footer-nav h4, .footer-contact h4 { margin-bottom: var(--space-sm); }
  .socials { justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; gap: var(--space-sm); }
  .footer-legal { flex-wrap: wrap; justify-content: center; }
  .service-card, .process-step, .work-card { padding: var(--space-md); }
}

@media (max-width: 480px) {
  .hero { padding: var(--space-lg) 0; min-height: 70vh; }
  .hero-cta { flex-direction: column; width: 100%; gap: var(--space-sm); padding: 0 var(--space-sm); }
  .hero-cta .btn { width: 100%; min-height: 52px; font-size: 1rem; }
  .pill-box { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
  .attr-sub { font-size: 0.95rem; line-height: 1.5; }
  .section-title { font-size: clamp(1.5rem, 6vw, 2rem); }
  .contact-inner { padding: var(--space-md); }
  
  /* Very small screens: single column about cards */
  .about-cards {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
  
  /* Stats in a row of 3 */
  .about-stats {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
  }
  
  .stat {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0.5rem 0.25rem !important;
  }
  
  .stat-number { font-size: 1.25rem !important; }
  .stat-label { font-size: 0.6rem !important; }
  
  /* Very small screens: compact but clean timeline */
  .process-timeline {
    padding-left: 24px !important;
  }
  
  .process-timeline::before {
    left: 0 !important;
    top: 20px !important;
    bottom: 20px !important;
    width: 3px !important;
  }
  
  .process-step {
    padding: 1rem 1rem !important;
    margin-bottom: 1rem !important;
    margin-left: 16px !important;
  }
  
  .process-step::before {
    left: -26px !important;
    top: 24px !important;
    width: 12px !important;
    height: 12px !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 2px var(--primary) !important;
  }
  
  .process-step::after {
    left: -14px !important;
    top: 29px !important;
    width: 14px !important;
    height: 2px !important;
  }
  
  .process-step .step-number {
    font-size: 1.1rem !important;
    margin-bottom: 0.3rem !important;
  }
  
  .process-step h3 {
    font-size: 1rem !important;
    margin-bottom: 0.4rem !important;
  }
  
  .process-step p {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
  }
}

/* Mobile Light-theme: reduce heavy backdrop-filter, promote compositing, and avoid animating filters
     This keeps the light-mode surfaces visually consistent while improving perf and removing jitter on mobile. */
@media (max-width: 900px) {
    body.light-mode .service-card,
    body.light-mode .work-card,
    body.light-mode .about-card,
    body.light-mode .contact-inner,
    body.light-mode .stat,
    body.light-mode .pill-box,
    body.light-mode .newsletter-form input,
    body.light-mode .form-group input,
    body.light-mode .form-group textarea {
        /* reduce blur and remove saturation on small screens for performance */
        -webkit-backdrop-filter: blur(4px) !important;
        backdrop-filter: blur(4px) !important;
        /* use slightly more opaque backgrounds to avoid heavy compositing work */
        background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,250,252,0.96)) !important;
        /* avoid animating backdrop changes — only allow transform/box-shadow transitions */
        transition-property: transform, box-shadow, opacity, background-color !important;
        will-change: transform, opacity !important;
        transform: translateZ(0) !important; /* promotes element to its own layer */
        backface-visibility: hidden !important;
        -webkit-transform: translateZ(0) !important;
    }

    /* Mobile nav overlay: in light mode prefer an opaque surface rather than heavy blur */
    /* Disabled for mobile - handled by mobile-menu.css */
    /* body.light-mode .nav-links {
        background: rgba(255,255,255,0.98) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        color: var(--text-light) !important;
    } */

    /* For very small screens disable backdrop-filter entirely where it causes jank */
    @media (max-width: 420px) {
        body.light-mode .service-card,
        body.light-mode .about-card,
        body.light-mode .contact-inner,
        body.light-mode .stat {
            -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
            background: rgba(255,255,255,0.98) !important;
            box-shadow: 0 8px 24px rgba(11,17,23,0.06) !important;
            border: 1px solid rgba(11,17,23,0.06) !important;
        }
    }
}

/* Ensure hero CTAs have consistent sizing on desktop/tablet */
.hero .hero-cta .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.2rem;
    min-height: 48px;
    font-size: 1rem;
    box-sizing: border-box;
}

.hero .hero-cta .btn-secondary {
    padding: calc(1rem - 2px) calc(2.2rem - 2px);
}

/* Mobile: max-width constraint for section children */
.services *, .process *, .about * {
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 901px) {
    /* keep desktop layouts unchanged */
    .services *, .process *, .about * { max-width: none; }
}

/* Mobile shrink/flex fixes: ensure grid/flex children can shrink to container
   to prevent internal scrollbars caused by intrinsic min-widths */
@media (max-width: 900px) {
    /* Force single column grids */
    .services-grid,
    .process-timeline {
        grid-template-columns: 1fr !important;
    }
    
    .services-grid > *, .process-timeline > *, .about-grid > * {
        min-width: 0 !important;
        box-sizing: border-box;
        max-width: 100% !important;
        width: 100%;
    }
    
    .service-card, .process-step, .about-card {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    /* Ensure containers stay within bounds */
    .services .container,
    .process .container,
    .about .container {
        max-width: 100%;
        width: 100%;
    }
}

@media (prefers-contrast: high) {
  .service-card, .work-card { border-color: var(--text-light); }
  .pill-box { border: 1px solid var(--bg-dark); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .carousel-track { animation: none; }
}

@media print {
  .site-header, .hero-scroll, .carousel, .contact-form, .socials { display: none !important; }
  body { background: white; color: black; }
  .text-gradient { -webkit-text-fill-color: black; }
}
/* Home link visibility: kept visible on desktop — removed mobile-only hide rule */
/* ==========================================================================
   LyfePixels — Production-Ready Stylesheet
   Creative, Bold & Brave Digital Agency
   ========================================================================== */

/* --------------------------------------------------------------------------
    CSS Custom Properties (Design Tokens)
    -------------------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --primary: #f7e600;
    --accent: #be0cd7;
    --bg-dark: #000000;
    --bg-darker: #0a0a0a;
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-subtle: rgba(255, 255, 255, 0.5);
    
    /* Gradients removed in favor of solid brand colours; hero SVG keeps its gradient */
    --gradient-brand: var(--accent);
    --gradient-hero: var(--accent);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    --space-3xl: 8rem;
    
    /* Layout */
    --max-width: 1200px;
    --container-padding: 1.5rem;
    
    /* Typography */
    --font-primary: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(247, 230, 0, 0.15);
}

/* --------------------------------------------------------------------------
   Font Imports
   -------------------------------------------------------------------------- */
/* SuperWoobly removed from local loading — keep font file if needed elsewhere */

/* Space Grotesk is loaded via Google Fonts import; no local @font-face needed */

/* Local self-hosted Ductile (drop .woff/.woff2 files into assets/fonts/ductile/) */
@font-face {
    font-family: 'Ductile';
    src: url('../assets/fonts/ductile/Ductile-Regular.woff2') format('woff2'),
         url('../assets/fonts/ductile/Ductile-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* If only an OTF/TTF was provided, load it as a fallback for now */
/* OTF/TTF fallback removed to avoid duplicate declarations. Place
   any additional local font-face entries here if you self-host files. */

/* --------------------------------------------------------------------------
   Base Reset & Global Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

/* Note: body overflow is set to 'visible' in the main body rule above (line ~778)
   to ensure only html creates a scrollbar, not body */

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden !important; /* Prevent horizontal overflow while keeping vertical scroll on html */
    overflow-y: visible !important;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* Selection */
::selection {
    background: var(--primary);
    color: var(--bg-dark);
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
}

.skip-link:focus-visible {
    position: fixed;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 0.25rem 0.5rem;
    background: transparent;
    color: var(--text-light);
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    font-size: 0.9rem;
}

/* Also allow JS to reveal the skip link by adding `.visible` to the element.
   This improves discoverability when users press Tab to start keyboard nav. */
.skip-link.visible {
    position: fixed;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 0.25rem 0.5rem;
    background: transparent;
    color: var(--text-light);
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    font-size: 0.9rem;
}

/* Screen reader only */
.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;
}

/* --------------------------------------------------------------------------
   Layout Utilities
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

@keyframes bgShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* reduced-motion handling centralized later in the file */
.text-gradient {
    color: var(--text-light);
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-hero {
    padding: 1rem 2.2rem;
    font-size: 1.02rem;
    background: var(--primary);
    color: var(--bg-dark);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(247, 230, 0, 0.12);
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(247, 230, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.875rem 2rem;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

/* Solid yellow variant for header nav "Let's Talk" button - Clean shimmer CTA */
.nav-contact.btn-primary {
    background: var(--primary);
    background-image: none;
    color: var(--bg-dark);
    box-shadow: 0 2px 8px rgba(247, 230, 0, 0.2);
    border: none;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Shimmer effect overlay */
.nav-contact.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 100%
    );
    transition: left 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
    z-index: 1;
}

/* Subtle inner glow - contained within button */
.nav-contact.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

/* Hover state - Minimal lift with soft shadow */
.nav-contact.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 230, 0, 0.2);
    background: #ffed33;
    color: var(--bg-dark);
}

.nav-contact.btn-primary:hover::before {
    left: 100%;
}

.nav-contact.btn-primary:hover::after {
    opacity: 1;
}

/* Active/Click state */
.nav-contact.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(247, 230, 0, 0.15);
    transition: all 0.1s ease;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.95);
}

.topbar {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* nav-wave removed */

.brand .logo,
.footer-brand .logo {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: transparent;
    -webkit-text-stroke: 1px var(--text-light);
    letter-spacing: 0.02em;
}

/* Header-specific: use solid white text for the nav logo (no stroke/gradient effects) */
.site-header .brand .logo {
    /* header logo: filled white for better legibility and a professional tone */
    color: var(--text-light);
    -webkit-text-stroke: 0;
    -webkit-text-fill-color: var(--text-light);
    /* Try `Ductile` first; fall back to Outfit and the existing display font */
    font-family: 'Ductile', 'Outfit', var(--font-display);
    font-weight: 600;
}

/* header image logo and float animation removed (kept static for consistency) */

/* Respect reduced motion preferences */
/* Small reduced-motion rule removed — consolidated later in the file. */

/* Ensure footer brand text fallback remains readable */
.footer-brand .logo {
    font-family: var(--font-display);
}

/* Desktop-only nav-links base styles */
@media (min-width: 769px) {
  .nav-links {
      display: flex;
      align-items: center;
      gap: var(--space-sm);
  }

  .nav-links a {
      color: var(--text-light);
      text-decoration: none;
      font-size: 0.9rem;
      font-weight: 500;
      transition: color var(--transition-fast);
  }

  .nav-links a:hover {
      color: var(--primary);
  }

  .nav-links .nav-contact {
      padding: 0.5rem 1rem;
      margin-left: var(--space-xs);
  }
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    z-index: 1002;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3.5px;
    background: var(--text-light);
    border-radius: 999px;
    transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease, background-color 180ms ease;
    transform-origin: center;
    box-shadow: 0 1px 0 rgba(0,0,0,0.25) inset;
}

/* Make the middle bar shorter for a distinctive look */
.nav-toggle .hamburger-line:nth-child(2) {
    width: 60%;
    margin: 0 auto;
    display: block;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.service-card .section-tag,
.work-card .section-tag,
.process-step .section-tag,
.contact-inner .section-tag,
.about-content .section-tag,
.pill-box .section-tag,
.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: var(--space-sm);
    padding: 0; /* remove chip padding */
    background: transparent; /* no yellow/black chip */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-radius: 0;
    border: none;
}

/* Clients label styling */
.clients-label {
    padding: 0.12rem 0.5rem;
    background-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-radius: 0;
    margin-bottom: var(--space-sm);
}

@media (max-width:700px) {
    .clients-label { padding: 0.08rem 0.4rem; font-size: 0.85rem; }
}

/* Center the clients label within its container so the kicker stays centered */
.clients .container { text-align: center; }

/* Overlay X using pseudo-elements for crisp symmetric cross */
.nav-toggle::before,
.nav-toggle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 70%;
    height: 4.5px;
    background: var(--primary);
    border-radius: 999px;
    transform-origin: center;
    transform: translate(-50%, -50%) scaleX(0);
    opacity: 0;
    transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 160ms ease, box-shadow 200ms ease;
    pointer-events: none;
    /* soft halo to match brand energy */
    box-shadow: 0 4px 12px rgba(247,230,0,0.14), 0 1px 0 rgba(0,0,0,0.35) inset;
    filter: drop-shadow(0 6px 10px rgba(247,230,0,0.12));
}

/* When expanded show overlay X and hide bars */
.nav-toggle[aria-expanded="true"]::before {
    transform: translate(-50%, -50%) rotate(45deg) scaleX(1.02);
    opacity: 1;
}

.nav-toggle[aria-expanded="true"]::after {
    transform: translate(-50%, -50%) rotate(-45deg) scaleX(1.02);
    opacity: 1;
}

.nav-toggle[aria-expanded="true"] .hamburger-line {
    opacity: 0;
    transform: scaleX(0.15);
}

/* Slightly tint the bars when idle to read as part of the brand */
.nav-toggle .hamburger-line {
    background: rgba(255,255,255,0.95);
}

/* Wobbly X animations to give a hand-drawn, playful feel */
@keyframes wobble-1 {
    0% { transform: translate(-50%, -50%) rotate(45deg) scaleX(1); }
    20% { transform: translate(-52%, -48%) rotate(50deg) scaleX(1.03) skewX(-2deg); }
    40% { transform: translate(-48%, -52%) rotate(42deg) scaleX(1.01) skewX(1deg); }
    60% { transform: translate(-51%, -49%) rotate(47deg) scaleX(1.02) skewX(-1deg); }
    100% { transform: translate(-50%, -50%) rotate(45deg) scaleX(1.02); }
}

@keyframes wobble-2 {
    0% { transform: translate(-50%, -50%) rotate(-45deg) scaleX(1); }
    20% { transform: translate(-48%, -52%) rotate(-50deg) scaleX(1.03) skewX(2deg); }
    40% { transform: translate(-52%, -48%) rotate(-42deg) scaleX(1.01) skewX(-1deg); }
    60% { transform: translate(-49%, -51%) rotate(-47deg) scaleX(1.02) skewX(1deg); }
    100% { transform: translate(-50%, -50%) rotate(-45deg) scaleX(1.02); }
}

/* Apply wobble with small delay offsets for organic motion */
.nav-toggle[aria-expanded="true"]::before {
    animation: wobble-1 720ms cubic-bezier(.2,.9,.2,1) both;
}

.nav-toggle[aria-expanded="true"]::after {
    animation: wobble-2 720ms cubic-bezier(.2,.9,.2,1) 80ms both;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.2);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) 0 var(--space-2xl);
    position: relative;
}

.hero-inner {
    display: grid;
    grid-template-columns: 56% 44%;
    gap: 2.2rem;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.hero-title svg {
    font-family: var(--font-display);
    /* Tighter sizing so the logo doesn't overpower the hero */
    font-size: clamp(2.8rem, 9vw, 6.5rem);
    /* Slightly larger line-height to create a small gap between the two lines */
    line-height: 1.08;
    margin: 0;
}

/* Removed hero-line alignment helpers; hero H1 uses original centering/flow */

/* Inline SVG word sizing and stroke gradient */
/* Removed inline-SVG hero styles to restore original text-based hero sizing */

/* Hero uses the original H1 text styles; inline-SVG rules removed. */

/* Chromatic flowing glow for hero title — stops the previous breathing/transform
   animation and instead renders a blurred, moving chromatic gradient behind
   the text that reads like water movement. */
.hero-title svg.hero-logo--animated {
    width: 100%;
    height: auto;
    max-width: none;
    font-size: clamp(9.2rem, 26.5vw, 30rem);
    filter: none !important;
    -webkit-filter: none !important;
}

/* Re-enable SVG wavy displacement on hero text (reduced-motion handled globally) */

/* hero line alignment helpers removed (not used) */

/* (No fill on SVG; stroke handled by gradient) */

/* Glow removed per request — hero title kept static without pseudo glow. */

/* duplicate reduced-motion rules removed (central rule at end of file) */

/* SVG and hero animation removed — hero uses standard H1 styling */

/* Keep the About section title on a single line on larger viewports */
@media (min-width: 900px) {
    #about-title {
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
    }
}

.hero-attrs {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Mobile: stack hero columns, center logo, and increase logo size */
@media (max-width: 700px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        align-items: center;
        text-align: center;
    }

    .hero-title {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding-top: var(--space-sm);
        padding-bottom: var(--space-sm);
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .hero-title svg.hero-logo--animated {
        max-width: 90%;
        width: 85vw;
        height: auto;
        font-size: clamp(4rem, 16vw, 8rem);
        overflow: visible;
        margin: 0 auto;
    }

    .hero-title svg.hero-logo--animated text {
        stroke-width: 0;
    }

    .hero-attrs {
        padding-top: var(--space-md);
        align-items: center;
    }

    .hero-title .mobile-hero-text,
    .hero-title svg text.mobile-hero-text {
        font-family: 'Doto', 'Bvllet', Arial, sans-serif !important;
        text-anchor: middle;
    }
    
    .attr-pill {
        gap: 0.45rem;
        justify-content: center;
    }
    
    .pill-box {
        padding: 0.3rem 0.65rem;
        font-size: 0.85rem;
    }
    
    .desktop-hero-text { display: none !important; opacity: 0 !important; }
    .mobile-hero-text { display: block !important; opacity: 1 !important; }
}
@media (min-width: 701px) {
    .desktop-hero-text { display: block; }
    .mobile-hero-text { display: none; }
}

.attr-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.attr-pill {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.pill-box {
    display: inline-block;
    padding: 0.36rem 0.85rem;
    /* pill boxes get a subtle blurred backdrop so text stands out on busy backgrounds */
    background-color: rgba(6,6,6,0.42);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.02em;
    border: 1px solid rgba(255,255,255,0.06);
}

.pill-sep {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

.attr-sub {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 520px;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

/* Scroll Indicator */
    .hero-scroll {
    position: absolute;
    bottom: calc(var(--space-lg) + 1.2rem);
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    display: block;
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(45deg);
    animation: scrollBounce 2.5s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.3; }
    50% { transform: rotate(45deg) translate(8px, 8px); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Fade-in Animations
   -------------------------------------------------------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------------------------
   Clients / Carousel Section
   -------------------------------------------------------------------------- */
.clients {
    padding: var(--space-xl) 0;
    position: relative;
    overflow: hidden;
}

.clients-label {
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-subtle);
    margin-bottom: var(--space-md);
}

.carousel {
    /* Make carousel full-bleed across the viewport */
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    position: relative;
    padding: var(--space-sm) 0;
}

.carousel-viewport {
    overflow: hidden;
    width: 100vw;
}

.carousel-track {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    animation: carouselScroll 25s linear infinite;
    animation-play-state: running;
    will-change: transform;
    width: max-content;
}

.carousel-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-sm);
    /* Ensure items spread to fill the viewport evenly. Adjust divisor to
       change how many logos are visible at once on wide screens. */
    min-width: calc(100vw / 6);
}

.carousel-item img {
    width: 120px;
    height: auto;
    object-fit: contain;
    opacity: 0.45;
    filter: grayscale(1) brightness(1.2);
    transition: opacity var(--transition-base);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
}

.carousel-item img[alt="TP Logo"] {
    filter: none;
    opacity: 0.4;
}

/* Quantfi: make logo visible on dark background — convert to light/monochrome */
.carousel-item img.quantfi {
    /* Convert all visible pixels to white while preserving transparency */
    filter: grayscale(1) brightness(0) invert(1) !important;
    opacity: 0.45;
}

.carousel-logo {
    width: 120px;
    height: auto;
    object-fit: contain;
    opacity: 0.4;
    filter: grayscale(1) brightness(1.2);
}

.carousel:hover .carousel-track {
    animation-play-state: paused;
}

.carousel:hover .carousel-item img {
    opacity: 0.7;
    filter: grayscale(0.5) brightness(1.1);
}

.carousel:hover .carousel-logo {
    opacity: 0.7;
    filter: grayscale(0.5) brightness(1.1);
}

/* Light mode carousel - simple opacity control */
body.light-mode .carousel-item img,
body.light-mode .carousel-logo {
    opacity: 0.6 !important;
}

body.light-mode .carousel:hover .carousel-item img,
body.light-mode .carousel:hover .carousel-logo {
    opacity: 0.85 !important;
}

@keyframes carouselScroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* Carousel fade edges */
.clients::before,
.clients::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.clients::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg-dark), transparent);
}

.clients::after {
    right: 0;
    background: linear-gradient(270deg, var(--bg-dark), transparent);
}

/* ==========================================================================
   Services Section - Redesigned Premium Cards
   Modern glass morphism with smooth interactions
   ========================================================================== */

/* Main container */
.services-new {
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}

/* Background subtle grid pattern */
.services-new::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.008) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.008) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.services-header {
  margin-bottom: var(--space-2xl);
}

.services-intro {
  max-width: 600px;
  margin: var(--space-md) auto 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: center;
}

/* Grid layout - 3 columns with gap */
.services-grid-new {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

/* Individual service cards */
.service-item {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
}

/* Top accent line - animated on hover */
.service-accent-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.5) 100%);
  background-size: 200% 100%;
  opacity: 0.4;
  transition: all 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Service content wrapper */
.service-content {
  position: relative;
  z-index: 2;
}

/* Header row with icon and number */
.service-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

/* Icon container */
.service-icon-wrap {
  width: 52px;
  height: 52px;
  background: linear-gradient(145deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.service-icon-wrap .icon {
  width: 20px;
  height: 20px;
  stroke: rgba(255,255,255,0.9);
  transition: all 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Service number */
.service-number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.1em;
  transition: all 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Service title */
.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-light);
  transition: all 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Service description */
.service-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  transition: all 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Tags container */
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Individual tag */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Hover glow effect */
.service-hover-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

/* HOVER STATES */
.service-item:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255,255,255,0.3);
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.15),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

.service-item:hover .service-accent-line {
  opacity: 1;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.8) 100%);
  animation: accentShimmer 2s ease-in-out infinite;
}

.service-item:hover .service-icon-wrap {
  background: linear-gradient(145deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
  border-color: rgba(255,255,255,0.5);
  transform: scale(1.1);
}

.service-item:hover .service-icon-wrap .icon {
  stroke: rgba(255,255,255,1);
  transform: scale(1.1);
}

.service-item:hover .service-number {
  color: rgba(255,255,255,0.9);
}

.service-item:hover .service-title {
  color: rgba(255,255,255,1);
}

.service-item:hover .service-desc {
  color: rgba(255,255,255,0.85);
}

.service-item:hover .tag {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
}

.service-item:hover .service-hover-glow {
  opacity: 1;
}

/* Accent line animation */
@keyframes accentShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* CTA Section */
.services-cta {
  display: flex;
  justify-content: center;
  margin-top: var(--space-2xl);
  position: relative;
  z-index: 1;
}

.services-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: rgba(6,6,6,0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-md);
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.services-btn .btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.services-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(255,255,255,0.15);
  color: rgba(255,255,255,1);
}

.services-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* LIGHT MODE OVERRIDES */
body.light-mode .services-new::before {
  background-image: 
    linear-gradient(rgba(0,0,0,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.015) 1px, transparent 1px);
}

body.light-mode .service-item {
  background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(250,250,250,0.9) 100%);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 
    0 4px 6px -1px rgba(0,0,0,0.05),
    0 12px 24px -4px rgba(0,0,0,0.08);
}

body.light-mode .service-accent-line {
  background: linear-gradient(90deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.2) 100%);
  opacity: 0.5;
}

body.light-mode .service-icon-wrap {
  background: linear-gradient(145deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.03) 100%);
  border-color: rgba(0,0,0,0.15);
}

body.light-mode .service-icon-wrap .icon {
  stroke: rgba(0,0,0,0.7);
}

body.light-mode .service-number {
  color: rgba(0,0,0,0.4);
}

body.light-mode .service-title {
  color: rgba(0,0,0,0.9);
}

body.light-mode .service-desc {
  color: rgba(0,0,0,0.6);
}

body.light-mode .tag {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.6);
}

body.light-mode .service-hover-glow {
  background: radial-gradient(circle at 50% 0%, rgba(0,0,0,0.06) 0%, transparent 50%);
}

/* Light mode hover */
body.light-mode .service-item:hover {
  border-color: rgba(0,0,0,0.2);
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.1),
    0 0 0 1px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

body.light-mode .service-item:hover .service-accent-line {
  background: linear-gradient(90deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.4) 100%);
}

body.light-mode .service-item:hover .service-icon-wrap {
  background: linear-gradient(145deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.05) 100%);
  border-color: rgba(0,0,0,0.25);
}

body.light-mode .service-item:hover .service-icon-wrap .icon {
  stroke: rgba(0,0,0,0.9);
}

body.light-mode .service-item:hover .service-number {
  color: rgba(0,0,0,0.6);
}

body.light-mode .service-item:hover .service-title {
  color: rgba(0,0,0,1);
}

body.light-mode .service-item:hover .service-desc {
  color: rgba(0,0,0,0.7);
}

body.light-mode .service-item:hover .tag {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.15);
  color: rgba(0,0,0,0.8);
}

body.light-mode .services-btn {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.2);
  color: rgba(0,0,0,0.8);
}

body.light-mode .services-btn:hover {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.4);
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  color: rgba(0,0,0,1);
}

/* GSAP Animation ready - cards animate in on scroll */
.service-item {
  will-change: opacity, transform;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .services-grid-new {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  .service-item {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .services-new {
    padding: var(--space-2xl) 0;
  }
  
  .services-grid-new {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .service-item {
    padding: 1.5rem;
  }
  
  .service-header-row {
    margin-bottom: 1rem;
  }
  
  .service-icon-wrap {
    width: 48px;
    height: 48px;
  }
  
  .service-icon {
    width: 22px;
    height: 22px;
  }
  
  .service-title {
    font-size: 1.1rem;
  }
  
  .service-desc {
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }
  
  .tag {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }
  
  .services-intro {
    font-size: 0.95rem;
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .service-item {
    padding: 1.25rem;
  }
  
  .services-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .service-item,
  .service-item:hover,
  .service-accent-line,
  .service-icon-wrap,
  .service-icon,
  .service-number,
  .service-title,
  .service-desc,
  .tag,
  .service-hover-glow,
  .services-btn,
  .btn-arrow {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  
  .service-item {
    opacity: 1;
    transform: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .service-item {
    border-color: var(--text-light);
  }
  
  .service-item:hover {
    border-color: var(--primary);
  }
  
  .tag {
    border-color: var(--text-light);
  }
}

/* ==========================================================================
   Process Section - Horizontal Timeline with Alternating Cards
   ========================================================================== */
.process-new {
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.process-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.process-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: var(--space-md) auto 0;
}

/* Main Track Wrapper - Contains entire timeline */
.process-track-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl) var(--container-padding);
    position: relative;
}

/* Start & Finish Points */
.process-start-point,
.process-finish-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.process-start-point .start-label,
.process-finish-point .finish-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    white-space: nowrap;
    position: absolute;
    bottom: 100%;
    margin-bottom: var(--space-xs);
}

.start-dot,
.finish-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 20px rgba(247, 230, 0, 0.5);
    position: relative;
}

.start-dot::before,
.finish-dot::before {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px solid rgba(247, 230, 0, 0.3);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
}

.finish-dot {
    background: linear-gradient(135deg, var(--primary), #f5d800);
}

/* Timeline Track */
.process-track {
    flex: 1;
    max-width: 1000px;
    position: relative;
    height: 100%;
    min-height: 400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 0;
}

/* Horizontal Yellow Line */
.process-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 3px;
    background: rgba(247, 230, 0, 0.12);
    border-radius: 2px;
    z-index: 1;
}

/* Progress line that fills as user scrolls */
.track-progress-horizontal {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 3px;
    background: rgba(247, 230, 0, 0.85);
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(247, 230, 0, 0.4);
    z-index: 2;
    width: 0%;
}

/* Cards Container */
.process-track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    padding: 60px 0;
}

/* Process Step Cards */
.process-step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 220px;
    min-height: 280px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    z-index: 2;
    justify-content: center;
}

.process-step-card.visible {
    opacity: 1;
}

/* Step Above - Content above the timeline */
.process-step-card.step-above {
    justify-content: flex-start;
    transform: translateY(-110px);
    padding-bottom: 40px;
}

.process-step-card.step-above .step-content {
    order: 1;
    margin-bottom: 20px;
}

.process-step-card.step-above .step-dot {
    order: 2;
    position: absolute;
    top: calc(50% + 110px);
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Step Below - Content below the timeline */
.process-step-card.step-below {
    justify-content: flex-end;
    transform: translateY(110px);
    padding-top: 40px;
}

.process-step-card.step-below .step-content {
    order: 2;
    margin-top: 20px;
}

.process-step-card.step-below .step-dot {
    order: 1;
    position: absolute;
    top: calc(50% - 110px);
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Step Dot - Centered on the timeline */
.step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 3px solid var(--primary);
    box-shadow: 0 0 15px rgba(247, 230, 0, 0.4);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
    z-index: 3;
    flex-shrink: 0;
}

.step-dot::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: var(--primary);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.4s ease;
}

.process-step-card.active .step-dot::after {
    transform: scale(1);
}

.process-step-card.active .step-dot {
    box-shadow: 0 0 25px rgba(247, 230, 0, 0.7);
}

/* Step Content */
.step-content {
    padding: var(--space-md);
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    transition: all 0.4s ease;
    text-align: center;
    backdrop-filter: blur(10px);
}

.step-content:hover {
    border-color: rgba(247, 230, 0, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

.step-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(247,230,0,0.1) 0%, rgba(247,230,0,0.05) 100%);
    border: 1px solid rgba(247,230,0,0.2);
    border-radius: var(--radius-md);
    margin: 0 auto var(--space-sm);
    color: var(--primary);
}

.step-number {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.step-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--text-light);
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Light Mode Overrides */
body.light-mode .process-track::before {
    background: rgba(99, 102, 241, 0.25);
    box-shadow: none;
}

body.light-mode .track-progress-horizontal {
    background: rgba(99, 102, 241, 0.85);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

body.light-mode .start-dot,
body.light-mode .finish-dot {
    background: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

body.light-mode .start-dot::before,
body.light-mode .finish-dot::before {
    border-color: rgba(99, 102, 241, 0.3);
}

body.light-mode .process-start-point .start-label,
body.light-mode .process-finish-point .finish-label {
    color: var(--primary);
}

body.light-mode .step-dot {
    border-color: var(--primary);
    background: var(--bg-dark);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

body.light-mode .process-step-card.active .step-dot {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

body.light-mode .step-content {
    background: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(250,250,250,0.85) 100%);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .step-icon {
    background: linear-gradient(145deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.03) 100%);
    border-color: rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, 0.7);
}

body.light-mode .step-content h3 {
    color: rgba(0, 0, 0, 0.9);
}

body.light-mode .step-content p {
    color: rgba(0, 0, 0, 0.6);
}

/* Responsive - Mobile */
@media (max-width: 1024px) {
    .process-track-wrapper {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .process-start-point,
    .process-finish-point {
        flex-direction: row;
        gap: var(--space-sm);
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        padding-left: 0;
    }
    
    .process-start-point .start-dot,
    .process-finish-point .finish-dot {
        flex-shrink: 0;
        margin-left: 20px;
        margin-right: 0;
    }
    
    .process-start-point .start-label,
    .process-finish-point .finish-label {
        position: static;
        margin-bottom: 0;
        font-size: 0.85rem;
        color: var(--primary);
    }

    .process-track {
        width: 100%;
        min-height: auto;
    }

    /* Hide horizontal progress line on mobile */
    .track-progress-horizontal {
        display: none;
    }

    /* Vertical timeline line for mobile - positioned on left */
    .process-track::before {
        width: 4px;
        height: 100%;
        left: 30px;
        top: 0;
        right: auto;
        transform: none;
    }

    .process-track {
        flex-direction: column;
        gap: 2rem;
        padding: var(--space-lg) 0;
        align-items: flex-start;
    }

    .process-step-card {
        flex-direction: row;
        align-items: center;
        max-width: 100%;
        width: 100%;
        padding: 0;
        margin-bottom: 2rem;
        transform: translateX(-20px);
        opacity: 0;
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .process-step-card.visible {
        transform: translateX(0);
        opacity: 1;
    }

    /* Reset above/below for mobile - all cards same layout */
    .process-step-card.step-above,
    .process-step-card.step-below {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0;
        margin-bottom: 2rem;
        transform: translateX(-20px);
        min-height: auto;
        opacity: 0;
    }

    .process-step-card.step-above.visible,
    .process-step-card.step-below.visible {
        transform: translateX(0);
        opacity: 1;
    }

    /* Dot positioned on the timeline */
    .process-step-card .step-dot,
    .process-step-card.step-above .step-dot,
    .process-step-card.step-below .step-dot {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        order: 0;
        flex-shrink: 0;
        margin-left: 20px;
    }

    /* Content always on the right side */
    .process-step-card .step-content,
    .process-step-card.step-above .step-content,
    .process-step-card.step-below .step-content {
        margin: 0 0 0 var(--space-md);
        text-align: left;
        flex: 1;
        max-width: none;
        order: 1;
    }

    /* Remove any alternating row-reverse */
    .process-step-card:nth-child(even),
    .process-step-card:nth-child(odd) {
        flex-direction: row;
    }

    .process-step-card:nth-child(even) .step-content,
    .process-step-card:nth-child(odd) .step-content {
        text-align: left;
        margin: 0 0 0 var(--space-md);
    }

    .process-step-card:nth-child(even) .step-dot,
    .process-step-card:nth-child(odd) .step-dot {
        margin-left: 18px;
        position: relative;
        transform: none;
    }

    .step-content {
        padding: var(--space-sm) var(--space-md);
    }
}

@media (max-width: 480px) {
    .process-track-wrapper {
        padding: var(--space-lg) var(--space-sm);
    }

    .step-content {
        padding: var(--space-sm);
    }

    .step-content h3 {
        font-size: 1rem;
    }

    .step-content p {
        font-size: 0.8rem;
    }

    .step-icon {
        width: 40px;
        height: 40px;
    }
}

/* --------------------------------------------------------------------------
   Work / Portfolio Section
   -------------------------------------------------------------------------- */
.work {
    padding: var(--space-xl) 0;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.work-card {
    /* Match service-card: opaque surface with heavy backdrop blur to mask lines beneath */
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: rgba(6,6,6,0.52);
    background: rgba(6,6,6,0.52);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-base);
}

.work-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    background-color: rgba(6,6,6,0.62);
    background: rgba(6,6,6,0.62);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.work-image {
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.work-image img {
    max-width: 60%;
    max-height: 80%;
    object-fit: contain;
}

/* Solid background variants to replace previous gradients */
/* work-image--accent removed — unused (consolidated) */
.work-image--dark {
    background: linear-gradient(180deg, var(--bg-darker) 0%, rgba(10,10,10,0.985) 100%);
}

.work-info {
    padding: calc(var(--space-sm)) var(--space-lg);
    background: linear-gradient(180deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.02) 100%);
    border-top: 1px solid rgba(255,255,255,0.03);
}

.work-info h3 {
    font-size: 1.15rem;
    margin-bottom: var(--space-xs);
    font-family: var(--font-primary);
    font-weight: 700;
}

.work-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.work-cta {
    text-align: center;
    margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about {
    padding: var(--space-3xl) 0;
    background: rgba(0, 0, 0, 0.3);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
    grid-auto-flow: row; /* ensure placement fills rows left->right */
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: var(--space-xs);
}

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-shape {
    width: 300px;
    height: 300px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(60px);
    animation: pulse 4s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.15; }
    100% { transform: scale(1.2); opacity: 0.25; }
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
.contact {
    padding: var(--space-3xl) 0;
}

.contact-inner {
    max-width: 700px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.contact-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

/* Ensure individual form groups start at the top of their grid cell so labels/inputs align */
.form-group { align-self: start; }

.form-group--full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

/* Make controls fill their grid cell so they line up consistently */
.form-group input, .form-group textarea { width: 100%; box-sizing: border-box; }

/* Explicit placement for the small info fields to guarantee alignment */
.form-group--name { grid-column: 1; }
.form-group--email { grid-column: 2; }
.form-group--phone { grid-column: 1; }
.form-group--company { grid-column: 2; }

/* Ensure full-width stacking on small screens */
@media (max-width: 768px) {
    .form-group--name,
    .form-group--email,
    .form-group--phone,
    .form-group--company {
        grid-column: 1 / -1 !important;
    }
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-subtle);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
    /* Prevent users from resizing the contact textarea */
    resize: none;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    margin-top: var(--space-sm);
}

/* Ensure grid items align to the top so paired info fields remain inline */
.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    align-items: start;
}

.contact-alt {
    text-align: center;
    margin-top: var(--space-xl);
    color: var(--text-muted);
}

.contact-alt a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.contact-alt a:hover {
    text-decoration: underline;
}

/* Contact feedback styling: make top-level feedback more visible */
/* Default feedback: neutral, hidden when empty */
.contact-feedback {
    background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-left: 4px solid transparent;
    color: var(--text-light);
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
}

/* Hide the feedback container when it has no content to avoid an empty visible bar */
.contact-feedback:empty { display: none; }

/* Error variant (validation) */
.contact-feedback.error {
    background: linear-gradient(90deg, rgba(255,80,80,0.06), rgba(255,80,80,0.03));
    border-left: 4px solid rgba(255,80,80,0.9);
    color: #ffdede;
}

/* Success variant */
.contact-feedback.success {
    background: linear-gradient(90deg, rgba(60,190,115,0.06), rgba(60,190,115,0.03));
    border-left: 4px solid rgba(60,190,115,0.95);
    color: #e6fff0;
}

/* Inline field-level error placed under the form control */
.field-error {
    color: #ffdddd;
    font-size: 0.875rem;
    margin-top: 0.45rem;
    background: rgba(255,80,80,0.04);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border-left: 3px solid rgba(255,80,80,0.9);
}

/* Add a subtle info/error glyph and ensure the message sits below the control */
.field-error {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.field-error::before {
    content: 'ℹ';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    color: rgba(255,80,80,0.95);
    font-weight: 700;
    font-size: 0.9rem;
}

/* Stronger visual for invalid inputs */
.form-group input.error, .form-group textarea.error {
    border-color: rgba(255,80,80,0.9) !important;
    box-shadow: 0 8px 20px rgba(255,80,80,0.04) inset;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--bg-darker);
    padding: var(--space-2xl) 0 var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
}

.footer-brand .logo {
    margin-bottom: var(--space-xs);
    display: block;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-nav h4,
.footer-contact h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-light);
}

.footer-nav a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: var(--space-xs) 0;
    transition: color var(--transition-fast);
}

.footer-nav a:hover {
    color: var(--primary);
}

.footer-contact a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-contact a:hover {
    color: var(--primary);
}

.socials {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.socials a:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-bottom small {
    color: var(--text-subtle);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: var(--space-md);
}

.footer-legal a {
    color: var(--text-subtle);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--primary);
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */

/* Tablet & Below */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xl);
    }
    
    
    .hero-attrs {
        align-items: center;
    }
    
    .attr-group {
        align-items: center;
    }
    
    .attr-sub {
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-content .section-tag,
    .about-content .section-title {
        text-align: center;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .about-visual {
        order: -1;
    }
    
    .about-shape {
        width: 200px;
        height: 200px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: var(--space-md);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        min-height: 70vh;
        padding: var(--space-2xl) 0;
    }
    
    /* Reduce header padding and logo size on small screens to avoid overlap */
    .nav-inner {
        /* keep some horizontal padding so logo/hamburger aren't flush */
        padding: 0.5rem var(--container-padding);
        gap: var(--space-sm);
        align-items: center;
    }

    .brand .logo {
        font-size: clamp(1rem, 8vw, 1.4rem);
        -webkit-text-stroke: 1px var(--text-light);
        margin-left: 0.25rem;
    }

    .hero-title h1 {
        font-size: clamp(3rem, 15vw, 5rem);
    }
    
    .attr-pill {
        justify-content: center;
    }
    
    .pill-sep {
        display: none;
    }
    
    .hero-scroll {
        display: block;
        bottom: calc(var(--space-md) + 0.6rem);
        z-index: 3;
    }
    
    .services-grid,
    .process-timeline,
    .work-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-nav,
    .footer-contact {
        text-align: center;
    }
    
    .socials {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .about-stats {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card,
    .work-card {
        border-color: var(--text-light);
    }
    
    .pill-box {
        border: 1px solid var(--bg-dark);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .carousel-track {
        animation: none;
    }
}

/* Print styles */
@media print {
    .site-header,
    .hero-scroll,
    .carousel,
    .contact-form,
    .socials {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .text-gradient {
        -webkit-text-fill-color: black;
    }
}

/* Force dark background when not using light mode; preserve hero artwork */
body:not(.light-mode) {
    background: #000 !important;
}

/* Send animation: paper plane + trailing swoosh used during form submit */

/* Send animation removed per request */

/* Heart explosion (fireworks) used on send click */
.heart-explosion {
    position: fixed;
    pointer-events: none;
    inset: 0;
    z-index: 120000;
    overflow: visible;
}
.heart-explosion .heart {
    position: absolute;
    width: 28px;
    height: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    will-change: transform, opacity;
    transform-origin: center center;
    opacity: 1;
}

@keyframes heart-shoot {
    0% { transform: translate(0,0) scale(1) rotate(0deg); opacity: 1; }
    60% { opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0.6) rotate(var(--rot)); opacity: 0; }
}

/* helper small fade for burst center */
.heart-explosion .burst-center {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(247,230,0,0.95), rgba(190,12,215,0.4));
    opacity: 0.9;
}

.hero {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
}

/* Legal pages: improved typography and layout for privacy/terms */
.legal {
    max-width: 900px;
    margin: 2.25rem auto;
    background: transparent;
    padding: 2rem;
    border-radius: 0;
    box-shadow: none;
    color: var(--text-light);
}
.legal .legal-header {
    margin-bottom: 0.75rem;
}
.legal h1 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); margin: 0 0 0.25rem 0; }
.legal .meta { color: var(--text-subtle); margin: 0 0 1rem 0; }
.legal .legal-toc { margin: 0 0 1.25rem 0; padding: 0.75rem; background: transparent; border-radius: 0; }
.legal .legal-toc strong { display:block; margin-bottom:0.5rem; }
.legal .legal-toc ul { margin:0; padding-left:1.1rem; }
.legal .legal-toc a { color: var(--text-light); text-decoration: none; text-underline-offset: 3px; }
.legal h2 { margin-top: 1.25rem; font-size: 1.125rem; }
.legal p, .legal li { line-height: 1.6; color: var(--text-light); }
.legal ul { margin-left: 1.15rem; }
.legal .legal-footer { margin-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.04); padding-top: 1rem; }

@media (max-width: 700px) {
    .legal { padding: 1rem; margin: 1rem; }
    .legal .legal-toc ul { padding-left: 0.9rem; }
}

/* Legal page link styling: improve contrast, visited state and focus outlines */
.legal a {
    /* Use theme text color for legal links by default (no loud highlight)
       Keep weight for readability but avoid permanent visited colour changes */
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
}
.legal a:visited {
    color: var(--text-light);
}
.legal a:hover,
.legal a:active {
    /* No hover decoration or colour shift for legal pages (keep them plain)
       Still maintain focus styles for keyboard users */
    color: var(--text-light);
    text-decoration: none;
}

/* Highlight email addresses on legal pages for easy contact discovery */
.legal a[href^="mailto:"] {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}
.legal a[href^="mailto:"]:hover {
    /* No underline on hover — highlight colour is sufficient */
    text-decoration: none;
}
.legal a[href^="mailto:"]:focus-visible {
    /* Subtle outline for keyboard users only */
    outline: 3px solid rgba(247,230,0,0.12);
    outline-offset: 3px;
    text-decoration: none;
}
.legal a:focus {
    /* Keep an accessible focus indicator but make it subtle */
    outline: 3px solid rgba(247,230,0,0.08);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Aurora-style animated background (lightweight CSS-only approximation) */
.bg-aurora {
    position: fixed; /* span the whole viewport */
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    /* Use inset: 0 instead of explicit width to avoid covering the scrollbar */
    /* width: 100vw; -- removed: causes scrollbar issues on Windows */
    height: 100vh;
    height: 100dvh;
    /* Subtle base prevents pure black which causes banding on OLED displays */
    background: radial-gradient(ellipse 120% 80% at 50% 20%, rgba(15,12,20,1) 0%, rgba(5,5,8,1) 60%, rgba(0,0,0,1) 100%);
}

/* Noise overlay to reduce color banding on OLED/high-contrast displays */
.bg-aurora::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* Ensure site chrome (header/footer) sits above the aurora effect */
.site-header {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(0,0,0,0.95);
}
.site-footer {
    position: relative;
    z-index: 5;
    background-color: var(--bg-darker);

/* ===== Marquee carousel (client logos) - centralized in styles.css ===== */
:root {
    --marquee-item-width: 3.0rem; /* fixed item width for uniformity */
    --marquee-gap: 0.02rem;      /* very tight spacing */
    --marquee-duration: 360s;    /* very slow scroll */
    --marquee-start: 0;
    --marquee-end: calc(-100% - var(--marquee-gap));
}

.marquee {
    display: none;
}

.marquee__group {
    display: flex;
    align-items: center;
    gap: 0; /* disabled gap to use explicit margin for equal spacing */
    min-width: max-content; /* size to actual content */
    /* Force animations off so nothing moves unexpectedly during debugging/fixes */
    animation: none !important;
}

.marquee__group > svg { /* force equal-sized items */
    flex: 0 0 var(--marquee-item-width);
    width: var(--marquee-item-width) !important;
    height: var(--marquee-item-width) !important;
    margin-right: var(--marquee-gap);
    display: inline-block;
    vertical-align: middle;
    padding: 0 !important;
    background: transparent !important;
}
.marquee__group > svg:last-child { margin-right: 0; }

@keyframes marquee-scroll {
    from { transform: translateX(var(--marquee-start)); }
    to { transform: translateX(var(--marquee-end)); }
}

@media (prefers-reduced-motion: reduce) {
    .marquee__group { animation-play-state: paused !important; }
}

/* Responsive: tighten item width on small screens */
@media (max-width: 640px) {
    :root { --marquee-item-width: 2.0rem; }
}

/* Defensive high-specificity overrides to beat other local rules */
/* Remove aggressive re-enabling of animation */
body .marquee, body .marquee__group, body .marquee__group > svg {
    animation: none !important;
}

/* End marquee block */
}
.bg-aurora .aurora-blob {
    position: absolute;
    width: 70vmax;
    height: 70vmax;
    border-radius: 50%;
    filter: blur(100px);
    transform: translate3d(-10%, -10%, 0) scale(1);
    mix-blend-mode: screen;
    opacity: 0.85;
    /* Force GPU compositing for smoother gradients */
    will-change: transform;
    backface-visibility: hidden;
}
.bg-aurora .aurora-1 {
    left: -10%; top: -20%;
    /* Multi-stop gradient to reduce OLED banding */
    background: radial-gradient(closest-side at 30% 30%, 
        rgba(190,12,215,0.9) 0%, 
        rgba(190,12,215,0.6) 15%, 
        rgba(190,12,215,0.3) 25%, 
        rgba(190,12,215,0.12) 35%, 
        rgba(190,12,215,0.04) 45%, 
        transparent 55%);
    animation: aurora-move-1 12s ease-in-out infinite alternate;
}
.bg-aurora .aurora-2 {
    right: -5%; top: 10%;
    /* Multi-stop gradient to reduce OLED banding */
    background: radial-gradient(closest-side at 70% 40%, 
        rgba(247,230,0,0.9) 0%, 
        rgba(247,230,0,0.55) 15%, 
        rgba(247,230,0,0.25) 25%, 
        rgba(247,230,0,0.08) 35%, 
        rgba(247,230,0,0.02) 45%, 
        transparent 55%);
    animation: aurora-move-2 18s ease-in-out infinite alternate;
}
.bg-aurora .aurora-3 {
    left: 10%; bottom: -10%;
    /* Multi-stop gradient to reduce OLED banding */
    background: radial-gradient(closest-side at 40% 70%, 
        rgba(0,180,255,0.8) 0%, 
        rgba(0,180,255,0.5) 15%, 
        rgba(0,180,255,0.22) 25%, 
        rgba(0,180,255,0.08) 35%, 
        rgba(0,180,255,0.02) 50%, 
        transparent 60%);
    animation: aurora-move-3 22s ease-in-out infinite alternate;
}

@keyframes aurora-move-1 {
    0% { transform: translate3d(-8%, -18%, 0) scale(1); }
    100% { transform: translate3d(6%, 2%, 0) scale(1.05); }
}
@keyframes aurora-move-2 {
    0% { transform: translate3d(6%, -6%, 0) scale(1); }
    100% { transform: translate3d(-12%, 8%, 0) scale(1.1); }
}
@keyframes aurora-move-3 {
    0% { transform: translate3d(8%, 6%, 0) scale(1); }
    100% { transform: translate3d(-6%, -18%, 0) scale(1.08); }
}

/* test page helpers: ensure content sits above the aurora layer */
.test-content { position: relative; z-index: 2; }

/* reduced motion: slow or stop animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bg-aurora .aurora-blob { animation: none; }
}

/* Mobile aurora adjustments - make blobs smaller and more visible */
@media (max-width: 768px) {
    .bg-aurora {
        position: fixed;
        z-index: 0;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .bg-aurora .aurora-blob {
        width: 100vw;
        height: 100vw;
        filter: blur(60px);
        opacity: 0.9;
    }
    
    .bg-aurora .aurora-1 {
        left: -30%;
        top: -20%;
        background: radial-gradient(closest-side at 30% 30%, 
            rgba(190,12,215,0.75) 0%, 
            rgba(190,12,215,0.45) 20%, 
            rgba(190,12,215,0.15) 40%, 
            rgba(190,12,215,0.04) 55%, 
            transparent 70%);
    }
    
    .bg-aurora .aurora-2 {
        right: -30%;
        top: 20%;
        background: radial-gradient(closest-side at 70% 40%, 
            rgba(247,230,0,0.75) 0%, 
            rgba(247,230,0,0.4) 20%, 
            rgba(247,230,0,0.12) 40%, 
            rgba(247,230,0,0.03) 55%, 
            transparent 70%);
    }
    
    .bg-aurora .aurora-3 {
        left: -20%;
        bottom: 0%;
        background: radial-gradient(closest-side at 40% 70%, 
            rgba(0,180,255,0.65) 0%, 
            rgba(0,180,255,0.35) 20%, 
            rgba(0,180,255,0.1) 40%, 
            rgba(0,180,255,0.03) 55%, 
            transparent 70%);
    }
}

/* ==========================================================================
   Mobile Responsiveness Enhancements
   ========================================================================== */

/* Ensure main content sits above aurora background */
main, .hero, .clients, .services, .process, .work, .about, .contact {
    position: relative;
    z-index: 1;
    background: transparent;
}

/* Improve text readability on mobile */
@media (max-width: 768px) {
    .text-backdrop {
        display: inline;
        background: transparent;
        box-decoration-break: clone;
        -webkit-box-decoration-break: clone;
    }
    
    /* Better spacing for sections on mobile */
    .services, .process, .work, .about, .contact {
        padding: var(--space-xl) 0;
    }
    
    /* Improve section headers on mobile */
    .section-header {
        margin-bottom: var(--space-lg);
        padding: 0 var(--space-xs);
    }
    
    /* Carousel adjustments for mobile */
    .carousel-item {
        min-width: calc(100vw / 3);
        padding: 0 var(--space-xs);
    }
    
    .carousel-item img,
    .carousel-logo {
        width: 80px;
    }
    
    /* Work card image sizing on mobile */
    .work-image {
        padding: var(--space-md);
    }
    
    .work-image img {
        max-width: 70%;
    }
}

/* Very small screens (< 380px) */
@media (max-width: 380px) {
    :root {
        --container-padding: 0.75rem;
    }
    
    .brand .logo {
        font-size: 1rem !important;
    }
    
    .nav-toggle {
        width: 44px;
        height: 44px;
        padding: 8px;
    }
    
    .pill-box {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .attr-sub {
        font-size: 0.9rem;
    }
    
    .btn-hero {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: clamp(1.3rem, 5.5vw, 1.8rem);
    }
    
    .service-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .step-number {
        font-size: 2.5rem;
    }
    
    .stat {
        flex: 1 1 100%;
        min-width: unset;
    }
    
    .about-cards {
        flex-direction: column;
    }
    
    .about-card {
        width: 100% !important;
    }
}

/* Fix for iOS Safari notch/safe areas */
@supports (padding: max(0px)) {
    .site-header .topbar {
        padding-left: max(var(--container-padding), env(safe-area-inset-left));
        padding-right: max(var(--container-padding), env(safe-area-inset-right));
    }
    
    .site-footer {
        padding-bottom: max(var(--space-lg), env(safe-area-inset-bottom));
    }
}

/* Landscape mobile orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--space-md) 0;
    }
    
    .nav-links {
        padding: var(--space-sm);
        gap: var(--space-xs);
    }
    
    .nav-links a {
        font-size: 1rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .mobile-fallback-title .mobile-line1,
    .mobile-fallback-title .mobile-line2 {
        font-size: clamp(2rem, 8vh, 3rem);
    }
}

/* Ensure touch targets are at least 44x44px */
@media (pointer: coarse) {
    .nav-links a,
    .btn,
    .footer-nav a,
    .footer-legal a,
    .socials a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

.clients-scramble {
    /* inherit sizing and font from surrounding `.clients-label` so appearance stays identical */
    font: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    display: inline-block;
}
.clients-scramble span[aria-hidden] { opacity: 0.9; }

/* ==========================================================================
   NUCLEAR MOBILE SCROLLBAR FIX
   Force hide all scrollbars on sections that should not have them
   ========================================================================== */
@media (max-width: 900px) {
  /* Remove ALL scrollbars from these sections and their children */
  .services,
  .services *,
  .process,
  .process *,
  .about,
  .about *,
  .about-grid,
  .about-content,
  .about-visual,
  .about-cards,
  .about-card,
  .about-stats,
  .stat,
  .services-grid,
  .service-card,
  .process-timeline,
  .process-step {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  
  .services::-webkit-scrollbar,
  .services *::-webkit-scrollbar,
  .process::-webkit-scrollbar,
  .process *::-webkit-scrollbar,
  .about::-webkit-scrollbar,
  .about *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
}

/* Prevent accidental horizontal overflow on small screens
     - Use border-box sizing for predictable width calculations
     - Hide any accidental horizontal overflow while keeping vertical scrolling
     - This is conservative and safe; we can refine for specific components later
*/
html, body {
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Ensure all elements inherit the border-box sizing */
*, *::before, *::after { box-sizing: inherit; }



/* ==========================================================================
     Page-specific alignment overrides for `work/novaandroot.html`
     These are scoped to `main.container` and use !important to ensure the
     theme/global rules don't shift the visual alignment of the hero, stats
     and review divider on desktop.
     ========================================================================== */
main.container > section.showcase-hero,
main.container > .hero-divider,
main.container > .hero-divider > .stats-row,
main.container .hero-divider > .stats-row,
main.container > .stats-row {
    max-width: var(--max-width) !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding-inline: var(--container-padding) !important;
    box-sizing: border-box !important;
}

main.container > .hero-divider blockquote {
    max-width: none !important;
    width: 100% !important;
    padding: 1rem var(--container-padding) !important;
    margin: 0 auto !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

main.container > .hero-divider > .stats-row .stat,
main.container .hero-divider > .stats-row .stat,
main.container > .stats-row .stat {
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}




/* --------------------------------------------------------------------------
   Overrides: Transparent header + pill-shaped navbar
   Keeps original rules untouched; uses high-specificity overrides so
   these changes apply site-wide including light/dark modes.
   -------------------------------------------------------------------------- */
.site-header { background: transparent !important; border-bottom: none !important; }
.site-header .topbar { background: transparent !important; border-bottom: none !important; }

/* Desktop-only nav pill styling - wrapped in min-width query to not interfere with mobile menu */
@media (min-width: 769px) {
  /* Make the nav-links container read as a rounded pill on wide viewports */
  .nav-inner .nav-links {
      background: rgba(255,255,255,0.03);
      padding: 0.28rem 0.6rem;
      border-radius: 999px;
      gap: 0.6rem;
      align-items: center;
      box-shadow: var(--shadow-sm);
      backdrop-filter: blur(6px);
  }

  /* Ensure the nav links are visually separated inside the pill */
  .nav-inner .nav-links a { padding: 0.18rem 0.45rem; border-radius: 6px; }
}

/* Make primary CTA inside nav appear as a filled pill - Clean shimmer */
.nav-links .nav-contact {
    background: var(--primary) !important;
    color: var(--bg-dark) !important;
    border-radius: 999px !important;
    padding: 0.28rem 1.1rem !important;
    box-shadow: 0 2px 8px rgba(247, 230, 0, 0.2) !important;
    border: none !important;
    position: relative !important;
    overflow: hidden !important;
    transform: translateZ(0) !important;
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.2, 1) !important;
}

/* Shimmer effect for pill CTA */
.nav-links .nav-contact::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 100%
    ) !important;
    transition: left 0.5s cubic-bezier(0.2, 0.9, 0.2, 1) !important;
    z-index: 1 !important;
}

/* Subtle inner glow - contained within button */
.nav-links .nav-contact::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: inherit !important;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    z-index: 0 !important;
}

.nav-links .nav-contact:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(247, 230, 0, 0.2) !important;
    background: #ffed33 !important;
}

.nav-links .nav-contact:hover::before {
    left: 100% !important;
}

.nav-links .nav-contact:hover::after {
    opacity: 1 !important;
}

.nav-links .nav-contact:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(247, 230, 0, 0.15) !important;
    transition: all 0.1s ease !important;
}

/* Desktop-only: Align CTA ends with the nav-links pill */
@media (min-width: 769px) {
  .nav-inner .nav-links { padding: 0.35rem 0.35rem; }
  .nav-inner .nav-links a { padding: 0.18rem 0.45rem; }
  .nav-inner .nav-links .nav-contact { padding: 0.28rem 0.75rem !important; margin-left: 0 !important; margin-right: 0 !important; }
  .nav-inner .nav-links, .nav-inner .nav-links .nav-contact { display: inline-flex; align-items: center; }

  /* Ensure CTA text is perfectly centered inside the pill */
  .nav-inner .nav-links .nav-contact {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      text-align: center !important;
      line-height: 1 !important;
      vertical-align: middle !important;
  }

  .nav-inner .nav-links { gap: 0.5rem; }
  .nav-inner .nav-links .nav-contact { border-radius: 999px !important; }

  /* Optional: ensure the pill shape remains even when CTA pulled to edge */
  .nav-inner .nav-links::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 999px; }
}

/* Light mode adjustments so the pill remains subtle on light backgrounds */
/* Light-mode nav pill: mirror footer glass treatment (translucent white + blur + inset highlight) */
@media (min-width: 769px) {
  body.light-mode .nav-inner .nav-links {
      background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.74)) !important;
      -webkit-backdrop-filter: blur(12px) saturate(130%);
      backdrop-filter: blur(12px) saturate(130%);
      border: 1.5px solid rgba(11,17,23,0.14) !important;
      box-shadow: 0 8px 36px rgba(11,17,23,0.10), inset 0 1px 0 rgba(255,255,255,0.7) !important;
      color: var(--text-light) !important;
  }
}

/* Desktop-only: Ensure nav link text is readable in light mode (dark text) */
@media (min-width: 769px) {
  body.light-mode .nav-inner .nav-links a { color: var(--text-light) !important; }

  /* Keep CTA appearance consistent in light mode */
  body.light-mode .nav-inner .nav-links .nav-contact {
      background: var(--primary) !important;
      color: var(--bg-dark) !important;
  }

  /* Dark-mode: make navbar pill match the dark footer glass treatment */
  body:not(.light-mode) .nav-inner .nav-links {
      background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
      -webkit-backdrop-filter: blur(10px) saturate(120%);
      backdrop-filter: blur(10px) saturate(120%);
      border: 1.5px solid rgba(255,255,255,0.12);
      box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.03);
      color: var(--text-light) !important;
  }

  body:not(.light-mode) .nav-inner .nav-links a { color: var(--text-light) !important; }

  body:not(.light-mode) .nav-inner .nav-links .nav-contact {
      background: var(--primary) !important;
      color: var(--bg-dark) !important;
  }

  /* Final balance: make CTA padding symmetric so text is visually centered */
  .nav-inner .nav-links .nav-contact {
      padding-left: 0.72rem !important;
      padding-right: 0.72rem !important;
      margin-left: 0.18rem !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
  }
}

@media (max-width: 880px) {
    /* Keep mobile nav behavior unchanged — remove pill surface on narrow viewports */
    .nav-inner .nav-links { background: transparent !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
    .nav-inner .nav-links a { padding: 0.5rem 0 !important; }
}

/* High-specificity light-mode override: ensure header is fully transparent */
body.light-mode .site-header,
body.light-mode .topbar {
    background: transparent !important;
    border-bottom: none !important;
}


/* --------------------------------------------------------------------------
   Nav animation: fancy underline + moving dot
   - Uses ::after for an animated gradient underline and ::before for a running dot
   - Disabled on small screens to preserve mobile nav behavior
   -------------------------------------------------------------------------- */

.nav-inner .nav-links a:not(.nav-contact) { position: relative; overflow: visible; }

.nav-inner .nav-links a:not(.nav-contact)::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -8px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 999px;
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 420ms cubic-bezier(.2,.9,.2,1);
    will-change: transform;
}

.nav-inner .nav-links a:not(.nav-contact)::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff8 0%, var(--primary) 30%);
    bottom: -11px;
    left: 8%;
    transform: translateX(-50%) scale(0.7);
    transition: transform 420ms cubic-bezier(.2,.9,.2,1), left 600ms cubic-bezier(.2,.9,.2,1);
    box-shadow: 0 8px 26px rgba(247,230,0,0.12);
    will-change: left, transform;
}

.nav-inner .nav-links a:not(.nav-contact)::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -8px;
    height: 3px;
    border-radius: 999px;
    /* Subtle sheen: animate background-position for a sweeping effect */
    background-image: linear-gradient(90deg, transparent 0%, rgba(247,230,0,0.9) 28%, rgba(190,12,215,0.9) 72%, transparent 100%);
    background-size: 220% 100%;
    background-position: 100% 0;
    transform-origin: left center;
    transform: scaleX(0);
    transition: background-position 480ms cubic-bezier(.2,.9,.2,1), opacity 240ms linear, transform 360ms cubic-bezier(.2,.9,.2,1);
    will-change: background-position, opacity, transform;
    opacity: 0;
}


.nav-inner .nav-links a:not(.nav-contact):hover::after,
.nav-inner .nav-links a:not(.nav-contact):focus-visible::after {
    background-position: 0 0;
    opacity: 1;
    transform: scaleX(1);
}

/* Squiggle underline: drawn by expanding pseudo-element width with an SVG squiggle background */
.nav-inner .nav-links a:not(.nav-contact)::after {
    content: "";
    position: absolute;
    left: 8%;
    bottom: -10px;
    height: 12px;
    width: 0;
    border-radius: 999px;
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    /* colorful gradient stroke inlined as SVG (primary -> accent) */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 10" preserveAspectRatio="none"><defs><linearGradient id="g" x1="0" x2="1"><stop offset="0%" stop-color="%23f7e600"/><stop offset="100%" stop-color="%23be0cd7"/></linearGradient></defs><path d="M0 5 C20 0,40 10,60 5 C80 0,100 10,120 5 C140 0,160 10,200 5" stroke="url(%23g)" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    transition: width 520ms cubic-bezier(.2,.9,.2,1), opacity 260ms linear;
    will-change: width, opacity, transform;
    overflow: hidden;
    opacity: 0;
}

.nav-inner .nav-links a:not(.nav-contact):hover::after,
.nav-inner .nav-links a:not(.nav-contact):focus-visible::after {
    width: calc(100% - 16%);
    opacity: 1;
    animation: squiggle-in 420ms cubic-bezier(.2,.9,.2,1) both;
}

@keyframes squiggle-in {
    0% { transform: scaleY(0.72) skewX(-6deg); opacity: 0; }
    60% { transform: scaleY(1.06) skewX(3deg); opacity: 1; }
    100% { transform: scaleY(1) skewX(0deg); opacity: 1; }
}


/* --------------------------------------------------------------------------
   Footer — rounded edges + frosted-glass surface
   - Adds a subtle glass panel for the footer while preserving full-width layout
   - Light/dark mode adjustments and mobile fallback included
   -------------------------------------------------------------------------- */
.site-footer {
    margin: 1rem auto 1.5rem;
    /* fixed width for a balanced centered panel */
    width: 70vw;
    max-width: none;
    box-sizing: border-box;
    /* comfortable top/bottom padding so text isn't close to edges */
    padding: 1.25rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 18px 48px rgba(0,0,0,0.45);
    overflow: hidden;
}

.site-footer .container { max-width: var(--max-width); margin: 0 auto; padding: 0; }

/* Mobile fallback: use full-width with gutters */
@media (max-width: 880px) {
    .site-footer {
        width: calc(100% - 2rem);
        margin: 0.6rem auto 1rem;
        padding: 1rem;
        border-radius: 12px;
    }
}

/* Light theme: warmer glass surface */
body.light-mode .site-footer {
    /* stronger glass: translucent white base + blur + subtle inset highlight */
    background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.68));
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 10px 30px rgba(11,17,23,0.06), inset 0 1px 0 rgba(255,255,255,0.6);
}

@media (max-width: 880px) {
    .site-footer {
        margin: 0.6rem 0.5rem 1rem;
        border-radius: 12px;
        padding: 1rem 1rem 0;
        box-shadow: 0 10px 28px rgba(0,0,0,0.36);
    }
}

/* Space between brand logo and newsletter when newsletter is nested under the brand */
.footer-brand .footer-newsletter { margin-top: 3.25rem; }

/* Strong mobile centering overrides to ensure footer elements are visually centered
     on narrow viewports regardless of earlier rules that may affect layout. */
@media (max-width: 600px) {
    /* Ensure the footer container centers its contents regardless of grid or padding
         by switching to a centered flex column layout. This will fix cases where
         nested grid items appear left-aligned due to container padding or max-width. */
    .site-footer .container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        box-sizing: border-box !important;
    }

    .site-footer { padding-left: 1rem !important; padding-right: 1rem !important; }
    .site-footer .container { max-width: 720px !important; margin: 0 auto !important; }
    .site-footer .footer-grid {
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        align-items: start !important;
        text-align: center !important;
        gap: var(--space-md) !important;
        width: 100% !important;
    }
    .site-footer .footer-brand,
    .site-footer .footer-nav,
    .site-footer .footer-contact,
    .site-footer .footer-newsletter {
        grid-column: auto !important;
        justify-self: center !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 680px !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
    .footer-newsletter { margin: 3rem auto 0.2rem !important; }
    .newsletter-form .newsletter-row { display: flex !important; justify-content: center !important; gap: 0.5rem !important; }
    .newsletter-form input[type="email"] { min-width: 0 !important; width: 100% !important; }
    .newsletter-form .btn { flex: 0 0 auto !important; }
    .footer-bottom { justify-content: center !important; gap: var(--space-sm) !important; }
    .footer-legal { justify-content: center !important; gap: 0.5rem !important; }
    .socials { justify-content: center !important; }
}

/* Extra aggressive fixes for very narrow viewports where other rules
     or safe-area insets may push the footer visually off-center. */
@media (max-width: 420px) {
    .site-footer {
        width: calc(100% - 1rem) !important;
        margin: 0.6rem auto 1rem !important;
        left: auto !important;
        right: auto !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        box-sizing: border-box !important;
    }

    .site-footer .container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 0 0.5rem !important;
    }

    .site-footer .footer-grid {
        width: 100% !important;
        margin: 0 auto !important;
        grid-template-columns: 1fr !important;
        justify-items: center !important;
    }

    .brand .logo,
    .footer-brand .logo { margin-left: 0 !important; text-align: center !important; }

    /* Ensure the newsletter row doesn't overflow and pushes layout left */
    .newsletter-row { display: flex !important; flex-direction: column !important; gap: 0.5rem !important; align-items: center !important; }
    .newsletter-row input, .newsletter-row .btn { width: 100% !important; max-width: 560px !important; }
}





/* Fix Chrome deprecation H1UserAgentFontSizeInSection: force explicit font-size on ALL h1 elements
   This must be at the end of the stylesheet to override any other rules */
h1, h1[class] { font-size: clamp(2rem, 5vw, 3rem) !important; }
section h1, article h1, aside h1, nav h1, header h1, main h1, footer h1, 
.page-header h1, .post-header h1, .archive-header h1, .error-header h1,
.container h1, .wrap h1 { 
  font-size: clamp(1.75rem, 5vw, 3rem) !important; 
}
