/* ============================================================
   3DGlobal IT — Design System (hand-authored, build-free)
   Implements design.md §1–§10, §15 in plain CSS so the site
   renders correctly with or without a Tailwind build.
   Tailwind utility classes are layered on top via app.css
   (compiled) or the Tailwind CDN fallback.
   ============================================================ */

/* Fonts are loaded once via <link rel="preconnect"> + <link> in base.html
   (with display=swap) to avoid a render-blocking @import duplicate. */

/* ----------------------------- Tokens -----------------------------
   Global design tokens (CSS custom properties). Everything below —
   colours, spacing, shadows, type — is expressed through these so the
   whole theme (including dark mode) can be re-skinned from one place. */
:root {
  /* Brand colours. The *-rgb variants hold raw R,G,B channels so they
     can be dropped into rgba(var(--x-rgb), <alpha>) for translucency. */
  --primary-color: #0f67f6;
  --primary-color-rgb: 15, 103, 246;
  --secondary-color: #191919;
  --secondary-color-rgb: 25, 25, 25;
  --third-color: #08d9ff;
  --third-color-rgb: 8, 217, 255;

  /* Link states */
  --link-color: #0f67f6;
  --link-color-hover: #1227b8;
  --link-color-active: #1227b8;

  /* Primary gradient stops (buttons, CTAs, accents) */
  --gradient-color-from: #006cff;
  --gradient-color-to: #1227b8;

  /* Legacy section gutters */
  --gutter-horizontal: 120px;
  --gutter-vertical: 80px;

  /* Surface & text colours (light theme; overridden in .dark) */
  --surface: #ffffff;
  --surface-alt: #f7f9fc;
  --surface-card: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.9);
  --border-color: #ececf0;
  --field-border: #d4d4d4;
  --text-heading: #000001;
  --text-body: #383838;
  --text-muted: #6b7280;

  /* Font families */
  --font-heading: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, sans-serif;

  /* Radius scale (premium, consistent) */
  --radius-sm: 10px;   /* buttons, inputs */
  --radius: 14px;      /* icon tiles, small surfaces */
  --radius-lg: 18px;   /* cards, panels */
  --radius-pill: 999px;

  /* Soft, layered shadow system */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 6px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 14px rgba(16, 24, 40, 0.07), 0 10px 28px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 28px rgba(16, 24, 40, 0.10), 0 28px 64px rgba(16, 24, 40, 0.10);
  --shadow-primary: 0 8px 24px rgba(var(--primary-color-rgb), 0.30);
  --ring: 0 0 0 3px rgba(var(--primary-color-rgb), 0.14);

  /* Semantic colors (encode meaning, not decoration) */
  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.10);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.12);
  --error: #e11d48;
  --error-bg: rgba(225, 29, 72, 0.08);
  --info: var(--primary-color);

  /* Spacing scale — 8px base */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Type scale — font sizes (fs) so they don't clash with --text-* colors */
  --fs-display: clamp(40px, 5vw, 54px);
  --fs-h1: 54px;
  --fs-h2: 42px;
  --fs-h3: 34px;
  --fs-h4: 28px;
  --fs-body: 16px;
  --fs-sm: 15px;
  --fs-caption: 13px;
  --fs-label: 14px;

  /* Layout widths */
  --container: 100%;
  --reading: clamp(44ch, 80%, 72ch);

  /* Illustration palette — light */
  --illus-bg: #eef3ff;
  --illus-surface: #ffffff;
  --illus-subtle: #dce8ff;
  --illus-border: #c6d9f5;
  --illus-muted: #9ab2d4;
  --illus-text: #12193a;
}

/* Dark theme: re-declares only the tokens that change. Toggling the
   `.dark` class on a root element flips the entire palette via the
   cascade — no per-component dark rules needed for these values. */
.dark {
  --surface: #0b1220;
  --surface-alt: #0f1a2e;
  --surface-card: #111c30;
  --header-bg: rgba(11, 18, 32, 0.92);
  --border-color: #22304a;
  --field-border: #2c3c5a;
  --text-heading: #f4f7fb;
  --text-body: #c4cede;
  --text-muted: #8b9bb4;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30), 0 2px 6px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-primary: 0 10px 30px rgba(var(--primary-color-rgb), 0.40);
  --ring: 0 0 0 3px rgba(var(--primary-color-rgb), 0.28);

  /* Illustration palette — dark */
  --illus-bg: #0c1525;
  --illus-surface: #162236;
  --illus-subtle: #1c2f4a;
  --illus-border: #243655;
  --illus-muted: #3a5272;
  --illus-text: #e4ecf7;
}

/* ----------------------------- Base -----------------------------
   Element-level defaults: resets, typography and global behaviours
   applied before any component styles. */

/* Smooth in-page anchor scrolling; prevent iOS auto text inflation */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* Document defaults — body font, colour, and theme-swap transition */
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.625;
  color: var(--text-body);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Headings share the display font; per-tag sizes below use clamp() to
   scale fluidly between mobile and desktop without media queries. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(28px, 2.3vw + 21px, 54px); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-size: clamp(24px, 1.6vw + 18px, 42px); font-weight: 700; line-height: 1.14; letter-spacing: -0.022em; }
h3 { font-size: clamp(20px, 1.25vw + 16px, 34px); font-weight: 700; line-height: 1.2; letter-spacing: -0.018em; }
h4 { font-size: clamp(18px, 0.9vw + 15px, 28px); font-weight: 600; line-height: 1.25; letter-spacing: -0.012em; }
h5 { font-size: clamp(16px, 0.54vw + 14px, 22px); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
h6 { font-size: clamp(14px, 0.36vw + 13px, 18px); font-weight: 600; line-height: 1.4; }

/* Body copy justifies by default; the list below opts specific
   contexts back to left/centre alignment where justify looks wrong. */
p { margin: 0; text-align: justify; }
p.no-justify,
.no-justify p,
.text-center p,
.cookie-body p,
.toast p,
.popup-success p,
.popup-field-error,
.cmdk-empty { text-align: left; }
.text-center p { text-align: center; }

/* Links, media and buttons: sensible element defaults */
a { color: var(--link-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--link-color-hover); }
img { max-width: 100%; height: auto; display: block; }
video { max-width: 100%; height: auto; }
button { font-family: inherit; }

/* Tint text selection with the brand colour */
::selection { background: rgba(var(--primary-color-rgb), 0.18); color: var(--text-heading); }

/* Custom slim scrollbar (WebKit/Blink only) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(var(--primary-color-rgb), 0.35);
  border-radius: 999px;
  border: 3px solid var(--surface);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(var(--primary-color-rgb), 0.6); background-clip: padding-box; }

/* Visually hidden, but still read by screen readers (a11y helper) */
.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 ----------------------------- */
/* Guard against horizontal scroll from any full-bleed/overflowing child */
html, body { overflow-x: hidden; }

/* Centred page container with a fluid side gutter (the max-width cap
   keeps line lengths readable on very wide monitors) */
.container-site {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
/* Navbar shares the same container width as the content so the logo and menu
   line up with the page below it (a clean, professional alignment). */
/* Standard vertical rhythm for page sections (fluid top/bottom padding) */
.section {
  padding-top: clamp(36px, 2.6vw + 1rem, 60px);
  padding-bottom: clamp(30px, 2.2vw + 0.85rem, 50px);
}

/* ----------------------------- Buttons -----------------------------
   `.btn` is the shared base (layout, sizing, transitions); the
   `.btn-*` modifiers below only set colour/fill for each variant. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0 30px;
  line-height: 50px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #ffffff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: background-position 0.4s ease, color 0.3s ease,
    border-color 0.3s ease, transform 0.25s cubic-bezier(0.24, 0.74, 0.58, 1),
    box-shadow 0.3s ease;
}
/* Shared interaction feedback: lift on hover, settle on press,
   accessible focus ring for keyboard users */
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* Primary — filled gradient; the shifting background-position on hover
   animates the gradient, and ::after adds a diagonal shine sweep */
.btn-primary {
  background-image: linear-gradient(to right, #006cff, #1227b8, #006cff);
  background-size: 200%;
  background-position: left center;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background-position: right center; color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary::after {
  content: "";
  position: absolute; inset: 0;
  background: #fff; opacity: 0;
  transform: translateX(-100%) skewX(-20deg);
  transition: transform 0.6s ease, opacity 0.6s ease;
}
.btn-primary:hover::after { opacity: 0.18; transform: translateX(100%) skewX(-20deg); }

/* Secondary — outlined, fills with brand colour on hover */
.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 1.5px solid rgba(var(--primary-color-rgb), 0.45);
}
.btn-secondary:hover { background: var(--primary-color); color: #fff; border-color: transparent; box-shadow: var(--shadow-primary); }

/* Dark — solid ink button (inverts to the surface colour for its text) */
.btn-dark { background: var(--text-heading); color: var(--surface); }
.btn-dark:hover { box-shadow: var(--shadow-lg); }

/* White — for placing on coloured/photographic backgrounds */
.btn-white { background: #fff; color: #0b1220; box-shadow: var(--shadow-sm); }
.btn-white:hover { color: var(--primary-color); box-shadow: var(--shadow-lg); }

/* Ghost — subordinate action on light surfaces */
.btn-ghost {
  background: transparent;
  color: var(--text-heading);
  border: 1.5px solid var(--border-color);
}
.btn-ghost:hover { background: var(--surface-alt); border-color: rgba(var(--primary-color-rgb), 0.4); color: var(--primary-color); }

/* Outline-light — subordinate action on dark backgrounds (e.g. hero) */
.btn-outline-light {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.40);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.16); border-color: #fff; color: #fff; box-shadow: none; }

/* Destructive — uses the error semantic token */
.btn-destructive { background: var(--error); color: #fff; }
.btn-destructive:hover { filter: brightness(0.95); box-shadow: var(--shadow-md); }

/* Compact size modifier (composes with any variant) */
.btn-sm { line-height: 42px; font-size: 13px; padding: 0 22px; }

/* Click ripple — element injected by JS at the click point, then
   scaled up and faded out by the tdg-ripple keyframes */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.45);
  animation: tdg-ripple 0.6s ease-out;
  pointer-events: none;
  z-index: 0;
}
.btn-secondary .ripple { background: rgba(var(--primary-color-rgb), 0.25); }
@keyframes tdg-ripple { to { transform: scale(2.6); opacity: 0; } }

/* ----------------------------- Eyebrow -----------------------------
   Small uppercase kicker label shown above section headings. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--primary-color);
}

/* ----------------------------- Cards ----------------------------- */
/* Base card container: surface fill, border, rounding and shadow.
   Add `.card-hover` for the interactive lift-on-hover behaviour. */
.card-surface {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s cubic-bezier(0.24, 0.74, 0.58, 1),
    box-shadow 0.35s ease, border-color 0.35s ease;
}
/* Hover: raise the card and deepen its shadow */
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--primary-color-rgb), 0.25);
}

