/* ============================================================
   Thucy — Design system
   ============================================================ */

:root {
  /* Brand */
  --thucy-red: #C8102E;
  --thucy-red-dark: #9E0A23;
  --thucy-red-soft: #E63946;
  --thucy-ink: #0B1220;        /* near-black navy */
  --thucy-ink-2: #111A2E;
  --thucy-ink-3: #1A2540;
  --thucy-border: rgba(255,255,255,0.08);
  --thucy-border-strong: rgba(255,255,255,0.14);

  /* Neutrals (dark theme default) */
  --bg: #070B14;
  --bg-elev: #0E1524;
  --bg-card: #111B2E;
  --surface-line: rgba(255,255,255,0.07);

  --fg: #E7ECF3;
  --fg-dim: #9AA6BA;
  --fg-mute: #6B778C;

  --accent: var(--thucy-red);
  --accent-fg: #ffffff;

  /* Type */
  --font-sans: "Instrument Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --font-display: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --navy: #0A2540;

  /* Radius / shadow */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 0 1px rgba(200,16,46,0.25), 0 20px 60px -20px rgba(200,16,46,0.35);

  /* Layout */
  --wrap: 1240px;
  --wrap-narrow: 960px;
  --hdr-h: 72px;
  --bar-h: 38px;
}

/* LIGHT theme override */
[data-theme="light"] {
  --bg: #F7F8FB;
  --bg-elev: #FFFFFF;
  --bg-card: #FFFFFF;
  --surface-line: rgba(10,20,40,0.08);

  --fg: #0B1220;
  --fg-dim: #49566D;
  --fg-mute: #7A8599;

  --thucy-border: rgba(10,20,40,0.08);
  --thucy-border-strong: rgba(10,20,40,0.14);

  --shadow-md: 0 10px 30px rgba(10,20,40,0.08);
  --shadow-glow: 0 0 0 1px rgba(200,16,46,0.18), 0 20px 60px -20px rgba(200,16,46,0.25);
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h1 em, h2 em, h3 em { font-style: normal; color: var(--thucy-red); font-weight: 600; }
h1 { font-size: clamp(2.6rem, 5.2vw, 4.6rem); line-height: 1.02; }
h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1.05; }
h3 { font-size: clamp(1.3rem, 1.6vw, 1.6rem); line-height: 1.2; }
p { margin: 0; }

/* ============================================================
   Emergency top bar
   ============================================================ */
