/* =========================================================
   Fran Ruiz — Digital Solutions Studio · Bern, CH
   Pastel + bold sans + big colorful mockups
   Light by default · dark toggle
   ========================================================= */

/* Skip link — visually hidden until focused, then visible at the top of
   the viewport so keyboard users can jump past the nav. */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10000;
  padding: 10px 16px;
  background: #1a1a1a;
  color: #ffffff;
  font: 600 14px/1 "Hanken Grotesk", system-ui, sans-serif;
  text-decoration: none;
  border-radius: 8px;
  transform: translateY(-150%);
  transition: transform 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--accent, #e8624a);
  outline-offset: 2px;
}

/* Global keyboard focus indicator — only fires for keyboard navigation,
   not mouse clicks. Mirrors the ring already used on .fr-tst-arrow so
   the language is consistent across the whole site. WCAG 2.4.7. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

:root {
  /* Light (default) */
  --bg: #f5f2ec;
  --bg-2: #ffffff;
  --surface: #ebe6dc;
  --line: #1a1a1a14;
  --text: #1a1a1a;
  --text-2: #4a4a47;
  --text-mute: #8a8680;
  --accent: #e8624a;        /* terracotta from his Fimed mockup */
  --accent-2: #a3b59a;      /* sage from his portrait wall */
  --accent-3: #b4cfd1;      /* powder blue from My Mediterranean */
  --accent-4: #f4b65c;      /* warm sand */
  --shadow: 0 30px 80px -30px rgba(20, 18, 14, 0.18);
  --shadow-sm: 0 10px 30px -12px rgba(20, 18, 14, 0.12);

  --font-display: "Bricolage Grotesque", "Hanken Grotesk", Arial, sans-serif;
  --font-body:    "Hanken Grotesk", -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --r-card: 28px;
}

[data-theme="dark"] {
  --bg: #14130f;
  --bg-2: #1c1b16;
  --surface: #1f1e19;
  --line: #ffffff14;
  --text: #f3ede2;
  --text-2: #c2bdb1;
  --text-mute: #7f7a70;
  --accent: #ec7861;
  --shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
  --shadow-sm: 0 10px 30px -12px rgba(0,0,0,0.4);
}

/* ---------- AUTO DARK MODE ----------
   Honour the OS-level `prefers-color-scheme: dark` setting so visitors
   running macOS / iOS / Android / Windows in dark mode get the dark
   palette without having to flip the manual toggle. The token values
   below MUST mirror the [data-theme="dark"] block above — keep them
   in sync if either changes.

   The :not([data-theme-override]) guard is the override mechanism the
   manual toggle relies on: when the user explicitly picks a theme via
   the nav button (or Tweaks panel), JS stamps `data-theme-override`
   on <html>, which detunes this media query so the user's choice wins
   even when the OS says otherwise. Component-level rules elsewhere in
   this file still key off `[data-theme="dark"]`, which the boot script
   in each HTML file sets up-front so those rules also catch auto-dark
   visitors on first paint. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme-override]) {
    --bg: #14130f;
    --bg-2: #1c1b16;
    --surface: #1f1e19;
    --line: #ffffff14;
    --text: #f3ede2;
    --text-2: #c2bdb1;
    --text-mute: #7f7a70;
    --accent: #ec7861;
    --shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
    --shadow-sm: 0 10px 30px -12px rgba(0,0,0,0.4);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* Belt-and-braces against horizontal overflow at narrow widths. The
   body keeps the overflow-x:hidden below; here we also pin the html
   so a stray fixed/absolute element can't introduce a phantom scroll
   strip on the right edge in dark mode. */
html { max-width: 100vw; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}

/* Sync theme-toggle transitions across all themed surfaces so the whole
   page crossfades together with the body (.35s ease) — otherwise full-
   bleed sections like the marquee and the fixed nav snap instantly to
   the new colour while the body fades, producing a visible seam at the
   section boundary. Mirrors the fix on .frc-page (contact). */
.nav,
.marquee-wrap,
.drawer {
  transition: background .35s ease, color .35s ease, border-color .35s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section {
  padding: clamp(72px, 10vw, 140px) 0;
  position: relative;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 28px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 16px; left: 16px; right: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-2) 75%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  max-width: 1320px;
  margin: 0 auto;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.nav-logo .mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #0d0d0d;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.nav-logo .mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-links {
  display: flex;
  gap: 8px;
}
.nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav-links a:hover { background: var(--surface); color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.lang-pill, .theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lang-pill:hover, .theme-pill:hover { background: var(--surface); }
.lang-menu {
  position: relative;
}
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow);
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.lang-menu.open .lang-dropdown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.lang-dropdown button {
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-body);
  display: flex; align-items: center; gap: 10px;
}
.lang-dropdown button:hover { background: var(--surface); }
.lang-dropdown button .flag { font-size: 16px; }
.lang-dropdown button.active { color: var(--accent); font-weight: 600; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  transition: transform .2s, gap .2s;
}
.nav-cta:hover { transform: scale(1.02); gap: 12px; }
.nav-cta .arr { transition: transform .2s; }
.nav-cta:hover .arr { transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hide-sm { display: none !important; }
  .hide-sm-flex { display: none !important; }
}
@media (min-width: 901px) {
  .nav-burger { display: none !important; }
}

/* R-P1-1 — Tablet landscape (901–1099px) has a tight nav bar: links +
   theme toggle + lang menu + "Let's talk" CTA all competing for ~700px.
   Hide the language menu in this range to free space. Lang is still
   reachable in portrait (≤900px → burger drawer ships .drawer-lang) and
   on desktop (≥1100px). Desktop layout untouched. */
@media (min-width: 901px) and (max-width: 1099px) {
  .lang-menu { display: none !important; }
}

/* ---------- BURGER ---------- */
.nav-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.nav-burger:hover { border-color: var(--accent); }
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 99px;
  transition: transform .25s, opacity .25s;
}
.nav-burger span:nth-child(1) { width: 18px; }
.nav-burger span:nth-child(2) { width: 14px; margin-left: auto; }
.nav-burger span:nth-child(3) { width: 18px; }

/* ---------- DRAWER ---------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--text) 50%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--bg);
  z-index: 75;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
  overflow-y: auto;
  box-shadow: -30px 0 80px -30px rgba(0,0,0,0.25);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.drawer-close {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
}
.drawer-close:hover { background: var(--surface); border-color: var(--accent); }

.drawer-links {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  flex: 1;
}
.drawer-links a {
  display: grid;
  grid-template-columns: 60px 1fr 32px;
  align-items: center;
  gap: 16px;
  padding: 22px 28px;
  font-family: var(--font-display);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  animation: drawer-link-in .5s cubic-bezier(.2,.7,.2,1) forwards;
  transition: padding-left .25s, background .25s;
}
.drawer.open .drawer-links a { opacity: 1; }
@keyframes drawer-link-in {
  to { opacity: 1; transform: translateY(0); }
}
.drawer-links a:hover {
  padding-left: 36px;
  background: var(--surface);
}
.drawer-links a:hover .drawer-arrow { transform: translateX(4px); color: var(--accent); }
.drawer-links .drawer-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}
.drawer-links .drawer-label {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.drawer-links .drawer-arrow {
  font-size: 18px;
  color: var(--text-mute);
  transition: transform .25s, color .25s;
  text-align: right;
}

.drawer-foot {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-top: 1px solid var(--line);
}
.drawer-section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.drawer-lang {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
}
.drawer-lang button {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.drawer-lang button.active { background: var(--text); color: var(--bg); }
.drawer-lang .flag { font-size: 14px; }

.drawer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 20px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 18px;
  text-decoration: none;
  transition: transform .2s, background .2s;
}
.drawer-cta:hover { transform: translateY(-2px); }
.drawer-cta .arr { font-size: 18px; }

.drawer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
}
.drawer-contact a {
  color: var(--text-2);
  text-decoration: none;
  transition: color .2s;
}
.drawer-contact a:hover { color: var(--accent); }

/* ---------- HERO ---------- */
.hero {
  padding-top: 140px;
  padding-bottom: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.hero-availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 32px;
  width: max-content;
}
.hero-availability .led {
  width: 8px; height: 8px;
  background: #4caf50;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #4caf5022;
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 #4caf5055; }
  50% { box-shadow: 0 0 0 8px #4caf5000; }
}

.hero h1 {
  font-size: clamp(48px, 9vw, 140px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  max-width: 18ch;
}
.hero h1 .ink { color: var(--accent); }
.hero h1 .underline {
  position: relative;
  display: inline-block;
}
.hero h1 .underline::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 6%;
  height: 0.12em;
  background: var(--accent-4);
  z-index: -1;
  border-radius: 99px;
}

.hero-sub {
  margin-top: 32px;
  font-size: clamp(17px, 1.6vw, 22px);
  color: var(--text-2);
  max-width: 56ch;
  text-wrap: pretty;
}

/* MODIFIED: hero anchor chips — small linked pills between the
   subtitle and the primary CTAs that let high-intent visitors
   ("I need a booking system") jump straight to the Services
   section instead of scrolling through Work + About first.
   Visual weight is deliberately low: line-only chips on a flex
   row with gap, so they read as inline navigation, not buttons. */
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 22px;
  max-width: 56ch;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.hero-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.hero-chip-mark {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  opacity: 0.55;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.hero-chip:hover .hero-chip-mark { opacity: 1; transform: translate(1px, -1px); }

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: transform .2s, background .2s, color .2s, gap .2s;
  cursor: pointer;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { transform: scale(1.02); gap: 14px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn .arr { display: inline-block; transition: transform .25s; }
.btn:hover .arr { transform: translateX(4px); }

.hero-meta {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.hero-meta .stat .num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero-meta .stat .num em { color: var(--accent); font-style: normal; }
.hero-meta .stat .lbl {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 4px;
}
/* ---------- MOBILE RESPONSIVE POLISH ---------- */
@media (max-width: 900px) {
  :root { --gutter: 20px; --r-card: 22px; }

  .nav {
    top: 12px; left: 12px; right: 12px;
    padding: 8px 8px 8px 16px;
  }
  .nav-logo .mark { width: 30px; height: 30px; border-radius: 50%; }
  .nav-logo { font-size: 16px; }
  .theme-pill { padding: 8px 10px; }

  /* Section vertical padding consistent; horizontal handled by .wrap gutter.
     Use longhand for vertical so we don't clobber .wrap's horizontal
     padding-left/right via the shorthand. */
  .section { padding-top: 72px !important; padding-bottom: 72px !important; }
  section.section[style*="padding"] { padding: 72px var(--gutter) !important; }
  /* Ensure .wrap gutter takes effect under inline padding overrides.
     !important is required because .section's vertical shorthand was
     previously zeroing left/right on mobile. */
  .wrap { padding-left: var(--gutter) !important; padding-right: var(--gutter) !important; }

  /* HERO mobile */
  .hero {
    padding-top: 110px;
    padding-bottom: 60px;
    min-height: 88vh;
  }
  .hero h1 {
    font-size: clamp(40px, 11vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.03em;
  }
  .hero-sub { font-size: 16px; margin-top: 24px; }
  .hero-actions { margin-top: 28px; gap: 10px; }
  .hero-actions .btn { padding: 14px 22px; font-size: 13px; }
  /* MODIFIED: shrink the hero anchor chips on tablet+ small viewports
     so they don't push the primary CTAs further down the fold. */
  .hero-chips { margin-top: 18px; gap: 6px 8px; }
  .hero-chip { padding: 6px 12px; font-size: 12px; }
  .hero-meta { margin-top: 56px; gap: 12px; grid-template-columns: 1fr 1fr 1fr; padding-top: 24px; }
  .hero-meta .stat .num { font-size: clamp(26px, 7vw, 36px); }
  .hero-meta .stat .lbl { font-size: 10px; line-height: 1.3; }
  .hero-availability { padding: 7px 14px; font-size: 12px; }

  /* About mobile */
  .about-grid { gap: 32px; }
  .about-photo { aspect-ratio: 4/4.5; max-width: 100%; position: static; }
  .about-copy h2 { font-size: clamp(32px, 8vw, 48px); }
  .about-copy p { font-size: 16px; }
  .about-cards { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }

  /* Work head wraps controls below */
  .work-head { flex-direction: column; align-items: flex-start; gap: 24px; }
  .work-head h2 { font-size: clamp(34px, 8vw, 56px) !important; }
  .carousel-controls {
    width: 100%;
    justify-content: space-between;
  }
  .carousel { margin-top: 32px; }
  .carousel-slide .info { left: 14px; right: 14px; bottom: 14px; }
  .carousel-slide .info-left .tags span { font-size: 10px; padding: 4px 8px; }

  /* Services mobile */
  .services-head { display: block; }
  .services-head h2 {
    width: 100% !important;
    font-size: clamp(34px, 8vw, 56px) !important;
  }
  .svc-card { padding: 24px; min-height: 220px; }
  .svc-card h3 { font-size: 20px; }

  /* Tech mobile */
  .tech-head h2 { font-size: clamp(28px, 7vw, 44px); }
  .tech-pill { padding: 18px 10px; }

  /* Pricing mobile */
  .pricing-head h2 { font-size: clamp(32px, 8vw, 48px); }
  .price-card { padding: 28px 22px; }
  .price-card .price-tag { font-size: 38px; }

  /* Testimonials mobile — handled by carousel styles */
  .tests-head h2 { font-size: clamp(28px, 7vw, 44px); }

  /* Clients mobile */
  .clients .client { padding: 24px 8px; font-size: 16px; }

  /* FAQ mobile */
  .faq-grid .faq-intro { position: static; }
  .faq-grid h2 { font-size: clamp(28px, 7vw, 44px); }

  /* Contact mobile */
  .contact-wrap { padding: 32px 24px; border-radius: 24px; }
  .contact-grid h2 { font-size: clamp(34px, 8vw, 56px); }
  .contact-form { padding: 24px; }

  /* Footer mobile */
  .footer .big { font-size: clamp(36px, 10vw, 64px); }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; padding-bottom: 24px !important; }
  /* WCAG 2.5.8 — bring footer nav links to ≥44px tap targets on touch
     devices. Padding only; visual size of the text label is unchanged. */
  footer nav a { padding-block: 11px; }
}

/* R-P2-1 — On phones the row-laid-out footer-nav links are ~21px tall,
   below WCAG's 44px tap-target minimum. Stack them vertically with 12px
   block padding so each link rect clears 44px reliably. Row layout is
   preserved above 768px (tablet portrait still gets the wrap-friendly
   row); only phones get the stacked column. */
@media (max-width: 768px) {
  footer nav.footer-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  footer nav.footer-nav a {
    display: block;
    padding-block: 12px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: clamp(36px, 11vw, 48px); }
  .hero-availability { font-size: 11px; }
  .work-head h2, .services-head h2, .contact-grid h2 {
    font-size: clamp(30px, 9vw, 44px) !important;
  }
  .carousel-controls { gap: 8px; }
  .carousel-progress { font-size: 11px; }
  .carousel-progress .bar { width: 50px; }
  .carousel-arrows button { width: 38px; height: 38px; font-size: 15px; }

  /* R-P3-1 — Keep the tertiary "Book a free 20-min call" CTA above the
     fold on a 390px viewport, and survive iPhone SE (320×844) where three
     lines of 35px hero type + subtitle + stats blow past the fold. Trim
     the hero top padding (clamp lets it shrink on shortest viewports),
  /* HISTORY: previously this breakpoint collapsed the row to 2
     columns and hid the rating stat to keep the hero short on
     ≤480px. The rating ("4.8/5 · 50+ projects") is the strongest
     piece of social proof above the fold, so we now keep all
     three on screen. Three columns still fit at 360px once the
     label and number fonts step down — labels wrap to 2 short
     lines instead of being dropped. */
  .hero { padding-top: clamp(60px, 12vh, 88px); padding-bottom: 44px; }
  .hero-meta {
    margin-top: 32px;
    padding-top: 18px;
    gap: 8px;
    grid-template-columns: 1fr 1fr 1fr;
  }
  .hero-meta .stat .num { font-size: clamp(20px, 6vw, 28px); }
  .hero-meta .stat .lbl {
    font-size: 9px;
    line-height: 1.25;
    /* Allow the long rating label to wrap to two lines instead
       of overflowing; the other two labels are short and stay
       on one line. */
    text-wrap: balance;
  }
  /* MODIFIED: at 480px the chips compete with the primary CTAs for
     vertical space — pull them tighter so the tertiary "free call"
     CTA stays above the fold on a 390px viewport. */
  .hero-chips { margin-top: 14px; gap: 5px 6px; }
  .hero-chip { padding: 5px 10px; font-size: 11px; }
  .hero-chip-mark { font-size: 10px; }
  /* Tighten the indecision-CTA breathing room too — the spec attaches
     8px in JS; on small screens we want it tucked close to the buttons. */
  .hero-actions + .btn-text-cta { margin-top: 4px !important; }
}

/* Floating shapes — purely decorative halos. They sit on z-index 0 and
   every other hero child is promoted to z-index 1 so the shapes can
   never overlap the text/CTAs/stats regardless of their absolute position. */
.hero-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
  z-index: 0;
}
.hero > *:not(.hero-shape) {
  position: relative;
  z-index: 1;
}
.hero-shape.s1 { width: 380px; height: 380px; background: var(--accent-2); top: 10%; right: -120px; }
.hero-shape.s2 { width: 280px; height: 280px; background: var(--accent-4); bottom: 0; left: -100px; animation-delay: -3s; }
.hero-shape.s3 { width: 220px; height: 220px; background: var(--accent-3); top: 30%; right: 24%; animation-delay: -5s; opacity: 0.35; }
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}
[data-theme="dark"] .hero-shape { opacity: 0.18; }

/* ---------- MARQUEE ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  overflow: hidden;
  background: var(--bg-2);
}
.marquee-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: scroll-x 32s linear infinite;
  width: max-content;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 36px);
  font-weight: 600;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 56px;
}
.marquee-track .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: stretch;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

.about-photo {
  border-radius: var(--r-card);
  overflow: hidden;
  position: relative;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-height: 100%;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo .badge {
  position: absolute;
  bottom: 16px; left: 16px;
  background: var(--bg-2);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.about-photo .badge .moto { font-size: 16px; }

.about-copy h2 {
  font-size: clamp(36px, 5vw, 72px);
  margin-bottom: 28px;
}
.about-copy h2 .ink { color: var(--accent); }
.about-copy p {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--text-2);
  margin: 0 0 18px;
  max-width: 60ch;
  text-wrap: pretty;
}
.about-copy p strong { color: var(--text); font-weight: 600; }

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
}
.about-cards .card {
  padding: 22px;
  border-radius: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.about-cards .card .ico {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
}
.about-cards .card:nth-child(2) .ico { background: var(--accent-2); color: var(--text); }
.about-cards .card h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.about-cards .card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
}

/* ---------- WORK GRID ---------- */
.work-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.work-head h2 { font-size: clamp(40px, 6vw, 86px); max-width: 14ch; }
.work-head h2 .ink { color: var(--accent); }
.work-head .head-meta {
  color: var(--text-2);
  max-width: 36ch;
  font-size: 16px;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 800px) { .work-grid { grid-template-columns: 1fr; } }

.work-card {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  cursor: pointer;
  display: block;
  transition: transform .4s ease;
}
.work-card:hover { transform: translateY(-6px); }
.work-card .img-wrap {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface);
}
.work-card .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.work-card:hover .img-wrap img { transform: scale(1.04); }

.work-card .info {
  position: absolute;
  left: 24px; right: 24px; bottom: 24px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}
.work-card .info-left h3 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  color: var(--card-fg, #fff);
  margin: 0 0 4px;
}
.work-card .info-left .tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.work-card .info-left .tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-fg, #fff) 18%, transparent);
  color: var(--card-fg, #fff);
  backdrop-filter: blur(6px);
}
.work-card .open {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card-fg, #fff);
  color: var(--card-bg, #1a1a1a);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: transform .3s;
  flex-shrink: 0;
}
.work-card:hover .open { transform: rotate(-45deg); }

/* ---------- WORK CAROUSEL ---------- */
.carousel-controls {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-shrink: 0;
}
.carousel-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}
.carousel-progress .bar {
  width: 120px;
  height: 2px;
  background: var(--line);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.carousel-progress .bar .fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transition: width .6s cubic-bezier(.2,.7,.2,1);
}
.carousel-arrows { display: flex; gap: 8px; }
.carousel-arrows button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s, opacity .2s, color .2s;
}
.carousel-arrows button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.carousel { margin-top: 56px; position: relative; }
.carousel-viewport {
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.carousel-viewport.peek {
  /* Show a peek of the next slide */
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 48px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 48px), transparent 100%);
  padding: 0 12px 0 12px;
  margin: 0 -12px;
}
.carousel-viewport:active { cursor: grabbing; }

