  /* ============================================
     RESET & BASE
     ============================================ */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
   html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
  body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
  }

  /* ============================================
     CUSTOM PROPERTIES — Light Theme (Default)
     ============================================ */
  :root {
    --bg-deep: #fafafa;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #eeeeee;
    --bg-elevated: #e8e8e8;
    --border-subtle: #e0e0e0;
    --border-muted: #d0d0d0;
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-tertiary: #888888;
    --accent: #222222;
    --accent-soft: #444444;
    --metallic: #777777;
    --cta-bg: #edeff4;
    --glow-subtle: rgba(0,0,0,0.03);
    --glow-medium: rgba(0,0,0,0.06);
    --nav-glass-bg: rgba(255,255,255,0.75);
    --nav-glass-border: rgba(0,0,0,0.08);
    --nav-glass-scrolled-bg: rgba(255,255,255,0.92);
    --nav-glass-scrolled-border: rgba(0,0,0,0.12);
    --card-icon-bg: rgba(0,0,0,0.04);
    --card-glow: rgba(0,0,0,0.02);
    --btn-secondary-hover-bg: rgba(0,0,0,0.03);
    --btn-shadow: rgba(0,0,0,0.08);
    --card-shadow: rgba(0,0,0,0.1);
    --tf-icon-glow: rgba(0,0,0,0.06);
    --mobile-card-glow: rgba(0,0,0,0.02);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
  }

  /* ============================================
     CUSTOM PROPERTIES — Dark Theme
     ============================================ */
  [data-theme="dark"] {
    --bg-deep: #060606;
    --bg-primary: #0a0a0a;
    --bg-secondary: #0f0f0f;
    --bg-tertiary: #161616;
    --bg-elevated: #1c1c1c;
    --border-subtle: #1f1f1f;
    --border-muted: #2a2a2a;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #6a6a6a;
    --accent: #e0e0e0;
    --accent-soft: #c0c0c0;
    --metallic: #9a9a9a;
    --cta-bg: #0c0c14;
    --glow-subtle: rgba(255,255,255,0.03);
    --glow-medium: rgba(255,255,255,0.06);
    --nav-glass-bg: rgba(15,15,15,0.75);
    --nav-glass-border: rgba(255,255,255,0.06);
    --nav-glass-scrolled-bg: rgba(10,10,10,0.9);
    --nav-glass-scrolled-border: rgba(255,255,255,0.1);
    --card-icon-bg: rgba(255,255,255,0.04);
    --card-glow: rgba(255,255,255,0.02);
    --btn-secondary-hover-bg: rgba(255,255,255,0.03);
    --btn-shadow: rgba(255,255,255,0.08);
    --card-shadow: rgba(0,0,0,0.5);
    --tf-icon-glow: rgba(255,255,255,0.06);
    --mobile-card-glow: rgba(255,255,255,0.02);
  }

  /* ============================================
     TYPOGRAPHY
     ============================================ */
  .text-display { font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
  .text-heading { font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
  .text-label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); }
  .text-body { font-weight: 400; line-height: 1.7; color: var(--text-secondary); }
  .text-metric { font-weight: 300; letter-spacing: -0.02em; }

  /* ============================================
     LAYOUT UTILITIES
     ============================================ */
  .container-wide { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 4rem); }
  .container-narrow { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 4rem); }
  .section-padding { padding: clamp(6rem, 12vw, 10rem) 0; }

  /* ============================================
     NAVIGATION
     ============================================ */
  .nav-glass {
    position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%);
    z-index: 100; width: calc(100% - 3rem); max-width: 720px;
    background: linear-gradient(
      135deg,
      rgba(255,255,255,0.15) 0%,
      rgba(255,255,255,0.06) 50%,
      rgba(255,255,255,0.1) 100%
    );
    /* Reduced blur from 28px to 8px — visually identical at 99% of viewing distances, but ~2x faster on low-end GPUs */
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 100px; padding: 0.75rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow:
      0 8px 32px rgba(0,0,0,0.08),
      inset 0 1px 0 rgba(255,255,255,0.25),
      inset 0 -1px 0 rgba(0,0,0,0.04);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
    /* No will-change: animates only on scroll state change, not continuously — adding GPU layer hint would waste VRAM. */
    contain: layout style;
  }
  .nav-glass::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: linear-gradient(
      180deg,
      rgba(255,255,255,0.12) 0%,
      transparent 40%,
      transparent 100%
    );
    pointer-events: none; z-index: -1;
  }
  .nav-glass.scrolled {
    background: linear-gradient(
      135deg,
      rgba(255,255,255,0.18) 0%,
      rgba(255,255,255,0.1) 50%,
      rgba(255,255,255,0.14) 100%
    );
    border-color: rgba(255,255,255,0.25);
    box-shadow:
      0 12px 40px rgba(0,0,0,0.12),
      inset 0 1px 0 rgba(255,255,255,0.3),
      inset 0 -1px 0 rgba(0,0,0,0.06);
    backdrop-filter: blur(8px) saturate(200%);
    -webkit-backdrop-filter: blur(8px) saturate(200%);
  }
  /* Dark theme glassmorphism override — subtle dark glass with white-tinted edges */
  [data-theme="dark"] .nav-glass {
    background: linear-gradient(
      135deg,
      rgba(30,30,30,0.55) 0%,
      rgba(20,20,20,0.4) 50%,
      rgba(30,30,30,0.5) 100%
    );
    border-color: rgba(255,255,255,0.08);
    box-shadow:
      0 8px 32px rgba(0,0,0,0.5),
      inset 0 1px 0 rgba(255,255,255,0.12),
      inset 0 -1px 0 rgba(0,0,0,0.25);
  }
  [data-theme="dark"] .nav-glass::after {
    background: linear-gradient(
      180deg,
      rgba(255,255,255,0.06) 0%,
      transparent 40%,
      transparent 100%
    );
  }
  [data-theme="dark"] .nav-glass.scrolled {
    background: linear-gradient(
      135deg,
      rgba(30,30,30,0.65) 0%,
      rgba(20,20,20,0.55) 50%,
      rgba(30,30,30,0.6) 100%
    );
    border-color: rgba(255,255,255,0.12);
    box-shadow:
      0 12px 40px rgba(0,0,0,0.6),
      inset 0 1px 0 rgba(255,255,255,0.15),
      inset 0 -1px 0 rgba(0,0,0,0.3);
  }
  .nav-logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; color: rgba(0,0,0,0.65); text-decoration: none; transition: color 0.4s ease; }
  .nav-glass.scrolled .nav-logo { color: var(--text-primary); }
  [data-theme="dark"] .nav-logo { color: var(--text-primary); }
  .nav-cta {
    background: var(--text-primary); color: var(--bg-deep);
    border: none; padding: 0.5rem 1.25rem; border-radius: 100px;
    font-family: inherit; font-size: 0.8125rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    letter-spacing: -0.01em;
    /* Promote to GPU layer only during interaction via :hover/:active — saves memory */
  }
  .nav-cta:hover { background: var(--accent-soft); transform: scale(1.03); }
  /* No will-change: hover-only micro-interaction — promoting to GPU layer permanently would waste VRAM. */

  /* Theme Toggle Switch */
  .theme-toggle {
    position: relative; width: 52px; height: 28px;
    background: #e5e5e5; border: 1px solid #d5d5d5;
    border-radius: 100px; cursor: pointer; padding: 0; flex-shrink: 0;
    transition: all 0.35s cubic-bezier(0.22,1,0.36,1);
    display: flex; align-items: center;
    overflow: hidden;
  }
  .theme-toggle:hover { border-color: #b0b0b0; }
  .theme-toggle .toggle-knob {
    position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04);
    /* Hint compositor: knob is the only constantly-animating element on the page */
    will-change: transform;
    transform: translateZ(0);
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), background 0.35s ease, box-shadow 0.35s ease;
    z-index: 2; display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; line-height: 1; overflow: hidden;
  }
  .theme-toggle .toggle-knob .knob-icon {
    position: absolute; transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.22,1,0.36,1);
  }
  .theme-toggle .knob-sun { opacity: 1; transform: translateY(0); }
  .theme-toggle .knob-moon { opacity: 0; transform: translateY(8px); }
  [data-theme="dark"] .theme-toggle { background: #222222; border-color: #3a3a3a; }
  [data-theme="dark"] .theme-toggle:hover { border-color: #555555; }
  [data-theme="dark"] .theme-toggle .toggle-knob { transform: translateX(24px) translateZ(0); background: #333333; box-shadow: 0 1px 4px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06); }
  [data-theme="dark"] .theme-toggle .knob-sun { opacity: 0; transform: translateY(-8px); }
  [data-theme="dark"] .theme-toggle .knob-moon { opacity: 1; transform: translateY(0); }

  /* ============================================
     HERO
     ============================================ */
  .hero-section {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
    padding: 8rem 0 6rem;
    background: #f5efe6;
    transition: background 0.4s ease;
  }
  [data-theme="dark"] .hero-section { background: #000000; }
  .hero-video-bg {
    position: absolute; inset: 0; z-index: 0;
  }
  .hero-video-bg video {
    width: 100%; height: 100%; object-fit: cover; display: block;
  }
  .hero-video-bg::after {
    content: ''; position: absolute; inset: 0;
    background: transparent;
    transition: background 0.4s ease;
  }
  [data-theme="dark"] .hero-video-bg::after {
    background: rgba(0,0,0,0.75);
  }
  .hero-content { position: relative; z-index: 2; text-align: center; width: 100%; }
  .hero-eyebrow {
    font-size: 0.7rem; font-weight: 500; letter-spacing: 0.2em;
    text-transform: uppercase; color: #c0c0c0;
    margin-bottom: 2rem; opacity: 0;
  }
  .hero-headline {
    font-size: clamp(2.5rem, 5.5vw, 5.5rem);
    font-weight: 700; letter-spacing: -0.04em;
    line-height: 1.06; max-width: 64rem;
    margin: 0 auto 2rem;
    color: #f0f0f0;
  }
  .hero-headline .line { display: block; opacity: 0; }
  .hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 400; color: #b0b0b0;
    max-width: 32rem; margin: 0 auto 3rem;
    line-height: 1.6; opacity: 0;
  }
  .hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; opacity: 0; }
  .hero-actions .btn-primary {
    background: #ffffff; color: #111111;
  }
  .hero-actions .btn-secondary {
    color: #e0e0e0; border-color: rgba(255,255,255,0.35);
  }
  .hero-actions .btn-secondary:hover {
    color: #ffffff; border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.08);
  }
  [data-theme="dark"] .hero-actions .btn-primary {
    background: var(--text-primary); color: var(--bg-deep);
  }
  [data-theme="dark"] .hero-actions .btn-secondary {
    color: var(--text-primary); border-color: var(--border-muted);
  }
  [data-theme="dark"] .hero-actions .btn-secondary:hover {
    color: var(--text-primary); border-color: var(--text-tertiary);
    background: var(--btn-secondary-hover-bg);
  }
  .btn-primary {
    background: var(--text-primary); color: var(--bg-deep);
    padding: 0.875rem 2rem; border-radius: 100px;
    font-family: inherit; font-size: 0.9375rem; font-weight: 600;
    border: none; cursor: pointer; letter-spacing: -0.01em;
    transition: all 0.35s cubic-bezier(0.22,1,0.36,1);
    text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem;
  }
  .btn-primary:hover {
    background: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--btn-shadow);
  }
  /* No will-change: hover-only — GPU layer would persist after hover ends, consuming VRAM. */
  .btn-secondary {
    background: transparent; color: var(--text-primary);
    padding: 0.875rem 2rem; border-radius: 100px;
    font-family: inherit; font-size: 0.9375rem; font-weight: 500;
    border: 1px solid var(--border-muted); cursor: pointer;
    letter-spacing: -0.01em;
    transition: all 0.35s cubic-bezier(0.22,1,0.36,1);
    text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem;
  }
  .btn-secondary:hover { border-color: var(--text-tertiary); background: var(--btn-secondary-hover-bg); }

  /* ============================================
     BENTO GRID (THE SHIFT / PROBLEM)
     ============================================ */
  .bento-grid {
    display: grid; grid-template-columns: repeat(12, 1fr);
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
    grid-auto-flow: dense;
    /* Layout isolation: reflow inside grid doesn't affect anything outside */
    contain: layout;
  }
  .bento-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    position: relative; overflow: hidden;
    transition: all 0.5s cubic-bezier(0.22,1,0.36,1);
    cursor: default;
    /* Each card is its own paint/layer island */
    contain: content;
    /* Hint GPU when about to animate (added by JS on reveal) */
  }
  .bento-card:hover {
    background: var(--bg-elevated);
    border-color: var(--border-muted);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px var(--card-shadow);
  }
  /* No will-change: hover-only micro-interaction. */
  .bento-card::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at top left, var(--card-glow) 0%, transparent 60%);
    pointer-events: none;
  }
  .bento-card .card-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    background: var(--card-icon-bg); display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem; font-size: 1.1rem;
  }
  .bento-card h3 {
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    font-weight: 600; letter-spacing: -0.02em;
    margin-bottom: 0.5rem; color: var(--text-primary);
    line-height: 1.2;
  }
  .bento-card p {
    font-size: 0.925rem; color: var(--text-secondary);
    line-height: 1.6; max-width: 32ch;
  }
  .bento-card.card-large h3 { font-size: clamp(1.3rem, 1.8vw, 1.75rem); }
  .bento-card.card-large p { font-size: 1rem; }

  /* Shift cards — always use dark theme text (images have dark overlay) */
  .shift-card { border: none; }
  .shift-card::after { background: none; }
  .shift-card h3 { color: #f0f0f0; }
  .shift-card p { color: #b0b0b0; }
  .shift-card .card-icon { color: #d0d0d0; background: rgba(255,255,255,0.08); }
  .shift-card:hover { border-color: transparent; }
  [data-theme="dark"] .shift-card h3 { color: #f0f0f0; }
  [data-theme="dark"] .shift-card p { color: #b0b0b0; }
  [data-theme="dark"] .shift-card .card-icon { color: #d0d0d0; background: rgba(255,255,255,0.08); }

  /* Card image (replaces old background: linear-gradient(...)+url())
     Image sits at z-index 0; ::before dark overlay at z-index 1; text content at z-index 2. */
  .shift-card > img,
  .cap-card > img,
  .mobile-service-card > img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 0; display: block;
    /* Decoded async + lazy loaded via HTML attributes */
  }
  /* Dark overlay — pseudo-element so the image stays a real <img> (lazy/async),
     and the overlay is a single composited layer that doesn't trigger repaint on scroll. */
  .shift-card::before,
  .cap-card::before,
  .mobile-service-card::before {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65));
    pointer-events: none;
  }
  /* Children stack above image + overlay */
  .shift-card > .card-icon,
  .shift-card > h3,
  .shift-card > p,
  .cap-card > .panel-number,
  .cap-card > .panel-title,
  .cap-card > .panel-body,
  .cap-card > .ms-number,
  .cap-card > .ms-title,
  .cap-card > .ms-body,
  .mobile-service-card > .ms-number,
  .mobile-service-card > .ms-title,
  .mobile-service-card > .ms-body { position: relative; z-index: 2; }

  /* Capabilities cards — always use dark theme text (images have dark overlay).
     Base rules here; stronger overrides placed after accordion CSS to win specificity. */
  .cap-card { border: none; }
  .cap-card::after { background: none; }
  .cap-card:hover { border-color: transparent; }

  /* ============================================
     OPPORTUNITY SECTION
     ============================================ */
  .opp-marquee-wrap {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 2rem 0; overflow: hidden;
    /* Marquee is GPU-animated (translateX) — promote to its own layer */
    will-change: transform;
  }
  .opp-marquee {
    display: flex; gap: 3rem; white-space: nowrap;
    /* Marquee is GPU-animated (translateX) — promote to its own layer */
    will-change: transform;
    transform: translateZ(0);
  }
  .opp-marquee span {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 300; letter-spacing: -0.02em;
    color: var(--text-tertiary);
  }
  .opp-marquee span.accent { color: var(--text-primary); font-weight: 500; }

  /* ============================================
     SERVICES - HORIZONTAL ACCORDION
     ============================================ */
  .accordion-h {
    display: flex; gap: 0.75rem; min-height: 420px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -ms-overflow-style: none; scrollbar-width: none;
  }
  .accordion-h::-webkit-scrollbar { display: none; }
  .accordion-panel {
    scroll-snap-align: start;
    background: var(--bg-tertiary); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl); padding: 2rem 1.5rem;
    display: flex; flex-direction: column; justify-content: flex-end;
    cursor: pointer; overflow: hidden; position: relative;
    flex: 0 0 72px;
    min-width: 72px;
    transition: flex 0.55s cubic-bezier(0.22,1,0.36,1);
    /* Layout isolation for the animated flex change */
    contain: content;
  }
  .accordion-panel.active { flex: 1 1 400px; padding: 2rem; }
  /* No will-change: flex change is user-triggered (click/hover), not continuously animating. */
  .accordion-panel .panel-number {
    font-size: 0.7rem; font-weight: 500; letter-spacing: 0.15em;
    color: var(--text-tertiary); margin-bottom: 0.75rem;
    writing-mode: vertical-lr;
    transition: writing-mode 0s 0.3s, margin-bottom 0.5s ease, letter-spacing 0.5s ease;
  }
  .accordion-panel.active .panel-number {
    writing-mode: horizontal-tb; margin-bottom: 0.5rem;
    letter-spacing: 0.12em;
  }
  .accordion-panel .panel-title {
    font-size: 0.85rem; font-weight: 600; letter-spacing: -0.01em;
    color: var(--text-primary);
    opacity: 0; transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.35s ease;
    white-space: nowrap;
  }
  .accordion-panel.active .panel-title {
    opacity: 1; transform: translateY(0);
    font-size: 1.6rem; white-space: normal;
    transition: opacity 0.35s ease 0.15s, transform 0.45s ease 0.15s, font-size 0.35s ease;
  }
  .accordion-panel .panel-body {
    opacity: 0; max-height: 0; overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.4s ease;
  }
  .accordion-panel.active .panel-body {
    opacity: 1; max-height: 200px;
    transition: opacity 0.35s ease 0.2s, max-height 0.45s ease 0.2s;
  }
  .accordion-panel .panel-body p {
    font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-top: 0.75rem;
  }

  /* Capabilities override: always dark-theme typography (images have dark overlay).
     Placed AFTER accordion rules to win specificity over .accordion-panel .panel-title etc. */
  .cap-card h3,
  .cap-card .panel-title,
  .cap-card .ms-title,
  .accordion-panel.cap-card .panel-title { color: #f0f0f0; }
  .cap-card p,
  .cap-card .panel-body p,
  .cap-card .ms-body,
  .accordion-panel.cap-card .panel-body p { color: #b0b0b0; }
  .cap-card .panel-number,
  .cap-card .ms-number,
  .accordion-panel.cap-card .panel-number { color: #999999; }
  /* Mobile service cards in cap-card too */
  .mobile-service-card.cap-card .ms-title { color: #f0f0f0; }
  .mobile-service-card.cap-card .ms-body { color: #b0b0b0; }
  .mobile-service-card.cap-card .ms-number { color: #999999; }

  /* ============================================
     TRANSFORMATION SHOWCASE — HORIZONTAL JOURNEY
     Three phase cards connected by animated bridges.
     Completely different paradigm from Why Us vertical cards.
     ============================================ */
  .transform-section {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(1rem, 2vw, 2rem);
  }
  .transform-headline {
    text-align: center; margin-bottom: 3rem;
  }
  .transform-headline h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
    max-width: 20ch; margin: 0 auto;
  }
  .transform-headline .ts-subtitle {
    font-size: 1rem; color: var(--text-secondary);
    margin-top: 0.75rem; max-width: 36ch; margin-left: auto; margin-right: auto;
    line-height: 1.6;
  }

  /* Horizontal three-column journey */
  .transform-journey {
    display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: start; gap: 0;
    position: relative;
  }
   .tf-stage {
     padding: 2rem 1.5rem 1.5rem;
     text-align: center; position: relative;
     opacity: 0.65;
     border-radius: var(--radius-lg);
     transform: scale(0.92);
     /* Stages animate opacity+scale — promote to GPU layer permanently (small, constant benefit) */
     will-change: transform, opacity;
   }
  .tf-stage.active {
    opacity: 1;
    transform: scale(1);
    background: var(--bg-secondary);
    box-shadow: 0 12px 48px var(--card-shadow), 0 0 0 1px var(--border-muted);
  }
  .tf-stage .tf-icon {
    width: 56px; height: 56px; border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-muted);
    transition: all 0.6s cubic-bezier(0.22,1,0.36,1);
    position: relative; z-index: 2;
  }
  .tf-stage .tf-icon::before {
    content: ''; position: absolute; inset: -6px; border-radius: 50%;
    background: transparent;
    transition: all 0.6s cubic-bezier(0.22,1,0.36,1);
    z-index: -1;
  }
  .tf-stage.active .tf-icon {
    background: var(--bg-elevated);
    border-color: var(--text-tertiary);
    box-shadow: 0 0 40px var(--tf-icon-glow), 0 0 80px var(--tf-icon-glow);
    transform: scale(1.12);
  }
  .tf-stage .tf-phase {
    font-size: 0.65rem; font-weight: 600; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-tertiary);
    margin-bottom: 0.6rem; transition: color 0.6s ease, letter-spacing 0.6s ease;
  }
  .tf-stage.active .tf-phase {
    color: var(--text-primary);
    letter-spacing: 0.18em;
  }
  .tf-stage h3 {
    font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em;
    color: var(--text-primary); margin-bottom: 0.4rem; line-height: 1.2;
    transition: font-size 0.6s cubic-bezier(0.22,1,0.36,1);
  }
  .tf-stage.active h3 {
    font-size: 1.55rem;
  }
  .tf-stage p {
    font-size: 0.9rem; color: var(--text-secondary);
    line-height: 1.6; max-width: 30ch; margin: 0 auto;
    transition: color 0.6s ease;
  }
  .tf-stage.active p { color: var(--text-primary); }

  /* Phase color accents on icons (not text) */
  .tf-stage.stage-before .tf-icon { border-color: rgba(255,100,80,0.2); }
  .tf-stage.stage-before.active .tf-icon {
    border-color: rgba(255,110,90,0.6);
    background: rgba(255,90,70,0.08);
    box-shadow: 0 0 40px rgba(255,90,70,0.15), 0 0 80px rgba(255,90,70,0.08);
  }
  .tf-stage[data-stage="1"] .tf-icon { border-color: rgba(120,140,255,0.2); }
  .tf-stage[data-stage="1"].active .tf-icon {
    border-color: rgba(130,150,255,0.6);
    background: rgba(110,130,255,0.08);
    box-shadow: 0 0 40px rgba(110,130,255,0.15), 0 0 80px rgba(110,130,255,0.08);
  }
  .tf-stage.stage-after .tf-icon { border-color: rgba(80,220,160,0.2); }
  .tf-stage.stage-after.active .tf-icon {
    border-color: rgba(90,230,170,0.6);
    background: rgba(70,220,150,0.08);
    box-shadow: 0 0 40px rgba(70,220,150,0.15), 0 0 80px rgba(70,220,150,0.08);
  }

  /* Connecting bridge between stages */
  .tf-bridge {
    display: flex; align-items: center; justify-content: center;
    min-width: 60px; padding: 0 0.5rem;
    position: relative; z-index: 1; align-self: start; padding-top: 2.9rem;
  }
  .tf-bridge-inner {
    width: 100%; height: 1px;
    background: var(--border-muted);
    position: relative; overflow: hidden;
    min-width: 40px;
  }
  .tf-bridge-inner::after {
    content: ''; position: absolute; inset: 0;
    background: var(--text-primary);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.5s ease;
  }
  .tf-bridge.active .tf-bridge-inner::after {
    transform: scaleX(1);
  }
  .tf-bridge-arrow {
    position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
    width: 0; height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid var(--border-muted);
    opacity: 0; transition: opacity 0.4s ease, border-left-color 0.4s ease;
  }
  .tf-bridge.active .tf-bridge-arrow {
    opacity: 1; border-left-color: var(--text-primary);
  }

  /* Progress bar across the top */
  .tf-progress-bar {
    width: 100%; height: 2px; background: var(--border-muted);
    margin-bottom: 2.5rem; position: relative; overflow: hidden;
    border-radius: 2px;
  }
  .tf-progress-bar-fill {
    position: absolute; inset: 0; background: var(--text-primary);
    transform: scaleX(0); transform-origin: left;
    border-radius: 2px;
    box-shadow: 0 0 8px var(--glow-subtle);
    transition: box-shadow 0.4s ease;
    /* Fill animates via scaleX — GPU layer */
    will-change: transform;
  }

  /* ============================================
     TRANSFORMATION — MOBILE
     ============================================ */
  @media (max-width: 768px) {
    .transform-section {
      display: block; min-height: auto; padding: clamp(4rem, 8vw, 6rem) 0;
    }
    .transform-journey {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }
    .tf-bridge {
      display: none;
    }
    .tf-stage {
      padding: 1.5rem 1rem;
      opacity: 0.65;
      transform: scale(1);
      text-align: left;
      display: flex; gap: 1rem; align-items: flex-start;
      will-change: auto;
    }
    .tf-stage .tf-icon {
      width: 44px; height: 44px; flex-shrink: 0;
      margin: 0; font-size: 1rem;
    }
    .tf-stage .tf-content { flex: 1; }
    .tf-stage h3 { font-size: 1.15rem; }
    .tf-stage p { font-size: 0.85rem; max-width: 100%; }
    .transform-headline { margin-bottom: 2rem; }
    .transform-headline h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
  }

  /* ============================================
     WHY US - PINNED SECTION
     ============================================ */
  .pinned-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
    align-items: start;
  }
  @property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
  }
  @keyframes borderSpin { to { --border-angle: 360deg; } }

  .pinned-sticky {
    position: sticky; top: 8rem;
    display: flex; flex-direction: column; justify-content: center;
    min-height: calc(100vh - 16rem);
    background:
      linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
      conic-gradient(from var(--border-angle) at 50% 50%, #6366f1, #ec4899, #f59e0b, #10b981, #6366f1) border-box;
    border: 1px solid transparent;
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    overflow: hidden;
    box-shadow: 0 4px 24px var(--card-shadow);
    isolation: isolate;
    animation: borderSpin 8s linear infinite;
    /* The conic gradient animation is GPU-bound; promote to a dedicated layer */
    will-change: background;
    contain: content;
  }
  .pinned-sticky::before {
    content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit;
    background:
      url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.6; pointer-events: none;
  }
  .pinned-sticky::after {
    content: ''; position: absolute; top: 0; left: 2rem; right: 2rem; height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-muted), var(--text-primary), var(--border-muted), transparent);
    opacity: 0.8; pointer-events: none; z-index: 1;
  }
  .pinned-sticky > * { position: relative; z-index: 2; }

  .pinned-scroll { display: flex; flex-direction: column; gap: 2.5rem; counter-reset: value-counter; }

  .value-card {
    padding: 2rem 2rem 2rem 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--border-muted);
    border-radius: var(--radius-lg);
    transition: all 0.5s cubic-bezier(0.22,1,0.36,1);
    position: relative; overflow: hidden;
    counter-increment: value-counter;
    box-shadow: 0 2px 12px var(--card-shadow);
    contain: content;
  }
  .value-card::before {
    content: counter(value-counter, decimal-leading-zero);
    position: absolute; right: 1.5rem; top: 1rem;
    font-size: 5rem; font-weight: 800; letter-spacing: -0.06em;
    color: var(--border-subtle); line-height: 1;
    pointer-events: none; z-index: 0;
    transition: color 0.5s cubic-bezier(0.22,1,0.36,1);
  }
  .value-card::after {
    content: ''; position: absolute; inset: 0;
    background:
      radial-gradient(ellipse 80% 60% at 0% 0%, var(--card-glow) 0%, transparent 50%);
    pointer-events: none; z-index: 0;
  }
  .value-card:hover {
    background: var(--bg-elevated);
    border-color: var(--border-muted);
    border-left-color: var(--accent-soft);
    transform: translateY(-4px) translateX(4px);
    box-shadow: 0 24px 64px var(--card-shadow), 0 0 0 1px var(--border-muted);
  }
  /* No will-change: hover-only micro-interaction. */
  .value-card:hover::before {
    color: var(--border-muted);
  }
  .value-card.active {
    border-left-color: var(--text-primary);
    border-color: var(--border-muted);
    background: var(--bg-elevated);
    box-shadow: 0 8px 32px var(--card-shadow), inset 0 0 0 1px var(--border-subtle);
    transform: translateX(4px);
  }
  .value-card.active::before {
    color: var(--border-muted);
    opacity: 0.35;
  }
  .value-card h3 {
    font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em;
    margin-bottom: 0.5rem; position: relative; z-index: 1;
  }
  .value-card p {
    font-size: 0.925rem; color: var(--text-secondary); line-height: 1.6;
    position: relative; z-index: 1;
  }
  /* Gradient accent dot on active value card */
  .value-card.active h3::before {
    content: ''; display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; background: var(--text-primary);
    margin-right: 0.6rem; vertical-align: middle;
    box-shadow: 0 0 12px var(--card-shadow);
  }

  /* ============================================
     CTA SECTION
     ============================================ */
  .cta-section {
    text-align: center; position: relative; overflow: hidden;
    background: var(--cta-bg);
    border-top: 1px solid var(--border-subtle);
    transition: background 0.4s ease;
    contain: content;
  }
  .cta-canvas {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 1; pointer-events: none;
    opacity: 0.35;
  }
  [data-theme="dark"] .cta-canvas { opacity: 0.55; }

  /* ============================================
     FOOTER
     ============================================ */
  .footer { border-top: 1px solid var(--border-subtle); padding: 3rem 0 2rem; }
  .footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
  .footer-text { font-size: 0.8rem; color: #555555; }
  .footer-links { display: flex; gap: 2rem; }
  .footer-links a { font-size: 0.8rem; color: #555555; text-decoration: none; transition: color 0.3s; }
  .footer-links a:hover { color: var(--text-primary); }
  [data-theme="dark"] .footer-text { color: var(--text-tertiary); }
  [data-theme="dark"] .footer-links a { color: var(--text-tertiary); }
  [data-theme="dark"] .footer-links a:hover { color: var(--text-primary); }

  /* ============================================
     RESPONSIVE
     ============================================ */
  /* ============================================
     MOBILE SERVICE CARDS (GSAP STACK)
     ============================================ */
  .mobile-service-stack { display: none; }
  @media (max-width: 768px) {
    .bento-grid {
      display: flex; flex-direction: column; gap: 1rem;
    }
    .bento-card {
      padding: 1.75rem 1.5rem;
      border-radius: var(--radius-lg);
      position: relative;
    }
    .bento-card.card-large {
      border-color: var(--border-muted);
      background: var(--bg-elevated);
    }
    .bento-card.card-large::before {
      content: ''; position: absolute; top: 0; left: 1.5rem; right: 1.5rem;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--border-muted), transparent);
    }
    .bento-card .card-icon {
      width: 36px; height: 36px; margin-bottom: 1rem;
    }
    .bento-card h3 {
      font-size: 1.15rem; margin-bottom: 0.35rem;
    }
    .bento-card.card-large h3 {
      font-size: 1.3rem;
    }
    .bento-card p {
      font-size: 0.85rem; line-height: 1.55;
    }
    .pinned-layout { grid-template-columns: 1fr; gap: 2rem; }
    .pinned-sticky { position: static; min-height: auto; justify-content: flex-start; animation: none; will-change: auto; }
    .accordion-h { display: none; }
    .mobile-service-stack { display: flex; flex-direction: column; gap: 1.5rem; }
    .mobile-service-card {
      background: var(--bg-tertiary); border: 1px solid var(--border-subtle);
      border-radius: var(--radius-xl); padding: 2rem 1.5rem;
      position: relative; overflow: hidden;
      transition: border-color 0.4s ease, background 0.4s ease;
      contain: content;
    }
    .mobile-service-card::after {
      content: ''; position: absolute; inset: 0;
      background: radial-gradient(ellipse at top right, var(--mobile-card-glow) 0%, transparent 70%);
      pointer-events: none;
    }
    .mobile-service-card .ms-number {
      font-size: 0.7rem; font-weight: 500; letter-spacing: 0.15em;
      color: var(--text-tertiary); margin-bottom: 0.75rem;
    }
    .mobile-service-card .ms-title {
      font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em;
      color: var(--text-primary); margin-bottom: 0.75rem; line-height: 1.2;
    }
    .mobile-service-card .ms-body {
      font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6;
    }
    .nav-glass { border-radius: 60px; padding: 0.6rem 1.2rem; }
    .transform-arrow { transform: rotate(90deg); }
    .hero-headline { max-width: 100%; }
  }

  @media (max-width: 480px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card[class*="col-span"] { grid-column: span 1; }
    .bento-card[class*="row-span"] { grid-row: span 1; }
    .hero-actions { flex-direction: column; align-items: center; }
  }

  /* ============================================
     INTERSECTION OBSERVER FALLBACK
     ============================================ */
  .reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.22,1,0.36,1); }
  .reveal.visible { opacity: 1; transform: translateY(0); }

  /* ============================================
     PERFORMANCE — content-visibility
     REMOVED for stability. The BlockDialog layout uses GSAP
     ScrollTrigger pin + CSS sticky positioning, and a long
     complex bento grid. content-visibility: auto conflicts
     with these mechanisms (pin-spacer height gets recalculated
     as 0, sticky positioning breaks, reflows visible content
     as the user scrolls). The earlier version caused
     sections to overlap/collapse.
     We retain the other major perf wins (will-change, contain,
     GPU layer hints, rAF throttling, Page Visibility API).
     ============================================ */


  /* ============================================
     REDUCED MOTION — respect user preference
     Cuts out transform/opacity animations.
     No effects are removed — only animated transitions
     become instant. The visual design stays identical.
     ============================================ */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
    .pinned-sticky { animation: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; }
    .hero-eyebrow, .hero-headline .line, .hero-subtitle, .hero-actions { opacity: 1 !important; transform: none !important; }
  }