.topbar {
  background: #000;
  color: #fff;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  position: relative;
  z-index: 60;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.topbar-left { display: flex; align-items: center; gap: 1.2rem; color: #B8C1D1; }
.topbar-left .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.topbar-right { display: flex; align-items: center; gap: 1.5rem; color: #B8C1D1; }
.topbar-right a { color: inherit; transition: color 0.15s; }
.topbar-right a:hover { color: #fff; }

/* ============================================================
   Header
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--hdr-h);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--surface-line);
}
.header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand { display: flex; align-items: center; }
.brand img { height: 38px; width: auto; display: block; }
[data-theme="dark"] .brand .logo-light { display: none; }
[data-theme="dark"] .brand .logo-dark { display: block; }
[data-theme="light"] .brand .logo-light { display: block; }
[data-theme="light"] .brand .logo-dark { display: none; }

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a {
  padding: 0.55rem 0.9rem;
  font-size: 0.94rem;
  color: var(--fg-dim);
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.nav a:hover { color: var(--fg); background: var(--surface-line); }
.nav a.has-submenu::after {
  content: "›";
  display: inline-block;
  transform: rotate(90deg);
  margin-left: 0.3rem;
  font-size: 0.8rem;
  opacity: 0.6;
}
.nav-item { position: relative; }
.nav-item:hover .submenu { display: block; }
.submenu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: -10px;
  min-width: 280px;
  background: var(--bg-elev);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-md);
  padding: 0.6rem;
  box-shadow: var(--shadow-md);
}
.submenu a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--fg);
}
.submenu a:hover { background: var(--surface-line); }
.submenu a .sub { display: block; font-size: 0.78rem; color: var(--fg-mute); margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.theme-toggle {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--fg-dim);
  border: 1px solid var(--surface-line);
}
.theme-toggle:hover { color: var(--fg); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.78rem 1.2rem;
  font-weight: 500;
  font-size: 0.94rem;
  border-radius: 8px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--thucy-red);
  color: #fff;
  box-shadow: 0 6px 18px -4px rgba(200,16,46,0.5);
}
.btn-primary:hover { background: var(--thucy-red-dark); transform: translateY(-1px); box-shadow: 0 10px 24px -6px rgba(200,16,46,0.6); }
.btn-ghost {
  color: var(--fg);
  border: 1px solid var(--thucy-border-strong);
}
.btn-ghost:hover { background: var(--surface-line); }
.btn-outline {
  color: var(--fg);
  border: 1px solid var(--thucy-border);
}
.btn-outline:hover { border-color: var(--thucy-border-strong); background: var(--surface-line); }

.btn-incident {
  background: var(--thucy-red);
  color: #fff;
  font-weight: 500;
  padding: 0.55rem 1rem 0.55rem 0.85rem;
  border-radius: 8px;
  display: inline-flex; align-items: center; gap: 0.55rem;
  box-shadow: 0 4px 14px -2px rgba(200,16,46,0.5);
  transition: all 0.15s;
}
.btn-incident:hover { background: var(--thucy-red-dark); transform: translateY(-1px); }
.btn-incident .pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
  animation: pulse-ring 1.8s infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ============================================================
   Layout
   ============================================================ */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 1.5rem; }

section { position: relative; }
.section { padding: clamp(4rem, 9vw, 8rem) 0; }
.section-tight { padding: clamp(3rem, 6vw, 5rem) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--thucy-red);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 20px; height: 1px;
  background: var(--thucy-red);
}

.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head h2 em { font-style: normal; color: var(--thucy-red); font-weight: 600; }
.section-head p { color: var(--fg-dim); font-size: 1.08rem; margin-top: 1rem; }

/* ============================================================
   Hero — default (split)
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 70%);
  pointer-events: none;
}
[data-theme="light"] .hero-grid-bg {
  background-image:
    linear-gradient(rgba(10,20,40,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,20,40,0.05) 1px, transparent 1px);
}
.hero-glow {
  position: absolute;
  top: -20%; left: 50%;
  width: 900px; height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(200,16,46,0.25), transparent 60%);
  filter: blur(60px);
  pointer-events: none;
}
[data-theme="light"] .hero-glow { opacity: 0.5; }

.hero .wrap { position: relative; z-index: 2; }

.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--thucy-border-strong);
  background: color-mix(in oklab, var(--bg-elev) 70%, transparent);
  border-radius: 100px;
  font-size: 0.83rem;
  color: var(--fg-dim);
  margin-bottom: 1.5rem;
}
.hero-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: #22C55E; }

.hero h1 { margin-bottom: 1.5rem; }
.hero h1 em { font-style: normal; color: var(--thucy-red); }
.hero-sub {
  font-size: 1.15rem;
  color: var(--fg-dim);
  margin-bottom: 2rem;
  max-width: 540px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2.5rem; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--fg-mute);
  align-items: center;
}
.hero-trust .trust-item { display: flex; align-items: center; gap: 0.5rem; }
.hero-trust svg { width: 16px; height: 16px; color: var(--thucy-red); }

/* Hero variant: terminal */
.hero-terminal-wrap {
  position: relative;
}
.terminal {
  background: #0A1020;
  border: 1px solid var(--thucy-border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(200,16,46,0.15);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.86rem;
}
.terminal-head {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: #070B14;
  border-bottom: 1px solid var(--thucy-border);
}
.terminal-head .tdot { width: 11px; height: 11px; border-radius: 50%; background: #2A3550; }
.terminal-head .tdot:nth-child(1) { background: #FF5F56; }
.terminal-head .tdot:nth-child(2) { background: #FFBD2E; }
.terminal-head .tdot:nth-child(3) { background: #27C93F; }
.terminal-head .thost {
  margin-left: auto;
  font-size: 0.75rem;
  color: #5A6987;
}
.terminal-body {
  padding: 1.2rem 1.2rem 1.5rem;
  color: #C8D1E0;
  line-height: 1.75;
  min-height: 360px;
}
.terminal-body .l { display: block; }
.terminal-body .prompt { color: var(--thucy-red); margin-right: 0.5rem; }
.terminal-body .cmd { color: #E7ECF3; }
.terminal-body .out { color: #7B8AA6; }
.terminal-body .ok { color: #22C55E; }
.terminal-body .warn { color: #F59E0B; }
.terminal-body .crit { color: #EF4444; }
.terminal-body .cursor {
  display: inline-block;
  width: 8px; height: 1.05em;
  background: var(--thucy-red);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Hero variant: full-bleed */
.hero-full {
  text-align: center;
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(5rem, 10vw, 8rem);
}
.hero-full h1 { font-size: clamp(3rem, 7vw, 6rem); max-width: 18ch; margin: 0 auto 1.5rem; }
.hero-full .hero-sub { margin: 0 auto 2rem; }
.hero-full .hero-actions { justify-content: center; }
.hero-full .hero-trust { justify-content: center; }

/* Hero variant: asymmetric diagram */
.hero-diagram {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  margin-left: auto;
}
.hero-diagram-core {
  position: absolute; inset: 0;
  display: grid; place-items: center;
}

/* ============================================================
   Marquee (logos / trust)
   ============================================================ */
.marquee {
  padding: 2.5rem 0;
  border-top: 1px solid var(--surface-line);
  border-bottom: 1px solid var(--surface-line);
  overflow: hidden;
  position: relative;
}
.marquee-label {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 1.2rem;
  text-align: center;
}
.marquee-track {
  display: flex;
  gap: 4rem;
  animation: marquee 40s linear infinite;
  width: max-content;
}
@keyframes marquee {
  to { transform: translateX(calc(-50% - 2rem)); }
}
.marquee-logo {
  height: 36px;
  display: flex; align-items: center;
  color: var(--fg-dim);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
  opacity: 0.85;
  white-space: nowrap;
  transition: opacity 0.2s, color 0.2s;
  padding: 0 0.2rem;
  position: relative;
}
.marquee-logo:hover { opacity: 1; color: var(--fg); }
.marquee-sep {
  height: 36px;
  display: flex; align-items: center;
  color: var(--thucy-red);
  opacity: 0.5;
  font-size: 0.5rem;
}

/* ============================================================
   Services — pillar cards
   ============================================================ */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.pillar {
  position: relative;
  padding: 2rem 1.6rem 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-lg);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
  min-height: 360px;
  overflow: hidden;
}
.pillar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(200,16,46,0.15), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.pillar:hover { transform: translateY(-4px); border-color: var(--thucy-border-strong); box-shadow: var(--shadow-md); }
.pillar:hover::before { opacity: 1; }
.pillar-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}
.pillar-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: color-mix(in oklab, var(--thucy-red) 18%, transparent);
  border: 1px solid color-mix(in oklab, var(--thucy-red) 30%, transparent);
  color: var(--thucy-red);
  border-radius: 10px;
  margin-bottom: 1.2rem;
}
.pillar-icon svg { width: 22px; height: 22px; }
.pillar h3 { margin-bottom: 0.7rem; }
.pillar p { color: var(--fg-dim); font-size: 0.94rem; flex: 1; }
.pillar-list {
  list-style: none; padding: 0; margin: 1.2rem 0 1.4rem;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.pillar-list li {
  font-size: 0.84rem;
  color: var(--fg-mute);
  padding-left: 1rem;
  position: relative;
}
.pillar-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 5px; height: 1px;
  background: var(--thucy-red);
}
.pillar-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--fg);
  font-weight: 500;
  margin-top: auto;
}
.pillar-link svg { width: 14px; transition: transform 0.2s; }
.pillar:hover .pillar-link svg { transform: translateX(3px); }

/* ============================================================
   Lab — featured products
   ============================================================ */
.lab-section {
  background:
    radial-gradient(ellipse at 80% 10%, rgba(200,16,46,0.08), transparent 50%),
    var(--bg-elev);
  border-top: 1px solid var(--surface-line);
  border-bottom: 1px solid var(--surface-line);
}
.lab-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 3rem;
  margin-bottom: 3rem;
}
.lab-head p { color: var(--fg-dim); max-width: 560px; }
.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.lab-card {
  padding: 2rem 1.6rem 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.lab-card:hover { transform: translateY(-3px); border-color: var(--thucy-border-strong); }
.lab-card-header {
  display: flex; justify-content: space-between; align-items: center;
}
.lab-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--thucy-red);
  padding: 0.25rem 0.6rem;
  border: 1px solid color-mix(in oklab, var(--thucy-red) 30%, transparent);
  border-radius: 100px;
}
.lab-card h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 0.6rem;
}
.lab-card h3 .prod-mark {
  width: 10px; height: 10px; border-radius: 2px;
  background: var(--thucy-red);
}
.lab-card p { color: var(--fg-dim); font-size: 0.94rem; flex: 1; }
.lab-viz {
  height: 140px;
  border-radius: 10px;
  background: #070B14;
  border: 1px solid var(--thucy-border);
  overflow: hidden;
  position: relative;
}
[data-theme="light"] .lab-viz { background: #0B1220; }
.lab-card .pillar-link { margin-top: 0.4rem; }

/* ============================================================
   Process / Methodology
   ============================================================ */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  counter-reset: step;
  border-top: 1px solid var(--surface-line);
  border-left: 1px solid var(--surface-line);
}
.process-step {
  padding: 2rem 1.6rem;
  border-right: 1px solid var(--surface-line);
  border-bottom: 1px solid var(--surface-line);
  counter-increment: step;
  position: relative;
}
.process-step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--thucy-red);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 1rem;
}
.process-step h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}
.process-step p { color: var(--fg-dim); font-size: 0.9rem; }

/* ============================================================
   CTA strip
   ============================================================ */
.cta-strip {
  position: relative;
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(200,16,46,0.35), transparent 55%),
    #0A0F1C;
  color: #fff;
  overflow: hidden;
  border-top: 1px solid rgba(200,16,46,0.2);
  border-bottom: 1px solid rgba(200,16,46,0.2);
}
.cta-strip::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, #000, transparent 60%);
  pointer-events: none;
}
.cta-strip .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center; }
.cta-strip h2 { max-width: 18ch; color: #fff; }
.cta-strip h2 em { font-style: normal; color: var(--thucy-red-soft); font-weight: 600; }
.cta-strip p { color: rgba(255,255,255,0.7); margin-top: 1rem; max-width: 50ch; }
.cta-strip-actions { display: flex; flex-direction: column; gap: 0.7rem; align-items: flex-start; }
.cta-strip-phone {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}
.cta-strip-phone strong { color: #fff; font-weight: 500; }

/* ============================================================
   FAQ / two-col content
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4rem;
  align-items: start;
}
.faq { display: flex; flex-direction: column; gap: 0.6rem; }
.faq-item {
  border: 1px solid var(--surface-line);
  border-radius: 10px;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--thucy-border-strong); }
.faq-item summary {
  list-style: none;
  padding: 1.1rem 1.2rem;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  font-weight: 500;
  font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--thucy-red);
  font-size: 1.4rem;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body {
  padding: 0 1.2rem 1.1rem;
  color: var(--fg-dim);
  font-size: 0.95rem;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 5rem 0 2rem;
  background: var(--bg);
  border-top: 1px solid var(--surface-line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand p {
  color: var(--fg-dim);
  font-size: 0.92rem;
  margin-top: 1rem;
  max-width: 30ch;
}
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 1.2rem;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { font-size: 0.92rem; color: var(--fg-dim); transition: color 0.15s; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--surface-line);
  font-size: 0.85rem;
  color: var(--fg-mute);
}
.footer-bottom a { color: var(--fg-mute); }
.footer-bottom a:hover { color: var(--fg); }
.footer-socials { display: flex; gap: 0.8rem; }

/* ============================================================
   Service / product page templates
   ============================================================ */
.page-hero {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--surface-line);
  position: relative;
  overflow: hidden;
}
.page-hero .hero-glow { top: -50%; }
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-mute);
  margin-bottom: 2rem;
  display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb span { color: var(--fg-dim); }