.carousel-track {
  display: flex;
  gap: 12px;
  will-change: transform;
  user-select: none;
}
.carousel-track.snap   { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.carousel-track.nosnap { transition: none; }
.carousel-track.is-dragging { transition: none; }
.carousel-track.is-dragging .carousel-slide { pointer-events: none; }

.carousel-slide {
  position: relative;
  display: block;
  border-radius: var(--r-card);
  overflow: hidden;
  text-decoration: none;
  background: var(--card-bg, var(--surface));
}
.carousel-slide .img-wrap {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-slide .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}
.carousel-slide:hover .img-wrap img { transform: scale(1.025); }

.carousel-slide .info {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  pointer-events: none;
}
.carousel-slide .info > * { pointer-events: auto; }
.carousel-slide .info-left .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.carousel-slide .info-left .tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-fg, #fff) 22%, transparent);
  color: var(--card-fg, #fff);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-weight: 600;
}
.carousel-slide .open {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--card-fg, #fff);
  color: var(--card-bg, #1a1a1a);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: transform .3s;
  flex-shrink: 0;
}
.carousel-slide:hover .open { transform: rotate(-45deg); }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.carousel-dots button {
  width: 28px;
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  border: 0;
  cursor: pointer;
  transition: background .25s, width .25s;
  padding: 0;
}
.carousel-dots button:hover { background: var(--text-mute); }
.carousel-dots button.active { background: var(--accent); width: 48px; }

.carousel-hint {
  position: absolute;
  right: 0;
  top: -64px;
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.carousel-hint .hint-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: hint-pulse 1.6s infinite ease-in-out;
}
@keyframes hint-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.6); opacity: 0.4; }
}

/* Mobile carousel controls (centered toolbar below viewport) */
.carousel-controls.mobile-only { display: none; }
.carousel-controls.desktop-only { display: flex; }

@media (max-width: 900px) {
  .carousel-controls.desktop-only { display: none; }
  .carousel-controls.mobile-only {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 24px;
    padding: 0 4px;
  }
  .carousel-arrow-big {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--text);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .15s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .carousel-arrow-big:active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: scale(0.94);
  }
  .carousel-progress-center {
    flex: 1;
    justify-content: center;
  }
  .carousel-progress-center .bar { flex: 1; max-width: 140px; }
  .carousel-hint { display: inline-flex; }
}
.services-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
  align-items: end;
}
.services-head h2 { font-size: clamp(40px, 6vw, 86px); }
.services-head h2 .ink { color: var(--accent); }
.services-head p { color: var(--text-2); max-width: 40ch; font-size: 17px; }
@media (max-width: 800px) { .services-head { grid-template-columns: 1fr; } }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.svc-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform .3s, border-color .3s, background .3s;
  min-height: 280px;
}
.svc-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.svc-card .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
}
.svc-card .ico {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: var(--svc-bg, var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.svc-card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.svc-card p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
}
.svc-card .more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- TECH ---------- */
.tech-head {
  text-align: center;
  margin-bottom: 48px;
}
.tech-head h2 { font-size: clamp(36px, 4.5vw, 64px); }
.tech-head p { color: var(--text-2); max-width: 50ch; margin: 20px auto 0; }
.tech-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .tech-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .tech-grid { grid-template-columns: repeat(2, 1fr); } }
.tech-pill {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  transition: background .25s, transform .25s, border-color .25s;
  text-align: center;
}
.tech-pill:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.tech-pill .ico {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.tech-pill .name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

/* ---------- PRICING ---------- */
.pricing-head { text-align: center; margin-bottom: 56px; }
.pricing-head h2 { font-size: clamp(40px, 5.5vw, 72px); }
.pricing-head h2 .ink { color: var(--accent); }
.pricing-head p { color: var(--text-2); max-width: 50ch; margin: 18px auto 0; font-size: 17px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 24px; /* room for floating MOST POPULAR ribbon */
}
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }

.price-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  transition: transform .3s, border-color .3s;
}
.price-card:hover { transform: translateY(-4px); }
.price-card.featured {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.price-card.featured .price-tag { color: var(--bg-2); }
.price-card.featured p { color: color-mix(in srgb, var(--bg) 80%, transparent); }
.price-card.featured .ribbon {
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
}
.price-card .tier {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.price-card.featured .tier { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.price-card h3 {
  font-size: 28px;
  font-weight: 800;
  margin-top: 4px;
}
.price-card .price-tag {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 4px;
}
.price-card .price-tag em {
  font-style: normal;
  font-size: 14px;
  color: var(--text-mute);
  font-weight: 500;
  letter-spacing: 0;
}
.price-card.featured .price-tag em { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.price-card p.desc {
  font-size: 14px;
  color: var(--text-2);
  margin: 4px 0 0;
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.price-card li {
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: start;
}
.price-card li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 800;
  flex-shrink: 0;
}
.price-card.featured li::before { color: var(--accent-4); }
.price-card .pc-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  transition: gap .2s;
}
.price-card.featured .pc-btn { background: var(--bg-2); color: var(--text); }
.price-card .pc-btn:hover { gap: 12px; }

/* ---------- TESTIMONIALS ---------- */
.tests-head { text-align: center; margin-bottom: 56px; }
.tests-head h2 { font-size: clamp(36px, 5vw, 64px); }
.tests-head h2 .ink { color: var(--accent); }

/* ── Desktop grid (unchanged) ── */
.tests-grid--desktop {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Mobile carousel (hidden on desktop) ── */
.tests-carousel-wrap { display: none; }
.tests-dots          { display: none; }

.test-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.test-card .stars {
  color: var(--accent-4);
  font-size: 14px;
  letter-spacing: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.test-card .stars-num {
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: 0;
}
.test-card blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -0.01em;
}
.test-card .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.test-card .av {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.test-card .name { font-size: 14px; font-weight: 600; }
.test-card .role { font-size: 12px; color: var(--text-mute); }

/* ── Mobile breakpoint ── */
@media (max-width: 768px) {
  /* hide desktop grid */
  .tests-grid--desktop { display: none; }

  /* show carousel */
  .tests-carousel-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
  }

  .tests-carousel-track {
    display: flex;
    width: 100%;
    will-change: transform;
    cursor: grab;
  }
  .tests-carousel-track:active { cursor: grabbing; }

  .tests-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
  }

  .tests-carousel-slide .test-card {
    width: 100%;
    box-sizing: border-box;
    padding: 28px 24px;
    border-radius: 20px;
    gap: 20px;
    min-height: unset;
  }

  .tests-carousel-slide .test-card blockquote {
    font-size: 18px;
    line-height: 1.4;
  }

  /* Fade edges — only left & right, not top/bottom */
  .tests-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 2;
  }
  .tests-fade--left {
    left: 0;
    background: linear-gradient(to right, var(--bg), transparent);
  }
  .tests-fade--right {
    right: 0;
    background: linear-gradient(to left, var(--bg), transparent);
  }

  /* Dots */
  .tests-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-bottom: 4px;
  }
  .tests-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
  }
  .tests-dot--active {
    background: var(--accent);
    transform: scale(1.3);
  }
}

/* ---------- CLIENTS ---------- */
.clients {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 900px) { .clients { grid-template-columns: repeat(3, 1fr); } }
.clients .client {
  padding: 32px 12px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--text-mute);
  letter-spacing: -0.01em;
  border-right: 1px solid var(--line);
  transition: color .25s, background .25s;
}
.clients .client:nth-child(6n) { border-right: 0; }
@media (max-width: 900px) {
  .clients .client { border-right: 1px solid var(--line); }
  .clients .client:nth-child(3n) { border-right: 0; }
}
.clients .client:hover { color: var(--accent); background: var(--surface); }

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 24px; } }
.faq-grid h2 { font-size: clamp(36px, 5vw, 64px); }
.faq-grid h2 .ink { color: var(--accent); }
.faq-grid .faq-intro {
  position: sticky;
  top: 100px;
}
@media (max-width: 900px) {
  .faq-grid .faq-intro { position: static !important; top: auto !important; }
}
.faq-grid .faq-intro p { color: var(--text-2); margin-top: 18px; max-width: 32ch; }

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  cursor: pointer;
}
.faq-item .q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.faq-item .q .ico {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: transform .3s, background .3s, color .3s;
  flex-shrink: 0;
}
.faq-item[open] .q .ico { transform: rotate(45deg); background: var(--accent); color: #fff; }
.faq-item .a {
  padding-top: 16px;
  color: var(--text-2);
  max-width: 60ch;
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- CONTACT ---------- */
.contact-wrap {
  background: var(--text);
  color: var(--bg);
  border-radius: 32px;
  padding: clamp(40px, 6vw, 88px);
  position: relative;
  overflow: hidden;
}
.contact-wrap .blob {
  position: absolute;
  width: 500px; height: 500px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  top: -200px; right: -150px;
  pointer-events: none;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  position: relative;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-grid h2 {
  font-size: clamp(40px, 6vw, 88px);
  color: var(--bg);
}
.contact-grid h2 .ink { color: var(--accent-4); }

.contact-left p {
  color: color-mix(in srgb, var(--bg) 75%, transparent);
  font-size: 17px;
  margin: 24px 0 32px;
  max-width: 40ch;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-info .row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.contact-info .row .ico {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 12%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--accent-4);
  flex-shrink: 0;
}
.contact-info .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bg) 50%, transparent);
}
.contact-info .v { font-size: 15px; font-weight: 500; color: var(--bg); }
.contact-info .v a:hover { color: var(--accent-4); }

