/* ============================================
   QUADRAGEN DESIGN SYSTEM
   Dark theme · Raleway + Plus Jakarta Sans
   Accent: Extension Studio Yellow (#F2A900)
   ============================================ */

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

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Colors */
  --bg-primary: #0A0A0F;
  --bg-secondary: #111118;
  --bg-card: #16161F;
  --bg-card-hover: #1C1C28;
  --bg-gradient-start: #0A0A0F;
  --bg-gradient-end: #0F0F1A;
  --text-primary: #EEEEF0;
  --text-secondary: #9999A8;
  --text-muted: #7A7A8C;
  --accent: #F2A900;
  --accent-hover: #FFB81C;
  --accent-glow: rgba(242, 169, 0, 0.15);
  --accent-soft: rgba(242, 169, 0, 0.08);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --studio-extension: #D4A017;
  --studio-lender: #7B4FAF;
  --studio-onboarding: #5A8BA8;
  --studio-orchestration: #E87E2A;
  --studio-arr: #8CC63F;

  /* Typography */
  --font-heading: 'Raleway', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Spacing */
  --section-padding: 96px;
  --container-max: 1200px;
  --container-wide: 1400px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.3rem); }

p { color: var(--text-secondary); max-width: 680px; }
p.large { font-size: 1.15rem; line-height: 1.8; }

.accent-text { color: var(--accent); }
.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #FFD166 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.container--wide {
  max-width: var(--container-wide);
}

section {
  padding: var(--section-padding) 0;
  position: relative;
  scroll-margin-top: 96px; /* nav height (~72px) + 24px breathing room */
}

/* --- Section Divider (between same-bg adjacent sections) --- */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s var(--ease-out);
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__logo-mark {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--bg-primary);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

/* Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
}

.nav__dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding-bottom: 8px;
  margin-bottom: -8px;
}

.nav__dropdown-trigger svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
}

.nav__dropdown:hover .nav__dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease-out);
}

.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav__dropdown-item:hover {
  background: var(--bg-card-hover);
}

.nav__dropdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav__dropdown-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
}

.nav__dropdown-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Mobile nav */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  -webkit-appearance: none;
  appearance: none;
}

.nav__hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

.nav__cta-btn {
  padding: 10px 24px;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.nav__cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(242, 169, 0, 0.3);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.btn--primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(242, 169, 0, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  padding: 14px 0;
}

.btn--ghost:hover {
  gap: 14px;
}

.btn--ghost svg {
  transition: transform 0.3s var(--ease-out);
}

.btn--ghost:hover svg {
  transform: translateX(4px);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 100px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero__bg-glow {
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}

.hero__bg-glow--accent {
  top: -200px;
  right: -200px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
}

.hero__bg-glow--blue {
  bottom: -300px;
  left: -200px;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.06) 0%, transparent 70%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(242, 169, 0, 0.15);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  margin-bottom: 28px;
}

.hero__eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero__title {
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero__subtitle {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 620px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  animation: float 3s ease-in-out infinite;
}

.hero__scroll-indicator span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: 32px;
}

.section-header__eyebrow {
  display: block;
  width: fit-content;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}
[style*="text-align:center"] > .section-header__eyebrow,
[style*="text-align: center"] > .section-header__eyebrow {
  margin-left: auto;
  margin-right: auto;
}

.section-header__title {
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-header__description {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--accent)), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover::before {
  opacity: 1;
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.card__description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.3s;
}

.card__link:hover {
  gap: 10px;
}

/* Studio-specific card colors */
.card--extension { --card-accent: var(--studio-extension); }
.card--extension .card__icon { background: rgba(212, 160, 23, 0.1); color: var(--studio-extension); }
.card--lender { --card-accent: var(--studio-lender); }
.card--lender .card__icon { background: rgba(123, 79, 175, 0.1); color: var(--studio-lender); }
.card--onboarding { --card-accent: var(--studio-onboarding); }
.card--onboarding .card__icon { background: rgba(90, 139, 168, 0.1); color: var(--studio-onboarding); }
.card--orchestration { --card-accent: var(--studio-orchestration); }
.card--orchestration .card__icon { background: rgba(232, 126, 42, 0.1); color: var(--studio-orchestration); }
.card--arr { --card-accent: var(--studio-arr); }
.card--arr .card__icon { background: rgba(140, 198, 63, 0.1); color: var(--studio-arr); }

/* --- Stats Bar --- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.stat {
  text-align: center;
}

.stat__number {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat__label {
  font-size: 0.88rem;
  color: #c0c0cc;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Feature Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 24px; /* Normalized: 24px desktop, 16px tablet, 12px mobile */
}