/* Square, rounded icon tile used at the top of feature cards */
.icon-box-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  font-size: 28px;
  border-radius: var(--radius);
  color: var(--primary-color);
  background: rgba(var(--primary-color-rgb), 0.10);
  transition: transform 0.35s cubic-bezier(0.24, 0.74, 0.58, 1), background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
/* When the parent card is hovered, the icon tile pops and fills with gradient */
.card-hover:hover .icon-box-icon {
  transform: scale(1.08) rotate(-3deg);
  background: linear-gradient(135deg, #006cff, #1227b8);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

/* ----------------------------- Forms -----------------------------
   Shared field primitives: label, text input, and inline error text.
   `aria-invalid="true"` drives the validation (error) styling. */
.field-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}
.field-input {
  width: 100%;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--surface);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.field-input:hover { border-color: rgba(var(--primary-color-rgb), 0.5); }
.field-input::placeholder { color: var(--text-muted); }
/* Focus: brand border + ring */
.field-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: var(--ring);
}
/* Invalid state (set by JS validation) */
.field-input[aria-invalid="true"] { border-color: var(--error); background: var(--error-bg); }
/* Inline error message; min-height reserves space to avoid layout shift */
.field-error { margin-top: 0.25rem; font-size: 0.875rem; color: var(--error); min-height: 1rem; }

/* ----------------------------- Footer / misc ----------------------------- */
/* Footer link: muted white that slides right + turns brand on hover */
.footer-link {
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.3s ease, padding-left 0.3s ease;
}
.footer-link:hover { color: var(--primary-color); padding-left: 6px; }

/* Small pill-shaped category/label chip */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: rgba(var(--primary-color-rgb), 0.1);
  color: var(--primary-color);
}

/* ----------------------------- Utilities / effects ----------------------------- */
/* Clip a gradient to the shape of the text (transparent fill reveals it) */
.text-gradient {
  background: linear-gradient(to right, #006cff, #1227b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Faint blueprint-style grid background for hero/section backdrops */
.bg-grid {
  background-image:
    linear-gradient(rgba(var(--primary-color-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--primary-color-rgb), 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Scroll-reveal animation: elements start hidden/offset and animate in
   when JS adds `.is-visible` (via IntersectionObserver). Direction
   modifiers change the entry vector. */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.24, 0.74, 0.58, 1);
}
/* will-change is applied only while actively transitioning (see main.js
   initReveal) — applying it permanently to every .reveal element at once
   causes serious scroll jank on mobile from too many simultaneous
   compositing layers. */
.reveal.is-revealing { will-change: opacity, transform; }
.reveal.from-left { transform: translateX(-40px); }
.reveal.from-right { transform: translateX(40px); }
.reveal.zoom { transform: scale(0.9); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Respect users who prefer reduced motion: show content immediately */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Loading skeleton: grey placeholder with an animated shimmer sweep */
.skeleton { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-alt); }
.skeleton::after {
  content: "";
  position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent,
    rgba(var(--primary-color-rgb), 0.08), transparent);
  animation: tdg-shimmer 1.5s infinite;
}
@keyframes tdg-shimmer { 100% { transform: translateX(100%); } }

/* Header (design.md §8): frosted, theme-aware, always legible */
.site-header {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}
/* Fallback for browsers without backdrop-filter: use an opaque surface */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--surface); }
}

/* Sticky-shrink behaviour on scroll */
.header-sticky { box-shadow: 0 4px 20px rgba(16, 24, 40, 0.08); }
.header-sticky [data-header-inner] { height: 84px; }

/* ----------------------------- Command palette (⌘K) -----------------------------
   Spotlight-style search/navigation overlay opened with ⌘K / Ctrl+K.
   `.cmdk-trigger` is the header button; `.cmdk-overlay` + `.cmdk-panel`
   are the modal; `.is-open`/`.is-active` are toggled by JS. */

/* Header pill button that opens the palette (shows the ⌘K shortcut hint) */
.cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 14px;
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.cmdk-trigger:hover { border-color: rgba(var(--primary-color-rgb), 0.5); color: var(--text-heading); box-shadow: var(--shadow-sm); }
.cmdk-trigger .cmdk-kbd { margin-left: 4px; }

/* Little keyboard-key badge (e.g. the "K" glyph) */
.cmdk-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* Full-screen dimmed, blurred backdrop; `.is-open` fades it in */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 1rem;
  background: rgba(8, 16, 30, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.cmdk-overlay.is-open { opacity: 1; }

/* The floating palette panel (slides/scales in when open) */
.cmdk-panel {
  width: 100%;
  max-width: 640px;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(8, 16, 30, 0.45);
  transform: translateY(-8px) scale(0.98);
  transition: transform 0.18s cubic-bezier(0.24, 0.74, 0.58, 1);
  overflow: hidden;
}
.cmdk-overlay.is-open .cmdk-panel { transform: none; }

/* Search input row at the top of the panel (icon + text field) */
.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
}
.cmdk-input-icon { color: var(--primary-color); font-size: 16px; }
.cmdk-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text-heading);
}
.cmdk-input::placeholder { color: var(--text-muted); }

/* Scrollable results list */
.cmdk-list { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow-y: auto; }
/* Group heading within the results (e.g. "Pages", "Actions") */
.cmdk-group {
  padding: 10px 12px 4px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
/* A single result row; `.is-active` marks the keyboard-highlighted item */
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text-body);
}
.cmdk-item.is-active { background: rgba(var(--primary-color-rgb), 0.1); }
.cmdk-item-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  color: var(--primary-color);
  background: rgba(var(--primary-color-rgb), 0.1);
  border-radius: 8px;
  font-size: 14px;
}
.cmdk-item.is-active .cmdk-item-icon { background: var(--primary-color); color: #fff; }
.cmdk-item-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cmdk-item-label { font-family: var(--font-heading); font-weight: 500; font-size: 15px; color: var(--text-heading); }
.cmdk-item-sub { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item-hint { font-size: 11px; color: var(--text-muted); border: 1px solid var(--border-color); padding: 2px 8px; border-radius: 999px; }
.cmdk-item-enter { color: var(--text-muted); font-size: 12px; opacity: 0; }
.cmdk-item.is-active .cmdk-item-enter { opacity: 1; }
/* "No results" placeholder */
.cmdk-empty { padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* Footer bar with keyboard hints */
.cmdk-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
}
.cmdk-footer .ml-auto { margin-left: auto; font-weight: 600; }

/* ----------------------------- Scroll progress + transitions ----------------------------- */
/* Thin top-of-page bar whose width JS ties to scroll position */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 130;
  background: linear-gradient(to right, #006cff, #08d9ff, #1227b8);
  transition: width 0.08s linear;
  pointer-events: none;
}

/* Opt in to smooth cross-document (page-to-page) view transitions. */
@view-transition { navigation: auto; }

/* ----------------------------- FAQ accordion -----------------------------
   Built on native <details>/<summary>; the [open] attribute (toggled by
   the browser) drives the icon rotation and answer reveal. */
.faq-item { overflow: hidden; }
/* Clickable question row (default marker hidden, custom +/x icon used) */
.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 20px 4px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--primary-color);
  background: rgba(var(--primary-color-rgb), 0.1);
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.faq-item[open] .faq-icon { transform: rotate(135deg); background: var(--primary-color); color: #fff; }
.faq-summary:hover .faq-icon { background: var(--primary-color); color: #fff; }
.faq-answer {
  display: grid;
  grid-template-rows: 1fr;
  animation: tdg-faq-open 0.3s ease;
}
@keyframes tdg-faq-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ----------------------------- Trusted-by marquee -----------------------------
   Infinitely scrolling logo/brand strip. The track holds two copies of
   the items and translates -50%, so the loop is seamless. Edge fade via
   mask-image; hover pauses; reduced-motion falls back to a static wrap. */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 3.5rem;
  white-space: nowrap;
  width: max-content;
  animation: tdg-marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  color: var(--text-muted);
  opacity: 0.85;
  transition: color 0.3s ease, opacity 0.3s ease;
}
.marquee-item:hover { color: var(--text-heading); opacity: 1; }
@keyframes tdg-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; white-space: normal; justify-content: center; }
}