.contact-form {
  /* MODIFIED: balanced visibility — the form is mostly opaque so the red
     ambient blob behind only ghosts through softly (was 10% translucent,
     too much bleed; then fully opaque, hid it entirely). Keep a light
     backdrop blur to diffuse what does show through, and use a solid
     border colour instead of a translucent one. */
  background: color-mix(in srgb, var(--text) 78%, transparent);
  border: 1px solid #3a3733;
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.contact-form label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bg) 60%, transparent);
  display: block;
  margin-bottom: 6px;
}
.contact-form .field {
  display: flex; flex-direction: column;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  /* MODIFIED: opaque field surfaces so the red ambient blob behind the
     form card does not tint or bleed through the input chrome. Was a
     translucent mix of var(--bg); now a solid dark surface that matches
     the existing select override (#2a2926). */
  background: #2a2926;
  border: 1px solid #3a3733;
  /* Field surface is always dark (see above), so the typed text must
     always be light — using var(--bg) made it dark-on-dark (invisible)
     in dark mode. Fixed light value works in both themes. */
  color: #f3ede2;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  transition: border-color .2s, background .2s;
}
.contact-form input::placeholder, .contact-form textarea::placeholder {
  color: rgba(243, 237, 226, 0.45);
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  outline: none;
  border-color: var(--accent-4);
  background: #34322e;
}
.contact-form textarea { min-height: 110px; resize: vertical; font-family: inherit; }
.contact-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .contact-form .row-2 { grid-template-columns: 1fr; } }
.contact-form button {
  margin-top: 8px;
  padding: 16px 24px;
  border-radius: 999px;
  background: var(--accent-4);
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: gap .2s, background .2s;
}
.contact-form button:hover { gap: 14px; background: #fff; }
.contact-form button[disabled],
.contact-form button[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}
.contact-form button[disabled]:hover { gap: 10px; }

/* Error states — red border + small inline message */
.contact-form .field.has-error input,
.contact-form .field.has-error textarea,
.contact-form .field.has-error select {
  border-color: #ff6b6b;
  /* Keep a solid dark surface in the error state so the typed (light)
     text stays readable. The translucent red tint over a light page made
     it low-contrast/unreadable in light mode. */
  background: #34262a;
}
.contact-form .field-error {
  margin-top: 6px;
  font-size: 12px;
  color: #ff8a8a;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* Inline submit-failure banner */
.contact-form .form-banner {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.contact-form .form-banner-error {
  background: color-mix(in srgb, #ff6b6b 14%, transparent);
  border: 1px solid color-mix(in srgb, #ff6b6b 40%, transparent);
  color: #ffd9d9;
}

/* Honeypot — visually hidden but still in the DOM for bots */
.contact-form .hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Success state — replaces the form */
.contact-form.contact-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 12px;
  min-height: 360px;
}
.contact-form.contact-success .success-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 4px;
}
.contact-form.contact-success h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  color: var(--bg);
}
.contact-form.contact-success p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--bg) 75%, transparent);
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 48px 0 36px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-left { display: flex; flex-direction: column; gap: 12px; }
.footer .big {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 100px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--text-mute);
}
.footer .big .ink { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  flex-wrap: wrap;
}
.footer-bottom .socials { display: flex; gap: 18px; align-items: center; }
.footer-bottom .socials a:hover { color: var(--accent); }
.footer-bottom .socials .socials-wa { display: inline-flex; align-items: center; gap: 6px; }
.footer-bottom .socials .socials-wa svg { display: block; }

/* ---------- PROJECT DETAIL PAGE ---------- */
.proj-main { padding-top: 80px; }

.proj-hero {
  padding: 80px 0 56px;
  position: relative;
}
.proj-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 56px;
  transition: background .2s, color .2s, border-color .2s, gap .2s, padding-left .2s;
}
.proj-back:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
  gap: 14px;
  padding-left: 16px;
}
.proj-back span { font-size: 14px; transition: transform .2s; }
.proj-back:hover span { transform: translateX(-3px); }

.proj-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 28px;
}
.proj-eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.proj-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 9vw, 124px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.96;
  margin: 0 0 32px;
  max-width: 18ch;
}

.proj-summary {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--text-2);
  max-width: 64ch;
  text-wrap: pretty;
  margin: 0 0 64px;
}

.proj-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
@media (max-width: 800px) { .proj-meta { grid-template-columns: 1fr 1fr; gap: 28px 20px; } }
@media (max-width: 480px) { .proj-meta { grid-template-columns: 1fr 1fr; } }

.meta-cell .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 10px;
}
.meta-cell .v {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
}
.scope-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.scope-tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--line);
}

/* HERO CANVAS */
.proj-canvas-hero {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--card-bg, var(--surface));
  border-radius: 28px;
  overflow: hidden;
  margin: 32px 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Hairline frame in the page ink color — keeps photos feeling
     contained against any background (incl. coloured hero bgs). */
  border: 1.5px solid var(--text);
}
.proj-canvas-hero img {
  width: 100%; height: 100%; object-fit: cover;
}
.canvas-empty.big .canvas-cross {
  font-size: 88px;
}
.canvas-empty.big .canvas-label {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* BODY */
.proj-body {
  padding-top: 80px !important;
  padding-bottom: 80px !important;
}
.proj-body-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) { .proj-body-grid { grid-template-columns: 1fr; gap: 32px; } }

.proj-aside {
  position: sticky;
  top: 110px;
}
@media (max-width: 900px) { .proj-aside { position: static; top: auto; } }
.proj-aside .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.proj-aside h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}
.proj-aside p {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 38ch;
}
.proj-aside-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.aside-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.aside-row .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.aside-row .v {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-align: right;
}

.proj-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.proj-content p {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
  max-width: 38ch;
  text-wrap: pretty;
}

/* GALLERY */
.proj-gallery {
  padding-top: 0 !important;
  padding-bottom: 80px !important;
}
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
}
@media (max-width: 800px) { .gallery-grid { grid-template-columns: 1fr; gap: 20px; } }

.proj-canvas-block {
  position: relative;
  background: var(--card-bg, var(--surface));
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proj-canvas-block:not(.tall):not(.wide) { aspect-ratio: 4/3; }
.proj-canvas-block.tall { aspect-ratio: 4/5; }
.proj-canvas-block.wide { aspect-ratio: 16/9; }
.proj-canvas-block .canvas-empty .canvas-cross { font-size: 56px; }

/* NEXT PROJECT */
.proj-next {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-decoration: none;
  color: var(--text);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 56px 0;
  transition: padding 0.4s cubic-bezier(.2,.7,.2,1);
}
.proj-next:hover { padding: 72px 0; }
.next-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.next-meta .next-num { color: var(--accent); font-weight: 600; }
.next-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 124px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.96;
  margin: 0;
  transition: color .35s;
}
.proj-next:hover .next-title { color: var(--accent); }
.next-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.next-tags > span:not(.next-arrow) {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--line);
}
.next-arrow {
  margin-left: auto;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  line-height: 1;
  transition: transform .35s;
}
.proj-next:hover .next-arrow { transform: translateX(8px) rotate(-15deg); }

@media (max-width: 600px) {
  .proj-hero { padding: 56px 0 40px; }
  .proj-back { margin-bottom: 32px; }
  .proj-summary { margin-bottom: 40px; }
  .proj-canvas-hero { aspect-ratio: 16/9; border-radius: 22px; }
  .proj-body { padding-top: 56px !important; padding-bottom: 10px !important; }
  .proj-next { padding: 36px 0; }
  .proj-next:hover { padding: 36px 0; }
  .next-arrow { width: 44px; height: 44px; font-size: 18px; }
}
/* Reveal animations — content visible by default; only hidden when JS opts in via [data-anim].
   If the animation timeline doesn't advance (some iframes), JS auto-removes [data-anim]
   so content stays visible without the slide-in. */
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-in-left {
  from { opacity: 0; transform: translate(-40px, 30px); }
  to   { opacity: 1; transform: translate(0, 0); }
}
@keyframes reveal-in-right {
  from { opacity: 0; transform: translate(40px, 30px); }
  to   { opacity: 1; transform: translate(0, 0); }
}
.reveal, .reveal-stagger { opacity: 1; }
[data-anim] .reveal:not(.in),
[data-anim] .reveal-stagger:not(.in) { opacity: 0; }
[data-anim] .reveal.in        { animation: reveal-in       .9s cubic-bezier(.2,.7,.2,1) forwards; }
[data-anim] .reveal-stagger.from-left.in  { animation: reveal-in-left  1s cubic-bezier(.2,.7,.2,1) forwards; }
[data-anim] .reveal-stagger.from-right.in { animation: reveal-in-right 1s cubic-bezier(.2,.7,.2,1) forwards; }
[data-anim] .reveal[data-d="100"].in { animation-delay: .08s; }
[data-anim] .reveal[data-d="200"].in { animation-delay: .16s; }
[data-anim] .reveal[data-d="300"].in { animation-delay: .24s; }
[data-anim] .reveal[data-d="400"].in { animation-delay: .32s; }
[data-anim] .reveal[data-d="500"].in { animation-delay: .40s; }

/* ---------- FEATURED WORK GRID (Kurawa-style) ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 28px;
  margin-top: 64px;
}
@media (max-width: 800px) {
  .featured-grid { grid-template-columns: 1fr; gap: 36px; }
}

.feat-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
  color: inherit;
  border-radius: var(--r-card);
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s, border-color .4s;
}
.feat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px -30px rgba(20,18,14,0.25), 0 12px 30px -16px rgba(20,18,14,0.12);
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
}

.feat-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.feat-num { color: var(--accent); font-weight: 600; }

.feat-canvas {
  position: relative;
  aspect-ratio: 16/11;
  background: var(--card-bg, var(--surface));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 14px;
  border-radius: calc(var(--r-card) - 8px);
}
.feat-canvas img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.feat-card:hover .feat-canvas img { transform: scale(1.04) translateY(0) !important; }

.feat-canvas .canvas-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--card-fg, var(--text));
  text-align: center;
  padding: 24px;
}
.feat-canvas .canvas-cross {
  font-size: 56px;
  font-weight: 200;
  line-height: 1;
  opacity: 0.4;
  transition: transform .5s, opacity .3s;
}
.feat-card:hover .canvas-cross {
  transform: rotate(90deg) scale(1.1);
  opacity: 0.7;
}
.feat-canvas .canvas-label {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 16ch;
}
.feat-canvas .canvas-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-top: 6px;
}

/* Diagonal stripe pattern overlay for blank canvases */
.feat-canvas .canvas-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 22px,
    color-mix(in srgb, var(--card-fg, #1a1a1a) 4%, transparent) 22px 23px
  );
  pointer-events: none;
}

/* Hover overlay with "View case" pill */
.feat-canvas-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  justify-content: end;
  padding: 20px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 50%, color-mix(in srgb, var(--card-bg, #000) 70%, transparent) 100%);
  opacity: 0;
  transition: opacity .4s;
}
.feat-card:hover .feat-canvas-overlay { opacity: 1; }
.feat-hover {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--card-fg, #fff);
  color: var(--card-bg, #1a1a1a);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  transform: translateY(10px);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.feat-card:hover .feat-hover { transform: translateY(0); }

.feat-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 24px;
}
.feat-foot-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.feat-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: var(--text);
}
.feat-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.feat-tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--line);
}
.feat-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text);
  transition: background .25s, color .25s, transform .25s, border-color .25s;
}
.feat-card:hover .feat-arrow {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: rotate(-45deg);
}

/* ---- CTA card (4th block) ---- */
.feat-card-cta { background: var(--text); border-color: var(--text); }
.feat-card-cta .feat-meta-top { color: color-mix(in srgb, var(--bg) 50%, transparent); }
.feat-card-cta .feat-num { color: var(--accent); }
.feat-card-cta .feat-title { color: var(--bg); }
.feat-card-cta .feat-tags span {
  background: color-mix(in srgb, var(--bg) 10%, transparent);
  color: var(--bg);
  border-color: color-mix(in srgb, var(--bg) 18%, transparent);
}
.feat-card-cta .feat-arrow {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.feat-card-cta:hover .feat-arrow {
  background: var(--bg);
  color: var(--text);
}

.feat-canvas-cta {
  background: var(--text);
  border-radius: calc(var(--r-card) - 8px);
}
.feat-canvas-cta .cta-pattern {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  pointer-events: none;
  opacity: 0.08;
}
.feat-canvas-cta .cta-pattern span {
  border-right: 1px solid var(--bg);
}
.feat-canvas-cta .cta-pattern span:last-child { border-right: 0; }

.feat-canvas-cta .cta-content {
  position: relative;
  z-index: 1;
  text-align: left;
  width: 100%;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  justify-content: space-between;
}
.feat-canvas-cta .cta-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-4);
}
.feat-canvas-cta .cta-big {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--bg);
  margin: 0;
  max-width: 14ch;
}
.feat-canvas-cta .cta-circle {
  align-self: flex-end;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.feat-card-cta:hover .cta-circle { transform: scale(1.1) rotate(-15deg); }

@media (max-width: 600px) {
  .feat-canvas-cta .cta-big { font-size: 28px; }
  .feat-canvas-cta .cta-content { padding: 22px; }
  .feat-canvas-cta .cta-circle { width: 56px; height: 56px; font-size: 22px; }
  .feat-foot { padding: 18px 18px 20px; }
  .feat-meta-top { padding: 14px 18px 10px; }
  .feat-canvas { margin: 0 10px; }
}

/* ---------- PRICING 3D ---------- */
.pricing-grid { perspective: 1400px; padding-top: 24px; overflow: visible; }

.price-card-3d {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  transform-style: preserve-3d;
  will-change: transform;
  /* At rest the card is flat. On mouseleave we ease back to this state. */
  transform: perspective(800px) rotateX(0deg) rotateY(0deg);
  /* Two parallel transitions:
       - opacity / filter: smooth fade for the dim-others effect (0.6s
         ease-out, so the surrounding cards melt gently).
       - transform: only the *return* uses a transition (0.45s);
         while the cursor is on the card the :hover override below cuts
         it to 0 so the tilt tracks the cursor 1:1 with no startup pop. */
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s ease;
}
/* :hover (not the React-managed class) controls the transform transition
   so it applies the instant the cursor enters — before React re-renders
   the className. Without this the first onMouseMove fires while the
   transition is still 0.45s and the tilt "jumps" into pose. */
.price-card-3d:hover {
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0s;
  z-index: 3;
}
/* The .reveal class is intentionally NOT on the price cards (see
   components.jsx). These two !important rules dim the non-hovered
   cards without touching their transform — only opacity + blur shift,
   so a dimmed card stays perfectly still. */
.price-card-3d.is-dimmed {
  opacity: 0.45 !important;
  filter: blur(2px) !important;
}

/* Responsive: disable the 3D tilt + dim effects on narrow viewports
   and touch devices. The inline transform written by onMouseMove is
   force-flattened with `!important`, the dim-others rule is overridden
   to its rest state, and the slow transitions are dropped so taps feel
   immediate. We pair `(max-width: 900px)` with `(hover: none)` to also
   cover desktop touch displays. */
@media (max-width: 900px), (hover: none) {
  .price-card-3d,
  .price-card-3d:hover {
    transform: none !important;
    transition: opacity 0.25s ease, filter 0.25s ease;
  }
  .price-card-3d.is-dimmed {
    opacity: 1 !important;
    filter: none !important;
  }
}
.price-card-inner {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform-style: preserve-3d;
  box-shadow: 0 4px 16px -8px rgba(20,18,14,0.08);
  transition: box-shadow .3s, border-color .3s;
  overflow: hidden;
  height: 100%;
}
.price-card-3d:hover .price-card-inner {
  box-shadow: 0 40px 80px -30px rgba(20,18,14,0.35),
              0 20px 40px -20px rgba(20,18,14,0.15);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}
.price-card-3d.featured .price-card-inner {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.price-card-3d.featured .tier { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.price-card-3d.featured p { color: color-mix(in srgb, var(--bg) 80%, transparent); }
.price-card-3d.featured .price-tag em { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.price-card-3d.featured li::before { color: var(--accent-4); }
.price-card-3d.featured .pc-btn { background: var(--bg-2); color: var(--text); }
.price-card-3d.featured .ribbon {
  background: var(--accent);
  color: #fff;
}
.price-card-3d .ribbon {
  position: absolute;
  top: -12px; left: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  transform: translate(-50%, 0) translateZ(40px);
  z-index: 4;
}
.price-card-3d .price-card-inner > * { transform: translateZ(20px); }
.price-card-3d .price-card-inner > .ribbon { transform: translate(-50%, 0) translateZ(40px); }
.price-card-3d .pc-btn { transform: translateZ(40px); }

/* Glare effect */
.price-card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 20%, transparent) 0%, transparent 45%);
  opacity: 0;
  transition: opacity .3s;
  z-index: 3;
  border-radius: var(--r-card);
  mix-blend-mode: screen;
}
.price-card-3d:hover .price-card-glare { opacity: 1; }
.price-card-3d.featured .price-card-glare { mix-blend-mode: normal; }

@media (hover: none) {
  .price-card-3d:hover {
    transform: none;
  }
}

/* ---------- BRANDS (2 rows × 5 cols, each with own type) ---------- */
.brands-head { text-align: center; margin-bottom: 56px; }

.brands-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-2);
}
.brand-cell {
  position: relative;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  text-decoration: none;
  color: inherit;
  min-height: 150px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  transition: background .3s;
}
.brand-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--accent) 10%, transparent) 100%);
  transform: translateY(100%);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
  z-index: 0;
}
.brand-cell:hover::before { transform: translateY(0); }
.brand-cell > * { position: relative; z-index: 1; }

