/* ============================================================
   Hubstream marketing site — bright, modern, paper-led.
   All variables live in tokens.css. Single orange accent.
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ---------- Theme variables (light default; dark available) ---------- */
:root {
  --th-bg:           var(--ds-paper-50);
  --th-bg-raised:    #FFFFFF;
  --th-bg-alt:       var(--ds-paper-100);
  --th-bg-card:      var(--ds-paper-200);
  --th-hairline:     var(--ds-paper-300);
  --th-divider:      var(--ds-paper-400);
  --th-text:         var(--ds-text-on-light);
  --th-text-muted:   var(--ds-text-on-light-muted);
  --th-text-faint:   var(--ds-text-on-light-faint);
  --th-nav-bg:       rgba(250, 248, 243, 0.82);
  --th-inverse-bg:   var(--ds-ink-900);
  --th-inverse-text: var(--ds-text-on-dark);
}
html[data-theme="dark"] {
  --th-bg:           var(--ds-ink-900);
  --th-bg-raised:    var(--ds-ink-800);
  --th-bg-alt:       var(--ds-ink-800);
  --th-bg-card:      var(--ds-ink-700);
  --th-hairline:     var(--ds-ink-600);
  --th-divider:      var(--ds-ink-500);
  --th-text:         var(--ds-text-on-dark);
  --th-text-muted:   var(--ds-text-on-dark-muted);
  --th-text-faint:   var(--ds-text-on-dark-faint);
  --th-nav-bg:       rgba(14, 14, 16, 0.78);
  --th-inverse-bg:   var(--ds-paper-50);
  --th-inverse-text: var(--ds-text-on-light);
}

body {
  background: var(--th-bg);
  color: var(--th-text);
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--ds-dur-base) var(--ds-ease-snap), color var(--ds-dur-base) var(--ds-ease-snap);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
::selection { background: var(--ds-orange); color: white; }

/* ---------- Layout primitives ---------- */
.container       { max-width: var(--ds-content-wide); margin: 0 auto; padding-inline: var(--ds-gutter); }
.container-text  { max-width: var(--ds-content-text); margin: 0 auto; padding-inline: var(--ds-gutter); }
.container-full  { max-width: var(--ds-content-full); margin: 0 auto; padding-inline: var(--ds-gutter); }

.section         { padding-block: var(--ds-space-4xl); position: relative; }
.section--tight  { padding-block: var(--ds-space-3xl); }
.section--bleed  { padding-block: 0; }

/* ---------- Type primitives ---------- */
.eyebrow {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-2xs);
  letter-spacing: var(--ds-tracking-overline);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ds-orange);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow.muted { color: var(--th-text-faint); }
.eyebrow::before {
  content: "";
  width: 16px; height: 1px;
  background: currentColor;
}
.eyebrow.no-bar::before { display: none; }

.display {
  font-family: var(--ds-font-display);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.024em;
  text-wrap: balance;
  margin: 0;
  color: var(--th-text);
}
.display em { font-style: italic; color: var(--ds-orange); font-weight: 300; }

.lede {
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-xl);
  line-height: 1.45;
  color: var(--th-text-muted);
  text-wrap: pretty;
  margin: 0;
  max-width: 56ch;
}

/* ---------- Brand wordmark ---------- */
.brand-mark {
  display: inline-flex;
  align-items: center;
  height: 22px;
  flex: 0 0 auto;
}
.brand-mark img {
  height: 100%; width: auto; max-width: none; display: block;
}
.brand-mark--sm { height: 16px; }
.brand-mark--lg { height: 28px; }
.brand-mark .brand-mark__light { display: block; }
.brand-mark .brand-mark__dark  { display: none; }
html[data-theme="dark"] .brand-mark .brand-mark__light { display: none; }
html[data-theme="dark"] .brand-mark .brand-mark__dark  { display: block; }

