/* ============================================================
   TrueSpar Corporate Site — Layout & Components
   All colors/spacing/typography via design system tokens.

   Root font-size stays at 16px (browser default) so all token
   rem values compute correctly. Body copy uses --ts-text-md
   (16px) — the web standard for marketing content.
   ============================================================ */

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Base ─────────────────────────────────────────────────── */
html {
  font-family: var(--ts-font-sans);
  font-size: 16px;
  line-height: var(--ts-leading-normal);
  color: var(--color-text-primary);
  background: var(--color-bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--ts-duration-slow) var(--ts-ease-default),
              color var(--ts-duration-slow) var(--ts-ease-default);
}

body {
  font-size: var(--ts-text-md);
  line-height: var(--ts-leading-relaxed);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: var(--color-accent-primary);
  text-decoration: none;
  transition: color var(--ts-duration-fast) var(--ts-ease-default);
}

a:hover {
  color: var(--color-accent-primary-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  padding-left: var(--ts-space-6);
}

li {
  margin-bottom: var(--ts-space-2);
}

h1, h2, h3, h4 {
  color: var(--color-text-primary);
  font-weight: var(--ts-weight-bold);
  line-height: var(--ts-leading-tight);
  letter-spacing: var(--ts-tracking-tight);
}

h1 {
  font-size: var(--ts-text-5xl);
  font-weight: var(--ts-weight-extrabold);
  letter-spacing: var(--ts-tracking-tighter);
}

h2 {
  font-size: var(--ts-text-3xl);
  margin-bottom: var(--ts-space-4);
}

h3 {
  font-size: var(--ts-text-xl);
  margin-bottom: var(--ts-space-2);
}

h4 {
  font-size: var(--ts-text-lg);
  margin-bottom: var(--ts-space-2);
}

p {
  color: var(--color-text-secondary);
  line-height: var(--ts-leading-relaxed);
  margin-bottom: var(--ts-space-4);
}

/* ── Container ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--ts-space-6);
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--ts-z-sticky);
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  padding-top: var(--ts-space-3);
  padding-bottom: var(--ts-space-3);
  transition: padding 0.3s ease;
}

.site-header.header-scrolled {
  padding-top: 0;
  padding-bottom: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--ts-space-3);
  color: var(--color-text-primary);
  text-decoration: none;
}

.logo-link:hover {
  text-decoration: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--ts-space-10);
}

.header-wordmark {
  height: 25px;
  width: auto;
}

/* ── Main Nav ────────────────────────────────────────────── */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--ts-space-6);
}

.nav-link {
  font-size: var(--ts-text-sm);
  font-weight: var(--ts-weight-medium);
  line-height: var(--ts-leading-normal);
  color: var(--nav-text);
  text-decoration: none;
  transition: color var(--ts-duration-fast) var(--ts-ease-default);
}

.nav-link:hover {
  color: var(--nav-text-active);
  text-decoration: none;
}

.nav-link-active {
  color: var(--nav-text-active);
  position: relative;
}

.nav-link-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--nav-accent);
  border-radius: 1px;
}

/* ── Nav Dropdown (Products) ─────────────────────────────── */
.nav-dropdown {
  position: relative;
  padding-bottom: var(--ts-space-3);
  margin-bottom: calc(-1 * var(--ts-space-3));
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: var(--ts-space-1);
  padding: 0;
  font-family: var(--ts-font-sans);
  font-size: var(--ts-text-sm);
  font-weight: var(--ts-weight-medium);
  line-height: var(--ts-leading-normal);
  color: var(--nav-text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--ts-duration-fast) var(--ts-ease-default);
}

.nav-dropdown-trigger:hover {
  color: var(--nav-text-active);
}

.nav-dropdown-trigger svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
  margin-top: 1px;
  transition: transform var(--ts-duration-fast) var(--ts-ease-default);
}

.nav-dropdown:hover .nav-dropdown-trigger svg,
.nav-dropdown-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: calc(-1 * var(--ts-space-4));
  min-width: 420px;
  padding: var(--ts-space-5);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--ts-radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--ts-z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── Rich Product Link ────────────────────────────────────── */