/* ----------------------------- Legal / long-form prose -----------------------------
   Typographic defaults for privacy/terms pages where content is raw HTML
   (headings, paragraphs, lists) without utility classes. */
.legal-prose { color: var(--text-body); font-size: 16px; line-height: 1.8; }
.legal-prose > p { margin-bottom: 1.25rem; }
.legal-prose h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-heading);
  margin: 2.25rem 0 0.75rem;
}
.legal-prose ul { margin: 0 0 1.25rem; padding-left: 1.25rem; list-style: disc; }
.legal-prose li { margin-bottom: 0.5rem; }
.legal-prose a { color: var(--primary-color); font-weight: 500; }

/* ----------------------------- Announcement bar -----------------------------
   Fixed promo strip at the very top of the page; [hidden] removes it
   once dismissed. */
.announce-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 55;
  background: linear-gradient(to right, #006cff, #1227b8);
  color: #fff;
  font-size: 14px;
  padding: 9px 0;
}
.announce-bar[hidden] { display: none; }
.announce-text { font-family: var(--font-body); }
.announce-link { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.announce-link:hover { color: #fff; opacity: 0.85; }
.announce-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.announce-close:hover { opacity: 1; }
@media (max-width: 575px) { .announce-close { right: 0.25rem; } .announce-bar { font-size: 12.5px; } }

/* ----------------------------- Cookie consent -----------------------------
   Bottom-left consent card; JS adds `.is-visible` to slide it in and
   sets [hidden] once the user accepts/declines. */
.cookie-consent {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 115;
  width: min(420px, calc(100vw - 2rem));
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.cookie-consent.is-visible { transform: none; opacity: 1; }
.cookie-consent[hidden] { display: none; }
.cookie-body { display: flex; gap: 0.75rem; align-items: flex-start; }
.cookie-icon { color: var(--primary-color); font-size: 20px; margin-top: 2px; }
.cookie-text { font-size: 13.5px; line-height: 1.6; color: var(--text-body); }
.cookie-text a { color: var(--primary-color); font-weight: 500; }
.cookie-actions { display: flex; gap: 0.6rem; margin-top: 14px; }

/* Page entrance: fade + slight rise applied to <main> on every load */
@keyframes tdg-page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
main { animation: tdg-page-in 0.5s ease both; }

/* Cross-document view transitions (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: tdg-fade-out 0.18s ease both; }
  ::view-transition-new(root) { animation: tdg-page-in 0.28s ease both; }
}
@keyframes tdg-fade-out { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
  .cmdk-overlay, .cmdk-panel { transition: none; }
}

/* ============================================================
   Premium polish layer (Apple / Stripe / Linear inspired)
   ============================================================ */

/* Global focus ring for keyboard users */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
select:focus-visible, summary:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

/* Decorative rounded media (gradient/photo blocks) */
.media-rounded { border-radius: var(--radius-lg); overflow: hidden; }

/* Aurora mesh — layered radial gradients for hero/dark sections */
.aurora { position: relative; isolation: isolate; }
.aurora::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(40% 50% at 18% 22%, rgba(0, 108, 255, 0.45), transparent 60%),
    radial-gradient(38% 46% at 82% 18%, rgba(8, 217, 255, 0.30), transparent 60%),
    radial-gradient(45% 55% at 70% 88%, rgba(18, 39, 184, 0.45), transparent 60%);
  filter: blur(8px);
  animation: tdg-aurora 18s ease-in-out infinite alternate;
}
@keyframes tdg-aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -2%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 1%, 0) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) { .aurora::before { animation: none; } }

/* Glassmorphism surface */
.glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-radius: var(--radius-lg);
}

/* Soft floating animation for decorative blobs */
.float-slow { animation: tdg-float 9s ease-in-out infinite; }
@keyframes tdg-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
@media (prefers-reduced-motion: reduce) { .float-slow { animation: none; } }

/* Gradient divider accent */
.divider-accent { height: 4px; width: 56px; border-radius: 999px; background: linear-gradient(to right, #006cff, #08d9ff); }

/* Animated gradient text shimmer (used sparingly on key headings) */
.text-gradient-anim {
  background: linear-gradient(110deg, #006cff, #08d9ff, #1227b8, #006cff);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: tdg-text-shimmer 6s linear infinite;
}
@keyframes tdg-text-shimmer { to { background-position: 220% center; } }
@media (prefers-reduced-motion: reduce) { .text-gradient-anim { animation: none; } }

/* Section dividers blend into alternating surfaces */
.section { position: relative; }

/* Smooth, consistent transitions on interactive list items */
.footer-link, .cmdk-item, .filter-btn { will-change: transform; }

/* =====================================================================
   Team card — professional animations
   1. 3D tilt    (JS sets inline transform via data-team-card)
   2. Shine sweep (CSS ::before on .team-card-img-frame)
   3. Border glow (CSS on hover)
   4. Staggered social icons (CSS nth-child transition-delay)
   ===================================================================== */

/* Base hover state: shadow + border (no transform — JS owns that) */
.team-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--primary-color-rgb), 0.28);
}

.team-card-img-frame {
  isolation: isolate;
  transition: box-shadow 0.35s ease;
}

/* Blue glow ring around the image on hover */
.team-card:hover .team-card-img-frame {
  box-shadow:
    0 0 0 2px rgba(var(--primary-color-rgb), 0.55),
    0 8px 28px rgba(var(--primary-color-rgb), 0.22);
}

/* Shine sweep — diagonal white glare that crosses the photo once on hover */
.team-card-img-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    108deg,
    transparent 20%,
    rgba(255, 255, 255, 0.24) 45%,
    rgba(255, 255, 255, 0.08) 55%,
    transparent 80%
  );
  transform: translateX(-140%) skewX(-14deg);
  /* No transition by default so it resets instantly when not hovered */
  transition: none;
}
.team-card:hover .team-card-img-frame::before {
  transform: translateX(140%) skewX(-14deg);
  transition: transform 0.72s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Staggered social icons:
   - Default (exit): delay = 0ms so icons disappear instantly on mouse-leave
   - On parent hover (enter): cascade delay creates a waterfall effect        */
[data-team-card] .team-social-icon     { transition-delay: 0ms; }
[data-team-card]:hover .team-social-icon:nth-child(1) { transition-delay: 40ms; }
[data-team-card]:hover .team-social-icon:nth-child(2) { transition-delay: 100ms; }
[data-team-card]:hover .team-social-icon:nth-child(3) { transition-delay: 160ms; }

/* ── Hero text scrim — left-side gradient for text readability ── */
.hero-text-scrim {
  background: radial-gradient(
    ellipse 62% 60% at 18% 52%,
    rgba(255,255,255,0.95) 0%,
    rgba(255,255,255,0.80) 30%,
    rgba(255,255,255,0.35) 55%,
    transparent 72%
  );
  pointer-events: none;
  z-index: 1;
}
.dark .hero-text-scrim {
  background: radial-gradient(
    ellipse 62% 60% at 18% 52%,
    rgba(11,18,32,0.95) 0%,
    rgba(11,18,32,0.80) 30%,
    rgba(11,18,32,0.35) 55%,
    transparent 72%
  );
}

/* ── Hero video loop dissolve ── */
#hero-video-fade {
  position: absolute; inset: 0;
  background: var(--surface);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  will-change: opacity;
}

/* ── Hero slider ── */
.hero-slides-wrap {
  display: grid; /* all slides share one grid cell → wrap auto-sizes to the tallest, no overlap */
}
[data-hero-slide] {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}
[data-hero-slide].is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-nav-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--border-color);
  color: var(--text-heading);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.hero-nav-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}
[data-hero-dot] {
  width: 8px; height: 8px; border-radius: 8px;
  background: rgba(var(--primary-color-rgb), 0.25);
  border: none; cursor: pointer; padding: 0; flex-shrink: 0;
  transition: width 0.35s ease, background 0.35s ease;
}
[data-hero-dot].is-active {
  width: 24px; background: var(--primary-color);
}