/* ---------- NAV ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--th-nav-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--th-hairline);
  transition: background var(--ds-dur-base) var(--ds-ease-snap), border-color var(--ds-dur-base) var(--ds-ease-snap);
}
.site-nav__inner {
  max-width: var(--ds-content-full);
  margin: 0 auto;
  padding: 16px var(--ds-gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--ds-space-xl);
  align-items: center;
}
.site-nav__brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--th-text);
}
.site-nav__brand .pill {
  font-family: var(--ds-font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid var(--th-hairline);
  color: var(--th-text-muted);
  border-radius: var(--ds-radius-pill);
}
.site-nav__links { display: flex; gap: 4px; justify-content: center; }
.site-nav__links a {
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  color: var(--th-text-muted);
  padding: 10px 14px;
  border-radius: var(--ds-radius-md);
  transition: color var(--ds-dur-quick) var(--ds-ease-snap), background var(--ds-dur-quick) var(--ds-ease-snap);
}
.site-nav__links a:hover,
.site-nav__links a.is-current { color: var(--th-text); background: var(--th-bg-alt); }

.site-nav__cta { display: flex; align-items: center; gap: var(--ds-space-sm); }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--th-hairline);
  color: var(--th-text-muted);
  border-radius: var(--ds-radius-pill);
  cursor: pointer;
  transition: color var(--ds-dur-quick) var(--ds-ease-snap), border-color var(--ds-dur-quick) var(--ds-ease-snap), background var(--ds-dur-quick) var(--ds-ease-snap);
  background: transparent;
}
.theme-toggle:hover { color: var(--ds-orange); border-color: var(--ds-orange); }
.theme-toggle svg { width: 14px; height: 14px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  padding: 12px 20px;
  border: 1px solid currentColor;
  border-radius: var(--ds-radius-sm);
  background: transparent;
  color: inherit;
  white-space: nowrap;
  transition: background var(--ds-dur-quick) var(--ds-ease-snap), color var(--ds-dur-quick) var(--ds-ease-snap), border-color var(--ds-dur-quick) var(--ds-ease-snap), transform var(--ds-dur-quick) var(--ds-ease-snap);
}
.btn:hover { transform: translateY(-1px); }
.btn .arrow { display: inline-block; transition: transform var(--ds-dur-quick) var(--ds-ease-snap); }
.btn:hover .arrow { transform: translateX(3px); }

.btn--primary {
  background: var(--ds-orange);
  border-color: var(--ds-orange);
  color: white;
}
.btn--primary:hover { background: var(--ds-orange-hover); border-color: var(--ds-orange-hover); }

.btn--solid {
  background: var(--th-text);
  color: var(--th-bg);
  border-color: var(--th-text);
}
.btn--solid:hover { background: var(--ds-orange); border-color: var(--ds-orange); color: white; }

.btn--ghost { background: transparent; border-color: var(--th-hairline); color: var(--th-text); }
.btn--ghost:hover { background: var(--th-bg-alt); }

.btn--link {
  border: 0; padding: 0;
  color: var(--ds-orange);
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-sm);
  font-weight: 500;
}
.btn--link:hover { color: var(--ds-orange-hover); transform: none; }
.btn--link::after { content: "→"; margin-left: 6px; transition: transform var(--ds-dur-quick) var(--ds-ease-snap); display: inline-block; }
.btn--link:hover::after { transform: translateX(3px); }

.btn--sm { padding: 8px 14px; font-size: var(--ds-text-xs); }
.btn--lg { padding: 16px 28px; font-size: var(--ds-text-md); }

/* ---------- Pills (problems-we-solve strip) ---------- */
.pillrow {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
}
.pill-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  padding: 8px 14px;
  background: var(--th-bg-raised);
  border: 1px solid var(--th-hairline);
  border-radius: var(--ds-radius-pill);
  color: var(--th-text);
  white-space: nowrap;
  transition: border-color var(--ds-dur-quick) var(--ds-ease-snap);
}
.pill-chip:hover { border-color: var(--ds-orange); }
.pill-chip .ico {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  background: var(--ds-orange);
  border-radius: var(--ds-radius-sm);
  color: white;
  flex: 0 0 auto;
}
.pill-chip .ico svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding-top: clamp(80px, 12vh, 140px);
  padding-bottom: var(--ds-space-4xl);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("assets/rice-paper-2.png");
  background-size: 400px;
  opacity: 0.55;
  mix-blend-mode: multiply;
  z-index: -1;
  pointer-events: none;
}
html[data-theme="dark"] .hero::before { mix-blend-mode: screen; opacity: 0.1; }
.hero::after {
  content: "";
  position: absolute;
  inset: -1px 0 auto 0;
  height: 70%;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(255,81,0,0.06), transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.hero__inner {
  display: grid;
  gap: var(--ds-space-2xl);
  text-align: center;
  justify-items: center;
}
.hero__headline {
  font-family: var(--ds-font-display);
  font-weight: 300;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.028em;
  margin: 0;
  text-wrap: balance;
  max-width: 18ch;
}
.hero__headline em { font-style: italic; color: var(--ds-orange); font-weight: 300; }
.hero__tagline {
  font-family: var(--ds-font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.3;
  color: var(--th-text-muted);
  max-width: 32ch;
  margin: 0;
}
.hero__sub {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--th-text-muted);
  max-width: 56ch;
  margin: 0;
}
.hero__sub strong { color: var(--th-text); font-weight: 500; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--ds-space-md); justify-content: center; }

