/* ==========================================================================
   CLLWB — Design system
   Palette : Ardoise marine profonde (confiance / sécurité) + accent orange
   sécurité utilisé avec parcimonie pour les CTA.
   Typographie : Cabinet Grotesk (titres) / Satoshi (corps de texte) — Fontshare.
   ========================================================================== */

:root,
[data-theme='light'] {
  /* Surfaces — ardoise très clair, presque blanc froid */
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-surface-2: #fbfcfd;
  --color-surface-offset: #eef1f5;
  --color-surface-offset-2: #e4e8ee;
  --color-surface-dynamic: #dde2e9;
  --color-divider: #dde2e9;
  --color-border: #ccd3dd;

  /* Texte — bleu ardoise très sombre */
  --color-text: #10192b;
  --color-text-muted: #56617a;
  --color-text-faint: #97a1b5;
  --color-text-inverse: #f5f7fa;

  /* Marque — bleu marine profond */
  --color-navy-950: #0a1120;
  --color-navy-900: #0f1b32;
  --color-navy-800: #16274a;
  --color-navy-700: #1e3560;

  /* Accent primaire (boutons, liens) = marine profond en light mode */
  --color-primary: #16274a;
  --color-primary-hover: #0f1b32;
  --color-primary-active: #0a1120;
  --color-primary-highlight: #dde4ef;

  /* Accent sécurité orange — CTA ponctuels, petits highlights */
  --color-accent: #e8641c;
  --color-accent-hover: #c94f0f;
  --color-accent-active: #a83f0a;
  --color-accent-highlight: #fbe3d3;
  --color-accent-text: #ffffff;

  /* Statuts */
  --color-success: #2f7d52;
  --color-success-highlight: #d9ecdf;
  --color-warning: #b3771a;
  --color-warning-highlight: #f4e3c6;
  --color-error: #b3311f;
  --color-error-highlight: #f5d9d3;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Ombres — teintées ardoise */
  --shadow-sm: 0 1px 2px oklch(0.15 0.03 250 / 0.07);
  --shadow-md: 0 6px 16px oklch(0.15 0.03 250 / 0.10);
  --shadow-lg: 0 18px 40px oklch(0.15 0.03 250 / 0.16);

  /* Largeurs de contenu */
  --content-narrow: 640px;
  --content-default: 1000px;
  --content-wide: 1240px;
  --content-full: 100%;

  /* Polices */
  --font-display: 'Cabinet Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #0a0f1a;
  --color-surface: #101728;
  --color-surface-2: #131b2e;
  --color-surface-offset: #16213696;
  --color-surface-offset: #162136;
  --color-surface-offset-2: #1c2942;
  --color-surface-dynamic: #24324c;
  --color-divider: #22304a;
  --color-border: #2b3b58;

  --color-text: #e7ebf3;
  --color-text-muted: #9aa6c0;
  --color-text-faint: #647092;
  --color-text-inverse: #0a0f1a;

  --color-primary: #7ea3d8;
  --color-primary-hover: #a0c0ea;
  --color-primary-active: #c1d8f2;
  --color-primary-highlight: #1d2c48;

  --color-accent: #ff8a4c;
  --color-accent-hover: #ffa06c;
  --color-accent-active: #ffb388;
  --color-accent-highlight: #3a2416;
  --color-accent-text: #1a0f04;

  --color-success: #6bc794;
  --color-success-highlight: #16301f;
  --color-warning: #e3ab52;
  --color-warning-highlight: #3a2c11;
  --color-error: #e37464;
  --color-error-highlight: #3a1a14;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 6px 18px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 20px 44px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0a0f1a;
    --color-surface: #101728;
    --color-surface-2: #131b2e;
    --color-surface-offset: #162136;
    --color-surface-offset-2: #1c2942;
    --color-surface-dynamic: #24324c;
    --color-divider: #22304a;
    --color-border: #2b3b58;

    --color-text: #e7ebf3;
    --color-text-muted: #9aa6c0;
    --color-text-faint: #647092;
    --color-text-inverse: #0a0f1a;

    --color-primary: #7ea3d8;
    --color-primary-hover: #a0c0ea;
    --color-primary-active: #c1d8f2;
    --color-primary-highlight: #1d2c48;

    --color-accent: #ff8a4c;
    --color-accent-hover: #ffa06c;
    --color-accent-active: #ffb388;
    --color-accent-highlight: #3a2416;
    --color-accent-text: #1a0f04;

    --color-success: #6bc794;
    --color-success-highlight: #16301f;
    --color-warning: #e3ab52;
    --color-warning-highlight: #3a2c11;
    --color-error: #e37464;
    --color-error-highlight: #3a1a14;

    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 6px 18px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 20px 44px oklch(0 0 0 / 0.5);
  }
}