.nav-product-link {
  display: flex;
  align-items: flex-start;
  gap: var(--ts-space-4);
  padding: var(--ts-space-4);
  border-radius: var(--ts-radius-md);
  text-decoration: none;
  transition: background-color var(--ts-duration-fast) var(--ts-ease-default);
}

.nav-product-link:hover {
  background-color: var(--color-border-subtle);
  text-decoration: none;
}

.nav-product-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--ts-radius-md);
  background: var(--color-info-bg);
  color: var(--color-accent-primary);
}

.nav-product-title {
  display: block;
  font-size: var(--ts-text-base);
  font-weight: var(--ts-weight-medium);
  color: var(--color-text-primary);
  line-height: var(--ts-leading-tight);
}

.nav-product-desc {
  display: block;
  font-size: var(--ts-text-sm);
  color: var(--color-text-muted);
  line-height: var(--ts-leading-normal);
  margin-top: var(--ts-space-1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--ts-space-3);
}

/* ── Mobile Nav Toggle ────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background-color: var(--color-text-primary);
  border-radius: 1px;
  transition: transform var(--ts-duration-normal) var(--ts-ease-default),
              opacity var(--ts-duration-normal) var(--ts-ease-default);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Theme Toggle ─────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--ts-radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color var(--ts-duration-fast) var(--ts-ease-default),
              background-color var(--ts-duration-fast) var(--ts-ease-default);
}

.theme-toggle:hover {
  color: var(--color-text-primary);
  background-color: var(--color-border-subtle);
}

[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

[data-theme="dark"] .theme-img-light { display: none; }
[data-theme="dark"] .theme-img-dark { display: block; }
[data-theme="light"] .theme-img-light { display: block; }
[data-theme="light"] .theme-img-dark { display: none; }


/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: var(--ts-space-20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-left {
  text-align: left;
}

.hero-left .hero-subtitle {
  margin-left: 0;
  margin-right: 0;
}

.hero-left .hero-actions {
  justify-content: flex-start;
}

.hero-content {
  max-width: 640px;
}

.hero-sm {
  padding: var(--ts-space-16) 0 var(--ts-space-12);
  position: relative;
}

.hero-sm::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
}

/* Homepage WebGL hero */
.hero-gradient {
  position: relative;
}

.hero-gradient .container {
  position: relative;
  z-index: 1;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-canvas-fallback {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero-bg);
}

.hero h1 {
  font-weight: var(--ts-weight-medium);
  letter-spacing: -0.01em;
  margin-bottom: var(--ts-space-6);
}

.hero-badge {
  display: inline-block;
  margin-bottom: var(--ts-space-4);
}

.hero-subtitle {
  font-size: var(--ts-text-xl);
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto var(--ts-space-8);
  line-height: var(--ts-leading-relaxed);
}

.hero-actions {
  display: flex;
  gap: var(--ts-space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--ts-space-2);
  padding: var(--ts-space-2-5) var(--ts-space-5);
  border-radius: var(--ts-radius-md);
  font-family: var(--ts-font-sans);
  font-size: var(--ts-text-sm);
  font-weight: var(--ts-weight-semibold);
  border: none;
  cursor: pointer;
  transition: all var(--ts-duration-normal) var(--ts-ease-default);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: var(--btn-primary-glow);
}

.btn-primary:hover {
  background: var(--btn-primary-bg-hover);
  color: var(--btn-primary-text);
  transform: scale(1.02);
  box-shadow: var(--glow-accent-md);
}

.btn-primary:active {
  background: var(--btn-primary-bg-active);
  transform: scale(0.98);
}

.btn-lg {
  padding: var(--ts-space-3) var(--ts-space-6);
  font-size: var(--ts-text-md);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border: 1px solid var(--btn-secondary-border);
}

.btn-secondary:hover {
  background: var(--btn-secondary-bg-hover);
  color: var(--btn-secondary-text);
}