/* ---------- Section heads ---------- */
.section-head {
  display: grid; gap: var(--ds-space-md);
  margin-bottom: var(--ds-space-3xl);
  max-width: var(--ds-content-text);
}
.section-head.center { justify-items: center; text-align: center; margin-inline: auto; }
.section-head h2 {
  font-family: var(--ds-font-display);
  font-weight: 300;
  font-size: clamp(36px, 5vw, var(--ds-text-5xl));
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
  color: var(--th-text);
}
.section-head h2 em { font-style: italic; color: var(--ds-orange); font-weight: 300; }
.section-head p {
  margin: 0;
  font-size: var(--ds-text-lg);
  line-height: 1.5;
  color: var(--th-text-muted);
  max-width: 60ch;
  text-wrap: pretty;
}

/* ---------- Feature grid (the 6 features) ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ds-space-lg);
}
@media (max-width: 1000px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--th-bg-raised);
  border: 1px solid var(--th-hairline);
  border-radius: var(--ds-radius-lg);
  padding: var(--ds-space-xl);
  display: flex; flex-direction: column; gap: var(--ds-space-md);
  transition: border-color var(--ds-dur-base) var(--ds-ease-snap), transform var(--ds-dur-base) var(--ds-ease-snap), box-shadow var(--ds-dur-base) var(--ds-ease-snap);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  border-color: var(--th-text);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -16px rgba(20, 20, 15, 0.12);
}
.feature-card__visual {
  aspect-ratio: 16 / 10;
  margin: calc(-1 * var(--ds-space-xl)) calc(-1 * var(--ds-space-xl)) 0;
  background: var(--th-bg-alt);
  border-bottom: 1px solid var(--th-hairline);
  position: relative;
  overflow: hidden;
}
.feature-card__name {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-2xs);
  letter-spacing: var(--ds-tracking-overline);
  text-transform: uppercase;
  color: var(--ds-orange);
  font-weight: 500;
  margin: 0;
}
.feature-card h3 {
  font-family: var(--ds-font-display);
  font-weight: 400;
  font-size: var(--ds-text-2xl);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
  color: var(--th-text);
}
.feature-card p {
  margin: 0;
  color: var(--th-text-muted);
  font-size: var(--ds-text-md);
  line-height: 1.55;
}
.feature-card .feature-card__cta {
  margin-top: auto;
  padding-top: var(--ds-space-sm);
}

/* ---------- Big alternating feature row (for hero feature) ---------- */
.feature-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-3xl);
  align-items: center;
}
.feature-hero.reverse > :first-child { order: 2; }
@media (max-width: 900px) {
  .feature-hero, .feature-hero.reverse { grid-template-columns: 1fr; }
  .feature-hero.reverse > :first-child { order: unset; }
}
.feature-hero__copy { display: flex; flex-direction: column; gap: var(--ds-space-md); }
.feature-hero__copy h2 {
  font-family: var(--ds-font-display);
  font-weight: 300;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
.feature-hero__copy h2 em { font-style: italic; color: var(--ds-orange); font-weight: 300; }
.feature-hero__copy p {
  margin: 0;
  color: var(--th-text-muted);
  font-size: var(--ds-text-lg);
  line-height: 1.55;
  max-width: 50ch;
}
.feature-hero__visual {
  background: var(--th-bg-raised);
  border: 1px solid var(--th-hairline);
  border-radius: var(--ds-radius-lg);
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

/* ---------- UI mock canvases (placeholder visuals for feature cards) ---------- */
.mock {
  position: absolute; inset: 0;
  background: var(--th-bg-raised);
  background-image:
    linear-gradient(rgba(20, 20, 15, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 15, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
html[data-theme="dark"] .mock {
  background-image:
    linear-gradient(rgba(244, 240, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 240, 230, 0.05) 1px, transparent 1px);
}
.mock__bar {
  height: 22px;
  background: var(--th-bg-alt);
  border: 1px solid var(--th-hairline);
  border-radius: var(--ds-radius-xs);
}
.mock__row { display: flex; gap: 6px; align-items: center; height: 22px; }
.mock__row .pill {
  height: 100%;
  border-radius: var(--ds-radius-pill);
  background: var(--th-bg-alt);
  border: 1px solid var(--th-hairline);
}
.mock__row .pill.is-active { background: var(--ds-orange); border-color: var(--ds-orange); }
.mock__rows { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mock__r {
  height: 16px;
  background: var(--th-bg-alt);
  border: 1px solid var(--th-hairline);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.mock__r::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--w, 60%);
  background: var(--ds-orange);
  opacity: 0.85;
}
.mock__node {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--th-text);
}
.mock__node.ac { background: var(--ds-orange); box-shadow: 0 0 0 4px rgba(255,81,0,0.18); }
.mock__edge {
  position: absolute;
  height: 1px;
  background: var(--th-hairline);
  transform-origin: left center;
}

/* ---------- Logo / customer marquee ---------- */
.marquee {
  overflow: hidden;
  padding-block: var(--ds-space-lg);
  border-block: 1px solid var(--th-hairline);
  background: var(--th-bg-raised);
  position: relative;
}
.marquee::before, .marquee::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 80px;
  z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(to right, var(--th-bg-raised), transparent); }
.marquee::after  { right: 0; background: linear-gradient(to left, var(--th-bg-raised), transparent); }
.marquee__track {
  display: flex; gap: var(--ds-space-3xl);
  animation: marquee 50s linear infinite;
  width: max-content;
}
.marquee__item {
  font-family: var(--ds-font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 3vw, 36px);
  color: var(--th-text-muted);
  white-space: nowrap;
}
.marquee__item::before {
  content: "✶";
  color: var(--ds-orange);
  font-style: normal;
  margin-right: var(--ds-space-2xl);
  font-size: 0.6em;
  vertical-align: middle;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--th-inverse-bg);
  color: var(--th-inverse-text);
  padding-block: var(--ds-space-4xl);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("assets/dotted_pattern.png");
  background-size: 600px;
  background-position: right center;
  background-repeat: no-repeat;
  opacity: 0.14;
  z-index: -1;
}
.cta-band__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--ds-space-2xl);
  align-items: center;
}
@media (max-width: 800px) { .cta-band__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; } }
.cta-band h2 {
  font-family: var(--ds-font-display);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
  max-width: 18ch;
}
.cta-band h2 em { font-style: italic; color: var(--ds-orange); font-weight: 300; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--th-bg);
  color: var(--th-text-muted);
  border-top: 1px solid var(--th-hairline);
  padding-block: var(--ds-space-3xl) var(--ds-space-lg);
}
.site-footer__cols {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: var(--ds-space-2xl);
  padding-bottom: var(--ds-space-2xl);
  border-bottom: 1px solid var(--th-hairline);
}
@media (max-width: 1000px) { .site-footer__cols { grid-template-columns: 1fr 1fr; } }
.site-footer__col h4 {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-2xs);
  letter-spacing: var(--ds-tracking-overline);
  text-transform: uppercase;
  color: var(--th-text-faint);
  margin: 0 0 var(--ds-space-md) 0;
  font-weight: 500;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer__col a { font-size: var(--ds-text-sm); color: var(--th-text-muted); transition: color var(--ds-dur-quick) var(--ds-ease-snap); }