/* ── Testimonial carousel ── */
@keyframes testimonialFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-18px); }
}
.testimonial-float {
  animation: testimonialFloat 5.5s ease-in-out infinite;
  will-change: transform;
}
[data-testimonial-slide] {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
[data-testimonial-slide].is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
[data-testimonial-dot] {
  width: 8px; height: 8px; border-radius: 8px;
  background: var(--border-color); border: none; cursor: pointer;
  transition: width 0.35s ease, background 0.35s ease;
  padding: 0; flex-shrink: 0;
}
[data-testimonial-dot].is-active { width: 28px; background: var(--primary-color); }
.testimonial-progress {
  height: 3px; background: rgba(var(--primary-color-rgb), 0.12);
  overflow: hidden; border-radius: 2px; margin-top: 20px;
}
.testimonial-progress-fill {
  height: 100%; width: 0%; background: var(--primary-color);
  border-radius: 2px;
}
.testimonial-progress-fill.running { width: 100%; transition: width 5s linear; }

/* =====================================================================
   RESPONSIVE SYSTEM — mobile-first additions
   ===================================================================== */

/* ── Buttons: smaller footprint on narrow screens ── */
@media (max-width: 480px) {
  .btn { padding: 0 20px; line-height: 46px; }
  .btn-sm { padding: 0 14px; line-height: 38px; font-size: 12px; }
}

/* ── Icon boxes: scale down for tight grids ── */
@media (max-width: 480px) {
  .icon-box-icon { width: 52px; height: 52px; font-size: 22px; }
}

/* ── Header: reclaim screen space on phones ── */
@media (max-width: 575px) {
  .site-header [data-header-inner] { height: 80px !important; }
  .header-sticky [data-header-inner] { height: 68px !important; }
}

/* ── Marquee: readable size on mobile ── */
@media (max-width: 640px) {
  .marquee-track { gap: 2rem; }
  .marquee-item { font-size: 16px; }
}

/* ── Testimonial touch targets ── */
@media (max-width: 768px) {
  [data-testimonial-dot] { width: 10px; height: 10px; }
  [data-testimonial-dot].is-active { width: 30px; }
  [data-testimonial-slide] { gap: 16px; }
}

/* ── Cards: single column on extra-small screens ── */
@media (max-width: 400px) {
  .card-surface { border-radius: var(--radius); }
}

/* ================================================================
   FLUID GRID & COMPONENT RESPONSIVE SYSTEM
   theme.css loads after Tailwind, so same-specificity rules here
   override Tailwind p-6/p-7/p-8 utilities via cascade order.
   ================================================================ */

/* ── Card padding: scale with screen ── */
@media (max-width: 639px) {
  .card-surface { padding: clamp(0.875rem, 4vw, 1.25rem); }
  .card-surface .icon-box-icon { margin-bottom: 0.75rem; }
  /* Icon inside a flex row (inline icon+title layout) — no bottom margin so it stays centred */
  .card-surface .flex .icon-box-icon { margin-bottom: 0 !important; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .card-surface { padding: clamp(1.125rem, 3vw, 1.5rem); }
}

/* ── Icon box: proportionally smaller on mobile/tablet ── */
@media (max-width: 639px) {
  .icon-box-icon { width: 44px !important; height: 44px !important; font-size: 18px !important; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .icon-box-icon { width: 54px !important; height: 54px !important; font-size: 22px !important; }
}

/* ── Stat counter: fluid font size (targets .stat-val class added to macros) ── */
.stat-val { font-size: clamp(24px, 4vw + 0.75rem, 52px) !important; }

/* ══════════════════════════════════════════════════════════════════
   GLOBAL MOBILE TYPOGRAPHY — unified professional type scale
   All pages · max-width 639px · specific overrides below can still
   win via higher specificity for compact-layout sections
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 639px) {
  /* Eyebrows — small caps label, sits below the heading in the hierarchy */
  .eyebrow { font-size: 12px !important; letter-spacing: 0.10em !important; }

  /* Heading scale */
  h1 { font-size: 24px !important; line-height: 1.25 !important; }
  h2 { font-size: 16px !important; line-height: 1.35 !important; }
  h3 { font-size: 17px !important; line-height: 1.35 !important; }
  h4 { font-size: 15px !important; line-height: 1.40 !important; }
  h5 { font-size: 14px !important; line-height: 1.40 !important; }
  h6 { font-size: 13px !important; line-height: 1.40 !important; }

  /* Body text */
  p  { font-size: 14px !important; line-height: 1.65 !important; }
  li { font-size: 14px !important; line-height: 1.60 !important; }

  /* Card surfaces — one step tighter */
  .card-surface p  { font-size: 13px !important; line-height: 1.60 !important; }
  .card-surface h3 { font-size: 16px !important; }
  .card-surface h4 { font-size: 14px !important; }
  .card-surface h5 { font-size: 13px !important; }
  .card-surface h6 { font-size: 12px !important; }
}

/* ── Service detail (mobile): show heading first, then illustration, then body.
   Desktop keeps illustration-on-top. The main column stacks its children with
   flexbox and lifts the heading block (2nd child; the illustration is 1st). ── */
@media (max-width: 639px) {
  .service-main-col { display: flex; flex-direction: column; }
  .service-main-col > :nth-child(2) { order: -1; margin-top: 0 !important; }
  /* The vector illustrations carry an empty band at the bottom of their viewBox
     (fill:--illus-bg) that reads as a gap before the body text. Pull the body up
     over it. Percentage margins scale with the image width at any phone size;
     each illustration is tuned to its own band so cloud (least bottom padding)
     is never over-cropped. Scoped to <svg> so photo banners (<img>) are safe. */
  .service-main-col > svg { margin-bottom: +5%; }
  .service-main-col > svg.illus-analytics,
  .service-main-col > svg.illus-automation { margin-bottom: +5%; }
  .service-main-col > svg.illus-people   { margin-bottom: +5%; }
  .service-main-col > svg.illus-devops   { margin-bottom: +5%; }
  .service-main-col > svg.illus-support  { margin-bottom: +5%; }
  .service-main-col > svg.illus-qa,
  .service-main-col > svg.illus-database { margin-bottom: +5%; }
}

/* ── Home services intro — center eyebrow on mobile ── */
@media (max-width: 1023px) {
  .home-services-section .from-left > .eyebrow {
    display: flex !important;
    justify-content: center !important;
  }
}

/* ── Mobile section headings inside lg:hidden blocks — center align ── */
@media (max-width: 1023px) {
  .lg\:hidden > .eyebrow {
    display: flex !important;
    justify-content: center !important;
  }
  .lg\:hidden > h2 {
    text-align: center !important;
  }
}

/* ── Section spacing: tighter on mobile ── */
@media (max-width: 639px) {
  .section { padding-top: 20px !important; padding-bottom: 18px !important; }
  .section > .container-site .mb-12 { margin-bottom: 1rem !important; }
  .section > .container-site .mb-10 { margin-bottom: 0.875rem !important; }
  /* section_heading macro wrapper: max-w-2xl mx-auto text-center mb-6 reveal */
  .section > .container-site > .reveal.max-w-2xl { margin-bottom: 12px !important; }
  .section > .container-site > .reveal.max-w-2xl .eyebrow { margin-bottom: 2px !important; }
  .section > .container-site > .reveal.max-w-2xl h2 { margin-top: 2px !important; font-size: 16px !important; line-height: 1.35 !important; }
  .section > .container-site > .reveal.max-w-2xl p { margin-top: 4px !important; font-size: 13px !important; }
}

/* ── Images & video: always constrained to parent ── */
img, video, iframe { max-width: 100%; }

/* ── Page title banner: compact on mobile ── */
@media (max-width: 639px) {
  .page-title-section { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
}

/* ── Hero slides min-height: compact on small screens ── */
@media (max-width: 639px) {
  .hero-slides-wrap { min-height: 160px; }
}

/* ── Two-column layout gaps: tighter on tablet/mobile ── */
/* These override the inline Tailwind gap-14/gap-12/gap-16 values */
@media (max-width: 1023px) {
  .two-col-gap { gap: clamp(1.5rem, 4vw, 3rem) !important; }
}

/* ── Home page: Testimonials — image beside heading on mobile ── */
.testi-mobile-img { display: none; } /* hidden on desktop */

@media (max-width: 639px) {
  .home-testimonials.section { padding-top: 24px !important; padding-bottom: 24px !important; }
  .testi-illustration { display: none !important; } /* desktop-only column hidden */

  /* flex row: image on left, eyebrow+heading on right */
  .testi-intro-row {
    display: flex !important;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
  }
  .testi-mobile-img {
    display: block !important;
    width: 110px;
    flex-shrink: 0;
  }

  .testi-eyebrow { font-size: 11px !important; margin-bottom: 4px !important; }
  .testi-heading { font-size: 18px !important; line-height: 1.25 !important; margin-bottom: 10px !important; }
  .testi-slides { min-height: 220px !important; }
  .home-testimonials [data-testimonial-slide] p.italic { font-size: 14px !important; line-height: 1.55 !important; }
  .home-testimonials .border-t { padding-top: 10px !important; }
}

/* ── Home page: We Work Together — full-width mobile layout (lg:hidden block) ── */
@media (max-width: 639px) {
  /* Stat card stays absolutely positioned inside the image wrapper */
  .home-work-section .card-surface.absolute {
    position: absolute !important;
  }
}

/* ── Home page: Fun Facts — compact single-row layout on mobile ── */
@media (max-width: 639px) {
  .fun-facts-desc { font-size: 13px !important; margin-top: 8px !important; line-height: 1.5 !important; }
  .home-fun-facts h2 { font-size: 18px !important; line-height: 1.3 !important; margin-top: 4px !important; }
  .home-fun-facts .eyebrow { font-size: 11px !important; margin-bottom: 2px !important; }
  .home-fun-facts .stat-val { font-size: 18px !important; }
  .home-fun-facts .text-center i { font-size: 15px !important; margin-bottom: 3px !important; }
  .home-fun-facts .text-center > p { font-size: 10px !important; margin-top: 2px !important; }
}

/* ── About page: About Us & Who We Are sections on mobile ── */
@media (max-width: 639px) {
  .about-section-img { height: 180px !important; object-fit: cover !important; object-position: center top !important; }
  .about-eyebrow { font-size: 11px !important; margin-bottom: 2px !important; }
  .about-h2 { font-size: 18px !important; line-height: 1.3 !important; margin-top: 3px !important; }
  .about-body { font-size: 12px !important; line-height: 1.55 !important; margin-top: 6px !important; }
  .about-body > * + * { margin-top: 6px !important; }
}

/* ── CTA banner: compact padding on mobile ── */
@media (max-width: 639px) {
  .bg-gradient-primary .container-site { padding-top: 28px !important; padding-bottom: 28px !important; gap: 14px !important; }
  .bg-gradient-primary h2 { font-size: 18px !important; line-height: 1.3 !important; }
}

/* ── Services section: compact heading block on mobile ── */
@media (max-width: 639px) {
  .home-services-section.section { padding-top: 20px !important; padding-bottom: 20px !important; }
  .home-services-section .eyebrow { margin-bottom: 4px !important; }
  .home-services-section .reveal.from-left > h2 { margin-top: 4px !important; font-size: 18px !important; line-height: 1.3 !important; }
  .home-services-section .reveal.from-left > p { margin-top: 8px !important; font-size: 13px !important; line-height: 1.5 !important; }
  .home-services-section .grid { margin-bottom: 12px !important; gap: 12px !important; }
}

/* ── Carousel cards: bypass reveal animation (overflow-x:auto clips translateY) ── */
.home-blog-track > article {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  will-change: auto !important;
}

/* Culture page event cards: same fix — preserve hover lift */
.culture-all-events-track .culture-event-card,
.culture-event-cards .culture-event-card {
  opacity: 1 !important;
  transform: none !important;
  transition: transform 0.35s cubic-bezier(0.24, 0.74, 0.58, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease !important;
  will-change: auto !important;
}
.culture-all-events-track .culture-event-card:hover,
.culture-event-cards .culture-event-card:hover {
  transform: translateY(-6px) !important;
}

/* ── About page: all section carousels on mobile ── */
.about-carousel-nav { display: none; }
@media (max-width: 639px) {
  .about-carousel-track {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
    gap: 12px !important;
    padding-bottom: 4px;
    margin-bottom: 0 !important;
  }
  .about-carousel-track::-webkit-scrollbar { display: none; }
  .about-carousel-track > * {
    flex: 0 0 100% !important;
    width: 100% !important;
    scroll-snap-align: start;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
    margin-bottom: 0 !important;
  }
  .about-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    margin-bottom: 28px;
  }
  /* last carousel in a section doesn't need bottom margin */
  .about-carousel-wrap:last-of-type .about-carousel-nav { margin-bottom: 0; }
  /* sub-headings that follow a carousel wrap */
  .about-carousel-wrap + h3 { margin-top: 8px !important; }
  /* approach section intro paragraph: fix overflow on mobile */
  .about-approach-wrap ~ div p { font-size: 14px !important; line-height: 1.6 !important; }
  /* closing statement after approach carousel */
  .about-approach-wrap + div { margin-top: 20px !important; }
}

/* ── About page: Team grid — 3-per-row compact on mobile ── */
.team-section-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
@media (max-width: 639px) {
  .team-section-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
  /* card-surface adds ~17px padding globally on mobile — zero it out for team cards */
  .team-card.card-surface { padding: 0 !important; }
  /* card clips image at its own border-radius */
  .team-card { overflow: hidden !important; }
  /* photo wrapper: no inner padding so image goes edge-to-edge */
  .team-card > div:first-child { padding: 0 !important; }
  .team-card-img-frame {
    border-radius: 0 !important;
    aspect-ratio: 1 / 1 !important;
    max-height: none !important;
    width: 100% !important;
  }
  .team-card-img-frame img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
  /* compact text area gets its own padding */
  .team-card .p-3 { padding: 6px 5px 8px !important; }
  .team-card h5 { font-size: 10px !important; line-height: 1.3 !important; margin: 0 !important; font-weight: 600 !important; }
  .team-card p.text-primary { font-size: 9px !important; margin-top: 2px !important; line-height: 1.2 !important; }
  /* hide bio + social icons — too small at 3-col width */
  .team-card .mt-2.text-\[13px\] { display: none !important; }
  .team-card .absolute { display: none !important; }

  /* tap-to-activate hover effect on mobile */
  .team-card { transition: transform 0.25s ease, box-shadow 0.25s ease !important; }
  .team-card.touch-hover {
    transform: translateY(-4px) scale(1.04) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22) !important;
    border-color: rgba(var(--primary-color-rgb), 0.35) !important;
    z-index: 2;
    position: relative;
  }
  .team-card.touch-hover .team-card-img-frame img {
    transform: scale(1.12) !important;
  }
}

/* ── About page: CTRM tiles — 2-per-row grid, not carousel ── */
@media (max-width: 639px) {
  .about-ctrm-track {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    overflow-x: visible !important;
    scroll-snap-type: none !important;
    touch-action: auto !important;
    flex-direction: unset !important;
    gap: 10px !important;
    padding-bottom: 0 !important;
    margin-bottom: 8px !important;
  }
  .about-ctrm-track > * {
    flex: unset !important;
    width: auto !important;
    scroll-snap-align: none !important;
    display: flex !important;
    align-items: center !important;
    padding: 12px 10px !important;
    gap: 8px !important;
  }
  .about-ctrm-track .icon-box-icon { width: 32px !important; height: 32px !important; min-width: 32px !important; }
  .about-ctrm-track h6 { font-size: 12px !important; }
  .about-ctrm-track + .about-carousel-nav { display: none !important; }
}

/* ── Blog detail: compact related-articles section ── */
.blog-related-section.section {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}
.blog-related-section .container-site > .reveal.max-w-2xl {
  margin-bottom: 24px !important;
}
.blog-related-section .container-site > .reveal.max-w-2xl h2 {
  font-size: clamp(20px, 2vw, 26px) !important;
  margin-top: 4px !important;
}
.blog-related-section .container-site > .reveal.max-w-2xl .eyebrow {
  margin-bottom: 4px !important;
}

/* ── Blog detail: related articles carousel on mobile ── */
.blog-related-nav { display: none; }
@media (max-width: 639px) {
  .blog-related-track {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
    gap: 12px !important;
    padding-bottom: 4px;
  }
  .blog-related-track::-webkit-scrollbar { display: none; }
  .blog-related-track > article {
    flex: 0 0 100% !important;
    width: 100% !important;
    scroll-snap-align: start;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }
  .blog-related-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
  }
}

/* ── Blog page: paginated grid — nav visible on all screen sizes ── */
.blog-page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}
@media (max-width: 639px) {
  .blog-page-nav {
    margin-top: 16px;
  }
}

