/* ==========================================================================
   Quantibrain — static site
   Light canvas with strong section rhythm: white → gray band → dark band.
   Per-service identity accents (purple / yellow / cyan / green).
   ========================================================================== */

/* ---- Fonts (self-hosted Inter) ---------------------------------------- */

/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Tokens ---------------------------------------------------------- */

:root {
  /* Surfaces */
  --canvas: #ffffff;
  --surface-1: #f2f3f5;
  --surface-2: #e8eaee;
  --surface-3: #dcdfe4;
  --hairline: rgba(12, 14, 20, 0.12);
  --hairline-soft: rgba(12, 14, 20, 0.06);

  /* Dark band (statements, footer) */
  --dark: #0c0e14;
  --dark-2: #171a21;
  --dark-ink-muted: #b2b6bd;
  --dark-ink-subtle: #7b818c;
  --dark-hairline: rgba(178, 182, 189, 0.18);

  /* Text */
  --ink: #0c0e14;
  --ink-muted: #51565f;
  --ink-subtle: #878d98;
  --accent-blue: #2563eb;

  /* Per-service identity accents, matching the marble textures:
     violet / coral / cobalt blue / green */
  --accent-ai: #6f5bd0;
  --accent-automation: #e8764a;
  --accent-integrations: #2d5bd0;
  --accent-web: #1db489;
  /* darkened variants for small text on white */
  --accent-ai-deep: #5d49c0;
  --accent-automation-deep: #c85a2e;
  --accent-integrations-deep: #23479f;
  --accent-web-deep: #0e8a68;

  /* Shape */
  --rounded-xs: 4px;
  --rounded-sm: 6px;
  --rounded-md: 8px;
  --rounded-lg: 12px;
  --rounded-xl: 16px;
  --rounded-xxl: 24px;
  --rounded-pill: 9999px;

  /* Layout */
  --container: 1280px;
  --gutter: 48px;
  --section: 88px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", helvetica, arial, sans-serif;

  --header-bg: rgba(255, 255, 255, 0.88);
}

/* ---- Dark mode --------------------------------------------------------- */

/* Neutral grays on purpose — Miguel dislikes blue-tinted darks against black */
:root[data-theme="dark"] {
  --canvas: #151515;
  --surface-1: #202022;
  --surface-2: #2c2c2f;
  --surface-3: #37373a;
  --hairline: rgba(205, 205, 210, 0.16);
  --hairline-soft: rgba(205, 205, 210, 0.08);
  --dark: #080808;
  --dark-2: #19191b;
  --ink: #ffffff;
  --ink-muted: #b5b5b9;
  --ink-subtle: #8b8b90;
  --accent-blue: #6ea8ff;
  --header-bg: rgba(21, 21, 21, 0.88);
}

/* ---- Reset / base ----------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px; /* clears the sticky header on anchor jumps */
}

/* Page transitions: content rises on load; on exit a dark sheet with
   rounded shoulders sweeps up over the page before navigating */
main {
  animation: page-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.page-veil {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  border-radius: 28px 28px 0 0;
  transform: translateY(102%);
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1), border-radius 0.45s ease;
  pointer-events: none;
}

.page-veil img {
  height: 34px;
  width: auto;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: opacity 0.3s ease 0.22s, transform 0.3s ease 0.22s;
}

body.page-exit .page-veil {
  transform: translateY(0);
  border-radius: 0;
}

body.page-exit .page-veil img {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  main {
    animation: none;
  }

  .page-veil {
    display: none;
  }
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

:root[data-theme="dark"] ::selection {
  background: #ffffff;
  color: #0c0e14;
}

:root[data-theme="dark"] .btn-primary {
  background: #ffffff;
  color: #0c0e14;
}

:root[data-theme="dark"] .btn-primary:hover {
  background: #d9dce1;
}

:root[data-theme="dark"] .blob {
  opacity: 0.3;
}

:root[data-theme="dark"] .service-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

img {
  max-width: 100%;
  display: block;
}

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

p a,
.prose a {
  color: var(--accent-blue);
}

p a:hover,
.prose a:hover {
  text-decoration: underline;
}

::selection {
  background: var(--dark);
  color: #fff;
}

/* On dark or textured surfaces the default selection disappears — invert it */
.statement ::selection,
.cta-banner ::selection,
.site-footer ::selection,
.form-panel ::selection,
.card-accent ::selection,
.pager-link ::selection,
.accent-ai .page-hero ::selection,
.accent-automation .page-hero ::selection,
.accent-integrations .page-hero ::selection,
.accent-web .page-hero ::selection {
  background: #ffffff;
  color: #0c0e14;
}

/* ---- Typography ------------------------------------------------------- */

.display-xl {
  font-size: clamp(2.5rem, 6.5vw, 5rem); /* 40 → 80px */
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: -0.031em;
}

.display-lg {
  font-size: clamp(2.125rem, 4.4vw, 3.5rem); /* 34 → 56px */
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.029em;
}

.display-md {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem); /* 28 → 40px */
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: -0.025em;
}