.site-footer__col a:hover { color: var(--ds-orange); }
.site-footer__about p { margin: 0 0 var(--ds-space-md) 0; font-size: var(--ds-text-sm); line-height: 1.55; max-width: 32ch; }
.site-footer__about .brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: var(--ds-space-md); color: var(--th-text); }
.site-footer__legal {
  padding-top: var(--ds-space-lg);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--ds-space-md);
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-2xs);
  letter-spacing: var(--ds-tracking-overline);
  text-transform: uppercase;
  color: var(--th-text-faint);
}
.site-footer__legal-links { display: flex; gap: var(--ds-space-lg); }
.site-footer__legal a:hover { color: var(--ds-orange); }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 700ms var(--ds-ease-cinematic), transform 700ms var(--ds-ease-cinematic);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Misc utilities ---------- */
.muted { color: var(--th-text-muted); }
.faint { color: var(--th-text-faint); }
.center { text-align: center; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
.stack-sm { display: grid; gap: var(--ds-space-sm); }
.stack-md { display: grid; gap: var(--ds-space-md); }
.stack-lg { display: grid; gap: var(--ds-space-lg); }
.stack-xl { display: grid; gap: var(--ds-space-xl); }

/* ============================================================
   SURFACE OVERRIDES — sections that are always dark/light regardless of
   global theme. Use .surface-dark on a section that should pin its own
   palette (e.g. a dark hero band on a light page).
   ============================================================ */
.surface-dark {
  --th-bg:           var(--ds-ink-900);
  --th-bg-raised:    var(--ds-ink-800);
  --th-bg-alt:       var(--ds-ink-800);
  --th-bg-card:      var(--ds-ink-700);
  --th-hairline:     var(--ds-ink-600);
  --th-divider:      var(--ds-ink-500);
  --th-text:         var(--ds-text-on-dark);
  --th-text-muted:   var(--ds-text-on-dark-muted);
  --th-text-faint:   var(--ds-text-on-dark-faint);
  --th-inverse-bg:   var(--ds-paper-50);
  --th-inverse-text: var(--ds-text-on-light);
  background: var(--th-bg);
  color: var(--th-text);
}
.surface-light {
  --th-bg:           var(--ds-paper-50);
  --th-bg-raised:    #FFFFFF;
  --th-bg-alt:       var(--ds-paper-100);
  --th-bg-card:      var(--ds-paper-200);
  --th-hairline:     var(--ds-paper-300);
  --th-divider:      var(--ds-paper-400);
  --th-text:         var(--ds-text-on-light);
  --th-text-muted:   var(--ds-text-on-light-muted);
  --th-text-faint:   var(--ds-text-on-light-faint);
  background: var(--th-bg);
  color: var(--th-text);
}

/* ============================================================
   DARK HERO PATTERN — atmospheric dark band with grain + glow.
   Used on Product and Solutions page hero rails.
   ============================================================ */
.dark-hero {
  position: relative;
  padding-top: clamp(100px, 14vh, 160px);
  padding-bottom: clamp(80px, 12vh, 120px);
  overflow: hidden;
  isolation: isolate;
}
.dark-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("assets/atmosphere.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  z-index: -2;
  mix-blend-mode: screen;
}
.dark-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(255, 81, 0, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(14, 14, 16, 0.5) 0%, var(--ds-ink-900) 100%);
  z-index: -1;
}
.dark-hero .container { position: relative; z-index: 1; }

