:root {
  --header-height: 76px;
  --bg: #f4f7f9;
  --ink: #061424;
  --muted: #4d657c;
  --line: rgba(3, 24, 48, 0.13);
  --paper: rgba(255, 255, 255, 0.86);
  --night: #061424;
  --green: #007c89;
  --gold: #005fcc;
  --blue: #086bff;
  --rose: #0087d8;
  --accent-fg: #ffffff;
  --shadow: 0 24px 70px rgba(0, 83, 170, 0.16);
  --radius-card: 8px;
  --space-section: clamp(32px, 5vw, 64px);
  --motion-fast: 180ms;
  --motion-normal: 320ms;
  --motion-deliberate: 680ms;
  --physics-x: 0px;
  --physics-y: 0px;
}

:root[data-theme="dark"] {
  --bg: #11171c;
  --ink: #f3fbff;
  --muted: #9eb7cf;
  --line: rgba(83, 205, 255, 0.2);
  --paper: rgba(6, 21, 39, 0.84);
  --night: #071b33;
  --green: #35f0e6;
  --gold: #69ecff;
  --blue: #63a0ff;
  --rose: #47c8ff;
  --accent-fg: #ffffff;
  --shadow: 0 24px 70px rgba(0, 229, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(8, 107, 255, 0.12), transparent 30%),
    linear-gradient(45deg, transparent 58%, rgba(0, 229, 255, 0.12)),
    var(--bg);
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

:root[data-theme="dark"] body {
  background:
    linear-gradient(180deg, rgba(2, 8, 18, 0.16), rgba(2, 8, 18, 0.92)),
    linear-gradient(135deg, rgba(8, 107, 255, 0.2), transparent 34%),
    linear-gradient(45deg, transparent 58%, rgba(0, 229, 255, 0.13)),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 30;
  padding: 10px 14px;
  color: white;
  background: var(--night);
  border-radius: var(--radius-card);
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}


.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 3px;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--gold));
  transform: scaleX(0);
  transform-origin: inline-start center;
  will-change: transform;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
  padding: 12px clamp(18px, 5vw, 58px);
  background: rgba(238, 247, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .site-header {
  background: rgba(2, 8, 18, 0.84);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  width: 46px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.34));
}

.brand span {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

:root[data-theme="dark"] .brand span {
  color: #ffffff;
  text-shadow: 0 0 18px rgba(105, 236, 255, 0.22);
}

nav {
  display: flex;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.autoplay-toggle[data-state="playing"] {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

@media (prefers-reduced-motion: reduce) {
  #autoplayToggle { display: none; }
}

nav a {
  padding: 8px 10px;
  border-radius: 7px;
}

nav a:hover,
nav a[aria-current="page"],
.filter:hover {
  background: rgba(17, 24, 39, 0.07);
}

:root[data-theme="dark"] nav a:hover,
:root[data-theme="dark"] nav a[aria-current="page"],
:root[data-theme="dark"] .filter:hover {
  background: rgba(255, 255, 255, 0.09);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 22%, transparent);
}

.section-band {
  position: relative;
  z-index: 1;
  padding: var(--space-section) clamp(18px, 5vw, 58px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 18px;
  font-size: 48px;
  line-height: 1.07;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 36px;
  line-height: 1.14;
  letter-spacing: 0;
}

.about-grid,
.services-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.about-story,
.value-card,
.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

:root[data-theme="dark"] .about-story,
:root[data-theme="dark"] .value-card,
:root[data-theme="dark"] .service-card,
:root[data-theme="dark"] .proof-card,
:root[data-theme="dark"] .testimonial-card {
  background:
    linear-gradient(180deg, rgba(11, 33, 58, 0.88), rgba(4, 14, 28, 0.9));
  border-color: rgba(83, 205, 255, 0.18);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
}

.about-story img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  object-position: center;
}

.about-story p,
.value-card,
.service-copy {
  padding: 18px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.value-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-weight: 900;
}

.services-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
  display: grid;
  min-height: 340px;
  transform-style: preserve-3d;
  will-change: transform;
}

.service-art {
  display: block;
  width: 100%;
  height: 220px;
  padding: 10px;
  object-fit: contain;
  object-position: center;
  background:
    radial-gradient(circle at 30% 18%, rgba(0, 203, 215, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(0, 102, 184, 0.12), rgba(23, 107, 95, 0.12));
  transition: transform 0.55s ease, filter 0.55s ease;
  will-change: transform, filter;
}

.service-card:hover .service-art,
.testimonial-card:hover .portrait {
  transform: scale(1.025);
  filter: saturate(1.16) contrast(1.06);
}

.value-card,
.proof-card,
.filter,
.button,
.industry-tag {
  transition: transform var(--motion-normal) ease, background var(--motion-normal) ease, border-color var(--motion-normal) ease, box-shadow var(--motion-normal) ease;
}

.value-card:hover,
.proof-card:hover,
.industry-tag:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 46px rgba(0, 160, 220, 0.16);
}

.button:hover,
.filter:hover {
  transform: translate3d(var(--physics-x, 0px), calc(var(--physics-y, 0px) - 2px), 0);
}
.industry-cloud,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.industry-tag,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--ink);
  background: color-mix(in srgb, var(--green) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 38%, transparent);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

h3 {
  margin-bottom: 6px;
  font-size: 20px;
  line-height: 1.25;
}

.lead,
.section-heading p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
}

.hero-actions,
.testimonial-tools,
.contact-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button,
.filter,
.icon-button,
.lang-toggle {
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button.primary,
.filter.active {
  color: white;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-color: color-mix(in srgb, var(--green) 50%, var(--blue));
}

:root[data-theme="dark"] .button.primary,
:root[data-theme="dark"] .filter.active {
  color: #ffffff;
  background: linear-gradient(90deg, #005fcc, #007c89);
  border-color: rgba(83, 205, 255, 0.44);
}

.button.secondary,
.filter,
.icon-button,
.lang-toggle {
  background: rgba(255, 255, 255, 0.7);
}

:root[data-theme="dark"] .button.secondary,
:root[data-theme="dark"] .filter,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .lang-toggle {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.icon-button {
  width: 44px;
  padding: 0;
  font-size: 20px;
}

.lang-toggle {
  min-width: 54px;
}

.proof-card span,
.identity span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.process {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--blue) 10%, transparent), transparent 42%),
    linear-gradient(180deg, transparent, color-mix(in srgb, var(--green) 7%, transparent));
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.process-card {
  position: relative;
  min-height: 250px;
  padding: 20px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  will-change: transform;
}

.process-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 18%, transparent), transparent 46%),
    radial-gradient(circle at 20% 12%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 26%);
  opacity: 0.78;
  pointer-events: none;
}