/* ── Sections ─────────────────────────────────────────────── */
.section {
  padding: var(--ts-space-20) 0;
}

.section-surface {
  background-color: var(--color-bg-surface);
  position: relative;
}

.section-surface::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--section-fade);
  pointer-events: none;
}

.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--section-divider-color), transparent);
  margin: 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--ts-space-10);
}

.section-subtitle {
  text-align: center;
  max-width: 640px;
  margin: calc(-1 * var(--ts-space-6)) auto var(--ts-space-10);
  font-size: var(--ts-text-lg);
  color: var(--color-text-secondary);
}

/* ── Value Props ──────────────────────────────────────────── */
.value-props {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ts-space-8);
}

.value-prop {
  text-align: center;
  padding: var(--ts-space-4);
}

.value-prop h3 {
  color: var(--color-text-primary);
  margin-bottom: var(--ts-space-3);
}

.value-prop p {
  color: var(--color-text-secondary);
  font-size: var(--ts-text-base);
  margin-bottom: 0;
}

/* ── Product Cards ────────────────────────────────────────── */
.product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--ts-space-6);
}

.product-card {
  display: block;
  padding: var(--ts-space-6);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--ts-radius-xl);
  box-shadow: var(--card-shadow);
  transition: border-color var(--ts-duration-normal) var(--ts-ease-default),
              box-shadow var(--ts-duration-normal) var(--ts-ease-default),
              transform var(--ts-duration-normal) var(--ts-ease-default);
  text-decoration: none;
}

.product-card:hover {
  border-color: var(--color-accent-primary);
  box-shadow: var(--card-hover-shadow);
  transform: translateY(var(--card-hover-lift));
  text-decoration: none;
}

.product-card h3 {
  color: var(--color-text-primary);
  font-size: var(--ts-text-xl);
  margin-bottom: var(--ts-space-2);
}

.product-card p {
  color: var(--color-text-secondary);
  font-size: var(--ts-text-sm);
  margin-bottom: var(--ts-space-4);
}

.product-card-badge {
  display: inline-block;
  padding: 2px var(--ts-space-3);
  font-size: var(--ts-text-xs);
  font-weight: var(--ts-weight-semibold);
  letter-spacing: var(--ts-tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent-primary);
  background-color: var(--color-info-bg);
  border-radius: var(--ts-radius-full);
  margin-bottom: var(--ts-space-4);
}

.product-card-cta {
  color: var(--color-accent-primary);
  font-weight: var(--ts-weight-semibold);
  font-size: var(--ts-text-sm);
}

/* ── Feature Grid ─────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ts-space-6);
}

.feature-card {
  padding: var(--ts-space-6);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 2px solid transparent;
  border-radius: var(--ts-radius-lg);
  transition: border-color var(--ts-duration-normal) var(--ts-ease-default),
              box-shadow var(--ts-duration-normal) var(--ts-ease-default),
              transform var(--ts-duration-normal) var(--ts-ease-default);
}

.feature-card:hover {
  border-top-color: var(--color-accent-primary);
  box-shadow: var(--card-hover-shadow);
  transform: translateY(var(--card-hover-lift));
}

.feature-card h3 {
  color: var(--color-text-primary);
}

.feature-card p {
  color: var(--color-text-secondary);
  font-size: var(--ts-text-sm);
  margin-bottom: 0;
}

/* ── Stat Grid (Performance) ──────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ts-space-8);
  text-align: center;
}

.stat-number {
  font-size: var(--ts-text-4xl);
  font-weight: var(--ts-weight-extrabold);
  background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: var(--ts-leading-tight);
  margin-bottom: var(--ts-space-2);
}

.stat-label {
  font-size: var(--ts-text-base);
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

.stat-detail {
  font-size: var(--ts-text-sm);
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* ── Browser Frame ───────────────────────────────────────── */
.browser-frame {
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--ts-radius-xl);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--card-border);
}

.browser-frame-bar {
  display: flex;
  align-items: center;
  gap: var(--ts-space-2);
  padding: var(--ts-space-3) var(--ts-space-4);
  background: var(--color-bg-surface);
  border-bottom: 1px solid var(--card-border);
}