.dark-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ds-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ds-text-on-dark-muted);
  padding: 6px 14px;
  border: 1px solid var(--ds-ink-600);
  border-radius: var(--ds-radius-pill);
  background: rgba(14, 14, 16, 0.55);
  backdrop-filter: blur(8px);
}
.dark-hero__eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--ds-orange);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--ds-orange);
}

.dark-hero h1 {
  font-family: var(--ds-font-display);
  font-weight: 300;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.028em;
  margin: var(--ds-space-lg) 0 0;
  text-wrap: balance;
  max-width: 18ch;
  color: var(--ds-text-on-dark);
}
.dark-hero h1 em { font-style: italic; color: var(--ds-orange); font-weight: 300; }

.dark-hero p.lede {
  margin-top: var(--ds-space-lg);
  font-size: var(--ds-text-xl);
  line-height: 1.45;
  color: var(--ds-text-on-dark-muted);
  max-width: 56ch;
}

.dark-hero__cta { display: flex; flex-wrap: wrap; gap: var(--ds-space-md); margin-top: var(--ds-space-xl); }

/* Variant: centered dark hero with hero composition under headline */
.dark-hero--centered { text-align: center; }
.dark-hero--centered .dark-hero__inner { display: grid; gap: var(--ds-space-xl); justify-items: center; }
.dark-hero--centered h1 { margin-inline: auto; }
.dark-hero--centered p.lede { margin-inline: auto; }
.dark-hero--centered .dark-hero__cta { justify-content: center; }

