/* ==========================================================================
   WorkForce Marketing Site — Design System
   Brand palette lifted from the product mark (navy / teal / amber) so the
   marketing site and the product apps read as one family.
   ========================================================================== */

:root {
  /* Color */
  --navy-950: #0b1f33;
  --navy-900: #0f2740;
  --navy-800: #15304c;
  --navy-700: #1d3d5e;
  --teal-300: #7fe3d4;
  --teal-400: #2fd6c2;
  --teal-500: #19b7a5;
  --teal-600: #129384;
  --amber-300: #f8cd76;
  --amber-400: #f4b942;
  --amber-500: #dfa22a;
  --ink-900: #0b1220;
  --ink-700: #33404f;
  --ink-500: #5b6b7c;
  --ink-400: #7c8aa0;
  --paper-0: #ffffff;
  --paper-50: #f6f8fa;
  --paper-100: #eef2f6;
  --paper-200: #e2e8f0;
  --border: #e2e8f0;
  --danger: #d64545;
  --navbar-bg: rgba(255, 255, 255, 0.82);

  /* Deliberately never flip with the theme toggle: .section-dark is a permanently-dark surface
     (built from the fixed navy-* hues) regardless of site theme, so its own text needs a
     permanently-light color too - using the flipping --paper-0/--paper-50 there was a real bug
     (dark-on-dark, near-invisible, once dark theme flipped them to near-black). */
  --paper-0-fixed: #ffffff;
  --paper-50-fixed: #f6f8fa;

  /* Typography */
  --font-display: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Arabic", "Noto Sans SC", "Noto Sans JP", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Arabic", "Noto Sans SC", "Noto Sans JP", sans-serif;

  /* Spacing */
  --space-2xs: 0.375rem;
  --space-xs: 0.75rem;
  --space-sm: 1.25rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4.5rem;
  --space-2xl: 6.5rem;

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Shadow (navy-tinted, soft) */
  --shadow-sm: 0 2px 8px -2px rgba(11, 31, 51, 0.12);
  --shadow-md: 0 16px 40px -16px rgba(11, 31, 51, 0.22);
  --shadow-lg: 0 24px 64px -20px rgba(11, 31, 51, 0.28);

  --container-w: 1240px;
  --transition: 220ms cubic-bezier(0.2, 0.7, 0.3, 1);

  color-scheme: light;
}

/* ==========================================================================
   Dark theme — auto-selected from the browser/OS (prefers-color-scheme) by
   default; a manual toggle (site.js) can force either theme via
   [data-theme], persisted in localStorage, and always wins over the system
   setting in both directions. Only the semantic paper-, ink- and border-
   token families flip — the brand hues (navy-, teal-, amber-) stay fixed in both themes.
   The .section-dark islands are a separate, permanently-dark surface built
   from those fixed hues; they use --paper-0-fixed/--paper-50-fixed (defined
   once, above, never flipping) for their own text rather than these
   flipping tokens, which would otherwise go dark-on-dark once this block
   activates - that combination was a real, confirmed contrast bug (WCAG
   ~1:1, effectively invisible) fixed alongside this one.
   ink-400 is bumped further than a simple flip (matching ink-500's value)
   because ink-400's own base value already fails WCAG AA in light mode
   (checked and confirmed 3.1-3.5:1 against every paper-* background, an
   existing gap this pass doesn't otherwise touch) - flipping it verbatim
   would carry that failure into dark mode too (2.75-3.93:1), so dark mode
   gets a value that actually passes (4.6-7.3:1) instead.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink-900: #f1f5f9;
    --ink-700: #c7d2de;
    --ink-500: #94a3b8;
    --ink-400: #94a3b8;
    --paper-0: #0b1220;
    --paper-50: #111a2e;
    --paper-100: #16223a;
    --paper-200: #22314a;
    --border: #22314a;
    --navbar-bg: rgba(11, 18, 32, 0.82);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink-900: #f1f5f9;
  --ink-700: #c7d2de;
  --ink-500: #94a3b8;
  --ink-400: #94a3b8;
  --paper-0: #0b1220;
  --paper-50: #111a2e;
  --paper-100: #16223a;
  --paper-200: #22314a;
  --border: #22314a;
  --navbar-bg: rgba(11, 18, 32, 0.82);
  color-scheme: dark;
}

/* .stat-value's gradient-clipped-to-text effect (below) has a navy-950 stop that would read as
   near-invisible against a dark background - swap it for a lighter stop in dark mode so the
   gradient itself stays legible, not just its plain-color fallback. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stat-value { background-image: linear-gradient(135deg, var(--teal-300), var(--teal-600)); }
}
:root[data-theme="dark"] .stat-value { background-image: linear-gradient(135deg, var(--teal-300), var(--teal-600)); }

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper-0);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

button { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

/* RTL: flip horizontal-only decorative elements that logical properties can't reach */
body.rtl .flip-rtl { transform: scaleX(-1); }
body.rtl .hero-blob { transform: scaleX(-1); }

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: var(--space-2xl);
}