.process-card > * {
  position: relative;
  z-index: 1;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 38px;
  color: var(--accent-fg);
  background: linear-gradient(135deg, var(--blue), var(--green));
  border: 1px solid color-mix(in srgb, var(--gold) 44%, transparent);
  border-radius: var(--radius-card);
  font-weight: 900;
}

.process-card p {
  color: var(--muted);
  font-size: 15px;
}

:root[data-theme="dark"] .process-card {
  background: linear-gradient(180deg, rgba(11, 33, 58, 0.9), rgba(4, 14, 28, 0.92));
  border-color: rgba(83, 205, 255, 0.18);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.proof-card,
.testimonial-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 14px 44px rgba(25, 31, 44, 0.08);
}

.proof-card {
  padding: 18px;
}

.proof-card strong {
  display: block;
  margin: 6px 0;
  font-size: 44px;
  line-height: 1;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.testimonial-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 500px;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.portrait {
  position: relative;
  min-height: 210px;
  background-image: url("./assets/generated/testimonial-portraits.png");
  background-size: 500% 300%;
  background-position: var(--portrait-position);
  transition: transform 0.55s ease, filter 0.55s ease;
  will-change: transform, filter;
}

.portrait::after {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  content: "";
  background: linear-gradient(transparent, rgba(17, 24, 39, 0.72));
}

.tag {
  position: absolute;
  z-index: 2;
  inset-inline-start: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 7px 10px;
  color: white;
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
}

.testimonial-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.identity {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.metric-pill {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--green);
  background: rgba(23, 107, 95, 0.1);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
}


.testimonial-text {
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  font-size: 15px;
}

.disclaimer {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
}

.card-tags {
  margin-top: -4px;
}

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

.contact {
  padding-top: 28px;
}

.contact-panel {
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 5vw, 46px);
  color: white;
  background:
    linear-gradient(120deg, rgba(6, 20, 36, 0.9), rgba(8, 107, 255, 0.8)),
    linear-gradient(45deg, rgba(0, 229, 255, 0.34), transparent 62%);
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.contact-panel h2 {
  max-width: 760px;
}

.contact-panel p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

.contact-panel .button {
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .proof-grid,
  .value-grid,
  .services-grid,
  .process-grid,
  .testimonial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {


  h1 {
    font-size: 40px;
  }

  .proof-grid,
  .value-grid,
  .services-grid,
  .process-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-card {
    min-height: 500px;
  }


}

[dir="ltr"] .identity {
  text-align: left;
}

@media (hover: none) {
  .service-card:hover .service-art,
  .testimonial-card:hover .portrait,
  .value-card:hover,
  .proof-card:hover,
  .industry-tag:hover,
  .button:hover,
  .filter:hover {
    transform: none;
  }

}

@media (prefers-reduced-motion: reduce) {


  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}


/* Shared stage geometry is consumed by motion-system.js. */
.story-journey {
  --story-height: max(560px, calc(100svh - var(--header-height)));
  position: relative;
  isolation: isolate;
  color: #fff;
  background: #141b23;
}
.story-stage {
  position: sticky;
  top: var(--header-height);
  height: var(--story-height);
  overflow: hidden;
  pointer-events: none;
}
.story-images, .story-image, #storyCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.story-image { display: block; object-fit: cover; object-position: center; opacity: 0; }
.story-images { transform: scale(var(--scene-scale, 1)); transform-origin: center; }
.story-image:first-child { opacity: 1; }
#storyCanvas { z-index: 1; opacity: 0; pointer-events: none; }
.story-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(250deg, rgba(10, 18, 26, .9) 0%, rgba(10, 18, 26, .68) 28%, transparent 68%);
}
.story-chapters { position: relative; z-index: 3; margin-top: calc(-1 * var(--story-height)); }
.story-chapter {
  min-height: var(--story-height);
  padding: 48px max(24px, calc((100% - 1320px) / 2));
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  direction: ltr;
}
.story-copy { width: min(100%, 580px); direction: rtl; text-align: start; }
[dir="ltr"] .story-copy { direction: ltr; }
.story-brand { margin-bottom: 12px; font-size: 40px; font-weight: 800; line-height: 1.15; text-align: start; }
[dir="rtl"] .story-brand { text-align: right; }
.story-copy h1, .story-copy h2 { max-width: 21ch; font-size: 42px; line-height: 1.25; text-wrap: balance; }
.story-copy .lead { max-width: 52ch; color: #f1f5f8; font-size: 17px; line-height: 1.8; }
.story-copy .eyebrow { color: #86e8fa; }
.story-copy .button.secondary { color: #fff; background: rgba(16, 26, 35, .7); border-color: #adbec9; }
.story-copy .button.primary { background: #0067b9; color: #fff; }
.story-copy .button { display: inline-flex; justify-content: center; max-width: 100%; text-align: center; }
p { max-width: 60ch; }
h2, h3 { overflow-wrap: anywhere; text-wrap: balance; }
.service-card { grid-template-rows: 220px 1fr; align-content: start; }
.service-copy { align-self: start; }
.service-copy h3 { max-width: 28ch; }
.testimonial-body, .value-card, .proof-card { align-content: start; }
.section-band { scroll-margin-top: var(--header-height); }
@media (max-width: 1100px) {
  :root { --header-height: 120px; }
  .site-header { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 8px 20px; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; width: 100%; padding-bottom: 2px; }
  .header-controls { grid-column: 2; grid-row: 1; }
  .story-chapter { padding-inline: 28px; }
}
@media (max-width: 640px) {
  .story-journey { --story-height: max(600px, calc(100svh - var(--header-height))); }
  .story-chapter { padding: 28px 20px; }
  .story-copy { width: 100%; }
  .story-brand { font-size: 30px; }
  .story-copy h1, .story-copy h2 { font-size: 28px; max-width: 24ch; }
  .story-copy .lead { font-size: 15px; line-height: 1.7; }
  .story-stage::after { background: linear-gradient(180deg, rgba(10,18,26,.88), rgba(10,18,26,.72) 45%, transparent 82%); }
  .story-image { object-position: 42% center; }
  .story-images { top: 42%; height: 58%; }
  .story-stage::after { background: linear-gradient(180deg, #101923 0%, rgba(16,25,35,.98) 34%, rgba(16,25,35,.25) 50%, transparent 65%); }
  .story-copy .button { padding: 10px 12px; font-size: 14px; }
  h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .story-stage { position: relative; top: auto; height: min(60svh, 560px); min-height: 280px; }
  .story-stage::after { display: none; }
  .story-images { top: 0; height: 100%; }
  #storyCanvas { display: none !important; }
  .story-image:first-child,
  .cinematic-image:first-child { opacity: 1 !important; }
  .story-image:not(:first-child),
  .cinematic-image:not(:first-child) { display: none !important; }
  .story-chapters { margin-top: 0; }
  .story-chapter { min-height: auto; padding-block: 36px; }
  .story-copy { width: min(100%, 760px); }
  .story-chapter, .story-copy, .story-copy > * { opacity: 1 !important; visibility: visible !important; transform: none !important; }
}


/* Full-screen cinematic composition: one visible chapter beneath the header. */
@media (min-width: 760px) {
  .story-journey {
    --story-height: max(640px, calc(100svh - var(--header-height)));
    height: calc(var(--slide-count) * var(--story-height));
    background: #05090e;
    isolation: isolate;
  }

  .story-stage {
    position: sticky;
    top: var(--header-height);
    height: var(--story-height);
    min-height: 0;
    margin: 0;
    background: #05090e;
  }

  .story-images,
  .cinematic-image,
  #storyCanvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
  }

  .cinematic-image {
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transform: scale(1.025);
    will-change: opacity, transform;
  }

  .cinematic-image:first-child { opacity: 1; }
  #storyCanvas { z-index: 1; opacity: 0; pointer-events: none; }

  .story-stage::after {
    z-index: 2;
    background:
      linear-gradient(90deg, rgba(3, 8, 14, 0.1) 0%, rgba(3, 8, 14, 0.02) 38%, rgba(3, 8, 14, 0.86) 67%, rgba(3, 8, 14, 0.97) 100%),
      linear-gradient(180deg, rgba(3, 8, 14, 0.22), transparent 42%, rgba(3, 8, 14, 0.58));
  }

  .story-chapters {
    position: sticky;
    top: var(--header-height);
    z-index: 3;
    height: var(--story-height);
    margin-top: calc(-1 * var(--story-height));
    pointer-events: none;
  }

  .story-chapters > .cinematic-slide {
    position: absolute;
    inset: 0;
    display: flex;
    min-height: 0;
    padding: clamp(36px, 6vh, 84px) clamp(28px, 7vw, 120px);
    color: #f6fbff;
    background: transparent;
    border: 0;
    overflow: hidden;
    pointer-events: none;
    will-change: opacity, transform;
  }

  .story-chapters > .cinematic-slide.is-active { pointer-events: auto; }

  .story-chapter,
  .cinematic-section { align-items: flex-start; justify-content: flex-end; }

  .cinematic-section {
    flex-direction: column;
    gap: clamp(18px, 3vh, 34px);
  }

  .cinematic-section .section-heading,
  .cinematic-section .about-grid,
  .cinematic-section .services-grid,
  .cinematic-section .process-grid,
  .cinematic-section .industry-cloud,
  .cinematic-section .proof-grid,
  .cinematic-section .testimonial-filters,
  .cinematic-section .testimonial-grid,
  .cinematic-section .contact-panel {
    width: min(100%, 680px);
    margin-inline-start: auto;
    margin-inline-end: 0;
  }

  [dir="ltr"] .cinematic-section .section-heading,
  [dir="ltr"] .cinematic-section .about-grid,
  [dir="ltr"] .cinematic-section .services-grid,
  [dir="ltr"] .cinematic-section .process-grid,
  [dir="ltr"] .cinematic-section .industry-cloud,
  [dir="ltr"] .cinematic-section .proof-grid,
  [dir="ltr"] .cinematic-section .testimonial-filters,
  [dir="ltr"] .cinematic-section .testimonial-grid,
  [dir="ltr"] .cinematic-section .contact-panel,
  [dir="ltr"] .story-copy {
    margin-inline-start: 0;
    margin-inline-end: auto;
  }

  .cinematic-section .section-heading { margin: 0; }

  .cinematic-section .section-heading h2,
  .story-copy h1,
  .story-copy h2 {
    max-width: 17ch;
    margin-block: 0 12px;
    color: #fff;
    font-size: clamp(32px, 3.4vw, 58px);
    line-height: 1.05;
    letter-spacing: 0;
    text-wrap: balance;
  }

  .cinematic-section p,
  .story-copy .lead { max-width: 54ch; color: rgba(240, 247, 253, 0.86); }

  .story-copy {
    width: min(100%, 600px);
    margin-inline-start: auto;
    margin-inline-end: 0;
  }

  .story-brand { color: #fff; font-size: clamp(30px, 3vw, 50px); }

  .cinematic-section .about-grid,
  .cinematic-section .services-grid,
  .cinematic-section .process-grid,
  .cinematic-section .proof-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-height: calc(var(--story-height) - 210px);
    overflow: auto;
    padding-inline-end: 6px;
    scrollbar-color: rgba(0, 203, 215, 0.7) transparent;
    scrollbar-width: thin;
  }

  .cinematic-section .about-story { display: none; }
  .cinematic-section .value-grid { display: contents; }

  .cinematic-section .service-card,
  .cinematic-section .value-card,
  .cinematic-section .process-card,
  .cinematic-section .proof-card,
  .cinematic-section .testimonial-card,
  .cinematic-section .contact-panel {
    background: rgba(4, 13, 22, 0.72);
    border-color: rgba(119, 219, 244, 0.25);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
  }

  .cinematic-section .service-card { grid-template-rows: 104px minmax(0, 1fr); min-height: 0; }
  .cinematic-section .service-art { height: 104px; }
  .cinematic-section .service-copy,
  .cinematic-section .value-card,
  .cinematic-section .process-card,
  .cinematic-section .proof-card { padding: 14px; }

  .cinematic-section .service-copy h3,
  .cinematic-section .value-card span,
  .cinematic-section .process-card h3,
  .cinematic-section .proof-card strong { color: #fff; }

  .cinematic-section .service-copy p,
  .cinematic-section .value-card p,
  .cinematic-section .process-card p,
  .cinematic-section .proof-card p {
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.55;
  }

  .cinematic-section .industry-cloud {
    max-height: min(46vh, 350px);
    overflow: auto;
    padding: 0 6px 6px;
  }

  .cinematic-section .industry-tag {
    background: rgba(5, 17, 29, 0.72);
    border-color: rgba(102, 218, 243, 0.3);
    color: #eaf7ff;
  }

  .cinematic-section .testimonial-filters {
    display: flex;
    flex-wrap: nowrap;
    max-width: min(100%, 680px);
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .cinematic-section .testimonial-grid {
    display: flex;
    gap: 12px;
    max-height: min(52vh, 480px);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: inline mandatory;
    padding-bottom: 6px;
  }

  .cinematic-section .testimonial-card {
    flex: 0 0 min(100%, 430px);
    min-height: 0;
    scroll-snap-align: start;
  }

  .cinematic-section .portrait { min-height: 120px; }
  .cinematic-section .testimonial-body { padding: 16px; }
  .cinematic-section .testimonial-text { font-size: 14px; line-height: 1.65; }

  .cinematic-section .contact-panel {
    margin-block: auto;
    padding: clamp(22px, 3vw, 42px);
  }

  .cinematic-section .contact-panel h2 { color: #fff; }
}

/* Mobile keeps the story readable without a pinned stage. */
@media (max-width: 759px), (prefers-reduced-motion: reduce) {
  .story-journey { height: auto !important; background: #06101a; }
  .story-stage { position: relative !important; top: auto !important; height: min(54svh, 440px) !important; min-height: 300px; margin: 0; }
  .story-chapters { position: relative !important; top: auto !important; height: auto !important; margin-top: 0 !important; }

  .story-chapters > .cinematic-slide {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    min-height: auto !important;
    padding: 42px 20px !important;
    color: var(--ink);
    background: var(--bg);
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    overflow: visible !important;
  }

  :root[data-theme="dark"] .story-chapters > .cinematic-slide { color: #eff8ff; background: #06101a; }

  .cinematic-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #storyCanvas { display: none !important; }
  .story-stage::after { background: linear-gradient(180deg, transparent 42%, rgba(3, 10, 17, 0.64)); }

  .story-copy,
  .cinematic-section .section-heading,
  .cinematic-section .about-grid,
  .cinematic-section .services-grid,
  .cinematic-section .process-grid,
  .cinematic-section .industry-cloud,
  .cinematic-section .proof-grid,
  .cinematic-section .testimonial-filters,
  .cinematic-section .testimonial-grid,
  .cinematic-section .contact-panel {
    width: min(100%, 680px);
    margin-inline: auto;
  }

  .cinematic-section .section-heading h2,
  .story-copy h1,
  .story-copy h2 { font-size: clamp(28px, 8vw, 42px); line-height: 1.14; }

  .cinematic-section .services-grid,
  .cinematic-section .process-grid,
  .cinematic-section .proof-grid,
  .cinematic-section .about-grid { grid-template-columns: 1fr; }
}

/* Testimonial rail: one complete story at a time, by button, drag, or swipe. */
.testimonial-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  direction: ltr;
}

.carousel-control {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(14, 31, 48, 0.1);
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.carousel-control:not(:disabled):hover { color: #fff; background: var(--blue); transform: translateY(-2px); }
.carousel-control:focus-visible { outline: 3px solid color-mix(in srgb, var(--cyan) 66%, transparent); outline-offset: 3px; }
.carousel-control:disabled { opacity: 0.38; cursor: not-allowed; }
.testimonial-counter { min-width: 64px; margin: 0; color: var(--muted); font-size: 13px; font-weight: 800; text-align: center; }

#testimonialGrid {
  display: flex;
  gap: 0;
  margin-top: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-y;
  cursor: grab;
}

#testimonialGrid::-webkit-scrollbar { display: none; }
#testimonialGrid.is-dragging { cursor: grabbing; user-select: none; scroll-snap-type: none; }
#testimonialGrid .testimonial-card {
  flex: 0 0 100%;
  min-width: 0;
  min-height: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

@media (min-width: 760px) {
  .cinematic-section .testimonial-carousel-controls,
  .cinematic-section #testimonialGrid {
    width: min(100%, 680px);
    margin-inline-start: auto;
    margin-inline-end: 0;
  }

  [dir="ltr"] .cinematic-section .testimonial-carousel-controls,
  [dir="ltr"] .cinematic-section #testimonialGrid {
    margin-inline-start: 0;
    margin-inline-end: auto;
  }

  .cinematic-section .testimonial-tools { width: min(100%, 680px); margin-inline-start: auto; margin-inline-end: 0; }
  [dir="ltr"] .cinematic-section .testimonial-tools { margin-inline-start: 0; margin-inline-end: auto; }
  .cinematic-section #testimonialGrid { height: min(54vh, 500px); max-height: none; padding: 0; }
  .cinematic-section #testimonialGrid .testimonial-card {
    display: grid;
    grid-template-columns: minmax(190px, 36%) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    height: 100%;
    background: rgba(4, 13, 22, 0.78);
  }
  .cinematic-section #testimonialGrid .portrait { min-height: 0; height: 100%; }
  .cinematic-section #testimonialGrid .testimonial-body { min-width: 0; overflow-y: auto; padding: clamp(18px, 2.4vw, 28px); }
}

@media (max-width: 759px) and (prefers-reduced-motion: no-preference) {
  .story-journey { --story-height: calc(100svh - var(--header-height)); }
  .story-stage { height: var(--story-height) !important; min-height: 0 !important; }
  .story-chapters { margin-top: calc(-1 * var(--story-height)) !important; }
  .story-chapters > .story-chapter:first-child {
    display: flex !important;
    align-items: flex-end;
    min-height: var(--story-height) !important;
    padding-block: clamp(28px, 7vh, 64px) !important;
    color: #fff !important;
    background: transparent !important;
  }
  .story-chapters > .story-chapter:first-child .story-copy { margin-block-end: 0; }
  .story-chapters > .story-chapter:first-child .lead { color: rgba(244, 249, 253, 0.9); }
  .story-chapters > .story-chapter:first-child .button.secondary { background: rgba(5, 15, 25, 0.62); border-color: rgba(255, 255, 255, 0.46); }
  #testimonialGrid { margin-inline: 0; }
  #testimonialGrid .testimonial-card { min-height: 0; }
  #testimonialGrid .portrait { min-height: clamp(180px, 52vw, 238px); }
  #testimonialGrid .testimonial-body { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  #testimonialGrid { scroll-behavior: auto; }
}

/* Theme-aware cinematic reading panels keep copy clear of the central character. */
:root {
  --stage-panel: rgba(244, 250, 255, 0.94);
  --stage-ink: #062843;
  --stage-muted: #315775;
  --stage-line: rgba(0, 102, 184, 0.18);
}

:root[data-theme="dark"] {
  --stage-panel: rgba(2, 9, 18, 0.94);
  --stage-ink: #f4fbff;
  --stage-muted: #bdd2e3;
  --stage-line: rgba(119, 219, 244, 0.22);
}

.site-header {
  min-height: 76px;
  background: rgba(244, 250, 255, 0.9);
  border-bottom-color: rgba(5, 74, 123, 0.16);
  box-shadow: 0 8px 26px rgba(10, 57, 92, 0.08);
}

:root[data-theme="dark"] .site-header {
  background: rgba(2, 10, 20, 0.92);
  border-bottom-color: rgba(116, 218, 246, 0.2);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.2);
}

.brand {
  padding: 5px 9px 5px 5px;
  color: #062843;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(1, 80, 137, 0.16);
  border-radius: 6px;
}

:root[data-theme="dark"] .brand {
  color: #fff;
  background: rgba(4, 25, 43, 0.84);
  border-color: rgba(117, 220, 248, 0.22);
}

.brand-logo {
  width: 42px;
  height: 38px;
  padding: 3px;
  background: #fff;
  border-radius: 4px;
  filter: drop-shadow(0 4px 9px rgba(0, 84, 137, 0.2));
}

.brand span { color: currentColor; font-size: 22px; }
:root[data-theme="dark"] .brand span { color: currentColor; }
.sound-toggle[aria-pressed="true"] { color: #fff; background: var(--blue); border-color: var(--blue); }

@media (prefers-reduced-motion: no-preference) {
  .story-journey {
    --story-height: max(620px, calc(100svh - var(--header-height)));
    height: calc(var(--slide-count) * var(--story-height)) !important;
    background: #07111d;
  }

  :root[data-theme="light"] .story-journey { background: #eaf5fc; }

  .story-stage {
    position: sticky !important;
    top: var(--header-height) !important;
    height: var(--story-height) !important;
    min-height: 0 !important;
    margin: 0 !important;
    background: #07111d;
  }

  :root[data-theme="light"] .story-stage { background: #eaf5fc; }
  .story-stage::after { background: linear-gradient(180deg, transparent 62%, rgba(2, 10, 18, 0.14)); }
  :root[data-theme="light"] .story-stage::after { background: linear-gradient(180deg, transparent 62%, rgba(216, 238, 252, 0.18)); }

  .story-chapters {
    position: sticky !important;
    top: var(--header-height) !important;
    z-index: 3;
    height: var(--story-height) !important;
    margin-top: calc(-1 * var(--story-height)) !important;
    pointer-events: none;
  }

  .story-chapters > .cinematic-slide {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    min-height: 0 !important;
    padding: clamp(34px, 6vh, 78px) clamp(28px, 7vw, 120px) !important;
    overflow: hidden !important;
    color: var(--stage-ink) !important;
    background: transparent !important;
    border: 0;
    pointer-events: none;
    will-change: opacity, transform;
  }

  .story-chapters > .cinematic-slide.is-active { pointer-events: auto; }

  .story-chapters > .cinematic-slide::before {
    position: absolute;
    z-index: 0;
    inset: 0 auto 0 0;
    width: min(47%, 720px);
    content: "";
    background: linear-gradient(90deg, var(--stage-panel) 0%, var(--stage-panel) 74%, color-mix(in srgb, var(--stage-panel) 54%, transparent) 88%, transparent 100%);
    pointer-events: none;
  }

  [dir="rtl"] .story-chapters > .cinematic-slide::before {
    right: 0;
    left: auto;
    background: linear-gradient(270deg, var(--stage-panel) 0%, var(--stage-panel) 74%, color-mix(in srgb, var(--stage-panel) 54%, transparent) 88%, transparent 100%);
  }

  .story-chapter,
  .cinematic-section {
    align-items: flex-start !important;
    justify-content: center !important;
    flex-direction: column;
    gap: clamp(14px, 2.5vh, 28px);
  }

  .story-chapter { justify-content: flex-end !important; }
  .story-copy,
  .cinematic-section .section-heading,
  .cinematic-section .about-grid,
  .cinematic-section .services-grid,
  .cinematic-section .process-grid,
  .cinematic-section .industry-cloud,
  .cinematic-section .proof-grid,
  .cinematic-section .testimonial-tools,
  .cinematic-section .testimonial-carousel-controls,
  .cinematic-section #testimonialGrid,
  .cinematic-section .contact-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 680px);
    margin-inline-start: 0;
    margin-inline-end: auto;
  }

  .story-copy { width: min(100%, 600px); }
  .story-copy h1,
  .story-copy h2,
  .cinematic-section .section-heading h2,
  .cinematic-section .contact-panel h2 { color: var(--stage-ink); }
  .story-copy .lead,
  .cinematic-section p { color: var(--stage-muted); }
  .story-brand { color: var(--stage-ink); }
  .story-copy .button.secondary { color: var(--stage-ink); background: color-mix(in srgb, var(--stage-panel) 84%, transparent); border-color: var(--stage-line); }

  .cinematic-section .service-card,
  .cinematic-section .value-card,
  .cinematic-section .process-card,
  .cinematic-section .proof-card,
  .cinematic-section .testimonial-card,
  .cinematic-section .contact-panel {
    background: color-mix(in srgb, var(--stage-panel) 84%, transparent);
    border-color: var(--stage-line);
    box-shadow: 0 18px 42px rgba(0, 28, 48, 0.14);
  }

  .cinematic-section .service-copy h3,
  .cinematic-section .value-card span,
  .cinematic-section .process-card h3,
  .cinematic-section .proof-card strong { color: var(--stage-ink); }

  .cinematic-section #testimonialGrid { height: min(63vh, 590px); max-height: none; padding: 0; }
  .cinematic-section #testimonialGrid .testimonial-card { height: 100%; }
  .cinematic-section #testimonialGrid .testimonial-body { padding: clamp(20px, 2.6vw, 30px); }
}

@media (max-width: 759px) and (prefers-reduced-motion: no-preference) {
  html { scroll-snap-type: y proximity; scroll-padding-top: var(--header-height); }
  .story-journey { --story-height: calc(100svh - var(--header-height)); }
  .story-images {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 100% !important;
  }

  .story-stage .cinematic-image {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .story-chapters > .cinematic-slide {
    min-height: var(--story-height) !important;
    padding: 22px 18px !important;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    /* Override the document-flow fallback above: inactive chapters cannot stack. */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translate3d(0, 0, 0) !important;
  }

  .story-chapters > .cinematic-slide.is-active {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .story-chapters > .cinematic-slide::before {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 58%;
    background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--stage-panel) 68%, transparent) 26%, var(--stage-panel) 62%);
  }

  [dir="rtl"] .story-chapters > .cinematic-slide::before { background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--stage-panel) 68%, transparent) 26%, var(--stage-panel) 62%); }
  .story-chapter { justify-content: flex-end !important; padding-bottom: 30px !important; }
  .cinematic-section { justify-content: flex-end !important; gap: 12px; }
  .story-copy,
  .cinematic-section .section-heading,
  .cinematic-section .about-grid,
  .cinematic-section .services-grid,
  .cinematic-section .process-grid,
  .cinematic-section .industry-cloud,
  .cinematic-section .proof-grid,
  .cinematic-section .testimonial-tools,
  .cinematic-section .testimonial-carousel-controls,
  .cinematic-section #testimonialGrid,
  .cinematic-section .contact-panel { width: 100%; margin-inline: 0; }

  .story-copy h1,
  .story-copy h2,
  .cinematic-section .section-heading h2 { font-size: clamp(26px, 7vw, 38px); }
  .story-copy .lead { font-size: 14px; line-height: 1.65; }
  .cinematic-section .section-heading p { display: none; }

  .cinematic-section .about-grid { display: block; max-height: min(44svh, 360px); overflow: hidden; }
  .cinematic-section .about-story { display: none; }
  .cinematic-section .value-grid,
  .cinematic-section .services-grid,
  .cinematic-section .process-grid,
  .cinematic-section .proof-grid {
    display: flex;
    grid-template-columns: none;
    gap: 10px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .cinematic-section .value-grid::-webkit-scrollbar,
  .cinematic-section .services-grid::-webkit-scrollbar,
  .cinematic-section .process-grid::-webkit-scrollbar,
  .cinematic-section .proof-grid::-webkit-scrollbar { display: none; }

  .cinematic-section .value-card,
  .cinematic-section .service-card,
  .cinematic-section .process-card,
  .cinematic-section .proof-card {
    flex: 0 0 100%;
    min-height: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .cinematic-section .service-card { grid-template-rows: 116px minmax(0, 1fr); }
  .cinematic-section .service-art { height: 116px; }
  .cinematic-section .industry-cloud { max-height: min(38svh, 300px); overflow-y: auto; }
  .cinematic-section .testimonial-tools { flex-wrap: nowrap; overflow-x: auto; }
  .cinematic-section #testimonialGrid { height: min(51svh, 430px); max-height: none; }
  .cinematic-section #testimonialGrid .testimonial-card { min-height: 0; height: 100%; }
  .cinematic-section #testimonialGrid .portrait { min-height: 138px; }
  .cinematic-section #testimonialGrid .testimonial-body { overflow-y: auto; padding: 16px; }
  .cinematic-section .contact-panel { margin: 0; padding: 22px; }
}

/* Beat mode: one comfortable content item per scroll stop. */
@media (prefers-reduced-motion: no-preference) {
  .cinematic-section .about-grid,
  .cinematic-section .value-grid,
  .cinematic-section .services-grid,
  .cinematic-section .process-grid,
  .cinematic-section .proof-grid,
  .cinematic-section .industry-cloud,
  .cinematic-section #testimonialGrid {
    display: block !important;
    width: min(100%, 640px);
    height: auto !important;
    max-height: none !important;
    margin-inline-start: 0;
    margin-inline-end: auto;
    overflow: visible !important;
  }

  [dir="rtl"] .cinematic-section .about-grid,
  [dir="rtl"] .cinematic-section .value-grid,
  [dir="rtl"] .cinematic-section .services-grid,
  [dir="rtl"] .cinematic-section .process-grid,
  [dir="rtl"] .cinematic-section .proof-grid,
  [dir="rtl"] .cinematic-section .industry-cloud,
  [dir="rtl"] .cinematic-section #testimonialGrid {
    margin-inline-start: auto;
    margin-inline-end: 0;
  }

  .cinematic-section .story-beat { display: none !important; }

  .cinematic-section .story-beat.is-beat-active {
    width: 100%;
    height: auto !important;
    max-width: 640px;
    max-height: min(54svh, 520px);
    margin: 0;
    overflow: auto;
  }

  .cinematic-section .about-story.story-beat.is-beat-active,
  .cinematic-section .value-card.story-beat.is-beat-active,
  .cinematic-section .process-card.story-beat.is-beat-active,
  .cinematic-section .proof-card.story-beat.is-beat-active {
    display: block !important;
  }

  .cinematic-section .service-card.story-beat.is-beat-active,
  .cinematic-section .testimonial-card.story-beat.is-beat-active,
  .cinematic-section .contact-panel.story-beat.is-beat-active {
    display: grid !important;
  }

  .cinematic-section .industry-cluster.story-beat.is-beat-active {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--stage-line);
    border-radius: var(--radius-card);
    background: color-mix(in srgb, var(--stage-panel) 84%, transparent);
  }

  .cinematic-section .service-card.story-beat.is-beat-active {
    grid-template-rows: minmax(116px, 30vh) auto;
    min-height: 0;
  }

  .cinematic-section #testimonialGrid .testimonial-card.story-beat.is-beat-active {
    grid-template-columns: minmax(170px, 31%) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    height: clamp(350px, 49svh, 500px) !important;
    max-height: min(58svh, 540px);
    overflow: hidden;
  }

  .cinematic-section #testimonialGrid .testimonial-card.story-beat.is-beat-active .portrait {
    min-height: 0;
    height: 100%;
  }

  .cinematic-section #testimonialGrid .testimonial-card.story-beat.is-beat-active .testimonial-body {
    min-width: 0;
    overflow-y: auto;
    padding: clamp(18px, 2.3vw, 26px);
  }
}