/* Composition strip — the wide dataspace hero image */
.dark-hero__composition {
  margin-top: var(--ds-space-2xl);
  max-width: 1100px;
  width: 100%;
}

/* ============================================================
   FEATURE-DEEP-DIVE ROW — alternating left/right anchor for the
   product page's per-feature sections.
   ============================================================ */
.feat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-3xl);
  align-items: center;
}
.feat-row.reverse > :first-child { order: 2; }
@media (max-width: 900px) {
  .feat-row, .feat-row.reverse { grid-template-columns: 1fr; gap: var(--ds-space-xl); }
  .feat-row.reverse > :first-child { order: unset; }
}
.feat-row__copy { display: flex; flex-direction: column; gap: var(--ds-space-md); max-width: 50ch; }
.feat-row__copy .num {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-2xs);
  letter-spacing: var(--ds-tracking-overline);
  text-transform: uppercase;
  color: var(--ds-orange);
}
.feat-row__copy h2 {
  font-family: var(--ds-font-display);
  font-weight: 300;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
  color: var(--th-text);
}
.feat-row__copy h2 em { font-style: italic; color: var(--ds-orange); font-weight: 300; }
.feat-row__copy p {
  margin: 0;
  color: var(--th-text-muted);
  font-size: var(--ds-text-lg);
  line-height: 1.55;
}
.feat-row__copy ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.feat-row__copy li {
  display: grid; grid-template-columns: 18px 1fr; gap: 8px;
  font-size: var(--ds-text-md);
  color: var(--th-text);
  line-height: 1.5;
}
.feat-row__copy li::before {
  content: ""; width: 14px; height: 1px; background: var(--ds-orange); margin-top: 12px;
}

.feat-row__visual {
  background: var(--th-bg-raised);
  border: 1px solid var(--th-hairline);
  border-radius: var(--ds-radius-lg);
  aspect-ratio: 4 / 3;
  position: relative; overflow: hidden;
  box-shadow: 0 1px 0 rgba(20,20,15,0.04), 0 24px 60px -32px rgba(20,20,15,0.16);
}

/* ============================================================
   MATURITY TIMELINE — Solutions page evolution scale
   ============================================================ */
.maturity {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--th-hairline);
  position: relative;
}
@media (max-width: 1000px) { .maturity { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .maturity { grid-template-columns: 1fr; } }
.maturity__step {
  padding: var(--ds-space-xl) var(--ds-space-md) 0 0;
  display: flex; flex-direction: column; gap: var(--ds-space-md);
  position: relative;
}
.maturity__step::before {
  content: "";
  position: absolute; top: -1px; left: 0; right: 0;
  height: 1px; background: var(--th-hairline);
}
.maturity__step.is-now::before { background: var(--ds-orange); height: 2px; top: -2px; }
.maturity__step .yr {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-2xs);
  letter-spacing: var(--ds-tracking-overline);
  text-transform: uppercase;
  color: var(--th-text-faint);
}
.maturity__step.is-now .yr { color: var(--ds-orange); }
.maturity__step h3 {
  font-family: var(--ds-font-display);
  font-weight: 400;
  font-size: var(--ds-text-2xl);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--th-text);
}
.maturity__step h3 em { font-style: italic; color: var(--ds-orange); font-weight: 400; }
.maturity__step p { margin: 0; color: var(--th-text-muted); font-size: var(--ds-text-md); line-height: 1.5; }
.maturity__step .badge {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--ds-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--th-hairline);
  color: var(--th-text-faint);
  border-radius: var(--ds-radius-pill);
}
.maturity__step.is-now .badge { color: var(--ds-orange); border-color: var(--ds-orange); }