/* ── Careers: Why Join Us — 2-per-row grid on mobile, not carousel ── */
.careers-why-nav { display: none !important; }
@media (max-width: 639px) {
  .careers-why-track {
    display: grid !important;
    grid-template-columns: 1fr !important;
    overflow-x: visible !important;
    scroll-snap-type: none !important;
    gap: 24px !important;
  }
}

/* ── Careers: Perks — 2-per-row grid on mobile, not carousel ── */
.careers-perks-nav { display: none; }
@media (max-width: 639px) {
  .careers-perks-track {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    overflow-x: visible !important;
    scroll-snap-type: none !important;
    touch-action: auto !important;
    gap: 10px !important;
    padding-bottom: 0 !important;
  }
  .careers-perks-track > .card-surface {
    flex: unset !important;
    width: auto !important;
    scroll-snap-align: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }
  .careers-perks-nav { display: none !important; }
}

/* ── Careers: Interview process grid — compact cards on mobile ── */
@media (max-width: 639px) {
  .careers-interview-card { padding: 16px 10px !important; position: relative !important; }
  .careers-interview-card .icon-box-icon { margin-bottom: 8px !important; }
  .careers-interview-card h4 { font-size: 13px !important; }
  .careers-step-badge {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    border-radius: 4px !important;
    padding: 3px 8px !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    letter-spacing: 0.02em !important;
    gap: 3px !important;
    margin-bottom: 0 !important;
  }
}

/* ── Home page: Blog section heading — compact but properly spaced on mobile ── */
@media (max-width: 639px) {
  .home-blog-section.section { padding-top: 28px !important; padding-bottom: 24px !important; }
  .home-blog-section .container-site > .reveal:first-child { margin-bottom: 12px !important; }
  .home-blog-section .eyebrow { margin-bottom: 0 !important; }
}

/* ── Home page: services + blog horizontal scroll carousels (mobile only) ── */
.home-svc-nav,
.home-blog-nav { display: none; } /* hidden on desktop */