.browser-frame-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--ts-radius-full);
  background: var(--color-border-subtle);
}

.browser-frame img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: auto;
}

/* ── Text Gradient ────────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-secondary), var(--color-accent-primary-hover));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Icon Container ──────────────────────────────────────── */
.icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--ts-radius-full);
  background: var(--color-info-bg);
  color: var(--color-accent-primary);
  margin: 0 auto var(--ts-space-4);
}

/* ── CTA Block ────────────────────────────────────────────── */
.cta-block {
  text-align: center;
  border-top: 1px solid var(--color-border-subtle);
  padding-top: var(--ts-space-10);
}

.cta-block h2 {
  margin-bottom: var(--ts-space-3);
}

.cta-block p {
  max-width: 480px;
  margin: 0 auto var(--ts-space-8);
}

/* ── Pricing ──────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ts-space-6);
  align-items: start;
}

.pricing-card {
  padding: var(--ts-space-6);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--ts-radius-xl);
  text-align: center;
  transition: box-shadow var(--ts-duration-normal) var(--ts-ease-default),
              transform var(--ts-duration-normal) var(--ts-ease-default);
}

.pricing-card:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(var(--card-hover-lift));
}

.pricing-card-featured {
  border-color: var(--color-accent-primary);
  box-shadow: var(--pricing-featured-glow);
}

.pricing-card h3 {
  font-size: var(--ts-text-xl);
  margin-bottom: var(--ts-space-3);
}

.pricing-price {
  font-size: var(--ts-text-4xl);
  font-weight: var(--ts-weight-extrabold);
  color: var(--color-text-primary);
  margin-bottom: var(--ts-space-6);
}

.pricing-price span {
  font-size: var(--ts-text-base);
  font-weight: var(--ts-weight-normal);
  color: var(--color-text-muted);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin-bottom: var(--ts-space-6);
  text-align: left;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: var(--ts-space-2);
  padding: var(--ts-space-2) 0;
  font-size: var(--ts-text-base);
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border-subtle);
}

.pricing-check {
  color: var(--color-success);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-card .btn {
  width: 100%;
}

/* ── Content ──────────────────────────────────────────────── */
.content-narrow {
  max-width: 720px;
  margin: 0 auto;
}

.content-narrow h2 {
  margin-top: var(--ts-space-10);
}

.content-narrow h2:first-child {
  margin-top: 0;
}

/* ── Contact ──────────────────────────────────────────────── */
.contact-info {
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ts-space-6);
}

.contact-grid .feature-card {
  text-align: center;
}

.contact-grid .feature-card h3 {
  margin-bottom: var(--ts-space-2);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background-color: var(--color-bg-surface);
  border-top: 1px solid var(--color-border-subtle);
  padding-top: var(--ts-space-12);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: var(--ts-space-12);
  padding-bottom: var(--ts-space-12);
}

.footer-brand {
  max-width: 280px;
}

.footer-mark {
  width: 32px;
  height: 32px;
  padding: 3px;
  background: var(--color-accent-primary);
  border-radius: var(--ts-radius-md);
  margin-bottom: var(--ts-space-3);
  color: var(--color-text-inverse);
}

.footer-mark svg {
  width: 100%;
  height: 100%;
}

.footer-tagline {
  font-size: var(--ts-text-sm);
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  gap: var(--ts-space-16);
}

.footer-col h4 {
  font-size: var(--ts-text-xs);
  font-weight: var(--ts-weight-bold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--ts-tracking-widest);
  margin-bottom: var(--ts-space-4);
}

.footer-col a {
  display: block;
  font-size: var(--ts-text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--ts-space-2);
}

.footer-col a:hover {
  color: var(--color-text-primary);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--color-border-subtle);
  padding: var(--ts-space-5) 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: var(--ts-text-xs);
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: var(--ts-space-4);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: color var(--ts-duration-fast) var(--ts-ease-default),
              transform var(--ts-duration-fast) var(--ts-ease-default);
}