/* ==========================================================================
   Type scale
   ========================================================================== */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ==========================================================================
   Global elements
   ========================================================================== */
body {
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

p, li, figcaption {
  max-width: 68ch;
}

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--default {
  max-width: var(--content-default);
}
.container--narrow {
  max-width: var(--content-narrow);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.eyebrow::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  flex-shrink: 0;
}

.section-head {
  max-width: 44rem;
  margin-bottom: var(--space-12);
}
.section-head h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-3);
}
.section-head p {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  min-height: 44px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-text);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-md);
}
.btn--primary:active {
  background: var(--color-accent-active);
}

.btn--secondary {
  background: transparent;
  border-color: oklch(from var(--color-text) l c h / 0.18);
  color: var(--color-text);
}
.btn--secondary:hover {
  background: var(--color-surface-offset);
  border-color: oklch(from var(--color-text) l c h / 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  padding-inline: var(--space-3);
}
.btn--ghost:hover {
  background: var(--color-primary-highlight);
}

.btn--on-dark {
  background: #ffffff;
  color: #0f1b32;
  border-color: #ffffff;
}
.btn--on-dark:hover {
  background: #e7ebf3;
  border-color: #e7ebf3;
}
[data-theme='dark'] .btn--on-dark {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
[data-theme='dark'] .btn--on-dark:hover {
  background: var(--color-surface-offset);
  border-color: oklch(from var(--color-text) l c h / 0.3);
}

.btn--block {
  width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 76px;
  max-width: 1440px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  flex-shrink: 0;
}
.brand .logo-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  color: var(--color-primary);
}
.brand .brand-name {
  line-height: 1.1;
}
.brand .brand-name small {
  display: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}
@media (min-width: 1480px) {
  .brand .brand-name small { display: block; }
}

.main-nav {
  display: none;
  flex-shrink: 1;
  min-width: 0;
  justify-content: center;
  overflow: hidden;
}
.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: nowrap;
  white-space: nowrap;
  list-style: none;
}
.main-nav a {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) 0;
  position: relative;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a[aria-current='page'] {
  color: var(--color-text);
}
.main-nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.lang-toggle {
  display: none;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-faint);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
  cursor: not-allowed;
}
.lang-toggle .badge {
  font-size: 0.65rem;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  padding: 1px var(--space-2);
  color: var(--color-text-faint);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-text);
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.header-cta {
  display: none;
  padding-inline: var(--space-4);
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  height: calc(100vh - 76px);
  background: var(--color-bg);
  z-index: 99;
  padding: var(--space-6) var(--space-5) var(--space-10);
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms cubic-bezier(0.16,1,0.3,1), transform 220ms cubic-bezier(0.16,1,0.3,1), visibility 220ms;
}
.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  list-style: none;
}
.mobile-nav a {
  display: block;
  padding: var(--space-4) var(--space-2);
  font-size: var(--text-lg);
  font-family: var(--font-display);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-divider);
}
.mobile-nav .mobile-nav-actions {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.mobile-nav .lang-toggle {
  display: inline-flex;
  margin-top: var(--space-8);
}

@media (min-width: 1180px) {
  .main-nav { display: flex; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none; }
}
@media (min-width: 1480px) {
  .lang-toggle { display: inline-flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--space-16), 10vw, var(--space-32)) clamp(var(--space-16), 8vw, var(--space-24));
}
.hero .container {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}
.hero-copy h1 {
  font-size: var(--text-2xl);
  margin-top: var(--space-4);
}
.hero-copy p {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 42rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
}
.hero-meta div strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
}
.hero-meta div span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.hero-visual {
  position: relative;
}
.hero-visual svg {
  width: 100%;
  height: auto;
}