.section-tight { padding-block: var(--space-xl); }

.section-dark {
  background: radial-gradient(120% 140% at 15% 0%, var(--navy-800) 0%, var(--navy-950) 60%);
  color: var(--paper-50-fixed);
}

.section-dark h2, .section-dark h3, .section-dark h1 { color: var(--paper-0-fixed); }

.section-alt { background: var(--paper-50); }

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Typography helpers
   ========================================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-600);
}

.section-dark .eyebrow { color: var(--teal-300); }

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.display-xl {
  font-size: clamp(2.5rem, 5vw + 1rem, 3.75rem);
  font-weight: 700;
}

.display-lg { font-size: clamp(2rem, 3.4vw + 1rem, 2.75rem); font-weight: 700; }

.display-md { font-size: clamp(1.5rem, 1.6vw + 1rem, 1.875rem); font-weight: 700; }

.lead {
  font-size: 1.125rem;
  color: var(--ink-500);
  line-height: 1.7;
}

.section-dark .lead { color: rgba(246, 248, 250, 0.78); }

.section-header {
  max-width: 640px;
  margin-bottom: var(--space-lg);
}

.section-header.centered { margin-inline: auto; text-align: center; }

.section-header .eyebrow { margin-bottom: var(--space-xs); }

.section-header h2 { margin-bottom: var(--space-xs); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.85em 1.6em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: var(--paper-0);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-md); }

.btn-secondary {
  background: transparent;
  border-color: var(--paper-200);
  color: var(--ink-900);
}
.btn-secondary:hover { border-color: var(--teal-500); color: var(--teal-600); }

.section-dark .btn-secondary { border-color: rgba(246, 248, 250, 0.3); color: var(--paper-0-fixed); }
.section-dark .btn-secondary:hover { border-color: var(--teal-300); color: var(--teal-300); }

.btn-ghost {
  background: transparent;
  color: var(--ink-900);
  padding-inline: 0.4em;
}
.btn-ghost:hover { color: var(--teal-600); transform: none; }

.btn-block { width: 100%; }
.btn-sm { padding: 0.6em 1.2em; font-size: 0.875rem; }

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.navbar.is-scrolled {
  border-color: var(--border);
  box-shadow: 0 4px 24px -12px rgba(11, 31, 51, 0.15);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink-900);
}

.brand img { width: 34px; height: 34px; border-radius: 9px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink-700);
  position: relative;
  padding-block: 0.3rem;
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--ink-900); }

.nav-links a.active { color: var(--teal-600); }

.nav-links a.active::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -6px;
  height: 2px;
  background: var(--teal-500);
  border-radius: 2px;
}

.nav-right { display: flex; align-items: center; gap: var(--space-sm); }

.nav-utility-desktop { display: flex; align-items: center; gap: var(--space-sm); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--ink-900);
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta-desktop { display: none; }
  /* Only the hamburger stays in the top bar on mobile - ThemeToggle/LanguageSwitcher move down
     into .mobile-menu (.nav-utility-mobile below), otherwise their combined width overflows the
     row and pushes the hamburger itself off-screen. See the comment in NavMenu.razor. */
  .nav-utility-desktop { display: none; }
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-sm) 0 var(--space-md);
  border-top: 1px solid var(--border);
}

.mobile-menu.is-open { display: flex; }

/* Direct children only - .nav-utility-mobile's LanguageSwitcher renders its own <a class="lang-option">
   dropdown items nested inside this same column, which must keep their own .lang-option styling
   (site.css "Language switcher" section), not the mobile nav-link look meant for the links above. */
.mobile-menu > a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  padding-block: 0.5rem;
  color: var(--ink-900);
}

.nav-utility-mobile {
  display: none;
}

@media (max-width: 900px) {
  .nav-utility-mobile {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
  }
}