.headline {
  font-size: 1.75rem; /* 28px */
  font-weight: 600;
  line-height: 1.21;
  letter-spacing: -0.021em;
}

.card-title {
  font-size: 1.375rem; /* 22px */
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.018em;
}

.subhead {
  font-size: 1.25rem; /* 20px */
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.body-lg {
  font-size: 1.125rem; /* 18px */
  font-weight: 500;
  line-height: 1.69;
}

.body-sm {
  font-size: 0.875rem; /* 14px */
  line-height: 1.71;
}

.caption {
  font-size: 0.8125rem; /* 13px */
  line-height: 1.38;
  letter-spacing: 0.2px;
}

.eyebrow {
  display: block;
  font-size: 0.75rem; /* 12px */
  font-weight: 600;
  line-height: 1.23;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 16px;
}

.muted {
  color: var(--ink-muted);
}

.subtle {
  color: var(--ink-subtle);
}

/* ---- Layout ----------------------------------------------------------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--section);
  padding-bottom: var(--section);
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-head .display-lg + p,
.section-head .display-md + p {
  margin-top: 16px;
  color: var(--ink-muted);
}

/* Right-aligned editorial section (About story) */
.section-right {
  text-align: right;
}

.section-right .section-head,
.section-right .prose {
  margin-left: auto;
}

/* Gray band — visible section separation on the light canvas */
.band {
  background: var(--surface-1);
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
}

/* Cards sit on white wherever they are; on gray bands the border does the lift */
.band .card,
.band .value-card,
.band .capabilities li,
.band .contact-card,
.band .cta-banner {
  background: var(--canvas);
}

.band .chip {
  background-color: var(--canvas);
}

/* ---- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.29;
  padding: 10px 18px;
  min-height: 40px;
  border-radius: var(--rounded-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--dark);
  color: #fff;
}

.btn-primary:hover {
  background: #2a2f3a;
}

.btn-secondary {
  background: var(--canvas);
  color: var(--ink);
  border-color: var(--hairline);
}

.btn-secondary:hover {
  background: var(--surface-1);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--surface-1);
}

/* ---- Pills / chips ---------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-1);
  border: 1px solid var(--hairline-soft);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.2px;
  padding: 4px 12px;
  border-radius: var(--rounded-pill);
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-subtle);
  flex: none;
}

.dot-ai { background: var(--accent-ai); }
.dot-automation { background: var(--accent-automation); }
.dot-integrations { background: var(--accent-integrations); }
.dot-web { background: var(--accent-web); }

/* On colored grounds, the pill inverts */
.card-accent .pill {
  background: rgba(0, 0, 0, 0.16);
  border-color: transparent;
}

/* ---- Header ----------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline-soft);
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(12, 14, 20, 0.08);
}

:root[data-theme="dark"] .site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Logo swaps with the theme */
.brand .logo-dark { display: none; }
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.brand img {
  height: 32px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 8px 14px;
  transition: color 0.15s ease;
}

/* Underline indicator — grows on hover, pinned on the current page.
   Keeps solid black reserved for the header's one primary action. */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-md);
  color: var(--ink);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* Theme toggle — moon in light mode, sun in dark mode */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-pill);
  background: none;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  transition: background-color 0.15s ease, transform 0.3s ease;
}

.theme-toggle:hover {
  background: var(--surface-1);
  transform: rotate(20deg);
}

.theme-toggle .tt-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .tt-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .tt-moon { display: none; }

/* Language switcher — pill that unfolds a small menu */
.lang-switcher {
  position: relative;
}

.lang-switcher summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--ink-muted);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-pill);
  padding: 9px 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-switcher summary::-webkit-details-marker {
  display: none;
}

.lang-switcher summary:hover,
.lang-switcher[open] summary {
  background: var(--surface-1);
  color: var(--ink);
}

.lang-switcher .lang-code {
  letter-spacing: 0.6px;
}

.lang-switcher .lang-caret {
  transition: transform 0.2s ease;
}