@media (min-width: 960px) {
  .hero .container {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

/* Page hero (interior pages, smaller) */
.page-hero {
  padding-block: clamp(var(--space-14), 8vw, var(--space-20)) clamp(var(--space-10), 6vw, var(--space-16));
  border-bottom: 1px solid var(--color-divider);
}
.page-hero h1 {
  font-size: var(--text-2xl);
  margin-top: var(--space-4);
  max-width: 42rem;
}
.page-hero p {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 42rem;
}
.page-hero .hero-actions {
  margin-top: var(--space-8);
}

/* ==========================================================================
   Cards & grids
   ========================================================================== */
.grid {
  display: grid;
  gap: var(--space-6);
}
.grid--3 { grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.card--pad-lg {
  padding: var(--space-8);
}
.card h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-4);
}
.card p {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}
.card .icon {
  width: 40px;
  height: 40px;
  color: var(--color-primary);
}

.card--pillar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.card--pillar .pillar-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-highlight);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

/* Two-column editorial split */
.split {
  display: grid;
  gap: var(--space-10);
  align-items: center;
}
.split--reverse .split-visual {
  order: -1;
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
  .split--reverse .split-visual {
    order: 1;
  }
}
.split-copy h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-3);
}
.split-copy p {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
}
.split-visual svg {
  width: 100%;
}

/* Feature list with number/icon */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.feature-item {
  display: flex;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.feature-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.feature-item .icon {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.feature-item h4 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 700;
}
.feature-item p {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Steps / workflow */
.steps {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-8);
}
@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}
.step {
  position: relative;
  padding-top: var(--space-6);
  border-top: 2px solid var(--color-accent);
}
.step .step-num {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text-faint);
}
.step h4 {
  margin-top: var(--space-3);
  font-size: var(--text-base);
}
.step p {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Stat / proof band */
.stat-band {
  background: var(--color-navy-900);
  color: var(--color-text-inverse);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-6);
}
[data-theme='dark'] .stat-band {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}
.stat-band .grid {
  gap: var(--space-8);
}
.stat-band .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: #ffffff;
}
[data-theme='dark'] .stat-band .stat strong {
  color: var(--color-text);
}
.stat-band .stat span {
  font-size: var(--text-sm);
  color: #b9c3d6;
}

/* CTA band */
.cta-band {
  background: linear-gradient(160deg, var(--color-navy-900), var(--color-navy-800));
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  color: var(--color-text-inverse);
  position: relative;
  overflow: hidden;
}
[data-theme='dark'] .cta-band {
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
  border: 1px solid var(--color-border);
}
.cta-band h2 {
  font-size: var(--text-xl);
  max-width: 32rem;
  color: #ffffff;
}
[data-theme='dark'] .cta-band h2 {
  color: var(--color-text);
}
.cta-band p {
  margin-top: var(--space-4);
  color: #c3cce0;
  max-width: 34rem;
}
[data-theme='dark'] .cta-band p {
  color: var(--color-text-muted);
}
.cta-band .hero-actions {
  margin-top: var(--space-8);
}

/* Pricing */
.pricing-grid {
  display: grid;
  gap: var(--space-6);
  align-items: stretch;
}
@media (min-width: 900px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.plan {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.plan--featured {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  position: relative;
}
.plan-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  background: var(--color-accent);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}
.plan h3 {
  font-size: var(--text-lg);
}
.plan .price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-top: var(--space-2);
}
.plan .price small {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 400;
}
.plan .plan-desc {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.plan ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
  flex: 1;
  list-style: none;
}
.plan li {
  display: flex;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.plan li svg {
  width: 18px;
  height: 18px;
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 2px;
}
.plan .btn {
  margin-top: var(--space-8);
}

/* FAQ accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-8);
  list-style: none;
}
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary .chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform var(--transition-interactive);
}
.faq-item[open] summary .chevron {
  transform: rotate(180deg);
}
.faq-item .faq-answer {
  padding: 0 var(--space-6) var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* Category label for FAQ groups */
.faq-category {
  font-family: var(--font-display);
  font-size: var(--text-base);
  margin-top: var(--space-12);
  margin-bottom: var(--space-2);
}
.faq-category:first-of-type {
  margin-top: 0;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: var(--space-10);
}
@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 0.8fr;
    gap: var(--space-16);
  }
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.form-field label {
  font-size: var(--text-sm);
  font-weight: 600;
}
.form-field input,
.form-field select,
.form-field textarea {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-base);
  min-height: 44px;
}
.form-field textarea {
  min-height: 140px;
  resize: vertical;
}
.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}
.form-status {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  display: none;
}
.form-status.is-visible {
  display: block;
}
.form-status--success {
  background: var(--color-success-highlight);
  color: var(--color-success);
}
.form-status--error {
  background: var(--color-error-highlight);
  color: var(--color-error);
}