.page-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: end;
}
.page-hero h1 { font-size: clamp(2.4rem, 4.5vw, 4rem); margin-bottom: 1.2rem; }
.page-hero h1 em { font-style: normal; color: var(--thucy-red); }
.page-hero-lead { color: var(--fg-dim); font-size: 1.1rem; max-width: 55ch; margin-bottom: 1.8rem; }

.service-nav {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-lg);
}
.service-nav-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  padding: 0 0.6rem 0.8rem;
}
.service-nav a {
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--fg-dim);
  transition: background 0.15s, color 0.15s;
}
.service-nav a:hover { background: var(--surface-line); color: var(--fg); }
.service-nav a.active { background: color-mix(in oklab, var(--thucy-red) 12%, transparent); color: var(--fg); border-left: 2px solid var(--thucy-red); padding-left: 0.6rem; }

.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--surface-line);
}
.feature-block:nth-child(even) > :first-child { order: 2; }
.feature-block h2 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); margin-bottom: 1rem; }
.feature-block p { color: var(--fg-dim); margin-bottom: 1rem; }
.feature-mock {
  background: var(--bg-card);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  min-height: 340px;
  position: relative;
  overflow: hidden;
}

.deliverables {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.deliverables li {
  padding: 0.9rem 1rem;
  border: 1px solid var(--surface-line);
  border-radius: 8px;
  font-size: 0.92rem;
  display: flex; align-items: flex-start; gap: 0.6rem;
}
.deliverables svg { width: 16px; height: 16px; color: var(--thucy-red); flex-shrink: 0; margin-top: 3px; }

.badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--surface-line);
  border-radius: 100px;
  color: var(--fg-dim);
}
.badge-red {
  color: var(--thucy-red);
  border-color: color-mix(in oklab, var(--thucy-red) 35%, transparent);
  background: color-mix(in oklab, var(--thucy-red) 10%, transparent);
}