/* ==========================================================================
   Theme toggle
   ========================================================================== */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--paper-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--ink-900);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  flex: none;
}

.section-dark .theme-toggle,
.footer .theme-toggle {
  background: rgba(246, 248, 250, 0.08);
  border-color: rgba(246, 248, 250, 0.18);
  color: var(--paper-0);
}

.theme-toggle:hover { border-color: var(--teal-500); color: var(--teal-600); }
.section-dark .theme-toggle:hover,
.footer .theme-toggle:hover { color: var(--teal-300); }

/* Icon visibility is decided purely by CSS from the same [data-theme]/prefers-color-scheme
   condition the color tokens use above, so the icon is never one frame out of sync with the
   theme it represents — no JS dependency for correctness, only for the click itself. */
.theme-toggle .theme-icon-sun { display: none; }
.theme-toggle .theme-icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .theme-icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .theme-icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }

/* ==========================================================================
   Language switcher
   ========================================================================== */

.lang-switcher { position: relative; }

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--paper-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.5em 0.9em;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-900);
  cursor: pointer;
  transition: border-color var(--transition);
}

.lang-trigger:hover { border-color: var(--teal-500); }

.lang-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 0.6rem);
  background: var(--paper-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 220px;
  display: none;
  z-index: 50;
  max-height: 70vh;
  overflow-y: auto;
}

.lang-switcher.is-open .lang-menu { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--ink-700);
  transition: background var(--transition);
}

.lang-option:hover { background: var(--paper-50); }

.lang-option.active { color: var(--teal-600); font-weight: 600; background: rgba(25, 183, 165, 0.08); }

.lang-native { color: var(--ink-400); font-size: 0.8125rem; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-2xl) var(--space-xl);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
  z-index: 2;
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-blob {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60vw;
  max-width: 900px;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(47, 214, 194, 0.35), transparent 70%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}

.hero-actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-block: var(--space-md); }

.hero-trust {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-400);
}

.hero-trust .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-400); }

.hero-illustration {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Stat strip
   ========================================================================== */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  padding-block: var(--space-lg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 720px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

.stat-badge { text-align: center; }

.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2vw + 0.8rem, 2.25rem);
  color: var(--ink-900);
  background: linear-gradient(135deg, var(--navy-950), var(--teal-600));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label { font-size: 0.875rem; color: var(--ink-500); margin-top: 0.25rem; }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--paper-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(25, 183, 165, 0.35);
}

.icon-tile {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(25, 183, 165, 0.14), rgba(244, 185, 66, 0.14));
  color: var(--teal-600);
  margin-bottom: var(--space-sm);
}

.icon-tile svg { width: 26px; height: 26px; }

.module-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }

.module-card .module-tagline {
  color: var(--ink-500);
  font-size: 0.9375rem;
  margin-bottom: var(--space-xs);
}

.module-card .bullets { display: flex; flex-direction: column; gap: 0.5rem; margin-top: var(--space-xs); }

.bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--ink-700);
  line-height: 1.55;
}

.bullets li svg { flex: none; width: 18px; height: 18px; margin-top: 0.15rem; color: var(--teal-500); }

.module-price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-900);
  margin-top: var(--space-sm);
}

.module-price-tag .unit { font-size: 0.75rem; font-weight: 500; color: var(--ink-400); }

/* ==========================================================================
   Value points (home "why" grid)
   ========================================================================== */

.point-card { display: flex; gap: var(--space-sm); align-items: flex-start; }

.point-card .icon-tile { margin-bottom: 0; flex: none; }

.point-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }

.point-card p { color: var(--ink-500); font-size: 0.9375rem; }

.section-dark .point-card p { color: rgba(246, 248, 250, 0.7); }
.section-dark .point-card h3 { color: var(--paper-0-fixed); }
.section-dark .icon-tile { background: rgba(47, 214, 194, 0.16); color: var(--teal-300); }

/* ==========================================================================
   How it works
   ========================================================================== */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); counter-reset: step; }

@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.step { position: relative; padding-inline-start: 3.5rem; }

.step-number {
  position: absolute;
  inset-inline-start: 0;
  top: -0.2rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-500), var(--navy-800));
  color: var(--paper-0);
  font-family: var(--font-display);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.step p { color: var(--ink-500); font-size: 0.9375rem; }

/* ==========================================================================
   Pricing tiers
   ========================================================================== */

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  align-items: stretch;
}