/* --- Studio Grid --- */
.studio-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.studio-grid .card {
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
}
.studio-grid .card__description {
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.5;
}
.studio-grid .card__link {
  margin-top: auto;
  padding-top: 16px;
}
.studio-grid .studio-badge {
  width: 40px;
  height: 40px;
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.studio-grid .card__title {
  font-size: 0.95rem;
  margin-bottom: 6px;
}


/* --- Split Section (text + visual) --- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.split--reverse {
  direction: rtl;
}

.split--reverse > * {
  direction: ltr;
}

.split__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.split__visual {
  position: relative;
}

.split__visual-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.split__visual-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 50%);
  pointer-events: none;
}

/* --- Credibility / Logos --- */
.credibility {
  text-align: center;
  padding: 96px 0;
}

.credibility__text {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section__inner {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(242, 169, 0, 0.04) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(48px, 6vw, 80px);
  position: relative;
  overflow: hidden;
}

.cta-section__inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, var(--accent-soft) 0%, transparent 50%);
  pointer-events: none;
}

.cta-section__title {
  color: var(--text-primary);
  margin-bottom: 20px;
  position: relative;
}

.cta-section__description {
  margin: 0 auto 36px;
  text-align: center;
  position: relative;
}

.cta-section__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}

/* --- Footer --- */
.footer {
  padding: 96px 0 40px;
  border-top: 1px solid var(--border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__brand-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 16px;
  max-width: 300px;
}

.footer__heading {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer__link {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color 0.2s;
}

.footer__link:hover {
  color: var(--accent);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 400ms; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Studio Badge Icons (match brand circle icons) --- */
.studio-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1;
  padding-top: 1px;
  margin-bottom: 20px;
  position: relative;
  flex-shrink: 0;
}

.studio-badge::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2.5px solid;
  border-color: inherit;
  opacity: 0.6;
}

.studio-badge--es {
  background: rgba(212, 160, 23, 0.12);
  color: var(--studio-extension);
  border-color: var(--studio-extension);
}

.studio-badge--ls {
  background: rgba(123, 79, 175, 0.12);
  color: var(--studio-lender);
  border-color: var(--studio-lender);
}

.studio-badge--os {
  background: rgba(90, 139, 168, 0.12);
  color: var(--studio-onboarding);
  border-color: var(--studio-onboarding);
}

.studio-badge--or {
  background: rgba(232, 126, 42, 0.15);
  color: var(--studio-orchestration);
  border-color: var(--studio-orchestration);
}

.studio-badge--as {
  background: rgba(140, 198, 63, 0.12);
  color: var(--studio-arr);
  border-color: var(--studio-arr);
}

/* Large badge variant for page headers */
.studio-badge--lg {
  width: 72px;
  height: 72px;
  font-size: 1.4rem;
}

/* Nav logo with actual brand image */
.nav__logo-img {
  height: 44px;
  width: auto;
}

/* Nav logo as icon + text combo for dark backgrounds */
.nav__logo-icon {
  height: 38px;
  width: auto;
}

.nav__logo-text {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* --- Divider --- */
.divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* --- Animated Counter --- */
.counter { display: inline-block; }

/* --- Ticker / Marquee --- */
.ticker {
  overflow: hidden;
  padding: 20px 0;
  position: relative;
}

.ticker::before,
.ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
}

.ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-primary), transparent);
}

.ticker::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-primary), transparent);
}