.brand-lockup {
  display: inline-flex;
  align-items: center;
  filter: grayscale(0.15);
  transition: filter .35s cubic-bezier(.2,.7,.2,1), transform .35s cubic-bezier(.2,.7,.2,1);
}
.brand-cell:hover .brand-lockup {
  filter: grayscale(0);
  transform: translateY(-2px) scale(1.05);
}
.brand-name { line-height: 1; white-space: nowrap; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 6px;
}

@media (max-width: 1024px) {
  .brand-cell { padding: 36px 14px; min-height: 130px; }
  .brand-name { font-size: 17px !important; }
}

@media (max-width: 720px) {
  .brands-grid { grid-template-columns: repeat(2, 1fr); border-radius: 18px; }
  .brand-cell {
    padding: 32px 14px;
    min-height: 120px;
  }
  .brand-name { font-size: 16px !important; }
}


/* =========================================================
   v2 polish — added by Fran Ruiz refactor 2026-05
   ========================================================= */

/* ---------- WORK HEAD: explicit mobile left alignment ---------- */
.work-head { text-align: left; }
.work-head h2 { text-align: left; }
@media (max-width: 900px) {
  .work-head { width: 100%; align-items: flex-start !important; }
  .work-head h2 {
    max-width: none !important;
    width: 100%;
    align-self: flex-start;
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }
  /* Make sure the eyebrow line sits flush left, like the rest of sections */
  #work > .eyebrow { justify-content: flex-start !important; }
}

/* ---------- BRANDS / TRUSTED BY — minimal monochrome ---------- */
.brands-grid {
  background: transparent !important;
  border: 0 !important;
}
.brand-cell {
  border: 0 !important;
  background: transparent !important;
  padding: 36px 20px !important;
  min-height: 120px !important;
}
.brand-cell::before { display: none !important; }
.brand-cell .brand-name {
  color: var(--text) !important;
  background: none !important;
  -webkit-background-clip: initial !important;
          background-clip: initial !important;
  transition: opacity .25s ease, transform .35s cubic-bezier(.2,.7,.2,1);
  opacity: 0.78;
  max-width: 100%;
  display: inline-block;
  text-align: center;
  word-break: break-word;
  line-height: 1.15;
}
.brand-cell:hover .brand-name {
  opacity: 1;
  transform: translateY(-1px);
}
@media (max-width: 1024px) {
  .brand-cell .brand-name { font-size: 17px !important; }
}
@media (max-width: 720px) {
  .brand-cell { padding: 28px 14px !important; min-height: 100px !important; }
  .brand-cell .brand-name {
    font-size: 16px !important;
    white-space: normal !important;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    line-height: 1.2;
    max-width: 100%;
  }
}

/* Hover-dim is now driven by the React-managed `.is-dimmed` class on
   `.price-card-3d` (see top of this file's PRICING 3D section). The
   legacy `:has(:hover)` rules that lived here were re-introducing
   `transform: scale(...)` on the other cards and clobbering the smooth
   tilt of the active one — they're intentionally gone. */

/* Featured card retains its dark visual but no ribbon */
.price-card-3d.featured .price-card-inner {
  position: relative;
  /* Stand a touch taller than the side cards so it reads as the
     "recommended" tier even before hover. */
  margin-top: -16px;
  margin-bottom: -16px;
  padding-top: 52px;
  padding-bottom: 52px;
  border: 0 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
/* On mobile the pricing grid stacks vertically, so the -16px margins
   on the featured card collapse the gap with its neighbours and the
   first two cards end up touching. Drop the negative margins (and the
   extra vertical padding that compensated for them) below the stacking
   breakpoint so all three cards sit with the same grid gap between
   them. */
@media (max-width: 900px) {
  .price-card-3d.featured .price-card-inner {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 36px;
    padding-bottom: 36px;
  }
}
.price-card-3d.featured .tier {
  /* Solid accent badge in white text — the "ESTÁNDAR" pill. */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  width: max-content;
}
/* Inverted CTA: accent fill + white text */
.price-card-3d.featured .pc-btn {
  background: var(--accent) !important;
  color: #fff !important;
}
.price-card-3d.featured .pc-btn:hover { background: var(--accent) !important; }
/* Checks in accent (replaces the previous accent-4 tint) */
.price-card-3d.featured li::before { color: var(--accent) !important; }
/* Dark mode flip: light-text background, dark text */
[data-theme="dark"] .price-card-3d.featured .price-card-inner {
  background: #f3ede2;
  color: #14130f;
}
[data-theme="dark"] .price-card-3d.featured h3,
[data-theme="dark"] .price-card-3d.featured .price-tag {
  color: #14130f;
}
[data-theme="dark"] .price-card-3d.featured p {
  color: color-mix(in srgb, #14130f 75%, transparent);
}

/* ---------- TOOLS CLUSTER (Connected systems) ---------- */
.tools-section { padding-top: 120px !important; padding-bottom: 120px !important; }
.tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
@media (max-width: 980px) {
  .tools-grid { grid-template-columns: 1fr; gap: 56px; }
}

.tools-text .eyebrow { margin-bottom: 28px; }
.tools-text h2 {
  font-size: clamp(40px, 5.6vw, 76px);
  letter-spacing: -0.03em;
  line-height: 1;
  max-width: 14ch;
}
.tools-text h2 .ink { color: var(--accent); }
.tools-text p {
  margin-top: 24px;
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--text-2);
  max-width: 38ch;
  text-wrap: pretty;
}

.tools-bullets {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.tools-bullets .tb {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.tools-bullets .tb-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--accent);
  min-width: 60px;
  line-height: 1;
}
.tools-bullets .tb-label {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
}

/* The cluster: square area with center + 8 slots placed in circle */
.tools-cluster {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 560px;
  margin: 0 auto;
}
.tools-orbit-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.tools-orbit-bg .tools-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--text) 14%, transparent);
  transform: translate(-50%, -50%);
  animation: orbit-spin 60s linear infinite;
}
.tools-orbit-bg .r1 { width: 38%; height: 38%; animation-duration: 40s; }
.tools-orbit-bg .r2 { width: 70%; height: 70%; animation-duration: 65s; animation-direction: reverse; opacity: 0.6; }
.tools-orbit-bg .r3 { width: 100%; height: 100%; border-style: solid; border-color: color-mix(in srgb, var(--text) 8%, transparent); animation-duration: 90s; opacity: 0.5; }
@keyframes orbit-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.tools-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
  z-index: 5;
  box-shadow: 0 30px 60px -20px rgba(20,18,14,.4), 0 0 0 6px var(--bg);
}
.tools-center::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  animation: pulse-ring 3.4s ease-out infinite;
}
.tools-center .dot {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.tools-center .d1 { top: -3px; left: 50%; transform: translateX(-50%); }
.tools-center .d2 { right: -3px; top: 50%; transform: translateY(-50%); }
.tools-center .d3 { bottom: -3px; left: 50%; transform: translateX(-50%); }
@keyframes pulse-ring {
  0%   { transform: scale(0.96); opacity: .9; }
  100% { transform: scale(1.6);  opacity: 0;  }
}

/* Slot positions calculated from --x / --y unit vector */
.tool-slot {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(calc(-50% + var(--x) * 38cqi), calc(-50% + var(--y) * 38cqi));
  width: 96px;
  height: 96px;
  z-index: 4;
  container-type: inline-size;
}
.tool-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px -16px rgba(20,18,14,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
}
.tool-card:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: 0 24px 50px -20px rgba(20,18,14,0.3);
}
.tool-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transform: scale(0.7) translateY(8px);
  transition: opacity .55s cubic-bezier(.2,.7,.2,1), transform .55s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.tool-face.on {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.tool-face svg { display: block; }
.tool-name {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 0;
}
.tool-line { display: none; } /* not used currently */

/* Mobile: collapse the cluster to a grid */
@media (max-width: 980px) {
  .tools-cluster {
    aspect-ratio: auto;
    max-width: 480px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 20px 0;
  }
  .tools-orbit-bg, .tools-center { display: none; }
  .tool-slot {
    position: relative;
    top: auto; left: auto;
    transform: none;
    width: 100%;
    aspect-ratio: 1;
    height: auto;
  }
}
@media (max-width: 520px) {
  .tools-cluster { grid-template-columns: repeat(3, 1fr); max-width: 360px; }
}

/* ---------- TESTIMONIALS — Shinta-style featured ---------- */
.tests-shinta-wrap {
  position: relative;
  overflow: hidden;
}
.tests-shinta-wrap .ts-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.tests-shinta-wrap .ts-bg .ts-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.tests-shinta-wrap .ts-bg .b1 { width: 480px; height: 480px; background: var(--accent-2); top: 10%; left: -120px; }
.tests-shinta-wrap .ts-bg .b2 { width: 380px; height: 380px; background: var(--accent-4); bottom: -10%; right: -100px; opacity: 0.3; }
[data-theme="dark"] .tests-shinta-wrap .ts-bg .ts-blob { opacity: 0.18; }

.tests-shinta-wrap .ts-quote-mark {
  position: absolute;
  top: 8%;
  right: 8%;
  font-family: var(--font-display);
  font-size: clamp(220px, 28vw, 380px);
  line-height: 0.6;
  font-weight: 800;
  color: color-mix(in srgb, var(--accent) 12%, transparent);
  pointer-events: none;
  user-select: none;
}

.ts-head {
  text-align: center;
  margin-bottom: 56px;
  position: relative;
  z-index: 1;
}
.ts-head h2 {
  font-size: clamp(36px, 5vw, 64px);
}
.ts-head .eyebrow { justify-content: center; }

.ts-stage {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: 0 auto;
  min-height: 380px;
}
.ts-card {
  position: absolute;
  inset: 0;
  padding: 56px clamp(28px, 4vw, 56px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 60px 120px -50px rgba(20,18,14,.18), 0 20px 40px -30px rgba(20,18,14,.08);
  display: flex;
  flex-direction: column;
  gap: 28px;
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  pointer-events: none;
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.ts-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  z-index: 2;
}
.ts-stars {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ts-stars .ts-star {
  color: var(--accent-4);
  font-size: 18px;
  letter-spacing: 4px;
}
.ts-stars .ts-meta-sep {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.ts-stars .ts-meta-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.ts-quote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--text);
  text-wrap: pretty;
  position: relative;
}
.ts-quote .ts-mark-open,
.ts-quote .ts-mark-close {
  font-size: 1.4em;
  color: var(--accent);
  line-height: 0;
  vertical-align: -0.15em;
  margin: 0 0.05em;
}
.ts-author {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.ts-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-4));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.ts-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.ts-role {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 2px;
}

.ts-controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 48px;
}
.ts-arrow {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.ts-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.ts-dots {
  display: flex;
  gap: 8px;
}
.ts-dot {
  width: 28px;
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  border: 0;
  cursor: pointer;
  transition: background .25s, width .25s;
  padding: 0;
}
.ts-dot:hover { background: var(--text-mute); }
.ts-dot.active { background: var(--accent); width: 48px; }

@media (max-width: 700px) {
  .ts-stage { min-height: 460px; }
  .ts-card { padding: 36px 24px; gap: 22px; border-radius: 22px; }
  .ts-quote { font-size: 20px; line-height: 1.35; }
  .ts-author { gap: 12px; }
  .ts-avatar { width: 48px; height: 48px; font-size: 15px; }
  .tests-shinta-wrap .ts-quote-mark { font-size: 180px; right: -2%; top: 4%; }
}

/* ---------- PROJECT PAGE — improvements ---------- */

/* Tighten the back-button → eyebrow spacing on case study pages */
.proj-hero .proj-back { margin-bottom: 28px; margin-right: 24px; }
.proj-hero .proj-eyebrow { margin-bottom: 24px; }

/* The hero canvas section sits in its own .wrap, but the title +
   meta row live inside .proj-hero which strips .wrap's horizontal
   padding (because `.proj-hero { padding: 80px 0 56px }` overrides
   the shorthand). To line the canvas up with the title text, drop
   the wrap gutter on this one canvas section too. */
section.wrap.proj-canvas-section {
  padding-left: 0;
  padding-right: 0;
}

/* Mobile gutter alignment: use the global wrap gutter (20px) like the home page */
@media (max-width: 700px) {
  .proj-hero { padding: 56px 0 36px; }
  .proj-back { margin-bottom: 24px; padding: 9px 16px; font-size: 11px; }
  .proj-eyebrow { font-size: 11px; margin-bottom: 18px; }
  .proj-title { font-size: clamp(40px, 12vw, 60px) !important; margin-bottom: 24px; }
  .proj-summary { font-size: 16px; margin-bottom: 36px; }
  .proj-canvas-hero { margin: 24px 0 36px; border-radius: 18px; }
  .proj-meta { gap: 22px 16px; padding-top: 24px; }
  .meta-cell .v { font-size: 14px; }
  .proj-body { padding-top: 48px !important; padding-bottom: 8px !important; }
  .proj-body-grid { gap: 24px; }
  .proj-content p { font-size: 18px !important; }
  .proj-aside h2 { font-size: 26px; }
  .proj-aside p { font-size: 15px; }

  /* Long meta values (e.g. "Brilla Influencers & Communication") were
     overflowing past the right gutter on phones because .aside-row uses
     flex + space-between with a non-wrapping right-aligned value. Stack
     the label above the value so it can use the full row width and wrap
     cleanly inside the page gutter. */
  .proj-aside-meta { gap: 16px; }
  .aside-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .aside-row .v {
    text-align: left;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

/* Belt-and-braces: never let a case study page scroll horizontally,
   even if a long word or nested grid tries to push past the gutter. */
.proj-main { overflow-x: clip; }
.proj-body-grid,
.proj-aside,
.proj-content,
.proj-aside-meta,
.aside-row,
.proj-meta,
.meta-cell { min-width: 0; }
.proj-meta .meta-cell .v { overflow-wrap: anywhere; }
.proj-content p { max-width: 100%; }

/* Kurawa-inspired project gallery */
.proj-gallery-kurawa {
  display: grid;
  gap: 16px;
  margin-top: 48px;
}
.pgk-row {
  display: grid;
  gap: 16px;
}
.pgk-row.cols-1 { grid-template-columns: 1fr; }
.pgk-row.cols-2 { grid-template-columns: 1fr 1fr; }
.pgk-row.cols-2-uneven { grid-template-columns: 1.4fr 1fr; }
.pgk-row.cols-2-uneven-r { grid-template-columns: 1fr 1.4fr; }
.pgk-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.pgk-block {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card-bg, var(--surface));
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Match the hero frame — same ink hairline across all photo
     containers on project pages. */
  border: 1.5px solid var(--text);
}
.pgk-block.tall { aspect-ratio: 4/5; }
.pgk-block.wide { aspect-ratio: 16/9; }
.pgk-block.ultra-wide { aspect-ratio: 21/9; }
.pgk-block.square { aspect-ratio: 1; }

.pgk-block .canvas-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--card-fg, #fff);
  opacity: 0.85;
  padding: 24px;
  text-align: center;
}
.pgk-block .canvas-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 22px,
    color-mix(in srgb, var(--card-fg, #1a1a1a) 4%, transparent) 22px 23px
  );
  pointer-events: none;
}
.pgk-block .canvas-cross {
  font-size: 56px;
  font-weight: 200;
  line-height: 1;
  opacity: 0.5;
}
.pgk-block .canvas-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.65;
}
.pgk-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: -6px;
}