.lang-switcher[open] .lang-caret {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 6px;
  box-shadow: 0 14px 36px rgba(12, 14, 20, 0.16);
  animation: menu-in 0.18s ease;
  z-index: 60;
}

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--rounded-md);
  font-size: 0.875rem;
  color: var(--ink-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-menu a:hover {
  background: var(--surface-1);
  color: var(--ink);
}

.lang-menu a[aria-current="true"] {
  background: var(--surface-1);
  color: var(--ink);
  font-weight: 600;
}

.lang-menu .lang-tag {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--ink-subtle);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ---- Service switcher --------------------------------------------------- */

.service-switcher {
  position: relative;
  border-bottom: 1px solid var(--hairline-soft);
  background: var(--surface-1);
}

/* When the pill bar overflows, a fade plus chevron on the right edge says
   "there is more, scroll" — JS drops it once the end is reached */
.service-switcher::after {
  content: "\203A";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--ink-subtle);
  background: linear-gradient(90deg, transparent, var(--surface-1) 65%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.service-switcher.has-more::after {
  opacity: 1;
}

.service-switcher .container {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.service-switcher .sw-label {
  align-self: center;
  flex: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-right: 8px;
}

.service-switcher a {
  flex: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--canvas);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--rounded-pill);
  padding: 8px 16px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

/* Hovering an unselected service previews its texture */
.service-switcher a:hover {
  color: #fff;
  border-color: transparent;
  background-size: cover;
  background-position: center;
}

.service-switcher a.sw-ai:hover {
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url("../images/background/texture-purple.jpg");
}

.service-switcher a.sw-automation:hover {
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url("../images/background/texture-orange.jpg");
}

.service-switcher a.sw-integrations:hover {
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url("../images/background/texture-blue.jpg");
}

.service-switcher a.sw-web:hover {
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url("../images/background/texture-green.jpg");
}

.service-switcher a[aria-current="page"] {
  border-color: transparent;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.service-switcher a[aria-current="page"]:hover {
  color: #fff;
}

.service-switcher a.sw-ai[aria-current="page"] {
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url("../images/background/texture-purple.jpg");
}

.service-switcher a.sw-automation[aria-current="page"] {
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url("../images/background/texture-orange.jpg");
}

.service-switcher a.sw-integrations[aria-current="page"] {
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url("../images/background/texture-blue.jpg");
}

.service-switcher a.sw-web[aria-current="page"] {
  background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url("../images/background/texture-green.jpg");
}

/* ---- Hero ------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(72px, 10vw, 128px);
  padding-bottom: clamp(80px, 10vw, 128px);
  text-align: center;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 auto;
  max-width: 1000px;
}

/* Staggered line reveal on load */
.hero h1 .line {
  display: block;
  overflow: hidden;
}

.hero h1 .line > span {
  display: block;
  transform: translateY(110%);
  animation: rise-in 0.9s cubic-bezier(0.2, 0.65, 0.2, 1) forwards;
}

.hero h1 .line:nth-child(2) > span {
  animation-delay: 0.14s;
}

@keyframes rise-in {
  to { transform: translateY(0); }
}

/* Elements that fade up after the headline */
.hero-el {
  opacity: 0;
  animation: fade-up 0.7s ease forwards;
}

.hero-el.d1 { animation-delay: 0.45s; }
.hero-el.d2 { animation-delay: 0.6s; }
.hero-el.d3 { animation-delay: 0.75s; }

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Rotating word — its letters are filled with the matching service texture */
.hero-rotator {
  margin-top: 32px;
}

.rotator-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 6px;
}

.rotate-word {
  display: block;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
  background-image: url("../images/background/texture-purple.jpg");
  background-size: cover;
  background-position: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .rotate-word {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.rotate-word.is-out {
  opacity: 0;
  transform: translateY(10px);
}

.hero .lead {
  max-width: 560px;
  margin: 28px auto 0;
  color: var(--ink-muted);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.hero .btn {
  padding: 12px 22px;
  min-height: 44px;
  font-size: 0.9375rem;
}

.hero .hero-ctas {
  justify-content: center;
}

/* Scroll cue — replaces the hero buttons */
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 56px;
  color: var(--ink-subtle);
  transition: color 0.15s ease;
}

.scroll-cue:hover {
  color: var(--ink);
}

.scroll-cue .cue-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.scroll-cue .cue-line {
  position: relative;
  width: 1px;
  height: 48px;
  overflow: hidden;
  background: var(--hairline);
}

/* A short bright segment falls down the line, over and over */
.scroll-cue .cue-line::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 16px;
  background: currentColor;
  animation: cue-fall 1.9s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes cue-fall {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(300%); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue .cue-line::after {
    animation: none;
  }
}

/* Floating color blobs — the artwork palette, blurred and drifting */
.hero-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.35;
  animation: blob-float 16s ease-in-out infinite alternate;
}

.blob-1 {
  width: 440px;
  height: 440px;
  background: var(--accent-ai);
  top: -10%;
  left: -6%;
}

.blob-2 {
  width: 380px;
  height: 380px;
  background: var(--accent-automation);
  top: -14%;
  right: -4%;
  animation-delay: -5s;
}

.blob-3 {
  width: 340px;
  height: 340px;
  background: var(--accent-integrations);
  bottom: -22%;
  left: 18%;
  animation-delay: -9s;
}

.blob-4 {
  width: 300px;
  height: 300px;
  background: var(--accent-web);
  bottom: -18%;
  right: 14%;
  animation-delay: -12s;
}

@keyframes blob-float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(48px, -36px) scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 .line > span {
    transform: none;
    animation: none;
  }

  .hero-el {
    opacity: 1;
    animation: none;
  }

  .blob {
    animation: none;
  }
}

/* Sub-page hero (service pages, about, contact…) */
.page-hero {
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--hairline-soft);
}

.page-hero h1 {
  margin: 20px 0 20px;
  max-width: 900px;
}

.page-hero .lead {
  max-width: 640px;
  color: var(--ink-muted);
}

/* Service pages carry their theme texture on the title */
.accent-ai .page-hero,
.accent-automation .page-hero,
.accent-integrations .page-hero,
.accent-web .page-hero {
  color: #fff;
  border-bottom: none;
  background-size: cover;
  background-position: center;
}

.accent-ai .page-hero {
  background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)), url("../images/background/texture-purple.jpg");
}