/* ============================================================
   USE-CASE GRID — the Templatized solutions on Solutions page
   ============================================================ */
.usecases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ds-space-lg);
}
@media (max-width: 1000px) { .usecases { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .usecases { grid-template-columns: 1fr; } }

.usecase {
  background: var(--th-bg-raised);
  border: 1px solid var(--th-hairline);
  border-radius: var(--ds-radius-lg);
  padding: var(--ds-space-xl);
  display: flex; flex-direction: column; gap: var(--ds-space-sm);
  transition: border-color var(--ds-dur-base) var(--ds-ease-snap), transform var(--ds-dur-base) var(--ds-ease-snap), box-shadow var(--ds-dur-base) var(--ds-ease-snap);
  position: relative;
}
.usecase:hover {
  border-color: var(--th-text);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -16px rgba(20, 20, 15, 0.12);
}
.usecase .num {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-2xs);
  letter-spacing: var(--ds-tracking-overline);
  text-transform: uppercase;
  color: var(--ds-orange);
}
.usecase h3 {
  font-family: var(--ds-font-display);
  font-weight: 400;
  font-size: var(--ds-text-xl);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--th-text);
}
.usecase p {
  margin: 0;
  color: var(--th-text-muted);
  font-size: var(--ds-text-md);
  line-height: 1.5;
}
.usecase .replaces {
  margin-top: var(--ds-space-md);
  padding-top: var(--ds-space-md);
  border-top: 1px solid var(--th-hairline);
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-family: var(--ds-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--th-text-faint);
}
.usecase .replaces strong { color: var(--th-text); font-weight: 500; }
.usecase .more {
  margin-top: auto;
  padding-top: var(--ds-space-md);
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  color: var(--ds-orange);
}
.usecase .more::after { content: "→"; transition: transform var(--ds-dur-quick) var(--ds-ease-snap); }
.usecase:hover .more::after { transform: translateX(3px); }

/* ============================================================
   SECURITY / COMPLIANCE STRIP
   ============================================================ */
.compliance {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--ds-space-lg);
  align-items: center;
}
@media (max-width: 900px) { .compliance { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px) { .compliance { grid-template-columns: repeat(2, 1fr); } }
.compliance__badge {
  text-align: center;
  padding: var(--ds-space-md);
  border: 1px solid var(--th-hairline);
  border-radius: var(--ds-radius-md);
  background: var(--th-bg-raised);
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--ds-font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--th-text-muted);
  transition: border-color var(--ds-dur-quick) var(--ds-ease-snap);
}
.compliance__badge:hover { border-color: var(--th-text); }
.compliance__badge strong { color: var(--th-text); font-weight: 500; letter-spacing: 0.08em; font-size: var(--ds-text-md); font-family: var(--ds-font-display); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tighten spacing tokens on small screens so sections don't feel cavernous */
@media (max-width: 640px) {
  :root {
    --ds-space-4xl: 64px;
    --ds-space-3xl: 48px;
    --ds-space-2xl: 32px;
    --ds-space-xl:  24px;
  }
}

/* ---------- Mobile nav ---------- */
.site-nav__menu-btn {
  display: none;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--th-hairline);
  color: var(--th-text-muted);
  border-radius: var(--ds-radius-pill);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--ds-dur-quick) var(--ds-ease-snap),
              border-color var(--ds-dur-quick) var(--ds-ease-snap);
}
.site-nav__menu-btn:hover { color: var(--ds-orange); border-color: var(--ds-orange); }
.site-nav__menu-btn svg { width: 16px; height: 16px; }
.site-nav__menu-btn .icon-close    { display: none; }
.site-nav__menu-btn[aria-expanded="true"] .icon-hamburger { display: none; }
.site-nav__menu-btn[aria-expanded="true"] .icon-close    { display: block; }

