/* ========== Vitalis Sécurité — Design System ========== */

:root {
  --navy: #1a2942;
  --navy-deep: #0f1c30;
  --navy-soft: #2a3a55;
  --red: #c8341d;
  --red-dark: #a82812;
  --cream: #f6f4ef;
  --cream-warm: #efe9dc;
  --ink: #14181f;
  --muted: #6b7280;
  --line: rgba(26, 41, 66, 0.12);
  --line-soft: rgba(26, 41, 66, 0.06);

  --serif: "Newsreader", "Times New Roman", serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --container: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html.lenis-smooth { scroll-behavior: auto; }
html.lenis-smooth, html.lenis-smooth body { height: auto; }

/* ===== Chapter marker (used at top of homepage sections) ===== */
.chapter {
  padding-top: 64px;
  padding-bottom: 0;
  position: relative;
}
.chapter-mark {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.chapter-mark .idx {
  color: var(--red);
  font-weight: 500;
  position: relative;
}
.chapter-mark .idx::after {
  content: "/";
  margin: 0 8px 0 10px;
  color: var(--line);
}
.chapter-mark .tot { color: var(--muted); opacity: 0.6; margin-right: 16px; }
.chapter-mark .name { color: var(--navy); flex: 1; }
.chapter-mark .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.chapter-mark .meta { color: var(--muted); opacity: 0.7; }

.chapter.dark .chapter-mark { border-top-color: rgba(246,244,239,0.18); color: rgba(246,244,239,0.55); }
.chapter.dark .chapter-mark .name { color: var(--cream); }
.chapter.dark .chapter-mark .rule { background: rgba(246,244,239,0.18); }
.chapter.dark .chapter-mark .idx::after { color: rgba(246,244,239,0.25); }

@media (max-width: 700px) {
  .chapter { padding-top: 32px; }
  .chapter-mark { padding: 20px 0; gap: 10px; font-size: 10px; }
  .chapter-mark .rule { display: none; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--navy); color: var(--cream); }

/* ===== Typography ===== */

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--red);
}

.proof-section {
  background: var(--cream);
  padding: 92px 0;
  border-top: 1px solid var(--line);
}
.proof-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: end;
  margin-bottom: 40px;
}
.proof-head p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.proof-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}
.proof-card .proof-role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}
.proof-card p {
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.25;
  margin: 0;
}
.proof-card .proof-note {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .proof-head,
  .proof-grid { grid-template-columns: 1fr; }
  .proof-section { padding: 64px 0; }
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  color: var(--navy);
  text-wrap: balance;
}

h1 { font-size: clamp(56px, 9vw, 168px); line-height: 0.92; }
h2 { font-size: clamp(40px, 5.5vw, 88px); line-height: 0.98; }
h3 { font-size: clamp(28px, 3vw, 44px); line-height: 1.05; }
h4 { font-size: clamp(20px, 1.6vw, 26px); line-height: 1.2; }

p { text-wrap: pretty; }

.lead {
  font-family: var(--serif);
  font-size: clamp(20px, 1.7vw, 28px);
  line-height: 1.35;
  color: var(--navy);
  font-weight: 300;
}

/* ===== Layout ===== */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: clamp(80px, 10vw, 160px) 0;
  position: relative;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 0 var(--gutter);
}

/* ===== Navigation ===== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 244, 239, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.3s ease;
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.nav-logo img {
  height: 64px !important;
  width: auto !important;
}
.nav-logo .swiss {
  width: 22px; height: 22px;
  background: var(--red);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 3px;
}
.nav-logo .swiss::before, .nav-logo .swiss::after {
  content: ""; background: white; position: absolute;
}
.nav-logo .swiss {
  position: relative;
}
.nav-logo .swiss::before { width: 12px; height: 3px; }
.nav-logo .swiss::after { width: 3px; height: 12px; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.nav-tagline {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: clamp(18px, 2.2vw, 30px);
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  color: var(--navy);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--red);
  transition: width 0.3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--red); }

.nav-cta {
  background: var(--navy);
  color: var(--cream);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.25s ease;
}
.nav-cta:hover {
  background: var(--red);
  transform: translateY(-1px);
}
.nav-cta .arrow {
  transition: transform 0.25s ease;
}
.nav-cta:hover .arrow { transform: translate(3px, -3px); }

/* ===== Burger toggle (hidden on desktop) ===== */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--navy);
  color: var(--cream);
}
.btn-primary:hover { background: var(--red); transform: translateY(-2px); }
.btn-red {
  background: var(--red);
  color: white;
}
.btn-red:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ===== Footer ===== */