.accent-automation .page-hero {
  background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)), url("../images/background/texture-orange.jpg");
}

.accent-integrations .page-hero {
  background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)), url("../images/background/texture-blue.jpg");
}

.accent-web .page-hero {
  background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)), url("../images/background/texture-green.jpg");
}

.accent-ai .page-hero .lead,
.accent-automation .page-hero .lead,
.accent-integrations .page-hero .lead,
.accent-web .page-hero .lead {
  color: rgba(255, 255, 255, 0.88);
}

.accent-ai .page-hero .pill,
.accent-automation .page-hero .pill,
.accent-integrations .page-hero .pill,
.accent-web .page-hero .pill {
  background: rgba(0, 0, 0, 0.28);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.92);
}

.accent-ai .page-hero .pill .dot,
.accent-automation .page-hero .pill .dot,
.accent-integrations .page-hero .pill .dot,
.accent-web .page-hero .pill .dot {
  background: #fff;
}

/* ---- Marquee (tech strip) --------------------------------------------- */

.marquee {
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  background: var(--surface-1);
  overflow: hidden;
  padding: 20px 0;
}

.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: var(--canvas);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--rounded-sm);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 8px 16px;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.2s ease;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--hairline);
  transform: translateY(-2px);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }
}

/* ---- Cards ------------------------------------------------------------ */

.card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
}

/* Cards lift gently on hover */
.card,
.value-card,
.capabilities li,
.contact-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
.value-card:hover,
.capabilities li:hover,
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(12, 14, 20, 0.08);
}

:root[data-theme="dark"] .card:hover,
:root[data-theme="dark"] .value-card:hover,
:root[data-theme="dark"] .capabilities li:hover,
:root[data-theme="dark"] .contact-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.card h3 {
  margin: 16px 0 8px;
}

.card p {
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.71;
}

/* Identity surfaces — themed texture grounds, meaning not depth */
.card-accent {
  border: none;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.card-accent p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.88);
}

.card-accent .pill {
  color: rgba(255, 255, 255, 0.92);
}

.card-ai {
  background-image: linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)), url("../images/background/texture-purple.jpg");
}

.card-automation {
  background-image: linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)), url("../images/background/texture-orange.jpg");
}

.card-integrations {
  background-image: linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)), url("../images/background/texture-blue.jpg");
}

.card-web {
  background-image: linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)), url("../images/background/texture-green.jpg");
}

/* Service cards (home + services pages) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 300px;
  padding: 32px;
  border-radius: var(--rounded-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(12, 14, 20, 0.14);
}

.service-card h3 {
  margin: 24px 0 10px;
}

/* "Explore" link: hovering anywhere on the card draws the outline
   and nudges the text right */
.service-card .card-cta {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 14px;
  margin-left: -14px;
  margin-bottom: -9px;
  border: 1px solid transparent;
  border-radius: var(--rounded-md);
  text-indent: 0;
  transition: text-indent 0.25s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.service-card:hover .card-cta {
  text-indent: 6px;
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.1);
}

/* Feature cards (3-up) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.feature-card .stat {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---- Hairline rows (expertise / capability lists) ---------------------- */