@media (max-width: 768px) {
  .site-nav__inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0;
    padding-block: 14px;
  }
  /* links go on their own full-width row, hidden by default */
  .site-nav__links {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 2px;
    padding: var(--ds-space-sm) 0 var(--ds-space-xs);
    margin-top: var(--ds-space-sm);
    border-top: 1px solid var(--th-hairline);
  }
  .site-nav__links.is-open { display: flex; }
  .site-nav__links a { padding: 10px 12px; }
  /* hide the primary CTA button — it's in the menu area on desktop; nav is compact on mobile */
  .site-nav__cta .btn--primary { display: none; }
  .site-nav__menu-btn { display: inline-grid; }
}

/* ---------- Quote grid — responsive two-column layout ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-2xl);
  align-items: end;
}
@media (max-width: 767px) {
  .quote-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer: single column on small phones ---------- */
@media (max-width: 500px) {
  .site-footer__cols { grid-template-columns: 1fr; }
}

/* ---------- Feat-row visual: don't let the mock panel dominate on mobile ---------- */
@media (max-width: 640px) {
  .feat-row__visual { aspect-ratio: 3 / 2; }
}

/* ============================================================
   TESTIMONIAL CAROUSEL
   ============================================================ */
.testi-section { position: relative; }

.testi-carousel {
  padding-block: var(--ds-space-2xl);
}

.testi-carousel__slides {
  display: grid;
  grid-template-areas: "main";
}

.testi-slide {
  grid-area: main;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ds-space-lg);
  text-align: center;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 480ms var(--ds-ease-cinematic), transform 480ms var(--ds-ease-cinematic);
  pointer-events: none;
}
.testi-slide.is-prev  { transform: translateX(-20px); }
.testi-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.testi-slide__header {
  display: flex;
  align-items: center;
  gap: var(--ds-space-md);
}

.testi-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ds-font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.testi-logo--uber {
  background: var(--ds-ink-900);
  color: #fff;
  padding: 5px 14px;
  font-size: var(--ds-text-lg);
}
html[data-theme="dark"] .testi-logo--uber {
  background: #fff;
  color: var(--ds-ink-900);
}
.testi-logo--fti {
  background: #003087;
  color: #fff;
  padding: 5px 12px;
  font-size: var(--ds-text-sm);
  font-family: var(--ds-font-mono);
  letter-spacing: 0.12em;
}

.testi-logo__divider {
  width: 1px;
  height: 36px;
  background: var(--th-hairline);
  flex-shrink: 0;
}

.testi-person {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}
.testi-person strong {
  font-weight: 600;
  font-size: var(--ds-text-md);
  color: var(--th-text);
}
.testi-person span {
  font-family: var(--ds-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--th-text-muted);
}

.testi-quote {
  font-family: var(--ds-font-display);
  font-weight: 300;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 66ch;
  color: var(--th-text);
}

.testi-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-lg);
  margin-top: var(--ds-space-xl);
}

.testi-carousel__arrow {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--th-hairline);
  border-radius: var(--ds-radius-pill);
  color: var(--th-text-muted);
  background: transparent;
  cursor: pointer;
  transition: color var(--ds-dur-quick) var(--ds-ease-snap),
              border-color var(--ds-dur-quick) var(--ds-ease-snap),
              background var(--ds-dur-quick) var(--ds-ease-snap);
}
.testi-carousel__arrow:hover {
  color: var(--ds-orange);
  border-color: var(--ds-orange);
  background: rgba(255, 81, 0, 0.04);
}
.testi-carousel__arrow svg { width: 14px; height: 14px; }

.testi-carousel__dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.testi-carousel__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--th-divider);
  border: 0; padding: 0;
  cursor: pointer;
  transition: background var(--ds-dur-quick) var(--ds-ease-snap),
              transform var(--ds-dur-quick) var(--ds-ease-snap);
}
.testi-carousel__dot.is-active {
  background: var(--ds-orange);
  transform: scale(1.4);
}

@media (prefers-reduced-motion: reduce) {
  .testi-slide { transition: none; }
}

@media (max-width: 640px) {
  .testi-slide__header { flex-direction: column; align-items: center; }
  .testi-logo__divider { width: 32px; height: 1px; }
  .testi-person { text-align: center; }
}