@media (max-width: 639px) {
  .home-svc-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
  }
  .home-svc-btn {
    flex-shrink: 0;
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface-card);
    color: var(--text-heading);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
  }
  .home-svc-btn:not(:disabled):hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
  .home-svc-btn:disabled { opacity: 0.3; pointer-events: none; }
  .home-svc-counter {
    font-size: 13px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
  }
  .home-services-track {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
    gap: 12px !important;
    padding-bottom: 4px;
  }
  .home-services-track::-webkit-scrollbar { display: none; }
  .home-services-track > article {
    flex: 0 0 100% !important;
    width: 100% !important;
    scroll-snap-align: start;
  }

  /* Blog carousel */
  .home-blog-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
  }
  .home-blog-track {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
    gap: 12px !important;
    padding-bottom: 4px;
  }
  .home-blog-track::-webkit-scrollbar { display: none; }
  .home-blog-track > article {
    flex: 0 0 100% !important;
    width: 100% !important;
    scroll-snap-align: start;
  }
}

/* ================================================================
   Welcome Popup / Event Lead Capture Modal
   ================================================================ */

/* Prevent page scroll while popup is open */
body.popup-open { overflow: hidden; }

/* ── Backdrop ── */
.popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 24px);
  background: rgba(4, 10, 24, 0.70);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.popup-backdrop[hidden] { display: none; }
.popup-backdrop.popup-visible { opacity: 1; }

/* ── Modal shell ── */
.popup-modal {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 940px;
  max-height: 92vh;
  overflow: hidden;
  border-radius: 20px;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.08),
    0 8px 24px rgba(0,0,0,0.18),
    0 32px 80px rgba(0,0,0,0.28);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.40s cubic-bezier(0.22, 1, 0.36, 1);
}
.popup-backdrop.popup-visible .popup-modal {
  transform: scale(1) translateY(0);
}

/* ── Close button ── */
.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.popup-close:hover {
  background: rgba(0, 0, 0, 0.15);
  color: var(--text-heading);
  transform: scale(1.08);
}
.popup-close:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ══ LEFT PANEL — gradient event info ══════════════════════════ */
.popup-left {
  flex: 0 0 42%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #0052d4 0%, #0f3fa8 40%, #06063c 100%);
  display: flex;
  flex-direction: column;
}

/* Decorative floating orbs */
.popup-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.popup-deco-1 {
  width: 320px;
  height: 320px;
  bottom: -80px;
  right: -90px;
  background: radial-gradient(circle at center, rgba(8,217,255,0.14) 0%, transparent 68%);
}
.popup-deco-2 {
  width: 180px;
  height: 180px;
  top: -50px;
  left: -50px;
  background: radial-gradient(circle at center, rgba(255,255,255,0.08) 0%, transparent 70%);
}
.popup-deco-3 {
  width: 120px;
  height: 120px;
  top: 45%;
  right: -30px;
  border: 1px solid rgba(8,217,255,0.18);
  background: transparent;
}

.popup-left-inner {
  position: relative;
  z-index: 1;
  padding: 40px 32px 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}
.popup-left-inner::-webkit-scrollbar { display: none; }

/* Free badge */
.popup-badge-free {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  background: rgba(8,217,255,0.15);
  border: 1px solid rgba(8,217,255,0.32);
  border-radius: 999px;
  color: #08d9ff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 20px;
}

.popup-event-title {
  font-family: var(--font-heading);
  font-size: clamp(19px, 2.2vw, 25px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.28;
  margin: 0 0 14px;
}

.popup-event-desc {
  font-size: 13.5px;
  line-height: 1.70;
  text-align: left;
  color: rgba(255,255,255,0.72);
  margin: 0 0 24px;
}

.popup-event-details {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.popup-event-details li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  color: rgba(255,255,255,0.90);
  font-weight: 500;
}
.popup-event-details li i {
  color: #08d9ff;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* Highlights block */
.popup-highlights {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 24px;
}
.popup-highlights-label {
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin: 0 0 12px;
}
.popup-highlights ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.popup-highlights li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.85);
}
.popup-highlights li i {
  color: #08d9ff;
  font-size: 12px;
  flex-shrink: 0;
}

/* Limited seats badge */
.popup-seats-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(239,68,68,0.16);
  border: 1px solid rgba(239,68,68,0.30);
  border-radius: 10px;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-heading);
  width: fit-content;
  margin-top: auto;
}
.popup-seats-badge i { color: #f87171; }

/* ══ RIGHT PANEL — form ════════════════════════════════════════ */
.popup-right {
  flex: 0 0 58%;
  background: var(--surface);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
.popup-right-inner {
  padding: 22px 28px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

/* Form header */
.popup-form-header { margin-bottom: 12px; }
.popup-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 5px;
}
.popup-form-title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 5px;
  line-height: 1.2;
}
.popup-form-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: left;
  margin: 0;
  display: none;
}

/* Fields */
.popup-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.popup-field label {
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 4px;
}
.popup-required { color: var(--error); font-size: 12px; }
.popup-optional { color: var(--text-muted); font-weight: 400; font-size: 11.5px; }

/* Input with icon */
.popup-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.popup-input-icon {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}
.popup-input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 13.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.popup-input:focus {
  border-color: var(--primary-color);
  box-shadow: var(--ring);
}
.popup-input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(225,29,72,0.10);
}
.popup-input::placeholder { color: var(--text-muted); font-size: 13px; }
.popup-field-error {
  font-size: 11px;
  color: var(--error);
  min-height: 0;
  line-height: 1.3;
  display: none;
}
.popup-field-error:not(:empty) { display: block; }

/* Phone field — country code + number */
.popup-phone-wrap { gap: 0; }
.popup-phone-code {
  flex-shrink: 0;
  height: 38px;
  padding: 0 22px 0 8px;
  border: 1.5px solid var(--field-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--surface-alt);
  color: var(--text-body);
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5'%3E%3Cpath d='M0 0l4.5 5L9 0z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  transition: border-color 0.2s, background-color 0.2s;
  white-space: nowrap;
}
.popup-phone-code:focus {
  border-color: var(--primary-color);
  background-color: var(--surface);
}
.popup-phone-wrap:focus-within .popup-phone-code {
  border-color: var(--primary-color);
}
.popup-phone-input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
  padding-left: 12px !important;
}

/* Two-column row */
.popup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Consent checkbox */
.popup-consent-wrap { margin-bottom: 10px; }
.popup-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-body);
  line-height: 1.55;
  user-select: none;
}
.popup-consent-checkbox-wrap {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.popup-checkbox {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
  z-index: 1;
}
.popup-checkmark {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--field-border);
  border-radius: 4px;
  background: var(--surface);
  display: grid;
  place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.popup-checkmark i {
  font-size: 10px;
  color: white;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
}
.popup-checkbox:checked + .popup-checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}
.popup-checkbox:checked + .popup-checkmark i {
  opacity: 1;
  transform: scale(1);
}
.popup-checkbox:focus-visible + .popup-checkmark {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Action buttons */
.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}
.popup-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  padding: 0 20px;
  background: linear-gradient(90deg, var(--gradient-color-from), var(--gradient-color-to));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--shadow-primary);
  letter-spacing: 0.01em;
}
.popup-btn-primary:hover:not(:disabled) {
  opacity: 0.90;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(var(--primary-color-rgb), 0.40);
}
.popup-btn-primary:active:not(:disabled) { transform: translateY(0); }
.popup-btn-primary:disabled { opacity: 0.60; cursor: not-allowed; }

.popup-btn-skip {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px;
  text-align: center;
  transition: color 0.2s;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
}
.popup-btn-skip:hover {
  color: var(--text-body);
  text-decoration-color: currentColor;
}

/* ── Success state ── */
.popup-success {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  min-height: 320px;
}
.popup-success[hidden] { display: none; }

.popup-success-icon-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}
.popup-success-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(22,163,74,0.25);
  animation: popup-ring-expand 0.6s cubic-bezier(0.22,1,0.36,1) forwards;
}
.popup-success-icon {
  font-size: 42px;
  color: var(--success);
  animation: popup-icon-pop 0.5s cubic-bezier(0.22,1,0.36,1) 0.1s both;
}
.popup-success h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 10px;
}
.popup-success p {
  font-size: 14.5px;
  color: var(--text-body);
  line-height: 1.65;
  margin: 0 0 20px;
}
.popup-success-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