.rows {
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.rows li {
  display: grid;
  grid-template-columns: 64px minmax(0, 3.5fr) minmax(0, 6.75fr) minmax(0, 2.75fr);
  gap: 24px;
  align-items: baseline;
  padding: 22px 12px;
  border-bottom: 1px solid var(--hairline-soft);
  transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.rows li:hover {
  background: var(--surface-1);
  padding-left: 24px;
}

.rows .row-index {
  font-size: 0.8125rem;
  color: var(--ink-subtle);
  letter-spacing: 0.2px;
}

.rows .row-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.rows .row-desc {
  color: var(--ink-muted);
  font-size: 0.8125rem; /* small enough that the PT copy stays on one line */
  line-height: 1.71;
}

.rows .row-note {
  color: var(--ink-subtle);
  font-size: 0.8125rem;
  letter-spacing: 0.2px;
  text-align: right;
}

/* Two-column capability list on service pages */
.capabilities {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}

.capabilities li {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
}

.capabilities .cap-index {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  display: block;
  margin-bottom: 12px;
}

.capabilities h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.capabilities p {
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.71;
}

/* Per-page accent for capability indices */
.accent-ai .cap-index { color: var(--accent-ai); }
.accent-automation .cap-index { color: var(--accent-automation-deep); }
.accent-integrations .cap-index { color: var(--accent-integrations); }
.accent-web .cap-index { color: var(--accent-web-deep); }

/* ---- Values (about) ---------------------------------------------------- */

.values-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

.value-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
}

.value-card .value-index {
  font-size: 0.8125rem;
  color: var(--ink-subtle);
  display: block;
  margin-bottom: 24px;
}

.value-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.value-card p {
  color: var(--ink-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* ---- Statement band (dark) ---------------------------------------------- */

.statement {
  background: var(--dark);
  color: #fff;
}

.statement .eyebrow {
  color: var(--dark-ink-subtle);
}

.statement blockquote {
  max-width: 880px;
}

.statement blockquote p {
  font-size: clamp(1.375rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.statement footer {
  margin-top: 24px;
  color: var(--dark-ink-subtle);
  font-size: 0.8125rem;
  letter-spacing: 0.2px;
}

/* Color-splash statements (home / about) */
.statement--terracotta,
.statement--teal {
  background-size: cover;
  background-position: center;
}

.statement--terracotta {
  background-image: linear-gradient(rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.32)), url("../images/background/texture-terracotta.jpg");
}

.statement--teal {
  background-image: linear-gradient(rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.32)), url("../images/background/texture-teal.jpg");
}

.statement--terracotta .eyebrow,
.statement--terracotta footer,
.statement--teal .eyebrow,
.statement--teal footer {
  color: rgba(255, 255, 255, 0.78);
}

@media (min-width: 1025px) {
  .statement--terracotta,
  .statement--teal {
    background-attachment: fixed;
  }
}

/* On service pages the statement carries the theme texture */
.accent-ai .statement,
.accent-automation .statement,
.accent-integrations .statement,
.accent-web .statement {
  background-size: cover;
  background-position: center;
}

.accent-ai .statement {
  background-image: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.38)), url("../images/background/texture-purple.jpg");
}

.accent-automation .statement {
  background-image: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.38)), url("../images/background/texture-orange.jpg");
}

.accent-integrations .statement {
  background-image: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.38)), url("../images/background/texture-blue.jpg");
}

.accent-web .statement {
  background-image: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.38)), url("../images/background/texture-green.jpg");
}

@media (min-width: 1025px) {
  .accent-ai .statement,
  .accent-automation .statement,
  .accent-integrations .statement,
  .accent-web .statement {
    background-attachment: fixed;
  }
}

/* ---- Steps (how we work) ----------------------------------------------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.step {
  border-top: 2px solid var(--ink);
  padding-top: 24px;
}

.step .step-index {
  font-size: 0.8125rem;
  color: var(--ink-subtle);
  letter-spacing: 0.2px;
  display: block;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.71;
}

/* ---- CTA banner --------------------------------------------------------- */

.cta-banner {
  background: var(--dark);
  color: #fff;
  border-radius: var(--rounded-xxl);
  padding: clamp(32px, 5vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.band .cta-banner {
  background: var(--dark);
}

.cta-banner .cta-copy {
  max-width: 560px;
}

.cta-banner h2 {
  margin-bottom: 8px;
}

.cta-banner p {
  color: var(--dark-ink-muted);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* On the dark banner, both buttons are ghosts with a prominent white
   outline; hovering fills them white */
.cta-banner .btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.cta-banner .btn:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #0c0e14;
}

.copy-email {
  font-family: inherit;
}


/* ---- Next-page nav (service pages) -------------------------------------- */

.next-page {
  display: block;
  border-top: 1px solid var(--hairline-soft);
  background: var(--surface-1);
}

.next-page .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.next-page .eyebrow {
  margin-bottom: 8px;
}

/* On hover a circle draws itself around the arrow */
.next-page .arrow,
.pager-link .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  flex: none;
  font-size: 2rem;
  color: var(--ink-subtle);
  border: 1px solid transparent;
  border-radius: 50%;
  transition: transform 0.2s ease, color 0.15s ease, border-color 0.2s ease;
}

.next-page:hover .arrow {
  transform: translateX(8px);
  color: var(--ink);
  border-color: currentColor;
}

/* Split pager at the bottom of service pages: previous | next */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pager-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px clamp(24px, 4vw, 56px);
}