/* ============================================================
   Tweaks panel
   ============================================================ */
.tweaks-panel {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 280px;
  background: var(--bg-elev);
  border: 1px solid var(--thucy-border-strong);
  border-radius: var(--r-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-md);
  z-index: 100;
  display: none;
  font-size: 0.88rem;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}
.tweaks-panel .tw-group { margin-bottom: 1.1rem; }
.tweaks-panel label { font-size: 0.78rem; color: var(--fg-mute); text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 0.5rem; }
.tweaks-panel .tw-segmented {
  display: flex; gap: 2px;
  background: var(--bg);
  border: 1px solid var(--surface-line);
  border-radius: 7px;
  padding: 2px;
}
.tweaks-panel .tw-segmented button {
  flex: 1;
  padding: 0.45rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 5px;
  color: var(--fg-dim);
  transition: background 0.15s, color 0.15s;
}
.tweaks-panel .tw-segmented button.on { background: var(--thucy-red); color: #fff; }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Legal prose (mentions légales, confidentialité)
   ============================================================ */
.legal-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 4rem; align-items: start; }
.legal-toc {
  position: sticky; top: 110px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  border-left: 1px solid var(--surface-line);
  padding-left: 1rem;
}
.legal-toc-title {
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--thucy-red); font-size: 0.72rem;
  margin-bottom: 0.9rem;
}
.legal-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.legal-toc li { counter-increment: toc; margin-bottom: 0.55rem; }
.legal-toc a {
  color: var(--fg-dim); text-decoration: none;
  display: flex; gap: 0.6rem;
}
.legal-toc a::before { content: counter(toc, decimal-leading-zero); color: var(--fg-mute); }
.legal-toc a:hover { color: var(--fg); }