@keyframes popup-ring-expand {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes popup-icon-pop {
  from { transform: scale(0.2); opacity: 0; }
  60%  { transform: scale(1.18); opacity: 1; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── Mobile (≤ 640px) — bottom sheet ── */
@media (max-width: 640px) {
  .popup-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .popup-modal {
    flex-direction: column;
    border-radius: 20px 20px 0 0;
    max-width: 100%;
    max-height: 94vh;
    transform: translateY(100%);
    opacity: 1;
  }
  .popup-backdrop.popup-visible .popup-modal {
    transform: translateY(0);
    opacity: 1;
  }
  .popup-left {
    flex: 0 0 auto;
  }
  .popup-left-inner {
    padding: 28px 22px 20px;
  }
  .popup-event-title { font-size: 18px; }
  .popup-event-desc,
  .popup-highlights { display: none; }
  .popup-seats-badge { margin-top: 16px; }
  .popup-close {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.85);
  }
  .popup-close:hover {
    background: rgba(255,255,255,0.28);
    color: #fff;
  }
  .popup-right {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .popup-right-inner {
    padding: 18px 16px 14px;
    overflow: visible;
  }
  .popup-row {
    grid-template-columns: 1fr;
  }
  .popup-actions {
    position: sticky;
    bottom: 0;
    background: var(--surface);
    padding: 10px 0 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
  }
}

/* ── Tablet (641px – 900px) ── */
@media (min-width: 641px) and (max-width: 900px) {
  .popup-modal { max-width: 100%; border-radius: 16px; }
  .popup-left { flex: 0 0 38%; }
  .popup-left-inner { padding: 32px 24px 24px; }
  .popup-right { flex: 0 0 62%; }
  .popup-right-inner { padding: 20px 22px 16px; }
  .popup-highlights li:nth-child(n+4) { display: none; }
}

/* ── Large desktop (≥ 1200px) ── */
@media (min-width: 1200px) {
  .popup-modal { max-width: 1000px; }
}

/* ── Dark mode adjustments ── */
.dark .popup-close {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
  color: var(--text-muted);
}
.dark .popup-close:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text-heading);
}

/* ── Floating badges: no negative overflow on mobile ── */
@media (max-width: 640px) {
  .floating-badge { position: static !important; transform: none !important; margin-top: 1rem; }
}

/* ── Sidebar CTA: tighter padding on phones ── */
@media (max-width: 640px) {
  .sidebar-cta { padding: 1.25rem !important; }
}

/* ── FAQ icon: better touch target ── */
@media (max-width: 640px) {
  .faq-icon { width: 28px; height: 28px; font-size: 12px; }
}

/* ── Ensure images/video never overflow ── */
img, video, iframe, svg { max-width: 100%; }

/* ── Prevent long words breaking layout ── */
h1, h2, h3, h4, h5, h6, p, a, li, td, th {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── Popup re-open trigger ────────────────────────────────────── */
.popup-trigger {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) translateX(90px);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color, #4f46e5) 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 20px rgba(79,70,229,0.4);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(.34,1.56,.64,1), opacity 0.3s;
}
.popup-trigger--visible {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.popup-trigger--visible:hover {
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 6px 28px rgba(79,70,229,0.55);
}
.popup-trigger-tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-heading, #111);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.popup-trigger-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--text-heading, #111);
}
.popup-trigger--visible:hover .popup-trigger-tooltip {
  opacity: 1;
}
@keyframes popup-trigger-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(79,70,229,0.4); }
  50%       { box-shadow: 0 4px 20px rgba(79,70,229,0.4), 0 0 0 8px rgba(79,70,229,0.15); }
}
.popup-trigger--visible {
  animation: popup-trigger-pulse 2.8s ease-in-out infinite;
}
.popup-trigger--visible:hover {
  animation: none;
}
@media (max-width: 640px) {
  .popup-trigger { display: none !important; }
}

/* ── Reduce motion: disable all transitions ── */
@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;
  }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   Events & Culture Page
   ═══════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────── */
.culture-hero {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #0a0f2e 0%, #1a1060 40%, #0f2d5e 100%);
  padding-bottom: 0;
}
.culture-hero-bg {
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234f46e5' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.culture-hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(99,102,241,0.25) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.18) 0%, transparent 50%);
}
.culture-deco {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.culture-deco-1 { width: 400px; height: 400px; top: -100px; right: -100px; }
.culture-deco-2 { width: 280px; height: 280px; bottom: 60px; left: 5%; background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, transparent 70%); }
.culture-deco-3 { width: 160px; height: 160px; top: 30%; right: 15%; background: radial-gradient(circle, rgba(79,70,229,0.18) 0%, transparent 70%); }
.culture-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,0.2); border: 1px solid rgba(99,102,241,0.4);
  color: #a5b4fc; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 999px; margin-bottom: 20px;
  backdrop-filter: blur(8px);
}
.culture-hero-title {
  font-size: clamp(36px, 6vw, 72px); font-weight: 800;
  color: #fff; line-height: 1.1; margin: 0 0 18px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.culture-hero-sub {
  font-size: clamp(15px, 1.5vw, 20px); color: rgba(255,255,255,0.75);
  max-width: 640px; line-height: 1.6; margin: 0 auto 32px; text-align: center;
}
.culture-scroll-indicator {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3); color: rgba(255,255,255,0.7);
  animation: culture-bounce 2s ease-in-out infinite; text-decoration: none;
  transition: border-color 0.3s, color 0.3s;
}
.culture-scroll-indicator:hover { border-color: #fff; color: #fff; }
@keyframes culture-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Stats bar */
.culture-stats-bar {
  background: rgba(255,255,255,0.06); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: 40px;
}
.culture-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; padding: 0;
}
@media (max-width: 640px) { .culture-stats-grid { grid-template-columns: repeat(2, 1fr); } }
.culture-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 24px 16px; text-align: center;
  border-right: 1px solid rgba(255,255,255,0.1); color: #fff;
}
.culture-stat:last-child { border-right: none; }
.culture-stat i { font-size: 22px; color: #a5b4fc; margin-bottom: 4px; }
.culture-stat-num { font-size: 26px; font-weight: 800; line-height: 1; }
.culture-stat-label { font-size: 12px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Filter bar ────────────────────────────────────────────── */
.culture-filter-wrap {
  position: sticky; top: 0; z-index: 30; /* sits below main navbar */
  background: var(--surface); border-bottom: 1px solid var(--border-color);
  padding: 14px 0; transition: box-shadow 0.3s;
}
.culture-filter-wrap.is-stuck { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.culture-filter-inner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.culture-filter-pills {
  display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto;
  scrollbar-width: none; flex: 1;
}
.culture-filter-pills::-webkit-scrollbar { display: none; }
.culture-pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border-color); background: transparent;
  color: var(--text-body); cursor: pointer; transition: all 0.2s;
}
.culture-pill:hover { border-color: var(--primary-color); color: var(--primary-color); }
.culture-pill.is-active {
  background: var(--primary-color); border-color: var(--primary-color);
  color: #fff; box-shadow: 0 2px 12px rgba(79,70,229,0.3);
}
.culture-filter-controls { display: flex; gap: 10px; flex-shrink: 0; }
.culture-select {
  height: 38px; padding: 0 12px; border-radius: 8px;
  border: 1.5px solid var(--border-color); background: var(--surface);
  color: var(--text-body); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color 0.2s;
}
.culture-select:focus { outline: none; border-color: var(--primary-color); }
.culture-search-wrap { position: relative; }
.culture-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 13px; pointer-events: none;
}
.culture-search {
  height: 38px; padding: 0 12px 0 34px; border-radius: 8px; width: 200px;
  border: 1.5px solid var(--border-color); background: var(--surface);
  color: var(--text-body); font-size: 13px; transition: border-color 0.2s, width 0.3s;
}
.culture-search:focus { outline: none; border-color: var(--primary-color); width: 240px; }
@media (max-width: 640px) {
  .culture-search { width: 130px; }
  .culture-search:focus { width: 160px; }
}