/* More compact than the single next-page band */
.pager-link .next-title {
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.pager-link .eyebrow {
  margin-bottom: 4px;
}

.pager-link .arrow {
  width: 46px;
  height: 46px;
  font-size: 1.375rem;
}

.pager-prev {
  justify-content: flex-start;
}

.pager-next {
  justify-content: flex-end;
  text-align: right;
}

.pager-prev:hover .arrow {
  transform: translateX(-8px);
  border-color: currentColor;
}

.pager-next:hover .arrow {
  transform: translateX(8px);
  border-color: currentColor;
}

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

  .pager-next {
    justify-content: space-between;
  }

  .pager-prev {
    justify-content: space-between;
  }
}

/* Next-service link previews the NEXT service's texture */
.next-page--ai,
.next-page--automation,
.next-page--integrations,
.next-page--web {
  border-top: none;
  background-size: cover;
  background-position: center;
}

.next-page--ai {
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("../images/background/texture-purple.jpg");
}

.next-page--automation {
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("../images/background/texture-orange.jpg");
}

.next-page--integrations {
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("../images/background/texture-blue.jpg");
}

.next-page--web {
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("../images/background/texture-green.jpg");
}

.next-page--ai .eyebrow,
.next-page--automation .eyebrow,
.next-page--integrations .eyebrow,
.next-page--web .eyebrow {
  color: rgba(255, 255, 255, 0.8);
}

.next-page--ai .next-title,
.next-page--automation .next-title,
.next-page--integrations .next-title,
.next-page--web .next-title,
.next-page--ai .arrow,
.next-page--automation .arrow,
.next-page--integrations .arrow,
.next-page--web .arrow {
  color: #fff;
}

.next-page--ai:hover .arrow,
.next-page--automation:hover .arrow,
.next-page--integrations:hover .arrow,
.next-page--web:hover .arrow {
  color: #fff;
  border-color: #fff;
}

/* ---- Client logo marquee ------------------------------------------------------ */
/* Full-color logos drifting in an edge-faded band; odd/even logos sit on
   slightly different baselines for an organic rhythm. Pauses on hover. */