footer {
  background: var(--navy);
  color: var(--cream);
  padding: 100px 0 40px;
  margin-top: 80px;
}
footer h2 {
  color: var(--cream);
  font-size: clamp(48px, 6vw, 96px);
  margin-bottom: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-top: 80px;
  border-top: 1px solid rgba(246, 244, 239, 0.12);
}
.footer-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246, 244, 239, 0.5);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--cream); font-size: 14px; opacity: 0.85; transition: opacity 0.2s, color 0.2s; }
.footer-col a:hover { color: var(--red); opacity: 1; }
.footer-logos {
  margin-top: 56px;
  padding: 32px 0;
  border-top: 1px solid rgba(246, 244, 239, 0.12);
  border-bottom: 1px solid rgba(246, 244, 239, 0.12);
  text-align: center;
}
.footer-logos-label {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 244, 239, 0.58);
  max-width: none;
  margin: 0 auto 22px;
}
.footer-logos-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}
.footer-logo-card {
  width: auto;
  height: 72px;
  padding: 14px 18px;
  border-radius: 6px;
  background: #f6f4ef;
  border: 1px solid rgba(246, 244, 239, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.footer-logo-card img {
  max-width: 118px !important;
  max-height: 42px !important;
  width: auto !important;
  height: auto !important;
  display: block;
  object-fit: contain !important;
}
.footer-logo-card.is-asgs img {
  max-width: 124px !important;
  max-height: 38px !important;
}
.footer-logo-card.is-ssc img {
  max-width: 104px !important;
  max-height: 38px !important;
}
.footer-logo-card.is-vkf img {
  max-width: 132px !important;
  max-height: 34px !important;
  transform: none;
}
.footer-logo-card.is-src img {
  max-width: 104px !important;
  max-height: 36px !important;
  transform: none;
}
.footer-bottom {
  border-top: 1px solid rgba(246, 244, 239, 0.08);
  margin-top: 80px;
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(246, 244, 239, 0.5);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-logos + .footer-bottom {
  margin-top: 28px;
}

/* ===== Scroll reveal ===== */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.40s; }

/* ===== Marquee ===== */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  background: var(--cream);
}
.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  gap: 60px;
  animation: scroll 38s linear infinite;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--navy);
}
.marquee-track span { display: inline-flex; align-items: center; gap: 60px; }
.marquee-track .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  display: inline-block;
}
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* ===== Utility ===== */
.text-red { color: var(--red); }
.text-navy { color: var(--navy); }
.text-cream { color: var(--cream); }
.bg-navy { background: var(--navy); color: var(--cream); }
.bg-cream { background: var(--cream); }
.bg-red { background: var(--red); color: white; }
.italic { font-style: italic; }

/* ===== Cursor pulse (BLS theme) ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.6); }
}
.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* ===== EKG waveform animation ===== */
.ekg-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: ekg 4s linear infinite;
}
@keyframes ekg {
  0% { stroke-dashoffset: 1200; }
  60% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1200; }
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 1024px) {
  :root { --gutter: 32px; }
}