.contact-info-card {
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.contact-info-card dl {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-top: var(--space-6);
}
.contact-info-card dt {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}
.contact-info-card dd {
  font-size: var(--text-base);
  margin-top: var(--space-1);
}

/* Legal pages */
.legal-content h2 {
  font-size: var(--text-lg);
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
}
.legal-content h2:first-child {
  margin-top: 0;
}
.legal-content p,
.legal-content li {
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  max-width: 70ch;
}
.legal-content ul {
  padding-left: var(--space-6);
  list-style: disc;
}
.legal-content strong {
  color: var(--color-text);
}
.legal-content a {
  text-decoration: underline;
}

/* Table of contents sidebar for legal pages */
.legal-layout {
  display: grid;
  gap: var(--space-10);
}
@media (min-width: 900px) {
  .legal-layout {
    grid-template-columns: 220px 1fr;
    gap: var(--space-16);
  }
}
.legal-toc {
  align-self: start;
  position: sticky;
  top: 100px;
  display: none;
}
@media (min-width: 900px) {
  .legal-toc { display: block; }
}
.legal-toc ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
}
.legal-toc a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: block;
  padding: var(--space-1) 0;
}
.legal-toc a:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--color-navy-950);
  color: #aab5cc;
  padding-block: var(--space-16) var(--space-8);
}
[data-theme='dark'] .site-footer {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.site-footer a {
  color: #cfd8e8;
}
[data-theme='dark'] .site-footer a {
  color: var(--color-text-muted);
}
.site-footer a:hover {
  color: #ffffff;
}
[data-theme='dark'] .site-footer a:hover {
  color: var(--color-text);
}
.footer-grid {
  display: grid;
  gap: var(--space-10);
}
@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}
.footer-brand .brand {
  color: #ffffff;
}
[data-theme='dark'] .footer-brand .brand {
  color: var(--color-text);
}
.footer-brand .logo-mark {
  color: #ffffff;
}
[data-theme='dark'] .footer-brand .logo-mark {
  color: var(--color-primary);
}
.footer-brand p {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  max-width: 26rem;
  color: #94a1bd;
}
[data-theme='dark'] .footer-brand p {
  color: var(--color-text-muted);
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: var(--space-4);
}
[data-theme='dark'] .footer-col h4 {
  color: var(--color-text);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
}
.footer-col a,
.footer-col address {
  font-size: var(--text-sm);
}
.footer-col address {
  font-style: normal;
  color: #94a1bd;
}
[data-theme='dark'] .footer-col address {
  color: var(--color-text-muted);
}
.social-row {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
  list-style: none;
}
.social-row a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2a3550;
  border-radius: var(--radius-full);
}
[data-theme='dark'] .social-row a {
  border-color: var(--color-border);
}
.social-row svg {
  width: 16px;
  height: 16px;
}
.footer-bottom {
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid #212c46;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: #7c88a6;
}
[data-theme='dark'] .footer-bottom {
  border-color: var(--color-border);
  color: var(--color-text-faint);
}
@media (min-width: 760px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  z-index: 200;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

/* Utility */
.mt-0 { margin-top: 0 !important; }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
}
.divider-line {
  border: none;
  border-top: 1px solid var(--color-divider);
  margin-block: var(--space-16);
}

@media (min-width: 860px) {
  .section-head p { font-size: var(--text-lg); }
}

/* ==========================================================================
   Chat widget — Assistant CLLWB
   ========================================================================== */