@media (max-width: 759px) and (prefers-reduced-motion: no-preference) {
  .cinematic-section .about-grid,
  .cinematic-section .value-grid,
  .cinematic-section .services-grid,
  .cinematic-section .process-grid,
  .cinematic-section .proof-grid,
  .cinematic-section .industry-cloud,
  .cinematic-section #testimonialGrid {
    width: 100%;
    margin-inline: 0;
  }

  .cinematic-section .story-beat.is-beat-active {
    max-height: min(56svh, 470px);
  }

  .cinematic-section .service-card.story-beat.is-beat-active {
    grid-template-rows: minmax(168px, 42%) minmax(0, 1fr);
  }

  .cinematic-section .service-card.story-beat.is-beat-active .service-art {
    height: 100%;
    min-height: 168px;
  }

  .cinematic-section #testimonialGrid .testimonial-card.story-beat.is-beat-active {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(126px, 34%) minmax(0, 1fr);
    height: min(48svh, 410px) !important;
    max-height: none;
  }

  .cinematic-section #testimonialGrid .testimonial-card.story-beat.is-beat-active .portrait {
    min-height: 126px;
  }

  .cinematic-section #testimonialGrid .testimonial-card.story-beat.is-beat-active .testimonial-body {
    padding: 15px;
  }
}