/* Mobile nav + layout */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-inner { gap: 16px; }
  .nav-tagline { display: none; }

  /* slide-down menu panel */
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(82vw, 360px);
    background: var(--cream);
    border-left: 1px solid var(--line);
    box-shadow: -30px 0 60px -30px rgba(26,41,66,0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 96px 40px 40px;
    transform: translateX(100%);
    transition: transform 0.42s cubic-bezier(.4,0,.1,1);
    z-index: 60;
  }
  .nav.open .nav-menu { transform: translateX(0); }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-links a {
    font-family: var(--serif);
    font-size: 30px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a::after { display: none; }

  .nav-menu .nav-cta {
    margin-top: 28px;
    justify-content: center;
    padding: 16px 22px;
    font-size: 15px;
  }

  /* dim backdrop */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 28, 48, 0.4);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 55;
  }
  .nav.open .nav-backdrop { opacity: 1; pointer-events: auto; }

  body.nav-locked { overflow: hidden; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-logos-list { grid-template-columns: repeat(2, minmax(132px, 1fr)); max-width: 380px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}

/* Small phones */
@media (max-width: 560px) {
  :root { --gutter: 20px; }
  .nav-logo img { height: 52px !important; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-logos { margin-top: 40px; }
  .footer-logos-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 320px; }
  .footer-logo-card { height: 64px; padding: 12px 14px; }
  .footer-logo-card img { max-width: 112px !important; max-height: 36px !important; }
  .footer-logo-card.is-vkf img { max-width: 122px !important; max-height: 30px !important; }
  .btn { padding: 14px 22px; font-size: 14px; }
}

/* ===== Urgent banner ===== */
.urgent-bar {
  background: var(--navy);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px var(--gutter);
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.urgent-bar .red-dot {
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.4s ease-in-out infinite;
}
.urgent-bar a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }
.urgent-bar a:hover { color: var(--red); }
@media (max-width: 560px) {
  .urgent-bar { font-size: 10px; padding: 8px 12px; gap: 12px; }
}

/* ===== Sticky contact rail (mobile FAB phone + WhatsApp) ===== */
.contact-rail {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.contact-rail > * { pointer-events: auto; }
.contact-rail a {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  display: inline-flex;
  align-items: center; justify-content: center;
  text-decoration: none;
  box-shadow: 0 12px 28px -10px rgba(26, 41, 66, 0.45);
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), background 0.2s;
}
.contact-rail a:hover { transform: translateY(-2px) scale(1.04); }
.contact-rail .crail-wa { background: #25d366; }
.contact-rail .crail-wa:hover { background: #1da851; }
.contact-rail a svg { width: 20px; height: 20px; }
body.locked .contact-rail {
  display: none;
}
.contact-rail .crail-label {
  display: none;
  position: absolute;
  right: 64px;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 6px 12px;
  border-radius: 4px;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .contact-rail { right: 12px; bottom: 12px; gap: 10px; }
  .contact-rail a { width: 46px; height: 46px; }
  .contact-rail a svg { width: 19px; height: 19px; }
}
@media print {
  .contact-rail { display: none; }
}

/* ===== Trust strip (reference logos) ===== */
.trust-strip {
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 0;
}
.trust-strip .container {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.trust-strip .ts-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.trust-strip .ts-label::before {
  content: ""; width: 24px; height: 1px; background: var(--red);
}
.trust-strip .ts-logos {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}
.trust-strip .ts-logo {
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  color: var(--muted);
  letter-spacing: -0.01em;
}
@media (max-width: 700px) {
  .trust-strip .container { gap: 20px; flex-direction: column; }
  .trust-strip .ts-logos { gap: 24px; justify-content: flex-start; }
  .trust-strip .ts-logo { font-size: 14px; }
}

/* ===== Guarantee tag (placed under CTAs) ===== */
.guarantee {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.guarantee::before {
  content: "✓";
  display: inline-flex;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  align-items: center; justify-content: center;
  font-size: 10px;
  letter-spacing: 0;
}
.cta-section .guarantee,
section[style*="navy"] .guarantee,
.bg-navy .guarantee { color: rgba(246,244,239,0.7); }
.cta-section .guarantee::before { background: var(--cream); color: var(--red); }