@media (max-width: 700px) {
  .pgk-row.cols-2,
  .pgk-row.cols-2-uneven,
  .pgk-row.cols-2-uneven-r,
  .pgk-row.cols-3 { grid-template-columns: 1fr; }
  .pgk-block { border-radius: 16px; aspect-ratio: 4/3; }
  .pgk-block.tall { aspect-ratio: 4/5; }
}

/* ---------- SCROLL REVEAL — smoother, more orchestrated ---------- */
@keyframes reveal-up-soft {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-left-soft {
  from { opacity: 0; transform: translate(-32px, 18px); }
  to   { opacity: 1; transform: translate(0, 0); }
}
@keyframes reveal-right-soft {
  from { opacity: 0; transform: translate(32px, 18px); }
  to   { opacity: 1; transform: translate(0, 0); }
}

/* By default content is visible. Animation plays once when .in is added.
   No [data-anim] gating, no aggressive opacity:0 — content never gets stuck
   invisible even if the JS check is late. */
.reveal, .reveal-stagger { opacity: 1; }
[data-anim] .reveal:not(.in),
[data-anim] .reveal-stagger:not(.in) {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-anim] .reveal-stagger.from-left:not(.in)  { transform: translate(-32px, 18px); }
[data-anim] .reveal-stagger.from-right:not(.in) { transform: translate(32px, 18px); }

[data-anim] .reveal.in {
  animation: reveal-up-soft .85s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--d, 0) * 1ms);
}
[data-anim] .reveal-stagger.from-left.in {
  animation: reveal-left-soft 1s cubic-bezier(.2, .7, .2, 1) both;
}
[data-anim] .reveal-stagger.from-right.in {
  animation: reveal-right-soft 1s cubic-bezier(.2, .7, .2, 1) both;
}

/* Use data-d as the delay if present */
.reveal[data-d="100"] { --d: 100; }
.reveal[data-d="200"] { --d: 200; }
.reveal[data-d="300"] { --d: 300; }
.reveal[data-d="400"] { --d: 400; }
.reveal[data-d="500"] { --d: 500; }

/* Safety net: 1.8s after page load, force-show everything still hidden.
   This protects against JS hiccups or off-screen items the IntersectionObserver
   somehow missed. */
@keyframes reveal-safety-show {
  to { opacity: 1; transform: translate(0, 0); }
}
[data-anim] .reveal:not(.in),
[data-anim] .reveal-stagger:not(.in) {
  animation: reveal-safety-show 1s ease 2.4s forwards;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .tools-orbit-bg .tools-ring { animation: none !important; }
  .tools-center::before { animation: none !important; }
}


/* =========================================================
   INTEGRATION SECTION (Sanjaya-inspired dark band)
   ========================================================= */
.tools-integration {
  position: relative;
  background: #0a0a0a;
  color: #f3ede2;
  overflow: hidden;
  padding: clamp(80px, 12vw, 160px) 0 clamp(80px, 10vw, 140px) !important;
  border-radius: 0;
  isolation: isolate;
}
.tools-integration::before {
  /* Subtle vignette to give the rows a fade into the section */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 30%,
    rgba(232, 98, 74, 0.06) 0%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.tools-integration .ti-rows {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 auto clamp(56px, 7vw, 96px);
  width: 100%;
  max-width: 1400px;
  padding: 0 12px;
  /* Edge fade so tiles bleed off-screen */
  -webkit-mask-image: linear-gradient(to right,
    transparent 0%,
    #000 18%,
    #000 82%,
    transparent 100%);
          mask-image: linear-gradient(to right,
    transparent 0%,
    #000 18%,
    #000 82%,
    transparent 100%);
}

.tools-integration .ti-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.tools-integration .ti-row-2 {
  transform: translateX(8%);
}

.tools-integration .ti-tile {
  aspect-ratio: 1 / 1;
  background: #18181a;
  border: 1px solid #ffffff0a;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6e6e72;
  /* Initial state — hidden, slightly above and scaled down.
     Stagger reveal kicks in when `.ti-rows` receives `.in`. */
  opacity: 0;
  transform: translateY(-22px) scale(0.96);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}

/* Final state — driven by IntersectionObserver in tools.jsx */
.tools-integration .ti-rows.in .ti-tile {
  opacity: 1;
  transform: none;
}

/* Stagger delays — row 1 */
.tools-integration .ti-rows.in .ti-row:nth-child(1) .ti-tile:nth-child(1) { transition-delay:   0ms; }
.tools-integration .ti-rows.in .ti-row:nth-child(1) .ti-tile:nth-child(2) { transition-delay:  70ms; }
.tools-integration .ti-rows.in .ti-row:nth-child(1) .ti-tile:nth-child(3) { transition-delay: 140ms; }
.tools-integration .ti-rows.in .ti-row:nth-child(1) .ti-tile:nth-child(4) { transition-delay: 210ms; }
.tools-integration .ti-rows.in .ti-row:nth-child(1) .ti-tile:nth-child(5) { transition-delay: 280ms; }
.tools-integration .ti-rows.in .ti-row:nth-child(1) .ti-tile:nth-child(6) { transition-delay: 350ms; }

/* Stagger delays — row 2 (offset to feel like a cascade) */
.tools-integration .ti-rows.in .ti-row:nth-child(2) .ti-tile:nth-child(1) { transition-delay:  80ms; }
.tools-integration .ti-rows.in .ti-row:nth-child(2) .ti-tile:nth-child(2) { transition-delay: 150ms; }
.tools-integration .ti-rows.in .ti-row:nth-child(2) .ti-tile:nth-child(3) { transition-delay: 220ms; }
.tools-integration .ti-rows.in .ti-row:nth-child(2) .ti-tile:nth-child(4) { transition-delay: 290ms; }
.tools-integration .ti-rows.in .ti-row:nth-child(2) .ti-tile:nth-child(5) { transition-delay: 360ms; }
.tools-integration .ti-rows.in .ti-row:nth-child(2) .ti-tile:nth-child(6) { transition-delay: 430ms; }

/* Reduced motion — skip the entry animation entirely */
@media (prefers-reduced-motion: reduce) {
  .tools-integration .ti-tile {
    opacity: 1;
    transform: none;
    transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
  }
}
.tools-integration .ti-tile::after {
  /* soft inner highlight */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ffffff08 0%, transparent 40%);
  pointer-events: none;
}
.tools-integration .ti-tile svg {
  width: 38%;
  height: 38%;
  opacity: 0.55;
  transition: opacity .35s ease, transform .35s ease;
}
.tools-integration .ti-tile:hover {
  background: #232325;
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1.5px var(--accent);
}
.tools-integration .ti-tile:hover svg {
  opacity: 1;
  transform: scale(1.06);
}

.tools-integration .ti-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}
.tools-integration .ti-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 6px;
  background: #1a1a1a;
  color: #f3ede2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 500;
  /* Checkered border like the reference */
  position: relative;
  margin-bottom: 32px;
}
.tools-integration .ti-pill::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 8px;
  background-image:
    linear-gradient(45deg, var(--accent) 25%, transparent 25%),
    linear-gradient(-45deg, var(--accent) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--accent) 75%),
    linear-gradient(-45deg, transparent 75%, var(--accent) 75%);
  background-size: 6px 6px;
  background-position: 0 0, 0 3px, 3px -3px, -3px 0;
  z-index: -1;
  opacity: 0.55;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
          mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding: 3px;
}

.tools-integration .ti-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.8vw, 80px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: #f3ede2;
  margin: 0;
}
.tools-integration .ti-sub {
  margin: 24px auto 0;
  max-width: 56ch;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55;
  color: #9b9a96;
  text-wrap: pretty;
}

@media (max-width: 720px) {
  .tools-integration .ti-row { grid-template-columns: repeat(6, minmax(64px, 1fr)); gap: 10px; }
  .tools-integration .ti-rows { gap: 10px; padding: 0 8px; }
  .tools-integration .ti-tile { border-radius: 14px; }
  .tools-integration .ti-pill { font-size: 10px; letter-spacing: 0.18em; padding: 6px 14px; }
}
@media (max-width: 480px) {
  .tools-integration .ti-row { grid-template-columns: repeat(6, 60px); justify-content: center; }
  .tools-integration .ti-rows {
    overflow-x: visible;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
  }
}

/* =========================================================
   TESTIMONIALS — Shinta-style 5-card grid (blank photos)
   ========================================================= */
.tsh-section {
  background: var(--surface);
  border-radius: 0;
  padding: clamp(80px, 10vw, 140px) var(--gutter) !important;
}
.tsh-head {
  text-align: center;
  margin-bottom: 56px;
}
.tsh-eyebrow {
  display: inline-block;
  background: #f6c9eb;
  color: #2a1430;
  padding: 6px 16px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 24px;
}
.tsh-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 84px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--text);
  max-width: 14ch;
  margin: 0 auto;
}

.tsh-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto;
}
.tsh-row {
  display: grid;
  gap: 18px;
}
.tsh-row-top { grid-template-columns: 1.8fr 1fr; }
.tsh-row-bot { grid-template-columns: 1fr 1fr 1fr; }

.tsh-card {
  background: var(--bg-2);
  border-radius: 22px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 280px;
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(20,18,14,0.10);
  position: relative;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
.tsh-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 var(--line), 0 40px 80px -40px rgba(20,18,14,0.18);
}

.tsh-card-lg {
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}
.tsh-card-lg .tsh-card-body {
  padding: 28px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
}

.tsh-photo {
  position: relative;
  flex: 0 0 42%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 22px,
    color-mix(in srgb, var(--text) 4%, transparent) 22px 23px
  );
  border-right: 1px solid var(--line);
}
.tsh-photo-play {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.18);
}

.tsh-stars {
  display: inline-flex;
  gap: 2px;
  background: #fff5e6;
  padding: 5px 8px;
  border-radius: 6px;
  width: max-content;
}
.tsh-star { color: #f4b65c; font-size: 13px; letter-spacing: 1px; }

.tsh-card .tsh-quote {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}
.tsh-card-lg .tsh-quote { font-size: 22px; }
.tsh-card .tsh-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
}
.tsh-card-lg .tsh-body { font-size: 15px; }

.tsh-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}
.tsh-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  flex-shrink: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 6px,
    color-mix(in srgb, var(--text) 6%, transparent) 6px 7px
  );
}
.tsh-card-lg .tsh-author { padding-top: 0; }
.tsh-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.tsh-role {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 2px;
}

@media (max-width: 980px) {
  .tsh-row-top { grid-template-columns: 1fr; }
  .tsh-row-bot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .tsh-row-bot { grid-template-columns: 1fr; }
  .tsh-card-lg { flex-direction: column; }
  .tsh-photo { flex: 0 0 220px; min-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tsh-card { padding: 24px; min-height: 220px; }
  .tsh-card-lg .tsh-card-body { padding: 24px; }
}

/* =========================================================
   CONTACT — fix budget select (white-on-white)
   ========================================================= */
.contact-form select {
  background: #2a2926 !important;
  color: #f3ede2 !important;
  border: 1px solid color-mix(in srgb, var(--bg) 22%, transparent) !important;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #f4b65c 50%),
    linear-gradient(135deg, #f4b65c 50%, transparent 50%) !important;
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50% !important;
  background-size:
    5px 5px,
    5px 5px !important;
  background-repeat: no-repeat !important;
  padding-right: 36px !important;
}
.contact-form select option {
  background: #1a1a1a;
  color: #f3ede2;
}
.contact-form select:focus {
  background-color: #34322e !important;
  border-color: var(--accent-4) !important;
}


/* =========================================================
   MOBILE LATERAL MARGINS — subpages + global polish
   ========================================================= */
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .proj-hero,
  .proj-body,
  .proj-gallery,
  .proj-main > section.wrap {
    padding-left: 24px;
    padding-right: 24px;
  }
  .proj-canvas-hero { margin-left: 0; margin-right: 0; }
  .proj-gallery-kurawa { gap: 14px; }
  .pgk-row { gap: 14px; }
}

@media (max-width: 600px) {
  :root { --gutter: 22px; }
  .proj-hero,
  .proj-body,
  .proj-gallery,
  .proj-main > section.wrap {
    padding-left: 22px;
    padding-right: 22px;
  }
  .proj-meta { gap: 18px 14px; }
  .proj-content p { font-size: 17px !important; line-height: 1.5; }
}

/* Integration tile sizing on smaller screens — keep them visible but smaller */
@media (max-width: 600px) {
  .tools-integration .ti-row { gap: 8px; }
  .tools-integration .ti-rows { gap: 8px; }
  .tools-integration .ti-tile { border-radius: 12px; }
  .tools-integration .ti-pill { padding: 6px 12px; }
}

/* Testimonials mobile gutter fix */
@media (max-width: 700px) {
  .tsh-section { padding-left: 22px !important; padding-right: 22px !important; }
}

/* ============================================================
   SCROLL PERFORMANCE — paint/layout isolation
   ============================================================
   These rules don't change visuals; they tell the browser that
   each card is an isolated paint+layout boundary, so scrolling
   one (or hovering, transforming, etc.) doesn't dirty the
   whole document. Big win for jank when large hero images
   decode mid-scroll. */
.feat-card,
.svc-card,
.tech-pill,
.brand-cell,
.test-card,
.price-card-3d {
  contain: layout paint;
}

/* The fixed-aspect canvas already reserves height via `aspect-ratio`.
   Promote it to its own compositor layer so the image paint when it
   finally decodes is composited (cheap) instead of repainting the
   surrounding card. `transform: translateZ(0)` is the cross-browser
   way to ask for a layer. */
.feat-canvas {
  transform: translateZ(0);
  backface-visibility: hidden;
  /* Reserve vertical space + clip late-paint flashes to the canvas
     rounded corners so they never bleed into the surrounding layout. */
  contain: layout paint;
}
.feat-canvas img {
  /* Hint the browser to keep the image on its own layer once decoded,
     so subsequent scroll frames don't repaint it. */
  transform: translateZ(0);
  will-change: transform;
}

/* The hero shapes are decorative gradients; ensure their animations
   don't trigger layout. */
.hero-shape { contain: strict; will-change: transform; }

/* Block the browser's "scroll anchoring" inside scroll containers we
   don't want it interfering with. Scroll anchoring can cause the
   "vuelve para arriba" feeling when content above the viewport changes
   height (e.g. a late-loading image inside the carousel track). */
.tests-carousel-track,
.tests-grid,
.featured-grid {
  overflow-anchor: none;
}

/* Stop the smooth scroll-behavior from interfering when JS does
   programmatic scrolls during initial page settle. Smooth scrolling
   stays for in-page anchor clicks; this only suspends it for the
   first ~600ms after load while the page is mounting. */
html.scroll-settling { scroll-behavior: auto !important; }


/* ========================================================
   SERVICE DETAIL PAGE — service.html / service-app.jsx
   Reuses .proj-back, .proj-eyebrow, .proj-title, .proj-summary,
   .proj-next from the case-study page. Everything below is
   service-specific layout: facts row, for-whom grid, delivers
   checklist, process steps, case banner, pricing grid, FAQ.
   ======================================================== */

.svc-main { padding-top: 16px; }

/* Hero — same top region as proj-hero, just narrower line-length
   on the lede because services are explanatory, not visual-led. */
.svc-hero {
  padding: 84px 24px 36px;
  position: relative;
}
.svc-hero .proj-title { max-width: 14ch; }
.svc-hero .proj-summary { max-width: 62ch; margin-bottom: 48px; }

/* Facts row — 4 small key/value cells on the hero. Picks up the
   accent color so each service has a distinct hero signature. */
.svc-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.svc-fact {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 1px solid var(--line);
}
.svc-fact:first-child { border-left: none; }
.svc-fact .k {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}
.svc-fact .v {
  font-family: var(--font-display, var(--font-sans));
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.svc-fact:first-child .v { color: var(--accent); }
@media (max-width: 800px) {
  .svc-facts { grid-template-columns: repeat(2, 1fr); }
  .svc-fact:nth-child(3) { border-left: none; border-top: 1px solid var(--line); }
  .svc-fact:nth-child(4) { border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .svc-facts { grid-template-columns: 1fr; }
  .svc-fact { border-left: none; border-top: 1px solid var(--line); }
  .svc-fact:first-child { border-top: none; }
}

/* Section head — eyebrow + optional h2 / subline */
.svc-section { padding: 80px 24px; }
.svc-section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
  max-width: 720px;
}
.svc-section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
}
.svc-pricing-sub {
  font-size: 16px;
  color: var(--text-2);
  max-width: 56ch;
  margin: 0;
}

/* ── For whom: 3 ranked profile cards ───────────────────── */
.svc-forwhom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.svc-forwhom-card {
  padding: 28px 26px 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface, var(--bg));
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s, transform .2s;
}
.svc-forwhom-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  transform: translateY(-2px);
}
.svc-forwhom-num {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}
.svc-forwhom-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
.svc-forwhom-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
}
@media (max-width: 800px) {
  .svc-forwhom-grid { grid-template-columns: 1fr; }
}