/* Booking, subscription, music, and portfolio controls. */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.service-packages {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.service-packages > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subscription-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.subscription-option {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--stage-ink, var(--ink));
  background: color-mix(in srgb, var(--stage-panel, var(--paper)) 82%, transparent);
  border: 1px solid var(--stage-line, var(--line));
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.subscription-option:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  transform: translateY(-2px);
}

.subscription-option:focus-visible,
.portfolio-dialog .icon-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cyan) 66%, transparent);
  outline-offset: 3px;
}

.music-toggle[aria-pressed="true"] {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.music-player-mount {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  inset: auto auto -2px -2px;
}

.portfolio-dialog {
  width: min(1120px, calc(100vw - 32px));
  height: min(88svh, 820px);
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.portfolio-dialog::backdrop { background: rgba(0, 8, 17, 0.74); }

.portfolio-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 12px 16px 12px 20px;
  border-bottom: 1px solid var(--line);
}

.portfolio-dialog__header h2 { margin: 0; font-size: clamp(18px, 2vw, 24px); }

.portfolio-viewer {
  display: block;
  width: 100%;
  height: calc(100% - 66px);
  overflow: auto;
  overscroll-behavior: contain;
  background: #dbe8f1;
}

.portfolio-pages {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-width: 100%;
  padding: 16px 14px 28px;
}

.portfolio-page {
  display: grid;
  justify-items: center;
  width: 100%;
  scroll-margin-top: 12px;
}

.portfolio-page canvas {
  display: block;
  max-width: 100%;
  height: auto !important;
  background: #fff;
  box-shadow: 0 10px 28px rgba(4, 25, 43, 0.22);
}

.portfolio-status {
  position: sticky;
  top: 0;
  z-index: 1;
  width: max-content;
  max-width: calc(100% - 28px);
  margin: 10px auto -2px;
  padding: 4px 10px;
  color: #103e5c;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(5, 74, 123, 0.18);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 759px) {
  :root { --header-height: 126px; }
  .site-header {
    width: 100%;
    max-width: 100vw;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    padding: 8px 10px;
  }
  .site-header .brand { min-width: 0; gap: 6px; padding: 4px 6px 4px 4px; }
  .site-header .brand-logo { width: 34px; height: 32px; }
  .site-header .brand span { min-width: 0; font-size: clamp(17px, 5vw, 21px); white-space: nowrap; }
  .site-header .header-controls { gap: 5px; }
  .site-header .header-controls .icon-button { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; }
  .site-header .lang-toggle { min-width: 38px; min-height: 34px; padding: 6px 7px; }
  .site-header nav { max-width: 100%; min-height: 34px; padding-bottom: 3px; }
  .site-header nav a { flex: 0 0 auto; padding: 6px 8px; font-size: 13px; }
  .contact-actions { width: 100%; }
  .contact-actions .button { flex: 1 1 180px; justify-content: center; }
  .service-packages { margin-top: 12px; }
  .subscription-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .subscription-option { min-height: 38px; padding: 6px 5px; font-size: 11px; line-height: 1.2; }
  .portfolio-dialog { width: calc(100vw - 20px); height: min(84svh, 760px); }
  .portfolio-dialog__header { min-height: 58px; padding: 9px 12px; }
  .portfolio-viewer { height: calc(100% - 58px); }
  .portfolio-pages { gap: 12px; padding: 12px 8px 22px; }
  .portfolio-status { margin-top: 7px; }
}


@media (max-width: 759px) {
  .cinematic-section .testimonial-filters {
    width: 100%;
    max-width: none;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
  }
  .cinematic-section .testimonial-filters .filter {
    flex: 0 0 auto;
    min-width: max-content;
    min-height: 42px;
    padding: 8px 12px;
    scroll-snap-align: start;
  }
}

:root[data-theme="light"] .cinematic-section #testimonialGrid .testimonial-card {
  color: #082b47;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(5, 74, 123, 0.22);
}