.ticker__track {
  display: flex;
  gap: 60px;
  animation: scroll-left 30s linear infinite;
  width: max-content;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker__item {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0.7;
}

/* --- Floating Particles BG --- */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.15;
  animation: drift 20s linear infinite;
}

@keyframes drift {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% { transform: translateY(-10vh) translateX(100px); opacity: 0; }
}

/* --- Process / How Steps --- */
.process-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 40px 0;
  position: relative;
}

.process-step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--accent);
  background: var(--bg-primary);
  position: relative;
  z-index: 2;
}

.process-step__line {
  position: absolute;
  left: 47px;
  top: 96px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.process-step:last-child .process-step__line { display: none; }

.process-step__content h3 {
  margin-bottom: 12px;
  color: var(--text-primary);
}

.process-step__content p {
  font-size: 0.95rem;
}

/* --- How Timeline (horizontal connected flow) --- */
.how-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 48px;
}

/* Horizontal connecting line behind all nodes */
.how-timeline::before {
  content: '';
  position: absolute;
  top: 11px;
  left: calc(16.66%);
  right: calc(16.66%);
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), rgba(242,169,0,0.3));
  z-index: 0;
}

/* Small arrowheads on the timeline line */
.how-timeline::after {
  content: '';
  position: absolute;
  top: 6px;
  right: calc(16.66% - 6px);
  width: 0;
  height: 0;
  border-top: 5.5px solid transparent;
  border-bottom: 5.5px solid transparent;
  border-left: 7px solid rgba(242,169,0,0.35);
  z-index: 1;
}

.how-timeline__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Node: diamond shape */
.how-timeline__node {
  width: 22px;
  height: 22px;
  background: var(--accent);
  transform: rotate(45deg);
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(242,169,0,0.25);
}

/* Vertical connector from node to card */
.how-timeline__connector {
  width: 1.5px;
  height: 28px;
  background: linear-gradient(180deg, var(--accent), rgba(242,169,0,0.15));
}

/* Step card below the node */
.how-timeline__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 22px;
  text-align: center;
  width: 100%;
  max-width: 340px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
}
.how-timeline__card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.how-timeline__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.how-timeline__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Metric anchored below each step */
.how-timeline__metric {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  width: 100%;
  max-width: 340px;
}

.how-timeline__metric-value {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
}

