/* ===== Design tokens ===== */
:root {
  --ink: #171314;
  --paper: #f5efe6;
  --panel: #211c1e;
  --panel-2: #2a2325;
  --violet: #8a6bd9;
  --gold: #eec531;
  --sage: #b3d3ab;
  --line: rgba(245, 239, 230, 0.12);
  --text-soft: rgba(245, 239, 230, 0.7);
  --text-mute: rgba(245, 239, 230, 0.5);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

/* ===== Thèmes ===== */
/* Thème sombre (par défaut) */
.theme-dark {
  --ink: #171314;
  --paper: #f5efe6;
  --panel: #211c1e;
  --panel-2: #2a2325;
  --line: rgba(245, 239, 230, 0.12);
  --text-soft: rgba(245, 239, 230, 0.7);
  --text-mute: rgba(245, 239, 230, 0.5);
}

/* Thème clair */
.theme-light {
  --ink: #f5efe6;
  --paper: #171314;
  --panel: #e8e0d4;
  --panel-2: #ddd5c9;
  --line: rgba(23, 19, 20, 0.12);
  --text-soft: rgba(23, 19, 20, 0.7);
  --text-mute: rgba(23, 19, 20, 0.5);
}

/* Thème Breeze (bleu clair) */
.theme-breeze {
  --ink: #e8f0fe;
  --paper: #1a2a4a;
  --panel: #d4e0f0;
  --panel-2: #c8d4e8;
  --violet: #4a7ab5;
  --gold: #e8a838;
  --sage: #7ab89a;
  --line: rgba(26, 42, 74, 0.12);
  --text-soft: rgba(26, 42, 74, 0.7);
  --text-mute: rgba(26, 42, 74, 0.5);
}

/* Thème Océan (bleu profond) */
.theme-ocean {
  --ink: #0a1628;
  --paper: #b8d4e8;
  --panel: #12203a;
  --panel-2: #1a2a4a;
  --violet: #6a9ad9;
  --gold: #e8b83a;
  --sage: #7ac8b0;
  --line: rgba(184, 212, 232, 0.12);
  --text-soft: rgba(184, 212, 232, 0.7);
  --text-mute: rgba(184, 212, 232, 0.5);
}

/* Thème Volcan (chaud) */
.theme-volcano {
  --ink: #2a1410;
  --paper: #f0d8c8;
  --panel: #3a2018;
  --panel-2: #4a2a20;
  --violet: #c87850;
  --gold: #e8a830;
  --sage: #d8b090;
  --line: rgba(240, 216, 200, 0.12);
  --text-soft: rgba(240, 216, 200, 0.7);
  --text-mute: rgba(240, 216, 200, 0.5);
}

/* Thème haut contraste (accessibilité) */
.theme-high-contrast {
  --ink: #ffffff;
  --paper: #000000;
  --panel: #e0e0e0;
  --panel-2: #cccccc;
  --violet: #0000ff;
  --gold: #ffd700;
  --sage: #00aa00;
  --line: rgba(0, 0, 0, 0.3);
  --text-soft: #000000;
  --text-mute: #000000;
}

.theme-high-contrast .btn-primary {
  background: #0000ff;
  color: #ffffff;
}
.theme-high-contrast .btn-primary:hover {
  background: #3333ff;
}
.theme-high-contrast .btn-ghost {
  border-color: #000000;
  color: #000000;
}
.theme-high-contrast .btn-ghost:hover {
  border-color: #0000ff;
  color: #0000ff;
}
.theme-high-contrast .eyebrow {
  color: #0000ff;
}
.theme-high-contrast .ink {
  color: #0000ff;
}
.theme-high-contrast .ai-pill {
  background: #0000ff;
  color: #ffffff;
}
.theme-high-contrast .stat-number {
  color: #0000ff;
}
.theme-high-contrast .stat-icon {
  color: #0000ff;
}
.theme-high-contrast .nav-cta {
  background: #000000;
  color: #ffffff;
}
.theme-high-contrast .nav-cta:hover {
  background: #333333;
}
.theme-high-contrast .site-header {
  background: #ffffff;
  border-bottom-color: #000000;
}
.theme-high-contrast .primary-nav a:not(.nav-cta)::after {
  background: #0000ff;
}
.theme-high-contrast .panel-card {
  border-color: #000000;
}
.theme-high-contrast .contact {
  border-top-color: #000000;
  background: #e0e0e0;
}
.theme-high-contrast .contact-form {
  background: #cccccc;
  border-color: #000000;
}
.theme-high-contrast .field input,
.theme-high-contrast .field textarea {
  background: #ffffff;
  border-color: #000000;
  color: #000000;
}
.theme-high-contrast .field input:focus,
.theme-high-contrast .field textarea:focus {
  border-color: #0000ff;
}
.theme-high-contrast .ai-card {
  background: #e0e0e0;
  border-color: #000000;
}
.theme-high-contrast .ai-card p {
  color: #000000;
}
.theme-high-contrast .ai-card-tag {
  color: #0000ff;
}
.theme-high-contrast .solution-body p {
  color: #000000;
}
.theme-high-contrast .hero-lede {
  color: #000000;
}
.theme-high-contrast .about-copy p {
  color: #000000;
}
.theme-high-contrast .why p {
  color: #000000;
}
.theme-high-contrast .footer-brand p {
  color: #000000;
}
.theme-high-contrast .footer-contact {
  color: #000000;
}
.theme-high-contrast .footer-bottom p {
  color: #000000;
}
.theme-high-contrast .footer-social a {
  border-color: #000000;
}
.theme-high-contrast .footer-social a:hover {
  border-color: #0000ff;
  color: #0000ff;
}
.theme-high-contrast .stat-label {
  color: #000000;
}
.theme-high-contrast .solution-index {
  color: #000000;
}
.theme-high-contrast .card-tag {
  color: #0000ff;
}
.theme-high-contrast .site-footer {
  background: #e0e0e0;
  border-top-color: #000000;
}
.theme-high-contrast .footer-bottom {
  border-top-color: #000000;
}
.theme-high-contrast .grain {
  opacity: 0;
}
.theme-high-contrast .contact-details {
  color: #000000;
}
.theme-high-contrast .contact-details a:hover {
  color: #0000ff;
}
.theme-high-contrast .ai-card-glyph {
  color: #0000ff;
}
.theme-high-contrast .client-card {
  background: #ffffff;
  border-color: #000000;
}
.theme-high-contrast .client-card:hover {
  border-color: #0000ff;
}
.theme-high-contrast .form-note {
  color: #0000ff;
}
.theme-high-contrast .req {
  color: #0000ff;
}

/* ===== Modern Theme Switcher ===== */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  margin-left: 20px;
  margin-right: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.theme-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  outline: none;
}