.logo-marquee {
  border: none;
  background: transparent;
  padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.logo-marquee .marquee-track {
  align-items: center;
  gap: 72px;
  animation-duration: 28s;
}

.logo-marquee img {
  height: 38px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.logo-marquee img:hover {
  opacity: 1;
}

/* Dark-navy logos vanish on the dark canvas, so each logo sits on a
   small light chip in dark mode */
:root[data-theme="dark"] .logo-marquee img {
  background: #eef0f3;
  height: 58px;
  padding: 11px 16px;
  border-radius: var(--rounded-md);
}

@media (max-width: 640px) {
  .logo-wall {
    gap: 20px 36px;
  }

  .logo-wall img {
    height: 26px;
  }
}

/* ---- Case study ----------------------------------------------------------- */

.case-what {
  max-width: 720px;
  color: var(--ink-muted);
}

.case-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.case-stat {
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}

.case-stat .stat-value {
  display: block;
  font-size: clamp(1.625rem, 2.8vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.case-stat .stat-label {
  display: block;
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.accent-ai .case-stat .stat-value { color: var(--accent-ai); }
.accent-automation .case-stat .stat-value { color: var(--accent-automation-deep); }
.accent-integrations .case-stat .stat-value { color: var(--accent-integrations); }
.accent-web .case-stat .stat-value { color: var(--accent-web-deep); }

@media (max-width: 768px) {
  .case-stats {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ---- FAQ -------------------------------------------------------------------- */

.faq {
  display: grid;
  gap: 16px;
}

/* On desktop the FAQ splits: title and contact pointer on the left,
   the questions filling the right side */
@media (min-width: 1025px) {
  .faq-split {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 24px 72px;
    align-items: start;
  }

  .faq-split .section-head {
    margin-bottom: 0;
    position: sticky;
    top: 104px;
  }
}

.faq-split .section-head a {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--ink-subtle);
  transition: border-color 0.15s ease;
}

.faq-split .section-head a:hover {
  border-color: var(--ink);
}

.faq-item {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
}

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink-subtle);
  transition: transform 0.2s ease;
  flex: none;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 28px 24px;
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 760px;
}

/* ---- Contact form ------------------------------------------------------------- */
/* A dark panel with underline fields — designed, not default HTML */

.form-panel {
  background: var(--dark);
  color: #fff;
  border-radius: var(--rounded-xxl);
  padding: clamp(32px, 5vw, 56px);
}

.form-panel h2 {
  margin-bottom: 32px;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 40px;
}

.field-full {
  grid-column: 1 / -1;
}

.contact-form label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 8px;
}

.contact-form .label-optional {
  color: var(--dark-ink-subtle);
  text-transform: none;
  letter-spacing: 0.2px;
}

/* Phone: country-code dropdown + number */
.contact-form .phone-row {
  display: flex;
  gap: 16px;
}

.contact-form .phone-row select {
  width: 210px;
  flex: none;
  text-overflow: ellipsis;
}

.contact-form .phone-row input {
  width: auto;
  flex: 1;
}

/* Inline validation */
.contact-form .field-error {
  display: none;
  margin-top: 8px;
  font-size: 0.75rem;
  color: #ff8a7a;
}

.contact-form .field.invalid input,
.contact-form .field.invalid select {
  border-bottom-color: #ff8a7a;
}

.contact-form .field.invalid .field-error {
  display: block;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 10px 2px;
  border: none;
  border-bottom: 1px solid var(--dark-hairline);
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 1.0625rem;
  transition: border-color 0.2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: #fff;
}

.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 24px; /* keeps the text clear of the chevron */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b2b6bd' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  cursor: pointer;
}

.contact-form select option {
  color: #0c0e14;
  background: #fff;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.form-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
}

/* Ghost submit, matching the dark CTA banners */
.form-panel .btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 12px 26px;
  min-height: 46px;
}

.form-panel .btn:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #0c0e14;
}

.form-alt {
  font-size: 0.875rem;
  color: var(--dark-ink-muted);
}

.form-alt .copy-email {
  background: none;
  border: none;
  padding: 0;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid var(--dark-hairline);
  transition: border-color 0.15s ease;
}

.form-alt .copy-email:hover {
  border-color: #fff;
}

.form-note {
  grid-column: 1 / -1;
  font-size: 0.8125rem;
  color: var(--dark-ink-subtle);
}

.form-success {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  border-left: 3px solid var(--accent-web);
  padding-left: 16px;
}