:root[data-theme="light"] .cinematic-section #testimonialGrid .testimonial-body,
:root[data-theme="light"] .cinematic-section #testimonialGrid .testimonial-text,
:root[data-theme="light"] .cinematic-section #testimonialGrid .identity h3,
:root[data-theme="light"] .cinematic-section #testimonialGrid .identity span,
:root[data-theme="light"] .cinematic-section #testimonialGrid .disclaimer {
  color: #123e5c;
}

:root[data-theme="light"] .cinematic-section .contact-panel p:not(.eyebrow) {
  color: #123e5c !important;
  font-weight: 700;
  opacity: 1;
}

/* Standalone packages and a shared text-safe composition for Arabic and English. */
.package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.package-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 300px;
  padding: clamp(20px, 2.4vw, 30px);
  color: var(--stage-ink, var(--ink));
  background: color-mix(in srgb, var(--stage-panel, var(--paper)) 88%, transparent);
  border: 1px solid var(--stage-line, var(--line));
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 28, 48, 0.14);
}

.package-kicker {
  margin: 0;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.package-card h3,
.package-card p { margin: 0; }
.package-card h3 { font-size: clamp(22px, 2.3vw, 30px); line-height: 1.2; }
.package-card > p:not(.package-kicker) { color: var(--stage-muted, var(--muted)); line-height: 1.65; }
.package-price { color: var(--blue); font-size: 17px; line-height: 1.35; }
.package-card .button { width: 100%; margin-top: auto; justify-content: center; }

@media (min-width: 760px) and (prefers-reduced-motion: no-preference) {
  /* Every supplied visual reserves the right side, so both locales use that clear panel. */
  [dir="ltr"] .story-copy,
  [dir="ltr"] .cinematic-section .section-heading,
  [dir="ltr"] .cinematic-section .about-grid,
  [dir="ltr"] .cinematic-section .services-grid,
  [dir="ltr"] .cinematic-section .package-grid,
  [dir="ltr"] .cinematic-section .process-grid,
  [dir="ltr"] .cinematic-section .industry-cloud,
  [dir="ltr"] .cinematic-section .proof-grid,
  [dir="ltr"] .cinematic-section .testimonial-tools,
  [dir="ltr"] .cinematic-section .testimonial-carousel-controls,
  [dir="ltr"] .cinematic-section #testimonialGrid,
  [dir="ltr"] .cinematic-section .contact-panel {
    margin-inline-start: auto;
    margin-inline-end: 0;
  }

  [dir="ltr"] .story-copy,
  [dir="ltr"] .cinematic-section .section-heading,
  [dir="ltr"] .cinematic-section .package-card { text-align: left; }

  .cinematic-section .package-grid {
    display: block !important;
    width: min(100%, 640px);
    margin-inline-start: auto;
    margin-inline-end: 0;
    overflow: visible !important;
  }

  .cinematic-section .package-card.story-beat.is-beat-active {
    display: grid !important;
    width: 100%;
    max-width: 640px;
    max-height: min(54svh, 520px);
    overflow: auto;
  }
}

@media (max-width: 759px) {
  .package-grid { grid-template-columns: 1fr; }
  .package-card { min-height: 0; padding: 20px; }
  .package-card h3 { font-size: 24px; }

  .cinematic-section .package-grid {
    display: block !important;
    width: 100%;
    margin-inline: 0;
    overflow: visible !important;
  }

  .cinematic-section .package-card.story-beat.is-beat-active {
    display: grid !important;
    width: 100%;
    max-height: min(56svh, 470px);
    overflow: auto;
  }
}


/* Responsive cinematic fit pass: active cards own their artwork and never create a second scroll surface. */
@media (prefers-reduced-motion: no-preference) {
  .cinematic-section#services .service-card.story-beat.is-beat-active {
    position: relative;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) !important;
    min-height: clamp(300px, 47svh, 500px);
    max-height: min(52svh, 540px);
    isolation: isolate;
    overflow: hidden;
    background: #061424;
  }

  .cinematic-section#services .service-card.story-beat.is-beat-active .service-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    min-height: 0;
    padding: 0;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.04) contrast(1.04);
    transform: none;
  }

  .cinematic-section#services .service-card.story-beat.is-beat-active::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    content: "";
    background: linear-gradient(180deg, rgba(2, 10, 18, 0.04) 18%, rgba(2, 10, 18, 0.34) 48%, rgba(2, 10, 18, 0.94) 100%);
    pointer-events: none;
  }

  .cinematic-section#services .service-card.story-beat.is-beat-active .service-copy {
    position: relative;
    z-index: 1;
    align-self: end;
    width: min(100%, 620px);
    padding: clamp(18px, 3vw, 32px);
    color: #f5fbff;
    background: linear-gradient(90deg, rgba(2, 10, 18, 0.9), rgba(2, 10, 18, 0.56));
    border-top: 1px solid rgba(140, 225, 249, 0.22);
  }

  .cinematic-section#services .service-card.story-beat.is-beat-active .service-copy h3,
  .cinematic-section#services .service-card.story-beat.is-beat-active .service-copy p { margin: 0; color: inherit; }
  .cinematic-section#services .service-card.story-beat.is-beat-active .service-copy h3 { font-size: clamp(22px, 2.5vw, 34px); line-height: 1.12; }
  .cinematic-section#services .service-card.story-beat.is-beat-active .service-copy p { margin-top: 8px; font-size: clamp(13px, 1.2vw, 16px); line-height: 1.55; }

  .cinematic-section#testimonials { gap: clamp(8px, 1.6vh, 16px); }
  .cinematic-section#testimonials .section-heading h2 { margin-bottom: 4px; font-size: clamp(28px, 3vw, 44px); }
  .cinematic-section#testimonials .section-heading p { margin: 0; font-size: clamp(12px, 1.1vw, 15px); line-height: 1.45; }
  .cinematic-section#testimonials .testimonial-filters {
    box-sizing: border-box;
    min-height: 50px;
    margin: 0;
    padding: 3px 0 7px;
    align-items: center;
    gap: 8px;
  }
  .cinematic-section#testimonials .testimonial-filters .filter {
    flex: 0 0 auto;
    min-height: 40px;
    margin: 0;
    padding: 7px 12px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .cinematic-section#testimonials .testimonial-carousel-controls { margin-top: 0; }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active {
    height: clamp(310px, 42svh, 460px) !important;
    max-height: min(48svh, 500px);
  }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .testimonial-body {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: clamp(6px, 1.2vh, 12px);
    overflow: hidden;
    padding: clamp(14px, 2vw, 24px);
  }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .identity { gap: 8px; }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .identity h3 { margin: 0; font-size: clamp(18px, 1.8vw, 26px); line-height: 1.15; }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .identity span,
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .card-tags,
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .disclaimer { font-size: clamp(11px, 0.92vw, 13px); line-height: 1.35; }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .testimonial-text { margin: 0; font-size: clamp(12px, 1.02vw, 15px); line-height: 1.52; overflow: hidden; }
}