.theme-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.2s ease;
}

.theme-btn:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
}

.theme-btn:hover svg {
  transform: scale(1.15);
}

.theme-btn.active {
  color: #ffffff;
  background: var(--violet);
  box-shadow: 0 2px 8px rgba(138, 107, 217, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.theme-btn.active svg {
  transform: scale(1);
}

.theme-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.theme-btn::after {
  content: attr(title);
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--paper);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.theme-btn[title] {
  pointer-events: auto;
}

/* ===== Base Styles ===== */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.theme-light .grain,
.theme-breeze .grain {
  opacity: 0.03;
}
.theme-high-contrast .grain {
  opacity: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}
.eyebrow.center {
  text-align: center;
}
.section-title {
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  margin-bottom: 20px;
}
.section-title.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 620px;
}
.section-subtitle {
  color: var(--text-soft);
  font-size: 15px;
  margin-top: -12px;
  margin-bottom: 30px;
}

.ink {
  color: var(--violet);
  font-style: italic;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--violet);
  color: #16121a;
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: #9a7ee6;
}
.theme-high-contrast .btn-primary:hover {
  background: #3333ff;
}
.btn-ghost {
  border-color: var(--line);
  color: var(--paper);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}
.btn-block {
  width: 100%;
  justify-content: center;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(23, 19, 20, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.theme-light .site-header {
  background: rgba(245, 239, 230, 0.9);
}
.theme-breeze .site-header {
  background: rgba(232, 240, 254, 0.9);
}
.theme-ocean .site-header {
  background: rgba(10, 22, 40, 0.9);
}
.theme-volcano .site-header {
  background: rgba(42, 20, 16, 0.9);
}
.theme-high-contrast .site-header {
  background: #ffffff;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark {
  color: var(--violet);
  display: flex;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  white-space: nowrap;
}
.brand-name em {
  font-style: italic;
  color: var(--text-soft);
  font-weight: 400;
}
.brand-name.light {
  color: var(--paper);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  flex-shrink: 0;
  margin-left: auto;
}
.primary-nav a {
  color: var(--text-soft);
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}
.primary-nav a:not(.nav-cta):hover {
  color: var(--paper);
}
.primary-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.25s ease;
}
.primary-nav a:not(.nav-cta):hover::after {
  width: 100%;
}
.nav-cta {
  background: var(--paper);
  color: var(--ink);
  padding: 99px 18px;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 500;
}
.nav-cta:hover {
  background: var(--gold);
}

.nav-ai {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ai-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--ink);
  background: linear-gradient(120deg, var(--sage), var(--gold) 45%, var(--violet));
  background-size: 220% 100%;
  animation: ai-sheen 5s ease-in-out infinite;
}
.nav-ai:hover .ai-pill {
  animation-play-state: paused;
  background-position: 100% 0;
}
@keyframes ai-sheen {
  0%,
  100% {
    background-position: 0% 0;
  }
  50% {
    background-position: 100% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ai-pill {
    animation: none;
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--paper);
  display: block;
}

/* ===== Hero ===== */
.hero {
  padding: 92px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -180px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 107, 217, 0.28), transparent 70%);
  pointer-events: none;
}
.theme-light .hero::before {
  background: radial-gradient(circle, rgba(138, 107, 217, 0.12), transparent 70%);
}
.theme-breeze .hero::before {
  background: radial-gradient(circle, rgba(74, 122, 181, 0.15), transparent 70%);
}
.theme-ocean .hero::before {
  background: radial-gradient(circle, rgba(106, 154, 217, 0.2), transparent 70%);
}
.theme-volcano .hero::before {
  background: radial-gradient(circle, rgba(200, 120, 80, 0.2), transparent 70%);
}
.theme-high-contrast .hero::before {
  opacity: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
  position: relative;
}
.hero-copy h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  margin-bottom: 24px;
}
.hero-lede {
  color: var(--text-soft);
  max-width: 480px;
  font-size: 17px;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-panel {
  position: relative;
  height: 420px;
}
.panel-card {
  position: absolute;
  width: 78%;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease, background 0.4s ease, border-color 0.4s ease;
}
.panel-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.card-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.card-metric {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
}
.card-a {
  top: 0;
  left: 0;
  transition-delay: 0.05s;
}
.card-b {
  top: 150px;
  left: 14%;
  transition-delay: 0.2s;
}
.card-c {
  top: 300px;
  left: 2%;
  transition-delay: 0.35s;
}
.hero-scribble {
  position: absolute;
  right: -40px;
  top: -40px;
  z-index: -1;
}

/* ===== Solutions ===== */
.solutions {
  padding: 90px 0 40px;
}
.solution-rows {
  margin-top: 56px;
  border-top: 1px solid var(--line);
}
.solution-row {
  display: grid;
  grid-template-columns: 70px 1fr 60px;
  gap: 24px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s ease;
}
.solution-row.alt {
  transform: translateX(16px);
}
.solution-row.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.solution-index {
  font-family: var(--font-mono);
  color: var(--text-mute);
  font-size: 14px;
}
.solution-body h3 {
  font-size: 26px;
  margin-bottom: 8px;
}
.solution-body p {
  color: var(--text-soft);
  max-width: 620px;
  margin: 0;
}
.solution-glyph {
  font-size: 26px;
  color: var(--tint);
  text-align: right;
}

/* ===== AI Products ===== */
.ai-products {
  padding: 40px 0 90px;
}
.eyebrow .ai-pill {
  margin-left: 8px;
  vertical-align: 2px;
}
.ai-lede {
  color: var(--text-soft);
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.ai-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.ai-card {
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(238, 197, 49, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 1.8s ease-in-out, background 0.4s ease, border-color 0.4s ease;
  animation: ai-glow 4.5s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.ai-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation-play-state: running;
}
@keyframes ai-glow {
  from {
    box-shadow: 0 0 0 1px rgba(138, 107, 217, 0.08), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  }
  to {
    box-shadow: 0 0 0 1px rgba(238, 197, 49, 0.22), 0 0 34px -6px rgba(238, 197, 49, 0.35), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ai-card {
    animation: none;
  }
}
.ai-card-glyph {
  display: inline-flex;
  color: var(--gold);
  margin-bottom: 16px;
}
.ai-card-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 10px;
}
.ai-card h3 {
  font-size: 21px;
  margin-bottom: 10px;
}
.ai-card p {
  color: var(--text-soft);
  margin: 0;
}

/* ===== About ===== */
.about {
  padding: 90px 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-figure {
  position: relative;
  height: 340px;
}
.figure-block {
  position: absolute;
  inset: 20px 0 0 20px;
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(138, 107, 217, 0.35), rgba(179, 211, 171, 0.18));
}
.figure-frame {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.about-copy p {
  color: var(--text-soft);
  margin-bottom: 28px;
  max-width: 540px;
}

/* ===== Stats ===== */
.stats {
  padding: 40px 0 90px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 56px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.stat.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.stat-icon {
  color: var(--tint);
  margin-bottom: 6px;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--tint);
  line-height: 1;
}
.stat-label {
  color: var(--text-soft);
  font-size: 15px;
}

/* ===== Clients / Références ===== */
.clients {
  padding: 40px 0 90px;
}
.client-container {
  position: relative;
  border-top: 1px solid var(--line);
  padding-top: 40px;
  min-height: 280px;
}

.client-grids {
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  transform: scale(1);
}

.client-grids.is-hidden {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  position: absolute;
  inset: 40px 0 0 0;
}

.client-grid {
  display: grid;
  gap: 20px;
}
.client-grid-top {
  grid-template-columns: repeat(4, 1fr);
}
.client-grid-bottom {
  grid-template-columns: repeat(3, 1fr);
  max-width: 75%;
  margin: 0 auto;
}

.client-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 34px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--paper);
  cursor: pointer;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.25s ease, background 0.4s ease;
  outline: none;
  width: 100%;
}
.client-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.client-card:hover {
  border-color: var(--tint);
  transform: translateY(-3px);
  background: var(--panel-2);
}

.client-name {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: -0.01em;
}

.client-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 8px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.client-card:hover .client-hint {
  opacity: 1;
  transform: translateY(0);
  color: var(--gold);
}

/* Detail View Animation */
.client-detail-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  position: absolute;
  inset: 40px 0 0 0;
  visibility: hidden;
}

.client-detail-view.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
  inset: auto;
  visibility: visible;
}