/* ── Masonry gallery ───────────────────────────────────────── */
.culture-masonry {
  columns: 4 240px; gap: 16px;
}
@media (max-width: 900px) { .culture-masonry { columns: 3 180px; } }
@media (max-width: 600px) { .culture-masonry { columns: 2 140px; } }
.culture-gallery-card {
  break-inside: avoid; margin-bottom: 16px;
  border-radius: 14px; overflow: hidden;
  cursor: pointer; position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), box-shadow 0.35s;
}
.culture-gallery-card:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 12px 40px rgba(0,0,0,0.18); }
.culture-gallery-card:focus { outline: 2px solid var(--primary-color); outline-offset: 3px; }
.culture-gc-img-wrap { position: relative; width: 100%; }
.culture-gc-img { width: 100%; height: auto; display: block; object-fit: cover; transition: transform 0.5s; }
.culture-gallery-card:hover .culture-gc-img { transform: scale(1.06); }
.culture-gc-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,15,46,0.88) 0%, rgba(10,15,46,0.2) 60%, transparent 100%);
  opacity: 0; transition: opacity 0.3s; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px;
}
.culture-gallery-card:hover .culture-gc-overlay { opacity: 1; }
.culture-gc-cat {
  font-size: 11px; font-weight: 600; color: #a5b4fc; text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 6px; display: flex; align-items: center; gap: 4px;
}
.culture-gc-info h4 { font-size: 14px; font-weight: 700; color: #fff; margin: 0 0 2px; line-height: 1.3; }
.culture-gc-info span { font-size: 11px; color: rgba(255,255,255,0.65); }
.culture-gc-zoom {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px;
  transform: scale(0); transition: transform 0.25s;
}
.culture-gallery-card:hover .culture-gc-zoom { transform: scale(1); }

/* Empty state */
.culture-empty {
  text-align: center; padding: 80px 20px; color: var(--text-muted);
  grid-column: 1 / -1;
}
.culture-empty-icon {
  font-size: 56px; color: var(--border-color); margin-bottom: 16px;
}
.culture-empty h3 { font-size: 22px; color: var(--text-heading); margin: 0 0 8px; }
.culture-empty p { font-size: 15px; max-width: 400px; margin: 0 auto; text-align: center; }

/* ── Lightbox ──────────────────────────────────────────────── */
body.lb-open { overflow: hidden; padding-right: var(--scrollbar-w, 0px); }
.culture-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(5, 5, 18, 0.97);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
}
.culture-lightbox[hidden] { display: none; }
.culture-lb-close {
  position: absolute; top: 20px; right: 20px; z-index: 10;
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.12);
  border: none; color: #fff; font-size: 18px; cursor: pointer;
  transition: background 0.2s; display: flex; align-items: center; justify-content: center;
}
.culture-lb-close:hover { background: rgba(255,255,255,0.22); }
.culture-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.12);
  border: none; color: #fff; font-size: 18px; cursor: pointer;
  transition: background 0.2s; display: flex; align-items: center; justify-content: center;
}
.culture-lb-prev { left: 20px; }
.culture-lb-next { right: 20px; }
.culture-lb-nav:hover { background: rgba(255,255,255,0.22); }
.culture-lb-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 64px 72px 0; box-sizing: border-box;
  flex: 1; min-height: 0;
}
.culture-lb-img-wrap {
  flex: 1; min-height: 0; width: 100%;
  position: relative; display: flex; align-items: center; justify-content: center;
}
.culture-lb-img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px;
  transition: opacity 0.3s; box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.culture-lb-spinner {
  position: absolute; display: none; align-items: center; justify-content: center;
  font-size: 32px; color: #a5b4fc;
}
.culture-lb-info {
  width: 100%; color: #fff; text-align: center;
  padding: 14px 0 8px; flex-shrink: 0;
}
.culture-lb-cat {
  font-size: 11px; font-weight: 600; color: #a5b4fc; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 4px;
}
.culture-lb-title { font-size: 17px; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
.culture-lb-meta {
  display: flex; gap: 12px; justify-content: center;
  font-size: 12px; color: rgba(255,255,255,0.55); margin-bottom: 4px; flex-wrap: wrap;
}
.culture-lb-meta span { display: flex; align-items: center; gap: 5px; }
.culture-lb-caption { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.culture-lb-counter {
  font-size: 12px; color: rgba(255,255,255,0.35); font-variant-numeric: tabular-nums;
}
.culture-lb-strip {
  display: flex; gap: 8px; padding: 10px 72px 18px;
  overflow-x: auto; width: 100%; box-sizing: border-box; scrollbar-width: none; flex-shrink: 0;
}
.culture-lb-strip::-webkit-scrollbar { display: none; }
.culture-lb-thumb {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 8px;
  background-size: cover; background-position: center; cursor: pointer; opacity: 0.45;
  transition: opacity 0.2s, transform 0.2s; border: 2px solid transparent;
}
.culture-lb-thumb:hover { opacity: 0.75; transform: scale(1.05); }
.culture-lb-thumb.is-active { opacity: 1; border-color: var(--primary-color); transform: scale(1.1); }

/* ── Timeline ──────────────────────────────────────────────── */
.culture-timeline { max-width: 720px; margin: 0 auto; }
.culture-tl-year-group { margin-bottom: 48px; }
.culture-tl-year-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-color); color: #fff;
  font-size: 20px; font-weight: 800; padding: 6px 24px; border-radius: 999px;
  margin-bottom: 24px; box-shadow: 0 4px 16px rgba(79,70,229,0.35);
}
.culture-tl-events { position: relative; padding-left: 40px; }
.culture-tl-events::before {
  content: ''; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--primary-color), var(--border-color));
  border-radius: 2px;
}
.culture-tl-item {
  position: relative; margin-bottom: 28px; opacity: 0;
  transform: translateX(-20px); transition: opacity 0.5s, transform 0.5s;
}
.culture-tl-item.is-visible { opacity: 1; transform: none; }
.culture-tl-dot {
  position: absolute; left: -40px; top: 4px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--primary-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--surface);
}
.culture-tl-content {
  background: var(--surface); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s;
}
.culture-tl-content:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.1); }
.culture-tl-cat {
  font-size: 11px; font-weight: 600; color: var(--primary-color);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.culture-tl-title { font-size: 16px; font-weight: 700; color: var(--text-heading); margin: 4px 0 8px; }
.culture-tl-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.culture-tl-meta span { display: flex; align-items: center; gap: 5px; }
.culture-tl-photos {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-muted); margin-top: 6px;
}

/* ── Category showcase ─────────────────────────────────────── */
.culture-cat-header {
  display: flex; align-items: center; gap: 20px; margin-bottom: 32px;
}
.culture-cat-icon-wrap {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-color), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
  box-shadow: 0 8px 24px rgba(79,70,229,0.3);
}
.culture-cat-title { font-size: clamp(22px, 3vw, 32px); font-weight: 800; color: var(--text-heading); margin: 0 0 4px; }
.culture-cat-desc { font-size: 14px; color: var(--text-muted); margin: 0; }
.culture-cats-sidewise {
  display: flex; gap: 28px; align-items: flex-start;
  overflow-x: auto; padding-bottom: 20px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.culture-cats-sidewise::-webkit-scrollbar { height: 6px; }
.culture-cats-sidewise::-webkit-scrollbar-track { background: var(--border-color); border-radius: 999px; }
.culture-cats-sidewise::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 999px; }
.culture-cat-col {
  flex: 0 0 320px; width: 320px; scroll-snap-align: start;
}
.culture-cat-events-stack {
  display: flex; flex-direction: column; gap: 24px;
}
.culture-event-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
}
.culture-event-card {
  background: var(--surface); border: 1px solid var(--border-color);
  border-radius: 16px; overflow: hidden; transition: transform 0.35s, box-shadow 0.35s;
}
.culture-event-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.12); }
.culture-event-cover { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--surface-alt); }
.culture-event-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.culture-event-card:hover .culture-event-cover img { transform: scale(1.08); }
.culture-event-cover-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: var(--border-color);
  background: linear-gradient(135deg, var(--surface-alt), var(--surface));
}
.culture-event-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 12px;
}
.culture-event-photo-count {
  background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 999px; display: flex; align-items: center; gap: 4px;
}
.culture-event-featured-badge {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  display: flex; align-items: center; gap: 4px;
}
.culture-event-info { padding: 20px; }
.culture-event-meta {
  display: flex; gap: 12px; font-size: 12px; color: var(--text-muted);
  margin-bottom: 8px; flex-wrap: wrap;
}
.culture-event-meta span { display: flex; align-items: center; gap: 5px; }
.culture-event-title { font-size: 17px; font-weight: 700; color: var(--text-heading); margin: 0 0 8px; line-height: 1.3; }
.culture-event-desc { font-size: 13px; color: var(--text-body); margin: 0 0 10px; line-height: 1.55; }
.culture-event-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.culture-tag {
  font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border-color);
}

@media (max-width: 640px) {
  .culture-hero { min-height: 400px; }
  .culture-hero-title { font-size: 32px; }
  .culture-lb-inner { padding: 56px 16px 0; }
  .culture-lb-strip { padding: 8px 16px 16px; }
  .culture-lb-prev { left: 8px; } .culture-lb-next { right: 8px; }
  .culture-filter-inner { gap: 10px; }
  .culture-filter-controls { width: 100%; }
  .culture-search-wrap, .culture-select { flex: 1; }
  .culture-search { width: 100%; }
}

/* ── Service page feature cards: inline icon+title on mobile ── */
@media (max-width: 639px) {
  /* Icon cards (stacked → inline): excludes already-horizontal flex cards, team cards, interview steps */
  .card-surface:not([class*="flex"]):not(.team-card):not(.careers-interview-card):has(> .icon-box-icon) {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    column-gap: 12px !important;
    text-align: left !important;
    padding: 14px !important;
  }
  .card-surface:not([class*="flex"]):not(.team-card):not(.careers-interview-card):has(> .icon-box-icon) > .icon-box-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
  }
  .card-surface:not([class*="flex"]):not(.team-card):not(.careers-interview-card):has(> .icon-box-icon) > h4 {
    grid-column: 2 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    align-self: center !important;
    text-align: left !important;
  }
  .card-surface:not([class*="flex"]):not(.team-card):not(.careers-interview-card):has(> .icon-box-icon) > p {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    margin-top: 10px !important;
    text-align: left !important;
  }
  /* Numbered step cards (database migration process steps) */
  .card-surface:not([class*="flex"]):not(.team-card):not(.careers-interview-card):has(> div.rounded-full) {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    column-gap: 12px !important;
    padding: 14px !important;
  }
  .card-surface:not([class*="flex"]):not(.team-card):not(.careers-interview-card):has(> div.rounded-full) > div.rounded-full {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
  }
  .card-surface:not([class*="flex"]):not(.team-card):not(.careers-interview-card):has(> div.rounded-full) > h4 {
    grid-column: 2 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    align-self: center !important;
  }
  .card-surface:not([class*="flex"]):not(.team-card):not(.careers-interview-card):has(> div.rounded-full) > p {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    margin-top: 10px !important;
  }
}