@media (max-width: 960px) { .tier-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

.tier-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  position: relative;
}

.tier-card.is-highlighted {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, rgba(25, 183, 165, 0.05), transparent 30%);
}

.tier-badge {
  position: absolute;
  top: -0.9rem;
  inset-inline-start: var(--space-md);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
  color: var(--navy-950);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4em 0.9em;
  border-radius: var(--radius-pill);
}

.tier-name { font-size: 1.3rem; margin-bottom: 0.4rem; }
.tier-tagline { color: var(--ink-500); font-size: 0.9rem; min-height: 2.7em; }

.tier-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.25rem;
  color: var(--ink-900);
  margin-block: var(--space-sm) 0.15rem;
}

.tier-price small { font-size: 0.95rem; font-weight: 500; color: var(--ink-400); margin-inline-start: 0.3rem; }
.tier-price-from { font-size: 0.8125rem; font-weight: 600; color: var(--teal-600); text-transform: uppercase; letter-spacing: 0.06em; }

.tier-modules { margin-block: var(--space-md); display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }

.tier-cta { margin-top: auto; }

/* ==========================================================================
   Plan builder
   ========================================================================== */

.builder {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-lg);
  align-items: start;
}

@media (max-width: 960px) { .builder { grid-template-columns: 1fr; } }

.builder-modules { display: flex; flex-direction: column; gap: var(--space-sm); }

.module-toggle-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--paper-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  transition: border-color var(--transition), background var(--transition);
}

.module-toggle-row.is-active {
  border-color: var(--teal-500);
  background: rgba(25, 183, 165, 0.05);
}

.module-toggle-row .icon-tile { width: 44px; height: 44px; margin-bottom: 0; flex: none; }
.module-toggle-row .icon-tile svg { width: 22px; height: 22px; }

.module-toggle-info { flex: 1; min-width: 0; }
.module-toggle-info h4 { font-size: 0.98rem; margin-bottom: 0.15rem; }
.module-toggle-info p { font-size: 0.85rem; color: var(--ink-500); }

.module-toggle-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-900);
  white-space: nowrap;
}

/* Accessible custom switch */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.switch-track {
  position: absolute;
  inset: 0;
  background: var(--paper-200);
  border-radius: var(--radius-pill);
  transition: background var(--transition);
}

.switch-thumb {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 20px;
  height: 20px;
  background: var(--paper-0);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: inset-inline-start var(--transition);
}

.switch input:checked ~ .switch-track { background: var(--teal-500); }
.switch input:checked ~ .switch-thumb { inset-inline-start: 23px; }
.switch input:focus-visible ~ .switch-track { outline: 2px solid var(--teal-500); outline-offset: 2px; }

/* Permanently-dark surface (background: var(--navy-950), a fixed hue) - same reasoning as
   .footer above, so its own text needs --paper-0-fixed, not the flipping --paper-0. */
.builder-summary {
  position: sticky;
  top: 6.5rem;
  background: var(--navy-950);
  color: var(--paper-0-fixed);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
}

.builder-summary h3 { color: var(--paper-0-fixed); font-size: 1.1rem; margin-bottom: var(--space-xs); }

.builder-summary .core-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: rgba(246, 248, 250, 0.7);
  padding-block: 0.5rem;
  border-bottom: 1px solid rgba(246, 248, 250, 0.12);
}

.builder-selected-list { margin-block: var(--space-sm); display: flex; flex-direction: column; gap: 0.4rem; }

.builder-selected-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: rgba(246, 248, 250, 0.85);
}

.builder-total {
  border-top: 1px solid rgba(246, 248, 250, 0.16);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
}

.builder-total .amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  display: block;
  background: linear-gradient(135deg, var(--teal-300), var(--paper-0-fixed));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.builder-total .unit { font-size: 0.8125rem; color: rgba(246, 248, 250, 0.6); }

.builder-note {
  font-size: 0.8125rem;
  color: rgba(246, 248, 250, 0.55);
  margin-top: var(--space-sm);
  line-height: 1.6;
}

.disclaimer-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: rgba(244, 185, 66, 0.12);
  border: 1px solid rgba(244, 185, 66, 0.4);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  font-size: 0.875rem;
  color: var(--ink-700);
  margin-bottom: var(--space-lg);
}

.disclaimer-banner svg { flex: none; width: 20px; height: 20px; color: var(--amber-500); margin-top: 0.1rem; }

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 760px; margin-inline: auto; }