.btn-back {
  align-self: flex-start;
  padding: 8px 18px;
  font-size: 14px;
}

.client-detail-card {
  width: 100%;
  max-width: 720px;
  padding: 36px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.client-detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.client-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.client-detail-title {
  font-size: 26px;
}

.client-detail-desc {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

/* ===== Why ===== */
.why {
  padding: 30px 0 100px;
}
.why-grid {
  max-width: 680px;
}
.why p {
  color: var(--text-soft);
  margin-bottom: 28px;
}

/* ===== Contact ===== */
.contact {
  padding: 90px 0 110px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-radius: 32px 32px 0 0;
  transition: background 0.4s ease, border-color 0.4s ease;
}
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
}
.contact-intro p {
  color: var(--text-soft);
  max-width: 400px;
}
.contact-details {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-soft);
}
.contact-details a:hover {
  color: var(--gold);
}

.contact-form {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: background 0.4s ease, border-color 0.4s ease;
}
.field {
  margin: 0 0 20px;
}
.field label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.req {
  color: var(--gold);
  margin-left: 2px;
}
.field input,
.field textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--violet);
}
.form-note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--sage);
  min-height: 1em;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding-top: 50px;
  transition: background 0.4s ease, border-color 0.4s ease;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 40px;
  align-items: start;
  padding-bottom: 30px;
}
.footer-brand p {
  color: var(--text-mute);
  margin: 10px 0 0;
  max-width: 280px;
  font-size: 14px;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text-soft);
}
.footer-contact a:hover {
  color: var(--gold);
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--paper);
  transition: border-color 0.2s, color 0.2s;
}
.footer-social a:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: var(--text-mute);
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .header-row {
    gap: 20px;
  }

  .primary-nav {
    gap: 18px;
    font-size: 14px;
  }

  .theme-switcher {
    margin-left: 10px;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .about-figure {
    order: 2;
    height: 220px;
  }
  .hero-panel {
    height: 320px;
    margin-top: 20px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .ai-cards {
    grid-template-columns: 1fr;
  }
  .client-grid-top,
  .client-grid-bottom {
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-row {
    justify-content: flex-start;
    gap: 0;
  }

  .theme-switcher {
    margin-left: auto;
    margin-right: 8px;
    padding: 2px;
  }

  .theme-btn {
    width: 28px;
    height: 28px;
  }

  .theme-btn svg {
    width: 14px;
    height: 14px;
  }

  .theme-btn::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, background 0.4s ease;
  }
  .theme-light .primary-nav,
  .theme-breeze .primary-nav,
  .theme-ocean .primary-nav,
  .theme-volcano .primary-nav {
    background: var(--ink);
  }
  .theme-high-contrast .primary-nav {
    background: #ffffff;
  }
  .primary-nav.open {
    max-height: 320px;
  }
  .primary-nav a {
    width: 100%;
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
  }
  .nav-cta {
    border-radius: 0;
    text-align: center;
  }
  .solution-row {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .solution-glyph {
    text-align: left;
  }
  .client-grid-top,
  .client-grid-bottom {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .client-detail-card {
    padding: 24px;
  }
  .contact {
    border-radius: 20px 20px 0 0;
  }
}