.legal-prose { max-width: 68ch; color: var(--fg-dim); font-size: 1rem; line-height: 1.7; }
.legal-prose h2 {
  font-size: 1.6rem; color: var(--fg);
  margin: 3rem 0 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface-line);
  scroll-margin-top: 100px;
}
.legal-prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.legal-prose h2 .num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--thucy-red);
  display: block;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.legal-prose h3 {
  font-size: 1.1rem; color: var(--fg);
  margin: 1.8rem 0 0.7rem;
}
.legal-prose p { margin: 0 0 1rem; }
.legal-prose a { color: var(--thucy-red); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal-prose a:hover { color: var(--thucy-red-dark); }
.legal-prose ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.legal-prose ul li { margin-bottom: 0.4rem; }
.legal-prose strong { color: var(--fg); font-weight: 600; }

.legal-card {
  border: 1px solid var(--surface-line);
  border-radius: var(--r-md, 10px);
  padding: 1.2rem 1.4rem;
  background: var(--bg-elev, var(--bg));
  margin: 1.4rem 0;
}
.legal-card.accent {
  border-color: color-mix(in oklab, var(--thucy-red) 30%, transparent);
  background: color-mix(in oklab, var(--thucy-red) 6%, transparent);
}
.legal-card p:last-child { margin-bottom: 0; }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0 1.6rem;
  font-size: 0.94rem;
}
.legal-table th, .legal-table td {
  text-align: left;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--surface-line);
  vertical-align: top;
}
.legal-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-mute);
  border-bottom: 1px solid var(--thucy-red);
}
.legal-table td { color: var(--fg-dim); }
.legal-table td strong { color: var(--fg); }

.legal-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1rem 0 2rem;
  border-top: 1px solid var(--surface-line);
  margin-top: 3rem;
  display: flex; gap: 2rem; flex-wrap: wrap;
}

@media (max-width: 900px) {
  .legal-wrap { grid-template-columns: 1fr; gap: 2rem; }
  .legal-toc { position: relative; top: 0; }
}

/* ============================================================
   Utilities
   ============================================================ */
.text-accent { color: var(--thucy-red); }
.mono { font-family: var(--font-mono); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .lab-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .hero-split, .page-hero-grid, .cta-strip .wrap, .two-col, .feature-block { grid-template-columns: 1fr; gap: 2.5rem; }
  .feature-block:nth-child(even) > :first-child { order: initial; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .lab-head { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 640px) {
  .pillars { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar-left .sep, .topbar-left .addr { display: none; }
  .btn-incident .label-long { display: none; }
  .deliverables { grid-template-columns: 1fr; }
}