@media (max-width: 759px) and (prefers-reduced-motion: no-preference) {
  .cinematic-section#services .service-card.story-beat.is-beat-active { min-height: clamp(300px, 48svh, 430px); max-height: min(52svh, 460px); }
  .cinematic-section#services .service-card.story-beat.is-beat-active .service-copy { width: 100%; padding: 16px; background: linear-gradient(180deg, rgba(2, 10, 18, 0.18), rgba(2, 10, 18, 0.92)); }
  .cinematic-section#services .service-card.story-beat.is-beat-active .service-copy h3 { font-size: clamp(20px, 6vw, 28px); }
  .cinematic-section#services .service-card.story-beat.is-beat-active .service-copy p { font-size: 13px; line-height: 1.45; }

  .cinematic-section#testimonials .section-heading { margin-top: 0; }
  .cinematic-section#testimonials .section-heading h2 { font-size: clamp(25px, 7vw, 34px); }
  .cinematic-section#testimonials .section-heading p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .cinematic-section#testimonials .testimonial-filters { min-height: 48px; padding: 2px 0 6px !important; scrollbar-width: none; }
  .cinematic-section#testimonials .testimonial-filters::-webkit-scrollbar { display: none; }
  .cinematic-section#testimonials .testimonial-filters .filter { min-height: 38px; padding: 7px 10px; font-size: 12px; }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active {
    grid-template-rows: minmax(114px, 31%) minmax(0, 1fr);
    height: min(46svh, 390px) !important;
    max-height: none;
  }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .portrait { min-height: 114px; }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .testimonial-body { padding: 12px; gap: 6px; }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .identity h3 { font-size: clamp(17px, 5vw, 22px); }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .identity span,
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .card-tags,
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .disclaimer { font-size: 10px; }
  .cinematic-section#testimonials #testimonialGrid .testimonial-card.story-beat.is-beat-active .testimonial-text { font-size: clamp(11px, 3.2vw, 13px); line-height: 1.42; }
}