@media (max-width: 700px) {
  .contact-form {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ---- Contact ------------------------------------------------------------ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.contact-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 32px;
}

.contact-card .eyebrow {
  margin-bottom: 12px;
}

.contact-card .subhead {
  margin-bottom: 4px;
}

.contact-card p {
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.71;
}

.email-hero {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 2px solid var(--hairline);
  padding-bottom: 6px;
  transition: border-color 0.15s ease;
}

.email-hero:hover {
  border-color: var(--ink);
}

/* ---- Prose (terms & privacy) --------------------------------------------- */

.prose {
  max-width: 760px;
}

.prose h2 {
  margin: 64px 0 24px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 32px 0 8px;
}

.prose p {
  color: var(--ink-muted);
  margin-bottom: 12px;
}

/* ---- Footer (dark) --------------------------------------------------------- */

.site-footer {
  background: var(--dark);
  color: #fff;
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) repeat(2, minmax(0, 3fr));
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand img {
  height: 28px;
  width: auto;
  margin-bottom: 14px;
}

.footer-brand p {
  color: var(--dark-ink-subtle);
  font-size: 0.8125rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer-email {
  display: inline-block;
  margin-top: 10px;
  color: var(--dark-ink-muted);
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.footer-email:hover {
  color: #fff;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--dark-ink-subtle);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--dark-ink-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.2px;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--dark-hairline);
  padding-top: 24px;
  color: var(--dark-ink-subtle);
  font-size: 0.8125rem;
  letter-spacing: 0.2px;
}

.footer-bottom a {
  color: var(--dark-ink-muted);
}

.footer-bottom a:hover {
  color: #fff;
}

/* ---- Reveal on scroll ------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- 404 ------------------------------------------------------------------- */

.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---- Responsive -------------------------------------------------------------- */

@media (max-width: 1024px) {
  .features-grid,
  .steps-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

}

@media (max-width: 768px) {
  :root {
    --gutter: 24px;
    --section: 64px;
  }

  /* The menu takes over the whole page below the header; each link
     sits on its own hairline row */
  /* The header's backdrop-filter makes it the containing block for this
     fixed panel, so size it explicitly instead of anchoring to bottom: 0 */
  .site-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    z-index: 90;
    flex-direction: column;
    align-items: stretch;
    background: var(--canvas);
    padding: 12px var(--gutter) 32px;
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 22px 2px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--hairline-soft);
  }

  /* Short accent underline hugs the label instead of spanning the row */
  .site-nav a::after {
    left: 2px;
    right: auto;
    width: 32px;
    bottom: 14px;
    transform-origin: left;
  }

  /* Scroll locking while the menu is open is done in JS (blocking wheel and
     touchmove). Overflow tricks on <html> would unstick the sticky header
     and clamp the scroll position to the top. */

  .nav-toggle {
    display: inline-flex;
  }

  .services-grid,
  .capabilities {
    grid-template-columns: 1fr;
  }

  .rows li {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    row-gap: 6px;
  }

  .rows .row-desc {
    grid-column: 2;
  }

  .rows .row-note {
    display: none;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 560px) {
  .header-actions .btn-primary {
    display: none;
  }

  .features-grid,
  .steps-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- Mobile refinements ------------------------------------------------- */

/* Nothing may push the page wider than the screen (clip does not break sticky) */
html,
body {
  overflow-x: clip;
}

/* Form fields shrink with the panel instead of forcing it wider: grid and
   flex children refuse to go below their content width unless told to */
.contact-form .field {
  min-width: 0;
}

.contact-form .phone-row select,
.contact-form .phone-row input {
  min-width: 0;
}

@media (max-width: 768px) {
  /* Contact form: tighter panel, narrower country select, stacked footer */
  .form-panel {
    padding: 32px 24px;
    border-radius: var(--rounded-lg);
  }

  .form-panel h2 {
    margin-bottom: 24px;
  }

  .contact-form {
    gap: 24px;
  }

  /* Country dropdown stacks above the number, full width and untruncated */
  .contact-form .phone-row {
    flex-direction: column;
    gap: 16px;
  }

  .contact-form .phone-row select {
    width: 100%;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .form-panel .btn {
    justify-content: center;
  }

  .form-alt {
    text-align: center;
  }

  /* Cards size to their content instead of the desktop minimum */
  .service-card {
    min-height: 0;
  }

  /* Switcher scrolls sideways without showing a scrollbar */
  .service-switcher .container {
    scrollbar-width: none;
  }

  .service-switcher .container::-webkit-scrollbar {
    display: none;
  }

  /* Smaller, calmer hero blobs on small screens */
  .blob {
    filter: blur(52px);
    opacity: 0.28;
  }

  .blob-1 { width: 260px; height: 260px; }
  .blob-2 { width: 230px; height: 230px; }
  .blob-3 { width: 200px; height: 200px; }
  .blob-4 { width: 180px; height: 180px; }

  .next-page .container {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .next-page .arrow {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .faq-item summary {
    padding: 18px 20px;
    gap: 14px;
    font-size: 1.0625rem;
  }

  .faq-item p {
    padding: 0 20px 20px;
  }

  /* The Explore link sits bottom-right with clearance from the text,
     so the touch-hover outline never crowds the description */
  .service-card .card-cta {
    align-self: flex-end;
    margin-left: 0;
    margin-right: -14px;
    margin-top: 28px;
  }
}

@media (max-width: 560px) {
  /* Compact header: the three controls share one height and one shape */
  .site-header .container {
    height: 68px;
    gap: 12px;
  }

  .brand img {
    height: 28px;
  }

  .header-actions {
    gap: 8px;
  }

  .lang-switcher summary {
    height: 36px;
    padding: 0 12px;
  }

  .theme-toggle,
  .nav-toggle {
    width: 36px;
    height: 36px;
  }

  .nav-toggle {
    border-radius: var(--rounded-pill);
  }

  /* Nav panel hangs from the shorter header */
  .site-nav {
    top: 68px;
    height: calc(100vh - 68px);
    height: calc(100dvh - 68px);
  }

  .section-head {
    margin-bottom: 36px;
  }

  .hero {
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .hero-rotator {
    margin-top: 24px;
  }

  .scroll-cue {
    margin-top: 44px;
  }

  .pager-link {
    padding: 24px var(--gutter);
  }

  .statement blockquote p {
    font-size: 1.25rem;
  }

  /* In the 2-column values grid, an odd last card takes the full row
     instead of leaving an empty hole beside it */
  .values-grid .value-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .value-card {
    padding: 20px;
  }

  .value-card .value-index {
    margin-bottom: 14px;
  }

  /* Stacked banner buttons hang from the right edge */
  .cta-banner .cta-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-end;
  }
}