.faq-item {
  background: var(--paper-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-display);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary .chev { transition: transform var(--transition); flex: none; width: 18px; height: 18px; color: var(--teal-500); }

.faq-item[open] summary .chev { transform: rotate(180deg); }

.faq-item .faq-body { padding: 0 var(--space-md) var(--space-md); color: var(--ink-500); font-size: 0.9375rem; line-height: 1.65; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }

@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field.full { grid-column: 1 / -1; }

.form-field label { font-size: 0.875rem; font-weight: 600; color: var(--ink-900); }

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 0.75em 0.9em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--paper-200);
  background: var(--paper-50);
  color: var(--ink-900);
  transition: border-color var(--transition), background var(--transition);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  background: var(--paper-0);
}

.form-success {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: rgba(25, 183, 165, 0.1);
  border: 1px solid rgba(25, 183, 165, 0.35);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  font-size: 0.875rem;
  color: var(--ink-900);
  margin-top: var(--space-sm);
}

.form-success svg { flex: none; width: 20px; height: 20px; color: var(--teal-600); margin-top: 0.1rem; }

.form-error {
  background: rgba(214, 69, 69, 0.1);
  border: 1px solid rgba(214, 69, 69, 0.35);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  font-size: 0.875rem;
  color: var(--ink-900);
  margin-top: var(--space-sm);
}

.chip-checkbox-group { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.chip-checkbox {
  position: relative;
  display: inline-flex;
}

.chip-checkbox input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  margin: 0;
}

.chip-checkbox span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--paper-200);
  background: var(--paper-50);
  border-radius: var(--radius-pill);
  padding: 0.5em 1em;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-700);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.chip-checkbox input:checked ~ span {
  border-color: var(--teal-500);
  background: rgba(25, 183, 165, 0.1);
  color: var(--teal-600);
}

.chip-checkbox input:focus-visible ~ span { outline: 2px solid var(--teal-500); outline-offset: 2px; }

.form-note {
  font-size: 0.8125rem;
  color: var(--ink-400);
  background: var(--paper-50);
  border: 1px dashed var(--paper-200);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
}

/* ==========================================================================
   CTA banner
   ========================================================================== */

.cta-banner {
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner .cta-actions { display: flex; justify-content: center; gap: var(--space-sm); flex-wrap: wrap; margin-top: var(--space-md); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--navy-950);
  color: rgba(246, 248, 250, 0.75);
  padding-block: var(--space-xl) var(--space-md);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(246, 248, 250, 0.12);
}

@media (max-width: 820px) { .footer-top { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

/* .footer is a permanently-dark surface (background: var(--navy-950), a fixed hue that never
   flips) - same as .section-dark above, so its own text needs --paper-0-fixed, not the flipping
   --paper-0 (which goes near-black in dark theme: dark-on-dark, the same bug already fixed for
   .section-dark, just missed here). */
.footer-brand .brand { color: var(--paper-0-fixed); }
.footer-brand p { margin-top: var(--space-xs); font-size: 0.9rem; max-width: 320px; color: rgba(246, 248, 250, 0.6); }

.footer h4 { color: var(--paper-0-fixed); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-sm); }

.footer ul { display: flex; flex-direction: column; gap: 0.6rem; }

.footer a { font-size: 0.9rem; transition: color var(--transition); }
.footer a:hover { color: var(--teal-300); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  font-size: 0.8125rem;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: rgba(246, 248, 250, 0.45);
  max-width: 900px;
  margin-top: var(--space-sm);
  line-height: 1.6;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Applied (alongside is-visible) only to elements revealed synchronously because they were already
   on screen when the page loaded (site.js's isNearViewport) - skips the transition entirely so this
   never becomes a second compositor animation racing the browser's own scroll-to-fragment handling.
   See the "reveal-instant" comment in site.js for the full reasoning. */
.reveal.reveal-instant { transition: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card-hover:hover { transform: none; }
}

/* ==========================================================================
   Misc
   ========================================================================== */

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--paper-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.4em 0.9em;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-700);
}

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }

.icon { width: 20px; height: 20px; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 28px; height: 28px; }

.divider { height: 1px; background: var(--border); border: none; margin-block: var(--space-lg); }

.not-found {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-sm);
  padding-block: var(--space-2xl);
}