.footer-social a:hover {
  color: var(--color-accent-primary);
  transform: scale(1.1);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

/* ── Scroll Reveal ───────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--ts-reveal-distance));
  transition: opacity var(--ts-duration-reveal) var(--ts-ease-reveal),
              transform var(--ts-duration-reveal) var(--ts-ease-reveal);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .value-props,
  .feature-grid,
  .pricing-grid,
  .contact-grid,
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 { font-size: var(--ts-text-3xl); }
  h2 { font-size: var(--ts-text-2xl); }

  .hero { padding: var(--ts-space-12) 0; }
  .hero-sm { padding: var(--ts-space-10) 0 var(--ts-space-8); }
  .hero-subtitle { font-size: var(--ts-text-lg); }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--nav-bg);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid var(--nav-border);
    padding: var(--ts-space-4) var(--ts-space-6);
    gap: var(--ts-space-1);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav > .nav-link {
    padding: var(--ts-space-3) 0;
  }

  .nav-toggle {
    display: flex;
  }

  .value-props,
  .feature-grid,
  .pricing-grid,
  .contact-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .icon-container {
    width: 40px;
    height: 40px;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--ts-space-8);
  }

  .footer-links {
    gap: var(--ts-space-8);
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: var(--ts-space-3);
    text-align: center;
  }
}

/* ── Shared Content ───────────────────────────────────────── */
.shared-content-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--ts-radius-lg);
  overflow: hidden;
}

.shared-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ts-space-3) var(--ts-space-4);
  border-bottom: 1px solid var(--color-border-default);
}

.shared-content-badge {
  font-size: var(--ts-text-xs);
  font-weight: var(--ts-weight-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
}

.shared-content-copy {
  font-size: var(--ts-text-sm);
  padding: var(--ts-space-1-5) var(--ts-space-3);
}

/* ── Documentation ────────────────────────────────────────── */
.docs-wrapper {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--ts-space-6);
  min-height: calc(100vh - 200px);
}

.docs-sidebar {
  position: sticky;
  top: 88px;
  width: 260px;
  flex-shrink: 0;
  height: calc(100vh - 88px);
  overflow-y: auto;
  padding: var(--ts-space-6) var(--ts-space-6) var(--ts-space-6) 0;
  border-right: 1px solid var(--color-border-subtle);
}

.docs-sidebar-toggle {
  display: none;
}

.docs-version-badge {
  display: inline-block;
  padding: 2px var(--ts-space-3);
  font-size: var(--ts-text-xs);
  font-weight: var(--ts-weight-semibold);
  letter-spacing: var(--ts-tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent-primary);
  background-color: var(--color-info-bg);
  border-radius: var(--ts-radius-full);
  margin-bottom: var(--ts-space-4);
}

.docs-nav-heading {
  font-size: 0.6875rem;
  font-weight: var(--ts-weight-semibold);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--ts-space-3) var(--ts-space-3) var(--ts-space-1);
  margin-top: var(--ts-space-2);
}

.docs-nav-link {
  display: block;
  padding: var(--ts-space-2) var(--ts-space-3);
  font-size: var(--ts-text-sm);
  font-weight: var(--ts-weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--ts-radius-md);
  transition: color var(--ts-duration-fast) var(--ts-ease-default),
              background-color var(--ts-duration-fast) var(--ts-ease-default);
}

.docs-nav-link:hover {
  color: var(--color-text-primary);
  background-color: var(--color-border-subtle);
  text-decoration: none;
}

.docs-nav-link-active {
  color: var(--color-accent-primary);
  background-color: var(--color-info-bg);
}

.docs-nav-link-active:hover {
  color: var(--color-accent-primary);
  background-color: var(--color-info-bg);
}

.docs-content {
  flex: 1;
  min-width: 0;
  max-width: 820px;
  padding: var(--ts-space-8) var(--ts-space-10);
}

.docs-content h1 {
  font-size: var(--ts-text-3xl);
  margin-bottom: var(--ts-space-2);
}