/* ── Delivers: two-column checklist ──────────────────────── */
.svc-deliver-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.svc-deliver-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.35;
}
.svc-deliver-list li:nth-child(odd) { padding-right: 24px; border-right: 1px solid var(--line); padding-left: 0; }
.svc-deliver-list li:nth-child(even) { padding-left: 24px; }
.svc-deliver-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .svc-deliver-list { grid-template-columns: 1fr; }
  .svc-deliver-list li,
  .svc-deliver-list li:nth-child(odd),
  .svc-deliver-list li:nth-child(even) {
    padding: 16px 0;
    border-right: none;
  }
}

/* ── Process: 4 numbered steps in a row ──────────────────── */
.svc-process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.svc-process-step {
  padding: 32px 22px 28px 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.svc-process-step:last-child { border-right: none; padding-right: 0; }
.svc-process-step:not(:first-child) { padding-left: 22px; }
.svc-process-num {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 4px;
}
.svc-process-step h3 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}
.svc-process-step p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
}
@media (max-width: 900px) {
  .svc-process-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-process-step:nth-child(2) { border-right: none; }
  .svc-process-step:nth-child(3) { border-right: 1px solid var(--line); border-top: 1px solid var(--line); padding-top: 28px; }
  .svc-process-step:nth-child(4) { border-top: 1px solid var(--line); padding-top: 28px; }
  .svc-process-step:nth-child(3),
  .svc-process-step:nth-child(4) { padding-left: 0; }
  .svc-process-step:nth-child(4) { padding-left: 22px; }
}
@media (max-width: 600px) {
  .svc-process-grid { grid-template-columns: 1fr; }
  .svc-process-step { border-right: none !important; border-bottom: 1px solid var(--line); padding: 24px 0 !important; }
  .svc-process-step:last-child { border-bottom: none; }
}

/* ════════════════════════════════════════════════════════
   BOOKING DEMO — interactive visual preview of the booking
   flow. Mounted only on /services/booking via booking-demo.jsx.

   Two-column layout: a card on the left mocks the customer
   widget (service → date → time → confirm), the aside on
   the right lists the integrations that fire on confirm.

   Colour story: uses the booking service's accent (#5fa7d4
   — set inline by the page via --accent on .svc-main, so
   we just reach for var(--accent) here) for picked states
   and the progress bar; everything else stays in the
   site's neutral palette so the demo reads as a piece of
   product, not a marketing splash.
   ──────────────────────────────────────────────────────── */

.svc-bd-section .svc-section-head {
  margin-bottom: 28px;
}
.svc-bd-sub {
  max-width: 64ch;
  color: var(--text-2);
  margin-top: 8px;
}

.svc-bd-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .svc-bd-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ── Card: the customer-facing widget ──────────────────── */
.svc-bd-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Keep card paint isolated so step transitions don't
     thrash the page. */
  contain: layout paint;
}
.svc-bd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--text) 3%, transparent);
}
.svc-bd-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.svc-bd-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
}
.svc-bd-reset {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text-2);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .2s ease;
}
.svc-bd-reset:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--text);
  transform: rotate(-45deg);
}

/* ── Step pills ─────────────────────────────────────────── */
.svc-bd-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.svc-bd-pill {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  color: var(--text-mute);
  text-align: left;
  /* Only transition `color` — `background` and `border-color` are
     driven by `var(--accent)`, and transitioning them would lock
     the resolved colour at transition-start so a delayed --accent
     update (when navigating between services) wouldn't propagate.
     Snap the accent-coloured surfaces; ease the text. */
  transition: color .18s ease;
  min-width: 0;
}
.svc-bd-pill-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.svc-bd-pill-lbl {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.svc-bd-pill.is-done {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.svc-bd-pill.is-done .svc-bd-pill-num {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}
.svc-bd-pill.is-active {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-color: var(--accent);
  color: var(--text);
}
.svc-bd-pill.is-active .svc-bd-pill-num {
  background: var(--accent);
  color: #fff;
}
@media (max-width: 600px) {
  .svc-bd-pill-lbl { display: none; }
  .svc-bd-pills { grid-template-columns: repeat(4, auto); justify-content: start; }
}

/* ── Body: holds whichever step is active ──────────────── */
.svc-bd-body {
  padding: 22px 20px 26px;
  min-height: 320px;   /* prevents jump as steps change */
  position: relative;
}
.svc-bd-step {
  animation: bdFadeUp .35s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes bdFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* STEP 0 — service rows */
.svc-bd-svcs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.svc-bd-svc {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--text);
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.svc-bd-svc:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  transform: translateY(-1px);
}
.svc-bd-svc.is-picked {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
}
.svc-bd-svc-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
}
.svc-bd-svc-meta {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 2px;
}
.svc-bd-svc-price {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

/* STEP 1 — calendar */
.svc-bd-cal-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  margin-bottom: 14px;
  color: var(--text);
}
.svc-bd-cal-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-mute);
  text-align: center;
  margin-bottom: 6px;
}
.svc-bd-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.svc-bd-cal-cell {
  appearance: none;
  border: 1px solid transparent;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.svc-bd-cal-cell.is-blank { background: transparent; cursor: default; }
.svc-bd-cal-cell:not(.is-blank):not(.is-off):hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.svc-bd-cal-cell.is-off {
  color: color-mix(in srgb, var(--text) 30%, transparent);
  background: transparent;
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--text) 20%, transparent);
}
.svc-bd-cal-cell.is-picked {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

/* STEP 2 — time slots */
.svc-bd-slots-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  margin-bottom: 14px;
  color: var(--text);
}
.svc-bd-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 380px) {
  .svc-bd-slots-grid { grid-template-columns: repeat(2, 1fr); }
}
.svc-bd-slot {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 8px;
  font: inherit;
  font-size: 14px;
  font-family: var(--font-mono);
  cursor: pointer;
  color: var(--text);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.svc-bd-slot:hover:not(.is-off) {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}
.svc-bd-slot.is-off {
  color: color-mix(in srgb, var(--text) 30%, transparent);
  text-decoration: line-through;
  cursor: not-allowed;
}
.svc-bd-slot.is-picked {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* STEP 3 — confirm */
.svc-bd-confirm {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}
.svc-bd-confirm-check {
  color: var(--accent);
  margin-bottom: 12px;
  animation: bdCheckPop .55s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes bdCheckPop {
  0%   { transform: scale(.4); opacity: 0; }
  100% { transform: scale(1);  opacity: 1; }
}
.svc-bd-confirm-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 16px;
  color: var(--text);
}
.svc-bd-confirm-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin: 0 0 16px;
  text-align: left;
}
.svc-bd-confirm-meta > div {
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.svc-bd-confirm-meta dt {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.svc-bd-confirm-meta dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.svc-bd-confirm-body {
  font-size: 13px;
  color: var(--text-2);
  max-width: 38ch;
  margin: 0 auto;
}
@media (max-width: 520px) {
  .svc-bd-confirm-meta { grid-template-columns: 1fr; }
}

/* Progress bar on the bottom edge of the card. */
.svc-bd-progress {
  height: 2px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  position: relative;
}
.svc-bd-progress > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  transition: width .45s cubic-bezier(.2, .7, .2, 1);
}

/* ── Aside: behind-the-scenes integration log ───────────── */
.svc-bd-log {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.svc-bd-log-head .eyebrow {
  margin-bottom: 8px;
}
.svc-bd-log-head p {
  font-size: 13px;
  color: var(--text-mute);
  margin: 0;
  line-height: 1.5;
}
.svc-bd-log-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.svc-bd-log-item {
  position: relative;
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  opacity: .5;
  transition: opacity .25s ease;
}
.svc-bd-log-item:first-child { border-top: none; }
/* Stagger driven from nth-child — was previously inline
   style={{ "--d": Nms }} per item, but React re-applies that
   style attribute on every parent rerender (the BookingDemo
   churns state on auto-advance), which restarts any running
   CSS animation and pinned the fire-in animation at 0%. CSS-
   only stagger sidesteps the issue entirely. */
.svc-bd-log-item:nth-child(1) { --d:    0ms; }
.svc-bd-log-item:nth-child(2) { --d:  120ms; }
.svc-bd-log-item:nth-child(3) { --d:  240ms; }
.svc-bd-log-item:nth-child(4) { --d:  360ms; }
.svc-bd-log-item:nth-child(5) { --d:  480ms; }
.svc-bd-log-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 20%, transparent);
  margin-top: 6px;
  margin-left: 3px;
  transition: background .3s ease, box-shadow .3s ease, transform .3s ease;
}
.svc-bd-log-k {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  line-height: 1.3;
}
.svc-bd-log-v {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 2px;
  line-height: 1.4;
}
.svc-bd-log-status {
  font-size: 14px;
  color: var(--text-mute);
  margin-top: 2px;
  min-width: 14px;
  text-align: center;
}
/* Fired state — items light up with a staggered delay defined
   inline via --d so each row pops in turn, not all at once. */
.svc-bd-log-item.is-fired {
  opacity: 1;
  animation: bdLogFire .4s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: var(--d, 0ms);
}
.svc-bd-log-item.is-fired .svc-bd-log-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
  transform: scale(1.05);
  /* No animation-delay needed: the dot reaches its final state
     via plain CSS transition, no keyframes involved. */
}
.svc-bd-log-item.is-fired .svc-bd-log-status {
  color: var(--accent);
  font-weight: 600;
}
@keyframes bdLogFire {
  0%   { transform: translateX(-4px); opacity: 0; }
  100% { transform: translateX(0);    opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .svc-bd-step,
  .svc-bd-confirm-check,
  .svc-bd-log-item.is-fired {
    animation: none !important;
  }
  .svc-bd-progress > span { transition: none; }
}

/* ── Case banner: split card linking to a real project ───── */
.svc-case-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card-bg, var(--surface));
  color: var(--card-fg, var(--text));
  text-decoration: none;
  transition: transform .25s ease;
  isolation: isolate;
}
.svc-case-card:hover { transform: translateY(-3px); }
.svc-case-inner {
  padding: 44px 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}
.svc-case-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}
.svc-case-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}
.svc-case-year {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  opacity: 0.7;
}
.svc-case-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}
.svc-case-blurb {
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.85;
  max-width: 52ch;
  margin: 0;
}
.svc-case-cta {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
}
.svc-case-cta .arr { transition: transform .25s; }
.svc-case-card:hover .svc-case-cta .arr { transform: translateX(6px); }
.svc-case-visual {
  position: relative;
  min-height: 280px;
  background: color-mix(in srgb, var(--card-fg, var(--text)) 6%, transparent);
  /* Vertical divider between copy and image — matches the card's
     outer border weight + color so it reads as one continuous frame.
     On narrow viewports the grid collapses to one column, so the
     divider moves to the top edge instead. */
  border-left: 1px solid var(--line);
}
@media (max-width: 800px) {
  .svc-case-visual {
    border-left: none;
    border-top: 1px solid var(--line);
  }
}
/* Real hero image — fills the visual half of the case banner.
   object-fit:cover keeps the aspect ratio honest; the soft inner
   shadow from the parent's tint sits underneath when the image is
   absent (canvas-empty fallback). */
.svc-case-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.svc-case-visual .canvas-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0.6;
}
@media (max-width: 800px) {
  .svc-case-card { grid-template-columns: 1fr; }
  .svc-case-inner { padding: 32px 28px 28px; }
  .svc-case-visual { min-height: 200px; }
}

/* ── Pricing: 3 plans, middle one featured ───────────────── */
.svc-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.svc-price-card {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface, var(--bg));
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s, transform .2s;
}
.svc-price-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.svc-price-card.featured {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
[data-theme="dark"] .svc-price-card.featured {
  background: #f3ede2;
  color: #14130f;
  border-color: #f3ede2;
}
.svc-price-tier {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}
.svc-price-card.featured .svc-price-tier {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  background: var(--accent);
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
  opacity: 1;
}
.svc-price-amount {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-top: 6px;
}
.svc-price-time {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 4px;
}
.svc-price-card p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
  margin: 0;
  flex: 1;
}
.svc-price-card.featured p { color: color-mix(in srgb, var(--bg) 80%, transparent); }
[data-theme="dark"] .svc-price-card.featured p { color: color-mix(in srgb, #14130f 75%, transparent); }
.svc-price-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: gap .2s, background .2s;
}
.svc-price-card.featured .svc-price-cta {
  background: var(--accent);
  color: #fff;
}
.svc-price-cta:hover { gap: 18px; }
.svc-price-cta .arr { transition: transform .2s; }
.svc-price-cta:hover .arr { transform: translateX(4px); }
@media (max-width: 900px) {
  .svc-pricing-grid { grid-template-columns: 1fr; }
}

/* ── FAQ: progressive disclosure ─────────────────────────────
   The answer is always in the DOM; we only animate its row height
   from 0fr → 1fr. Two reasons this matters specifically on the AI
   service page:
     1. The page has multiple heavy paint layers (.ai-backdrop
        gradient, orb mix-blend filter chain, glass cards with
        backdrop-filter). A display:none → block flip triggers a
        full re-paint of that stack and the answer text appeared
        to "load late". Keeping the node mounted means the glyphs
        are already laid out; toggling just animates the wrapper.
     2. `contain: layout paint` on the list scopes layout/paint
        invalidation to the FAQ block, so opening one row no longer
        forces the heavy backdrop to recompute. */
.svc-faq-list {
  border-top: 1px solid var(--line);
  contain: layout paint;
}
.svc-faq-row { border-bottom: 1px solid var(--line); }
.svc-faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 22px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--text);
  text-align: left;
  letter-spacing: -0.01em;
  line-height: 1.25;
  font-weight: 500;
}
.svc-faq-q:hover { color: var(--accent); }
.svc-faq-mark {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-2);
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.svc-faq-row.open .svc-faq-mark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
/* Answer panel — always in the DOM, height-animated via max-height.
   We use a generous cap (1200px, far beyond any real answer length)
   because we can't transition `height: auto`. The transition only
   ever interpolates from 0 → realHeight (real height ≤ cap), so the
   cap is never visible to the user — it just gives the easing a
   number to aim at. Pre-rendering keeps the glyphs painted so the
   text appears the instant the row expands, which is the whole
   point of avoiding `display: none` on the heavy AI page. */