.how-timeline__metric-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Light section overrides */
.bg-light .how-timeline__title,
.bg-light-alt .how-timeline__title {
  color: var(--text-primary);
}
.bg-light .how-timeline__desc,
.bg-light-alt .how-timeline__desc {
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .how-timeline {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .how-timeline::before,
  .how-timeline::after {
    display: none;
  }
  /* Stack each step vertically so the marker, card, and metric align cleanly */
  .how-timeline__step {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .how-timeline__node {
    width: 18px;
    height: 18px;
    align-self: center;
  }
  .how-timeline__connector {
    display: block;
    align-self: center;
    height: 16px;
  }
  .how-timeline__card,
  .how-timeline__metric { max-width: 100%; width: 100%; }
}

/* --- Team Preview Grid (homepage) --- */
.team-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .split { grid-template-columns: 1fr; gap: 48px; }
  .split--reverse { direction: ltr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .studio-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-detail { grid-template-columns: 1fr; gap: 40px; }
  .feature-detail:nth-child(even) { direction: ltr; }
  .team-preview-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Spacing overrides */
  :root {
    --section-padding: 64px;
  }
  section { padding: 64px 0; }

  /* Typography scaling — cap headings at 1.75rem */
  h1 { font-size: clamp(1.75rem, 5vw, 2.4rem); }
  h2 { font-size: clamp(1.5rem, 4vw, 1.75rem); }
  h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

  /* Navigation */
  .nav__links { display: none; }
  /* Larger tap target (~44px) + extra padding keeps the icon clear of the edge */
  .nav__hamburger { display: flex; padding: 10px; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
    z-index: 999;
  }
  .nav__dropdown-menu {
    position: static;
    transform: none;
    left: auto;
    opacity: 1;
    visibility: visible;
    border: none;
    background: transparent;
    padding: 0 0 0 16px;
    display: none;
  }
  /* Touch devices fire :hover on tap — stop the desktop centering transform
     (higher specificity) from yanking the submenu off the left edge */
  .nav__dropdown:hover .nav__dropdown-menu {
    transform: none;
    left: auto;
  }
  .nav__dropdown.open .nav__dropdown-menu {
    display: block;
  }

  /* Hero */
  .hero { min-height: auto; padding: 120px 0 60px; }
  .hero__subtitle { font-size: 1.05rem; margin-bottom: 28px; }
  .hero__actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero__actions .btn { text-align: center; justify-content: center; }
  .hero__scroll-indicator { display: none; }

  /* Page header (sub-pages) */
  .page-header { padding: 120px 0 64px; }
  .page-header__description { font-size: 1rem; }

  /* Section headers */
  .section-header { margin-bottom: 32px; }

  /* Studio grid — 2 columns at tablet */
  .studio-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Team grid — 2 columns at tablet */
  .team-preview-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .team-preview-grid img { width: 100px; height: 100px; }

  /* Feature grid */
  .feature-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Card grid gaps — normalized to 16px at tablet */
  .benefit-grid { gap: 16px; }
  .os-stats-grid { gap: 16px; }
  .team-preview-grid { gap: 16px; }

  /* Feature detail */
  .feature-detail { grid-template-columns: 1fr; gap: 32px; padding: 40px 0; }
  .feature-detail:nth-child(even) { direction: ltr; }

  /* Cards — reduce padding */
  .card { padding: 28px; }

  /* Stats */
  .stats { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 32px 0; }

  /* Footer */
  .footer { padding: 64px 0 32px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }

  /* Process steps */
  .process-step { grid-template-columns: 1fr; gap: 16px; }
  .process-step__number { width: 44px; height: 44px; font-size: 1rem; }
  .process-step__line { display: none; }

  /* CTA section */
  .cta-section__inner { padding: 40px 24px; border-radius: 16px; }

  /* Split sections — ensure visual below text */
  .split { gap: 32px; }
  .split__visual { order: 2; }
  .split__content { order: 1; }

  /* Credibility */
  .credibility { padding: 64px 0; }

  /* SVG diagrams — ensure scalable */
  svg { max-width: 100%; height: auto; }
}

@media (max-width: 390px) {
  /* Further spacing reduction */
  section { padding: 48px 0; }

  /* Typography — cap headings further */
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }
  h4 { font-size: 1rem; }

  /* Container + nav — tighter side padding, matched to prevent overflow */
  .container { padding: 0 16px; }
  .nav__inner { padding: 0 16px; }

  /* Hero */
  .hero { padding: 100px 0 40px; }
  .hero__eyebrow { font-size: 0.72rem; padding: 4px 12px; margin-bottom: 20px; }
  .hero__subtitle { font-size: 0.95rem; line-height: 1.7; }

  /* Page header */
  .page-header { padding: 100px 0 48px; }
  .page-header__eyebrow { font-size: 0.75rem; padding: 6px 14px 6px 8px; }

  /* Section header */
  .section-header { margin-bottom: 32px; }
  .section-header__description { font-size: 0.95rem; }

  /* Studio grid — single column */
  .studio-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Card grid gaps — normalized to 12px at mobile, single column */
  .feature-grid { gap: 12px; }
  .benefit-grid { grid-template-columns: 1fr; gap: 12px; }
  .os-stats-grid { grid-template-columns: 1fr; gap: 12px; }
  .team-preview-grid { gap: 12px; }

  /* Team grid — single column */
  .team-preview-grid { grid-template-columns: 1fr; gap: 12px; }
  .team-preview-grid img { width: 80px; height: 80px; }

  /* Cards */
  .card { padding: 22px 18px; border-radius: 12px; }
  .card__title { font-size: 1.05rem; }
  .card__description { font-size: 0.88rem; }

  /* Stats — single column */
  .stats { grid-template-columns: 1fr; gap: 16px; padding: 24px 0; }

  /* Buttons — full width */
  .btn { width: 100%; justify-content: center; padding: 12px 24px; font-size: 0.9rem; }
  .nav__cta-btn { padding: 8px 16px; font-size: 0.82rem; }

  /* CTA */
  .cta-section__inner { padding: 32px 18px; border-radius: 12px; }

  /* Footer */
  .footer { padding: 48px 0 24px; }
  .footer__grid { gap: 24px; margin-bottom: 32px; }
  .footer__brand-desc { font-size: 0.82rem; }

  /* Studio badge */
  .studio-badge { width: 48px; height: 48px; font-size: 1rem; }
  .studio-badge--lg { width: 60px; height: 60px; font-size: 1.2rem; }

  /* Split */
  .split { gap: 24px; }

  /* How timeline */
  .how-timeline { gap: 24px; }
  .how-timeline__card { padding: 16px; }
  .how-timeline__metric { padding: 10px 12px; }
  .how-timeline__metric-value { font-size: 1.1rem; }

  /* Feature detail */
  .feature-detail { gap: 24px; padding: 28px 0; }

  /* Ensure no horizontal overflow */
  body { overflow-x: hidden; }
  img, video, iframe, svg, canvas { max-width: 100%; }
}

/* --- Page Header (for sub-pages) --- */
.page-header {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}

.page-header__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}
.page-header--tinted .page-header__bg {
  background: linear-gradient(170deg,
    color-mix(in srgb, var(--page-accent) 85%, #0A0A0F) 0%,
    color-mix(in srgb, var(--page-accent) 45%, #0A0A0F) 50%,
    #0A0A0F 100%);
}

.page-header__content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.page-header__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 18px 8px 10px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-header__title {
  margin-bottom: 20px;
  color: var(--text-primary);
}

.page-header__description {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* --- Feature Detail (for product pages) --- */
.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 60px 0;
}

.feature-detail:nth-child(even) {
  direction: rtl;
}

.feature-detail:nth-child(even) > * {
  direction: ltr;
}

.feature-detail__content h3 {
  color: var(--text-primary);
  margin-bottom: 16px;
}

.feature-detail__visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .feature-detail { grid-template-columns: 1fr; gap: 32px; }
  .feature-detail:nth-child(even) { direction: ltr; }
}

/* --- Smooth gradient bg sections --- */
.bg-gradient {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
}

/* --- Light section theme (mixed mode) --- */
.bg-light {
  background: #F5F5F7;
}
.bg-light-alt {
  background: #EEEEF1;
}
.bg-light,
.bg-light-alt {
  color: #1A1A2E;
}
.bg-light h1, .bg-light h2, .bg-light h3, .bg-light h4,
.bg-light-alt h1, .bg-light-alt h2, .bg-light-alt h3, .bg-light-alt h4 {
  color: #1A1A2E;
}
.bg-light p, .bg-light-alt p {
  color: #4A4A5A;
}
.bg-light .section-header__eyebrow,
.bg-light-alt .section-header__eyebrow {
  color: var(--accent);
}
.bg-light .section-header__title,
.bg-light-alt .section-header__title {
  color: #1A1A2E;
}
.bg-light .section-header__description,
.bg-light-alt .section-header__description {
  color: #4A4A5A;
}
.bg-light .card,
.bg-light-alt .card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.bg-light .card:hover,
.bg-light-alt .card:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}
.bg-light .card__title,
.bg-light-alt .card__title {
  color: #1A1A2E;
}
.bg-light .card__description,
.bg-light-alt .card__description {
  color: #4A4A5A;
}
.bg-light .text-gradient,
.bg-light-alt .text-gradient {
  background: linear-gradient(135deg, #C48800 0%, #E8A800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Light section stat overrides */
.bg-light .stat__number,
.bg-light-alt .stat__number {
  color: var(--accent);
}
.bg-light .stat__label,
.bg-light-alt .stat__label {
  color: #4A4A5A;
}

/* Light section process steps */
.bg-light .process-step__number,
.bg-light-alt .process-step__number {
  border-color: var(--accent);
  color: var(--accent);
}
.bg-light .process-step__line,
.bg-light-alt .process-step__line {
  background: rgba(0, 0, 0, 0.1);
}
.bg-light .process-step__content h3,
.bg-light-alt .process-step__content h3 {
  color: #1A1A2E;
}
.bg-light .process-step__content p,
.bg-light-alt .process-step__content p {
  color: #4A4A5A;
}

/* Light section — override CSS variables locally */
.bg-light,
.bg-light-alt {
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFAFA;
  --text-primary: #1A1A2E;
  --text-secondary: #4A4A5A;
  --text-muted: #6A6A7A;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
}

/* Light section buttons */
.bg-light .btn--ghost,
.bg-light-alt .btn--ghost {
  border-color: rgba(0, 0, 0, 0.2);
  color: #1A1A2E;
}
.bg-light .btn--ghost:hover,
.bg-light-alt .btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Architecture diagram overrides for light bg */
.bg-light .arch-qg-zone,
.bg-light-alt .arch-qg-zone {
  border-color: rgba(242, 169, 0, 0.3);
  background: rgba(242, 169, 0, 0.04);
}
.bg-light .arch-legacy,
.bg-light-alt .arch-legacy {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

/* Light section card shadow refinement */
.bg-light .card,
.bg-light-alt .card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.bg-light .card:hover,
.bg-light-alt .card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* Ticker in light context */
.bg-light .ticker__item,
.bg-light-alt .ticker__item {
  color: #4A4A5A;
}

/* Insights page overrides for light sections */
.bg-light .insights-filter.active,
.bg-light-alt .insights-filter.active {
  color: #FFFFFF;
}
.bg-light .insight-card__image,
.bg-light-alt .insight-card__image,
.bg-light .insights-featured__image,
.bg-light-alt .insights-featured__image {
  background: #E8E8EC;
}

/* Contact page form overrides for light sections */
.bg-light input,
.bg-light textarea,
.bg-light select,
.bg-light-alt input,
.bg-light-alt textarea,
.bg-light-alt select {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.15);
  color: #1A1A2E;
}
.bg-light input::placeholder,
.bg-light textarea::placeholder,
.bg-light-alt input::placeholder,
.bg-light-alt textarea::placeholder {
  color: #8A8A9A;
}
.bg-light input:focus,
.bg-light textarea:focus,
.bg-light select:focus,
.bg-light-alt input:focus,
.bg-light-alt textarea:focus,
.bg-light-alt select:focus {
  border-color: var(--accent);
  outline: none;
}

/* Page header stays dark even inside light context */
.page-header {
  --text-primary: #EEEEF0;
  --text-secondary: #9999A8;
  --text-muted: #7A7A8C;
  --bg-card: #16161F;
  --border: rgba(255, 255, 255, 0.06);
}

/* Studio page-specific light overrides */
.bg-light .benefit-card,
.bg-light-alt .benefit-card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.bg-light .benefit-card:hover,
.bg-light-alt .benefit-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* --- Animated border for emphasis --- */
.glow-border {
  position: relative;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 50%, var(--accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
}

.glow-border:hover::before {
  opacity: 1;
}

/* --- Zoomable diagrams (tap-to-zoom lightbox) --- */
.zoomable-diagram {
  position: relative;
  cursor: zoom-in;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.zoomable-diagram:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.diagram-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(8, 8, 12, 0.94);
  display: none;
  flex-direction: column;
  touch-action: none;
  overscroll-behavior: contain;
}
.diagram-lightbox.open {
  display: flex;
}
.diagram-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px;
  flex-shrink: 0;
}
.diagram-lightbox__btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}
.diagram-lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.diagram-lightbox__btn--close {
  font-size: 1.6rem;
}
.diagram-lightbox__stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.diagram-lightbox__stage:active {
  cursor: grabbing;
}
.diagram-lightbox__content {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  background: #fff;
  border-radius: 6px;
}
/* Dark-panel variant for diagrams designed for a dark background */
.diagram-lightbox.is-dark .diagram-lightbox__content {
  background: #16161f;
}
.diagram-lightbox__hint {
  flex-shrink: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 8px 12px 14px;
}