.docs-content h2 {
  font-size: var(--ts-text-2xl);
  margin-top: var(--ts-space-10);
  margin-bottom: var(--ts-space-4);
  padding-top: var(--ts-space-4);
  border-top: 1px solid var(--color-border-subtle);
}

.docs-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.docs-content h3 {
  font-size: var(--ts-text-lg);
  margin-top: var(--ts-space-6);
  margin-bottom: var(--ts-space-3);
}

.docs-content h4 {
  font-size: var(--ts-text-base);
  margin-top: var(--ts-space-4);
  margin-bottom: var(--ts-space-2);
}

.docs-content p {
  margin-bottom: var(--ts-space-4);
}

.docs-content ul,
.docs-content ol {
  margin-bottom: var(--ts-space-4);
}

.docs-content pre {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--ts-radius-md);
  padding: var(--ts-space-4);
  overflow-x: auto;
  margin-bottom: var(--ts-space-4);
  font-family: var(--ts-font-mono);
  font-size: var(--ts-text-sm);
  line-height: var(--ts-leading-relaxed);
  color: var(--color-text-primary);
}

.docs-content code {
  font-family: var(--ts-font-mono);
  font-size: 0.9em;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: 3px;
  padding: 1px 5px;
}

.docs-content pre code {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: inherit;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--ts-space-4);
  font-size: var(--ts-text-sm);
}

.docs-content th,
.docs-content td {
  padding: var(--ts-space-2) var(--ts-space-3);
  border: 1px solid var(--color-border-subtle);
  text-align: left;
}

.docs-content th {
  background: var(--color-bg-surface);
  font-weight: var(--ts-weight-semibold);
  color: var(--color-text-primary);
}

.docs-content td {
  color: var(--color-text-secondary);
}

.docs-callout {
  padding: var(--ts-space-4);
  border-radius: var(--ts-radius-md);
  margin-bottom: var(--ts-space-4);
  border-left: 3px solid var(--color-accent-primary);
  background: var(--color-info-bg);
}

.docs-callout p:last-child {
  margin-bottom: 0;
}

.docs-callout-warn {
  border-left-color: var(--color-warning, #e2a336);
}

.docs-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border-subtle);
  margin-bottom: 0;
}

.docs-tab {
  padding: var(--ts-space-2) var(--ts-space-4);
  font-size: var(--ts-text-sm);
  font-weight: var(--ts-weight-medium);
  color: var(--color-text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color var(--ts-duration-fast) var(--ts-ease-default),
              border-color var(--ts-duration-fast) var(--ts-ease-default);
}

.docs-tab:hover {
  color: var(--color-text-primary);
}

.docs-tab-active {
  color: var(--color-accent-primary);
  border-bottom-color: var(--color-accent-primary);
}

.docs-tab-panel {
  display: none;
  padding-top: var(--ts-space-4);
}

.docs-tab-panel-active {
  display: block;
}

.docs-lead {
  font-size: var(--ts-text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--ts-space-6);
}

@media (max-width: 768px) {
  .docs-wrapper {
    flex-direction: column;
    padding: 0 var(--ts-space-4);
  }

  .docs-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--ts-space-3) var(--ts-space-4);
    margin-top: var(--ts-space-3);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--ts-radius-md);
    font-family: var(--ts-font-sans);
    font-size: var(--ts-text-sm);
    font-weight: var(--ts-weight-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
  }

  .docs-sidebar-toggle svg {
    transition: transform var(--ts-duration-fast) var(--ts-ease-default);
  }

  .docs-sidebar-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .docs-sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border-subtle);
    padding: 0 0 var(--ts-space-4);
    display: none;
  }

  .docs-sidebar.open {
    display: block;
  }

  .docs-content {
    padding: var(--ts-space-6) 0;
  }
}

/* ── Shared Content ───────────────────────────────────────── */
.shared-content-code {
  margin: 0;
  padding: var(--ts-space-5) var(--ts-space-5);
  font-family: var(--ts-font-mono);
  font-size: var(--ts-text-sm);
  line-height: var(--ts-leading-relaxed);
  color: var(--color-text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