.svc-faq-a {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .35s cubic-bezier(.2, .7, .2, 1),
              opacity .22s ease,
              padding .35s cubic-bezier(.2, .7, .2, 1);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 72ch;
  padding: 0 4px;
}
.svc-faq-row.open .svc-faq-a {
  max-height: 1200px;
  opacity: 1;
  padding: 4px 4px 24px;
}
@media (prefers-reduced-motion: reduce) {
  .svc-faq-a { transition: opacity .12s ease; }
}

/* ── Tighten section rhythm on small screens ─────────────── */
@media (max-width: 700px) {
  .svc-section { padding: 56px 24px; }
  .svc-hero { padding: 88px 24px 24px; }
}


/* ========================================================
   AI WORKFLOW SERVICE PAGE — bespoke "liquid glass" hero
   Applies only when <main> has .svc-main-ai. Everything
   below the hero (forWhom / delivers / process / pricing /
   FAQ) keeps the standard service-page styling so the site
   stays a system, not a one-off page.

   Layering contract:
     · .ai-backdrop  — position: fixed, z-index: -10. Sits
       behind every paint in the document. Drives the soft
       gradient atmosphere across the WHOLE page (not just
       the hero) and never clips at section boundaries.
     · .ai-hero      — normal flow, NO overflow:hidden, so
       absolutely-positioned children can extend past it.
       The hero glow lives on .ai-backdrop, not here.
     · everything else — uses ambient page background as
       provided by .ai-backdrop. No section-level glows.
   ======================================================== */

/* ─── Full-page ambient backdrop ────────────────────────── */
/* MODIFIED: collapsed the three child blobs into one fixed
   element whose `background` paints all three radial gradients
   at once. Because the host element is position: fixed and
   sized to the viewport, the gradients are PAINTED into the
   viewport every frame — there is literally nothing that can
   shift on scroll. Cleaner, fewer GPU layers, and removes the
   subpixel jitter some browsers showed on the old child-divs
   approach. */
.ai-backdrop {
  /* MODIFIED: was position: fixed so the glows stuck to the
     viewport on scroll. Now absolute so they sit at the top of
     the page and scroll away with the rest of the content.
     Height extended past 100vh so the bottom-right glow can
     spill naturally into the next section instead of being
     hard-cut at the hero edge. */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 140vh;
  z-index: -10;
  pointer-events: none;
  background:
    radial-gradient(620px 620px at -120px -120px, rgba(96, 177, 255, 0.45) 0%, rgba(49, 154, 255, 0.30) 28%, transparent 60%),
    radial-gradient(640px 640px at calc(100vw - 160px) calc(100vh - 140px), rgba(49, 154, 255, 0.36) 0%, rgba(96, 177, 255, 0.20) 30%, transparent 60%),
    radial-gradient(540px 540px at 30vw 45vh, rgba(96, 177, 255, 0.22) 0%, rgba(96, 177, 255, 0.10) 38%, transparent 65%),
    radial-gradient(120% 80% at 50% 0%, rgba(96, 177, 255, 0.05), transparent 70%);
}
[data-theme="dark"] .ai-backdrop {
  background:
    radial-gradient(620px 620px at -120px -120px, rgba(96, 177, 255, 0.55) 0%, rgba(49, 154, 255, 0.36) 28%, transparent 60%),
    radial-gradient(640px 640px at calc(100vw - 160px) calc(100vh - 140px), rgba(49, 154, 255, 0.46) 0%, rgba(96, 177, 255, 0.24) 30%, transparent 60%),
    radial-gradient(540px 540px at 30vw 45vh, rgba(96, 177, 255, 0.30) 0%, rgba(96, 177, 255, 0.14) 38%, transparent 65%),
    radial-gradient(120% 80% at 50% 0%, rgba(96, 177, 255, 0.10), transparent 70%);
}

/* The .ai-backdrop-glow children are no longer rendered by the
   React component, but we keep these rules as a defensive
   no-op in case the markup is ever reintroduced. */
.ai-backdrop-glow { display: none; }

@keyframes aiBgDrift {
  /* retained for legacy refs but unused — glows are now static
     so they sit truly fixed under the page content. */
  from { transform: none; }
  to   { transform: none; }
}

/* ─── Hero container ────────────────────────────────────── */
.ai-hero {
  position: relative;
  /* MODIFIED: extra top breathing room so the hero headline
     clears the sticky nav on load; tighter bottom padding so
     it still flows into the For-Whom section beneath. */
  padding: 112px 0 56px;
}

.ai-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 48px;
  padding-left: 24px;
  padding-right: 24px;
}
@media (max-width: 980px) {
  .ai-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .ai-hero { padding: 80px 0 40px; }
}

/* MODIFIED: on the AI page, tighten the rhythm between
   sections — the bespoke hero is denser than the default
   service hero, so the default 80px padding read as too
   much air below it. Clamps scale with viewport. */
.svc-main-ai .svc-section { padding: clamp(48px, 6vw, 72px) 24px; }
.svc-main-ai .section { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); }

/* ─── Left column — glass card ──────────────────────────── */
.ai-hero-left {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}
.ai-hero-left .proj-back { align-self: flex-start; }

.ai-hero-card {
  position: relative;
  padding: 36px 36px 32px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.65),
    inset 0 4px 4px 0 rgba(255, 255, 255, 0.22),
    0 30px 60px -30px rgba(15, 25, 45, 0.22);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
[data-theme="dark"] .ai-hero-card {
  background: rgba(20, 22, 32, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.08),
    inset 0 4px 4px 0 rgba(255, 255, 255, 0.04),
    0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

/* Social-proof pill */
.ai-hero-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text);
}
[data-theme="dark"] .ai-hero-badge {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}
.ai-hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  animation: aiBadgePulse 2.4s ease-in-out infinite;
}
@keyframes aiBadgePulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); }
}
.ai-hero-badge-sep { opacity: 0.35; }
.ai-hero-badge-eb {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  font-size: 11px;
}

/* Headline */
.ai-hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
  font-weight: 800;
  -webkit-font-smoothing: antialiased;
}
.ai-hero-title .line { display: block; }
.ai-hero-title .accent {
  background: linear-gradient(92deg, #0084FF 0%, #60B1FF 50%, #319AFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: aiAccentSlide 8s ease-in-out infinite;
}
@keyframes aiAccentSlide {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.ai-hero-lede {
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--text-2);
  margin: 0;
  max-width: 52ch;
}

/* CTAs */
.ai-hero-ctas {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.ai-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px 14px 22px;
  border-radius: 16px;
  background: rgba(0, 132, 255, 0.85);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.45),
    inset 0 4px 4px 0 rgba(255, 255, 255, 0.32),
    0 12px 30px -12px rgba(0, 100, 220, 0.6);
  transition: transform .2s ease, box-shadow .2s ease;
}
.ai-cta-primary:hover {
  transform: scale(1.02);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
    inset 0 4px 4px 0 rgba(255, 255, 255, 0.36),
    0 18px 40px -12px rgba(0, 100, 220, 0.75);
}
.ai-cta-arr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: rgba(0, 100, 220, 1);
  margin-left: 4px;
  transition: transform .2s;
}
.ai-cta-primary:hover .ai-cta-arr { transform: translateX(3px); }

.ai-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  transition: background .2s, color .2s;
}
.ai-cta-ghost:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--accent);
}
[data-theme="dark"] .ai-cta-ghost:hover { background: rgba(255, 255, 255, 0.06); }