/* ==========================================================================
   Live AI demo widget — "Talk to Sales"
   Same voice/text browser demo VoiceCore's own marketing site offers
   (WebRTC in-browser call, no phone number needed), restyled with this
   site's own navy/teal/amber tokens instead of VoiceCore's palette. See
   wwwroot/js/demo-widget.js for the behavior; markup lives in Home.razor.
   ========================================================================== */

.demo-widget {
  position: relative;
  max-width: 480px;
  margin-inline: auto;
  background: var(--paper-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-sm);
  box-shadow: var(--shadow-lg);
  text-align: start;
}
.demo-widget::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(135deg, var(--teal-500), var(--amber-400));
}
.demo-widget h3 { margin: 0 0 0.25em; font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; text-align: center; }
.demo-widget p.demo-sub { text-align: center; color: var(--ink-500); font-size: 0.875rem; margin: 0 0 var(--space-sm); }

.demo-form { display: flex; gap: var(--space-2xs); }
.demo-form input[type="tel"], .demo-form input[type="text"] {
  flex: 1;
  padding: 0.8em 1em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--paper-50);
  color: var(--ink-900);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.demo-form input[type="tel"]:focus, .demo-form input[type="text"]:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(25, 183, 165, 0.18);
}
.demo-form input[type="tel"]::placeholder, .demo-form input[type="text"]::placeholder { color: var(--ink-400); }

.demo-disclaimer { font-size: 0.75rem; color: var(--ink-400); margin: var(--space-xs) 0 0; text-align: center; line-height: 1.6; }

.demo-status { display: none; text-align: center; padding: var(--space-xs) 0; }
.demo-status.active { display: block; }
.demo-status .pulse-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal-500);
  margin-inline-end: 0.5em;
  animation: demo-pulse 1.2s ease-in-out infinite;
}
@keyframes demo-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.demo-status.error .pulse-dot { background: var(--danger); animation: none; }
.demo-status.done .pulse-dot { background: var(--teal-500); animation: none; }
.demo-status-text { font-size: 0.9375rem; font-weight: 600; color: var(--ink-900); }
.demo-status-detail { font-size: 0.8125rem; color: var(--ink-500); margin-top: 0.25em; }

.demo-mode-tabs {
  display: flex;
  gap: 0.375rem;
  margin-bottom: var(--space-sm);
  background: var(--paper-50);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-sm) + 2px);
  padding: 0.25rem;
}
.demo-mode-tab {
  flex: 1;
  padding: 0.6em 0;
  border: none;
  background: transparent;
  color: var(--ink-500);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.demo-mode-tab.active { background: var(--paper-0); color: var(--ink-900); box-shadow: var(--shadow-sm); }
.demo-panel { display: block; }

.demo-call-bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75em 1em;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  background: var(--paper-50);
  border: 1px solid var(--border);
}
.demo-call-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal-500);
  animation: demo-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
.demo-call-bar.ringing .demo-call-dot { background: var(--amber-400); }
.demo-call-label { font-size: 0.875rem; font-weight: 600; flex: 1; color: var(--ink-900); }
.demo-call-timer { font-size: 0.8125rem; color: var(--ink-500); font-variant-numeric: tabular-nums; }
.demo-call-stop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity var(--transition), transform var(--transition);
}
.demo-call-stop:hover { opacity: 0.85; transform: scale(1.05); }

.btn-call { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; }
.btn-call-icon { flex-shrink: 0; }

.demo-chat-log {
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: var(--space-xs);
  padding: 0.25em 0.125em;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.demo-chat-log .bubble { max-width: 85%; padding: 0.65em 0.9em; border-radius: var(--radius-md); font-size: 0.875rem; line-height: 1.5; }
.demo-chat-log .bubble.ai { align-self: flex-start; background: var(--paper-50); border: 1px solid var(--border); border-end-start-radius: 4px; }
.demo-chat-log .bubble.caller { align-self: flex-end; background: linear-gradient(135deg, var(--teal-500), var(--teal-600)); color: var(--paper-0-fixed); border-end-end-radius: 4px; }

.demo-alt-link {
  display: block;
  width: 100%;
  margin-top: var(--space-sm);
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink-500);
  font-size: 0.75rem;
  font-family: inherit;
  text-decoration: underline;
  text-align: center;
  cursor: pointer;
}
.demo-alt-link:hover { color: var(--teal-600); }

@media (max-width: 640px) {
  .demo-form { flex-direction: column; }
}