.chat-widget {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 200;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--color-accent);
  color: var(--color-accent-text);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-interactive), transform var(--transition-interactive);
  position: relative;
}

.chat-toggle:hover { background: var(--color-accent-hover); transform: translateY(-2px); }
.chat-toggle:active { background: var(--color-accent-active); }

.chat-toggle-icon { width: 26px; height: 26px; position: absolute; transition: opacity 120ms ease, transform 120ms ease; }
.chat-toggle-icon--close { opacity: 0; transform: scale(0.7) rotate(-30deg); }
.chat-toggle-icon--chat { opacity: 1; transform: scale(1) rotate(0); }

.chat-widget[data-open='true'] .chat-toggle-icon--chat { opacity: 0; transform: scale(0.7) rotate(30deg); }
.chat-widget[data-open='true'] .chat-toggle-icon--close { opacity: 1; transform: scale(1) rotate(0); }

.chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(60px + var(--space-3));
  width: min(380px, calc(100vw - 2.5rem));
  height: min(600px, calc(100vh - 140px));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.chat-panel[data-visible='true'] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
  background: var(--color-navy-800);
  color: var(--color-text-inverse);
  flex-shrink: 0;
}

[data-theme='dark'] .chat-panel-header { background: var(--color-surface-offset); }

.chat-panel-identity { display: flex; align-items: flex-start; gap: var(--space-3); }
.chat-panel-identity .logo-mark { width: 28px; height: 28px; color: var(--color-text-inverse); flex-shrink: 0; margin-top: 2px; }
[data-theme='dark'] .chat-panel-identity .logo-mark { color: var(--color-text); }
.chat-panel-identity strong { display: block; font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; }
.chat-panel-identity span { display: block; font-size: var(--text-xs); opacity: 0.8; margin-top: 2px; line-height: 1.35; }

.chat-panel-close {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.75;
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.chat-panel-close:hover { opacity: 1; }
.chat-panel-close svg { width: 18px; height: 18px; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chat-message {
  max-width: 86%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-message--assistant {
  align-self: flex-start;
  background: var(--color-surface-offset);
  color: var(--color-text);
  border-bottom-left-radius: var(--radius-sm);
}

.chat-message--user {
  align-self: flex-end;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-bottom-right-radius: var(--radius-sm);
}
[data-theme='dark'] .chat-message--user { color: var(--color-navy-950); }

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 0 var(--space-4) var(--space-2);
  flex-shrink: 0;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-faint);
  animation: chat-typing-bounce 1.1s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  padding: var(--space-3);
  border-top: 1px solid var(--color-divider);
  flex-shrink: 0;
}

.chat-input-row textarea {
  flex: 1;
  resize: none;
  max-height: 96px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface-2);
}
.chat-input-row textarea:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }

.chat-send {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.chat-send:hover { background: var(--color-accent-hover); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-send svg { width: 18px; height: 18px; }

.chat-panel-footer {
  padding: var(--space-2) var(--space-4) var(--space-3);
  border-top: 1px solid var(--color-divider);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.chat-lead-link {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.chat-lead-link:hover { color: var(--color-accent-hover); text-decoration: underline; }

.chat-disclaimer {
  font-size: 0.7rem;
  color: var(--color-text-faint);
  line-height: 1.4;
}

.chat-lead-form {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface-2);
  flex-shrink: 0;
}
.chat-lead-intro { font-size: var(--text-xs); color: var(--color-text-muted); margin: 0 0 var(--space-2); }
.chat-lead-fields { display: flex; flex-direction: column; gap: var(--space-2); }
.chat-lead-fields input {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
}
.chat-lead-fields input:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.chat-lead-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.chat-lead-actions .btn { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.chat-lead-status { font-size: var(--text-xs); margin: var(--space-2) 0 0; min-height: 1em; }
.chat-lead-status--success { color: var(--color-success); }
.chat-lead-status--error { color: var(--color-error); }

@media (max-width: 480px) {
  .chat-widget { right: var(--space-3); bottom: var(--space-3); }
  .chat-panel {
    width: calc(100vw - 1.5rem);
    height: min(70vh, 560px);
    bottom: calc(60px + var(--space-2));
  }
}