/* Facts strip */
.ai-hero-facts {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 22px;
  gap: 14px 0;
}
[data-theme="dark"] .ai-hero-facts { border-top-color: rgba(255, 255, 255, 0.08); }
.ai-hero-fact {
  padding: 0 18px;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
[data-theme="dark"] .ai-hero-fact { border-left-color: rgba(255, 255, 255, 0.06); }
.ai-hero-fact:first-child { border-left: none; padding-left: 0; }
.ai-hero-fact .k {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}
.ai-hero-fact .v {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ai-hero-fact:first-child .v { color: var(--accent); }
@media (max-width: 640px) {
  .ai-hero-facts { grid-template-columns: repeat(2, 1fr); }
  .ai-hero-fact:nth-child(3) { border-left: none; padding-left: 0; }
  .ai-hero-fact:nth-child(odd) { padding-left: 0; }
}

/* ─── Right column — orb video ──────────────────────────── */
.ai-hero-orb-wrap {
  position: relative;
  align-self: center;
  width: 100%;
  aspect-ratio: 1;
  /* MODIFIED: shrink the orb a touch so it sits more in
     balance with the glass card on the left. */
  max-width: 440px;
  /* MODIFIED: center the orb within its grid column instead
     of pinning it to the right edge. */
  margin-left: auto;
  margin-right: auto;
  /* MODIFIED: entrance fade-in. Starts a touch lower, slightly
     smaller and blurred so the orb feels like it materialises
     into place rather than popping in. */
  animation: aiOrbEnter 1.2s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes aiOrbEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.94);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
@media (max-width: 980px) {
  .ai-hero-orb-wrap { margin: 0 auto; max-width: 340px; }
}
@media (max-width: 480px) {
  .ai-hero-orb-wrap { max-width: 260px; }
}

/* Clickable wrapper: no circular mask, no halo — the .webm's
   black backdrop is removed by mix-blend-mode: screen below,
   so the orb shows its own organic shape and the click pulse
   actually warps it. */
.ai-hero-orb-clickable {
  position: absolute;
  inset: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* The orb video itself. mix-blend-mode: screen filters out the
   black backdrop of the .webm. The CSS filter takes the purple
   source and colour-grades it into electric brand blue — and
   slots url(#ai-orb-wobble) at the end so SVG turbulence can
   distort the orb directly when the user clicks. transform-origin
   is driven by --clk-x/--clk-y so the pulse reads as a ripple
   from the actual click point. */
.ai-hero-orb-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%) scale(1.25);
  transform-origin: var(--clk-x, 50%) var(--clk-y, 50%);
  mix-blend-mode: screen;
  filter: hue-rotate(-55deg) saturate(2.5) brightness(1.2) contrast(1.1) url(#ai-orb-wobble);
  pointer-events: none;
}
[data-theme="dark"] .ai-hero-orb-video {
  filter: hue-rotate(-55deg) saturate(2.6) brightness(1.32) contrast(1.12) url(#ai-orb-wobble);
}

/* Click pulse — a brief contraction/rebound of the video,
   anchored at the click point via transform-origin. Pairs with
   the SVG turbulence so the orb literally wobbles. */
.ai-hero-orb-clickable.is-rippling .ai-hero-orb-video {
  animation: aiOrbPress 0.9s cubic-bezier(.2,.8,.25,1);
}
@keyframes aiOrbPress {
  0%   { transform: translate(-50%, -50%) scale(1.25); }
  18%  { transform: translate(-50%, -50%) scale(1.18); }
  55%  { transform: translate(-50%, -50%) scale(1.34); }
  100% { transform: translate(-50%, -50%) scale(1.25); }
}

/* The off-screen <svg> that hosts the filter — takes no layout
   space, just lives in the DOM so the filter id resolves. */
.ai-orb-filter-host {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ─── CSS-only orb fallback ─────────────────────────────────
   Used on clients that can't decode the .webm (older iOS Safari,
   locked-down WebViews). Composes a soft glass sphere from three
   radial-gradient layers + a slow drift so the AI hero still feels
   alive without depending on a video codec. Painted in the brand
   accent so it matches the page even when the video filter chain
   isn't in play. */
.ai-hero-orb-css {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  animation: aiOrbCssDrift 12s ease-in-out infinite alternate;
}
.ai-hero-orb-css span {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
/* Outer glow — wider than the wrap so it bleeds softly. */
.ai-hero-orb-css .ai-orb-glow {
  width: 130%;
  height: 130%;
  background: radial-gradient(
    circle at 50% 50%,
    color-mix(in oklab, var(--accent, #319AFF) 55%, transparent) 0%,
    color-mix(in oklab, var(--accent, #319AFF) 25%, transparent) 28%,
    transparent 62%
  );
  filter: blur(18px);
  opacity: 0.9;
  animation: aiOrbCssPulse 6s ease-in-out infinite alternate;
}
/* Core sphere — denser, slightly off-centre highlight. */
.ai-hero-orb-css .ai-orb-core {
  width: 78%;
  height: 78%;
  background:
    radial-gradient(circle at 38% 32%, #ffffff 0%, color-mix(in oklab, #ffffff 55%, transparent) 8%, transparent 30%),
    radial-gradient(circle at 55% 55%,
      color-mix(in oklab, var(--accent, #319AFF) 90%, #ffffff) 0%,
      color-mix(in oklab, var(--accent, #319AFF) 70%, #0b1a3a) 45%,
      color-mix(in oklab, var(--accent, #319AFF) 30%, #050a18) 78%,
      #050a18 100%);
  box-shadow:
    inset 18px -22px 60px color-mix(in oklab, var(--accent, #319AFF) 40%, transparent),
    inset -28px 28px 70px color-mix(in oklab, #000 70%, transparent),
    0 30px 80px color-mix(in oklab, var(--accent, #319AFF) 35%, transparent);
}
/* Specular shine — tiny crescent at the top-left. */
.ai-hero-orb-css .ai-orb-shine {
  width: 30%;
  height: 18%;
  top: 28%;
  left: 38%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.25) 35%,
    transparent 70%
  );
  filter: blur(4px);
  opacity: 0.85;
}
@keyframes aiOrbCssDrift {
  0%   { transform: translate3d(0, 0, 0)         scale(1); }
  50%  { transform: translate3d(-2%, 1.5%, 0)    scale(1.02); }
  100% { transform: translate3d(2%, -1.5%, 0)    scale(0.99); }
}
@keyframes aiOrbCssPulse {
  0%   { opacity: 0.75; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1;    transform: translate(-50%, -50%) scale(1.08); }
}

/* ─── Accessibility: prefers-reduced-motion ─────────────── */
@media (prefers-reduced-motion: reduce) {
  .ai-hero-title .accent,
  .ai-hero-badge-dot,
  .ai-hero-orb-clickable.is-rippling .ai-hero-orb-video,
  .ai-hero-orb-wrap,
  .ai-hero-orb-css,
  .ai-hero-orb-css .ai-orb-glow {
    animation: none !important;
  }
}

/* MODIFIED: tighten section rhythm specifically on the AI page.
   Sections on this page sit on top of the ambient backdrop, so
   the page reads as one continuous stage — the default 80px
   padding (160px between sections) felt empty against the
   gradient atmosphere. Bring it to 48–72px. */
.svc-main-ai .svc-hero { padding: 80px 0 36px; }
.svc-main-ai .svc-section { padding: clamp(48px, 6.5vw, 72px) 24px; }
@media (max-width: 700px) {
  .svc-main-ai .svc-hero { padding: 48px 0 24px; }
  .svc-main-ai .svc-section { padding: 44px 24px; }
}

/* ─── Below-the-fold liquid-glass treatment on AI page ───── */
.svc-main-ai .svc-forwhom-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] .svc-main-ai .svc-forwhom-card {
  background: rgba(20, 22, 32, 0.45);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

/* =========================================================
   AI DEMO — interactive "See AI at work" section
   ---------------------------------------------------------
   Three-column stage (Input → AI brain → Actions) with a
   scenario tab strip above and a Run-again footer below.
   Lives only inside .svc-main-ai (mounted conditionally
   from service-app.jsx). Uses the existing AI-page accent
   token (#319AFF) for every brand mark so it slots into
   the rest of the page without introducing new colour.
   ========================================================= */

.ai-demo-section { position: relative; }

/* Title / sub stack — keep tighter than the default svc-section-head
   so the tabs feel docked to the heading instead of floating. */
.ai-demo-section .svc-section-head { margin-bottom: 24px; }
.ai-demo-section .svc-section-head h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

/* ─── Scenario tabs ─── */
.ai-demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.ai-demo-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.ai-demo-tab:hover { transform: translateY(-1px); border-color: rgba(0,0,0,0.14); }
.ai-demo-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.ai-demo-tab.is-active .ai-demo-tab-num { color: rgba(255,255,255,0.7); }
.ai-demo-tab-ico {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
}
.ai-demo-tab.is-active .ai-demo-tab-ico { background: rgba(255,255,255,0.18); color: #fff; }
.ai-demo-tab-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  margin-left: 2px;
}
[data-theme="dark"] .ai-demo-tab {
  background: rgba(20, 22, 32, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .ai-demo-tab-ico { background: rgba(255,255,255,0.08); }

/* ─── Stage: 3-column grid ─── */
.ai-demo-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.1fr;
  gap: 18px;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
    0 30px 80px -40px rgba(20, 18, 14, 0.18);
}
[data-theme="dark"] .ai-demo-stage {
  background: rgba(20, 22, 32, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.05),
    0 30px 80px -40px rgba(0, 0, 0, 0.5);
}

/* Connector arrows between columns. Pure CSS — pseudo-elements
   sit on the right edge of the first two columns. They're a
   horizontal arrow with a flowing dash pulse driven by the
   accent. Hidden on stack at <980px. */
.ai-demo-col { position: relative; min-width: 0; }
.ai-demo-input-col::after,
.ai-demo-ai-col::after {
  content: "";
  position: absolute;
  top: 50%; right: -18px;
  width: 26px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.7;
}
.ai-demo-input-col::before,
.ai-demo-ai-col::before {
  content: "";
  position: absolute;
  top: 50%; right: -22px;
  width: 0; height: 0;
  border-left: 7px solid var(--accent);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.85;
  z-index: 2;
}

/* Column head — small label row */
.ai-demo-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
}
.ai-demo-col-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.ai-demo-col-dot--in  { background: #94a3b8; }
.ai-demo-col-dot--ai  { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.ai-demo-col-dot--out { background: oklch(72% 0.13 150); }
.ai-demo-col-chip {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text-2);
  text-transform: none;
}
[data-theme="dark"] .ai-demo-col-chip { background: rgba(255,255,255,0.06); }

/* ─── Input column: message card ─── */
.ai-demo-msg {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}
[data-theme="dark"] .ai-demo-msg {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}
.ai-demo-msg-head { display: flex; align-items: center; gap: 10px; }
.ai-demo-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #fff));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.ai-demo-msg-meta { min-width: 0; }
.ai-demo-msg-from {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.ai-demo-msg-sub {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 1px;
}
.ai-demo-msg-body {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  min-height: 76px;
}
.ai-demo-caret {
  display: inline-block;
  margin-left: 1px;
  color: var(--accent);
  animation: aiDemoBlink 0.85s steps(1) infinite;
}
@keyframes aiDemoBlink {
  50% { opacity: 0; }
}
.ai-demo-msg-attach {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(0,0,0,0.16);
  background: rgba(0,0,0,0.025);
}
[data-theme="dark"] .ai-demo-msg-attach {
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
}
.ai-demo-attach-ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ai-demo-attach-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-demo-msg-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  text-transform: uppercase;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 10px;
}
[data-theme="dark"] .ai-demo-msg-foot { border-top-color: rgba(255,255,255,0.06); }
.ai-demo-msg-status { color: var(--accent); }

/* ─── AI column: brain + steps ─── */
.ai-demo-brain {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 8%, rgba(255,255,255,0.7)),
    rgba(255,255,255,0.7));
  border: 1px solid rgba(0,0,0,0.06);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
[data-theme="dark"] .ai-demo-brain {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 18%, rgba(20,22,32,0.6)),
    rgba(20,22,32,0.55));
  border-color: rgba(255,255,255,0.08);
}
.ai-demo-brain-core {
  align-self: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent),
    0 0 0 14px color-mix(in srgb, var(--accent) 8%, transparent);
  animation: aiDemoBrainPulse 2.2s ease-in-out infinite;
}
@keyframes aiDemoBrainPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 0 14px color-mix(in srgb, var(--accent) 8%, transparent); }
  50%      { transform: scale(1.06); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 14%, transparent), 0 0 0 22px color-mix(in srgb, var(--accent) 6%, transparent); }
}
.ai-demo-brain-core svg { animation: aiDemoSpin 6s linear infinite; }
@keyframes aiDemoSpin { to { transform: rotate(360deg); } }

.ai-demo-steps {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ai-demo-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.05);
  font-size: 13px;
  color: var(--text-2);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
[data-theme="dark"] .ai-demo-step {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}
.ai-demo-step.is-in { opacity: 1; transform: translateY(0); color: var(--text); }
.ai-demo-step.is-current {
  background: color-mix(in srgb, var(--accent) 12%, rgba(255,255,255,0.7));
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
[data-theme="dark"] .ai-demo-step.is-current {
  background: color-mix(in srgb, var(--accent) 25%, rgba(20,22,32,0.55));
}
.ai-demo-step-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-mute);
}
.ai-demo-step.is-in .ai-demo-step-num { color: var(--accent); }
.ai-demo-step-text { min-width: 0; overflow-wrap: anywhere; }
.ai-demo-step-mark {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  width: 14px;
  text-align: right;
}

/* AI processing pulse-dots in column head — visible when phase=2 */
.ai-demo-pulse {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px !important;
}
.ai-demo-pulse-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-mute);
  opacity: 0.4;
  transition: background .2s;
}
.ai-demo-pulse.is-on .ai-demo-pulse-dot {
  background: var(--accent);
  animation: aiDemoDotPulse 1.1s ease-in-out infinite;
}
.ai-demo-pulse.is-on .ai-demo-pulse-dot:nth-child(2) { animation-delay: 0.15s; }
.ai-demo-pulse.is-on .ai-demo-pulse-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiDemoDotPulse {
  0%, 100% { transform: scale(1);   opacity: 0.4; }
  50%      { transform: scale(1.5); opacity: 1; }
}

/* ─── Output column: actions list + metric ─── */
.ai-demo-actions {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
}
.ai-demo-action {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.06);
  opacity: 0;
  transform: translateX(14px);
  transition: opacity .4s cubic-bezier(.2,.8,.25,1),
              transform .4s cubic-bezier(.2,.8,.25,1),
              border-color .25s ease, background .25s ease;
}
[data-theme="dark"] .ai-demo-action {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}
.ai-demo-action.is-in {
  opacity: 1;
  transform: translateX(0);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, rgba(255,255,255,0.7));
}
[data-theme="dark"] .ai-demo-action.is-in {
  background: color-mix(in srgb, var(--accent) 14%, rgba(20,22,32,0.55));
}
.ai-demo-action-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(0,0,0,0.04);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .25s, color .25s;
}
[data-theme="dark"] .ai-demo-action-ico { background: rgba(255,255,255,0.06); }
.ai-demo-action.is-in .ai-demo-action-ico {
  background: var(--accent);
  color: #fff;
}
.ai-demo-action-text { min-width: 0; }
.ai-demo-action-k {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.ai-demo-action-v {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 1px;
  overflow-wrap: anywhere;
}
.ai-demo-action-check {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity .3s ease .15s, transform .3s cubic-bezier(.34,1.56,.64,1) .15s;
}
.ai-demo-action.is-in .ai-demo-action-check { opacity: 1; transform: scale(1); }

/* Metric strip — bottom of the actions column. Pops in once
   the whole sequence has finished. */
.ai-demo-metric {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
}
.ai-demo-metric.is-in { opacity: 1; transform: translateY(0); }
[data-theme="dark"] .ai-demo-metric {
  background: var(--accent);
  color: #fff;
}
.ai-demo-metric-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.ai-demo-metric-k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}
.ai-demo-metric-v {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.ai-demo-metric-v--strike {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  opacity: 0.55;
}
.ai-demo-metric-v--win { color: #60B1FF; }
[data-theme="dark"] .ai-demo-metric-v--win { color: #fff; }
.ai-demo-metric-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ai-demo-metric:not([data-theme="dark"]) .ai-demo-metric-foot { border-top-color: rgba(255,255,255,0.12); }
.ai-demo-metric-save {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}
.ai-demo-metric-per {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ─── Footer: progress pips + run again ─── */
.ai-demo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}
.ai-demo-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-demo-progress-pip {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(0,0,0,0.1);
  transition: background .25s, width .25s;
}
[data-theme="dark"] .ai-demo-progress-pip { background: rgba(255,255,255,0.12); }
.ai-demo-progress-pip.is-done { background: var(--accent); opacity: 0.55; }
.ai-demo-progress-pip.is-active { background: var(--accent); width: 44px; }
.ai-demo-run {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.55);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
}
.ai-demo-run:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="dark"] .ai-demo-run {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
}
.ai-demo-run-ico {
  display: inline-block;
  font-size: 16px;
  transition: transform .4s ease;
}
.ai-demo-run:hover .ai-demo-run-ico { transform: rotate(-180deg); }

/* ─── Responsive: stack to one column under 980px ─── */
@media (max-width: 980px) {
  .ai-demo-stage {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }
  /* Hide the lateral connector arrows when stacked — they'd
     point off the right edge of each column. */
  .ai-demo-input-col::after,
  .ai-demo-input-col::before,
  .ai-demo-ai-col::after,
  .ai-demo-ai-col::before { display: none; }
  /* Show a small vertical chevron between stacked columns so
     the flow is still readable on mobile. */
  .ai-demo-input-col,
  .ai-demo-ai-col {
    position: relative;
    padding-bottom: 14px;
  }
  .ai-demo-input-col::after,
  .ai-demo-ai-col::after {
    content: "↓";
    display: block;
    position: absolute;
    left: 50%;
    bottom: -6px;
    top: auto;
    width: auto; height: auto;
    background: none;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 16px;
    transform: translateX(-50%);
    opacity: 0.7;
  }
  .ai-demo-msg, .ai-demo-brain { min-height: auto; }
  .ai-demo-actions { min-height: auto; }
}
@media (max-width: 560px) {
  .ai-demo-tab { padding: 8px 12px 8px 8px; font-size: 13px; }
  .ai-demo-tab-num { display: none; }
  .ai-demo-tab-label { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ai-demo-foot { flex-direction: column-reverse; align-items: stretch; }
  .ai-demo-run { justify-content: center; }
  .ai-demo-progress { justify-content: center; }
  .ai-demo-metric-v { font-size: 18px; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .ai-demo-brain-core,
  .ai-demo-brain-core svg,
  .ai-demo-pulse.is-on .ai-demo-pulse-dot,
  .ai-demo-caret { animation: none !important; }
  .ai-demo-step,
  .ai-demo-action,
  .ai-demo-metric { transition: none !important; opacity: 1; transform: none; }
}

/* =========================================================
   MOBILE — Contact form overflow fix
   ---------------------------------------------------------
   Reportado: en viewports estrechos (~390px) el card oscuro
   del contacto y su <h2> "Have something in mind?" se salían
   por la derecha. Causa: el grid + sus children no tenían
   `min-width: 0`, así que la palabra más larga ("something")
   forzaba el track de grid a su intrinsic min-content y, con
   el padding del card, se desbordaba.

   Fix defensivo: forzar min-width:0 + max-width:100% en toda
   la cadena (section, wrap, grid, columnas, form). Romper
   palabras largas (email, url) con overflow-wrap. Asegurar
   que inputs/select/textarea respeten el ancho del padre.
   ========================================================= */
@media (max-width: 720px) {
  #contact { min-width: 0; max-width: 100%; }
  #contact .contact-wrap { max-width: 100%; box-sizing: border-box; padding: 28px 20px; }
  #contact .contact-grid { min-width: 0; max-width: 100%; }
  #contact .contact-left,
  #contact .contact-form { min-width: 0; max-width: 100%; box-sizing: border-box; }

  /* Romper palabras largas en titulares y bodies */
  #contact .contact-grid h2,
  #contact .contact-left p {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
  }
  /* H2 un punto más compacto para móviles muy estrechos (<400px) */
  #contact .contact-grid h2 {
    font-size: clamp(28px, 8.5vw, 40px) !important;
    line-height: 1.08;
  }

  /* Las filas de info (email/phone/location/linkedin) — la columna
     derecha (key + value) puede contener un email/teléfono largo;
     asegurar que se contraiga y rompa si hace falta. */
  #contact .contact-info .row { min-width: 0; }
  #contact .contact-info .row > div:last-child { min-width: 0; flex: 1 1 auto; }
  #contact .contact-info .v,
  #contact .contact-info .v a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Form fields: que NUNCA sean más anchos que el form */
  #contact .contact-form .field { min-width: 0; max-width: 100%; }
  #contact .contact-form input,
  #contact .contact-form textarea,
  #contact .contact-form select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }
  /* El <select> con opciones largas (CHF 5,000 – 10,000 …) no debe
     forzar el ancho del formulario por su intrinsic min-content. */
  #contact .contact-form select { display: block; }
}


/* =========================================================
   SCROLL PERFORMANCE
   ---------------------------------------------------------
   Promote heavy ambient effects onto their own compositor
   layers so the 80px blur on the contact blob is rasterized
   once and reused, not rebuilt on every scroll frame.

   NOTE: do NOT put `overscroll-behavior` or `transform` on
   <body> / <html> here — those interact with the page's
   existing `html { overflow-x: clip }` setup in ways that
   can freeze the page scroll entirely in some browsers.

   NOTE: `content-visibility: auto` was considered for top-
   level sections but rejected — with sections of wildly
   different heights, the placeholder size jumps as real
   sections render in, showing up as the very "tirones" we
   are trying to remove.
   ========================================================= */

.contact-wrap .blob {
  will-change: transform;
  transform: translateZ(0);
}

/* ─────────────────────────────────────────────────────────────
   Service detail breadcrumb spacing (web-design / booking / qr-menus)
   The "← Back to services" pill and the "Service / NN — …" eyebrow sit
   on the same row; give them clear breathing room so the eyebrow no
   longer crowds the button. (AI service uses its own ai-hero layout.)
   ───────────────────────────────────────────────────────────── */
.svc-hero .proj-back { margin-right: 28px; }
.svc-hero .proj-eyebrow { margin-left: 52px; }
@media (max-width: 640px) {
  .svc-hero .proj-back { margin-right: 0; margin-bottom: 20px; }
  .svc-hero .proj-eyebrow { margin-left: 0; }
}
