/* ============================================================
   xNumerix — styles.css
   Swiss / International Typographic Style · mobile-first
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Color */
  --bg: #FFFFFF;
  --bg-alt: #F8F9FA;
  --text: #0A0A0A;
  --text-muted: #4A4A4A;
  --border: #E0E0E0;
  --cta: #000000;
  --cta-text: #FFFFFF;
  --cta-hover: #333333;

  /* Typography */
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Spacing scale */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 40px;
  --sp-5: 64px;
  --sp-6: 96px;

  /* Layout */
  --container: 1240px;
  --gutter: 20px;
  --header-h: 72px;
  --radius: 0;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Anchor offset under the sticky header */
section[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.bg-alt {
  background-color: var(--bg-alt);
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-2);
  z-index: 300;
  padding: var(--sp-1) var(--sp-2);
  background: var(--cta);
  color: var(--cta-text);
  font-size: 0.875rem;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--sp-1);
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 0;
  height: 2px;
  background: var(--text);
}

/* ---------- Type patterns ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--text);
  flex: none;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.lead,
.section-lead {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  color: var(--text-muted);
  max-width: 60ch;
}

.section {
  padding-block: var(--sp-5);
}

.section-head {
  max-width: 760px;
  margin-bottom: var(--sp-4);
}

.section-head h2 {
  margin-bottom: var(--sp-2);
}

/* Hero title word-by-word reveal (spans injected by JS) */
.hw {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--d, 0ms);
}

.hw.in {
  opacity: 1;
  transform: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--cta);
  border-radius: var(--radius);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-align: center;
}

.btn-solid {
  background: var(--cta);
  color: var(--cta-text);
}

.btn-solid::after {
  content: "→";
  display: inline-block;
  transition: transform 0.25s ease;
}

.btn-solid:hover {
  background: var(--cta-hover);
  border-color: var(--cta-hover);
}

.btn-solid:hover::after {
  transform: translateX(4px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--text);
  color: var(--cta-text);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(10, 10, 10, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.logo-bg {
  fill: var(--text);
}

.logo-strokes {
  stroke: var(--bg);
}

.wordmark-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.wordmark-x {
  color: var(--text-muted);
}

.wordmark-invert {
  color: var(--cta-text);
}

.wordmark-invert .logo-bg {
  fill: var(--cta-text);
}

.wordmark-invert .logo-strokes {
  stroke: var(--text);
}

.wordmark-invert .wordmark-x {
  color: #9A9A9A;
}

/* Hamburger (mobile) */
.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}

.hamburger-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav — mobile panel first */
.site-nav {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--gutter) var(--sp-4);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-nav.is-open {
  display: flex;
}

.nav-list {
  display: flex;
  flex-direction: column;
}

.nav-list li + li {
  border-top: 1px solid var(--border);
}

.nav-link {
  display: block;
  padding: 13px 0;
  font-size: 1rem;
  font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left calc(100% - 8px);
  background-size: 0% 1px;
  transition: color 0.2s ease, background-size 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background-size: 40px 1px;
}

.nav-cta {
  align-self: flex-start;
}

/* Language switch */
.lang-switch {
  display: flex;
  align-items: center;
}

.lang-btn {
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lang-btn + .lang-btn {
  border-left: 1px solid var(--border);
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.is-active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* Desktop nav */
@media (min-width: 1100px) {
  .hamburger {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-3);
    padding: 0;
    background: transparent;
    border: none;
  }

  .nav-list {
    flex-direction: row;
    gap: 20px;
  }

  .nav-list li + li {
    border-top: none;
  }

  .nav-link {
    padding: 4px 0;
    font-size: 0.875rem;
    background-position: left 100%;
  }

  .nav-link:hover,
  .nav-link.is-active {
    background-size: 100% 1px;
  }

  .nav-cta {
    align-self: center;
    padding: 10px 18px;
    font-size: 0.8125rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  gap: var(--sp-4);
  align-items: center;
}

.hero-copy .lead {
  margin-top: var(--sp-3);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.hero-media {
  border: 1px solid var(--border);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

@media (min-width: 900px) {
  .hero {
    padding-block: var(--sp-6);
  }

  .hero-inner {
    grid-template-columns: 7fr 5fr;
    gap: var(--sp-5);
  }

  .hero-media {
    aspect-ratio: 4 / 5;
    overflow: hidden;
  }
}

/* ---------- Trust strip + marquee ---------- */
.trust {
  padding-top: var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.trust-line {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.trust-tokens {
  display: grid;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.trust-tokens li {
  padding-left: var(--sp-2);
  border-left: 2px solid var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
}

@media (min-width: 640px) {
  .trust-tokens {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .trust-tokens {
    grid-template-columns: repeat(4, 1fr);
  }
}

.sector-marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  padding-block: 14px;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.sector-marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-list {
  display: flex;
  flex: none;
}

.marquee-list li {
  flex: none;
  padding-inline: 28px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  position: relative;
}

.marquee-list li::after {
  content: "·";
  position: absolute;
  right: -4px;
  color: var(--border);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  gap: var(--sp-3);
}

.card {
  padding: var(--sp-4) var(--sp-3);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.card:hover {
  border-color: var(--text);
  transform: translateY(-3px);
}

.card-icon {
  display: inline-block;
  width: 32px;
  height: 32px;
  margin-bottom: var(--sp-3);
  color: var(--text);
  transition: transform 0.25s ease;
}

.card:hover .card-icon {
  transform: translateY(-2px);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--sp-2);
}

.card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Processus ---------- */
.process-steps {
  display: grid;
  gap: var(--sp-3);
}

.process-step {
  padding-top: var(--sp-3);
  border-top: 1px solid var(--text);
}

.step-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.process-step h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: var(--sp-1);
}

.process-step p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

@media (min-width: 900px) {
  .process-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-4);
  }
}

/* ---------- Transformation (compare slider) ---------- */
.compare-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 8;
  min-height: 260px;
}

.compare-frame:focus-within {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.compare-after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos, 50%));
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  margin-left: -1px;
  background: var(--cta-text);
  pointer-events: none;
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--cta-text);
  color: var(--text);
  border: 1px solid var(--text);
}

.compare-handle svg {
  width: 22px;
  height: 22px;
}

.compare-label {
  position: absolute;
  bottom: 14px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--cta);
  color: var(--cta-text);
  pointer-events: none;
}

.compare-label-before {
  left: 14px;
}

.compare-label-after {
  right: 14px;
}

.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}

/* ---------- Sécurité ---------- */
.security-grid {
  display: grid;
  gap: var(--sp-3);
}

.pillar {
  padding: var(--sp-3);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.25s ease;
}

.pillar:hover {
  border-color: var(--text);
}

.pillar h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: var(--sp-2);
  padding-left: var(--sp-2);
  border-left: 3px solid var(--text);
}

.pillar p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.security-note {
  margin-top: var(--sp-4);
  padding: var(--sp-3);
  border: 1px solid var(--text);
  background: var(--bg);
  font-size: 0.9375rem;
  font-weight: 500;
  max-width: 720px;
}

@media (min-width: 900px) {
  .security-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Accès (online / off-grid) ---------- */
.access-inner {
  display: grid;
  gap: var(--sp-4);
}

.access-modes {
  display: grid;
  gap: var(--sp-3);
  align-content: start;
}

.access-mode {
  padding-top: var(--sp-2);
  border-top: 1px solid var(--text);
}

.access-mode h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: var(--sp-1);
}

.access-mode p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.access-viz {
  border: 1px solid var(--border);
  padding: var(--sp-3);
  background: var(--bg);
}

.access-toggle {
  display: inline-flex;
  border: 1px solid var(--text);
  margin-bottom: var(--sp-3);
}

.access-btn {
  padding: 10px 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.access-btn + .access-btn {
  border-left: 1px solid var(--text);
}

.access-btn.is-active {
  background: var(--cta);
  color: var(--cta-text);
}

.access-diagram {
  display: block;
  width: 100%;
  height: auto;
}

.access-diagram rect,
.access-diagram line,
.access-diagram path,
.access-diagram circle,
.access-diagram polyline {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
}

.access-diagram text {
  fill: var(--text);
  stroke: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-anchor: middle;
}

.acc-flow {
  stroke-dasharray: 6 5;
  animation: flowdash 1.1s linear infinite;
}

@keyframes flowdash {
  to {
    stroke-dashoffset: -11;
  }
}

.acc-layer {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.acc-layer.is-active {
  opacity: 1;
}

.acc-nowifi line {
  stroke-width: 2;
}

.access-caption {
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
  min-height: 3em;
}

@media (min-width: 900px) {
  .access-inner {
    grid-template-columns: 5fr 7fr;
    gap: var(--sp-5);
    align-items: start;
  }
}

/* ---------- Options (accordion) ---------- */
.accordion {
  border-top: 1px solid var(--text);
  max-width: 860px;
}

.acc-item {
  border-bottom: 1px solid var(--border);
}

.acc-heading {
  font-family: var(--font-body);
  letter-spacing: 0;
}

.acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  width: 100%;
  padding: 20px 4px;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.acc-btn:hover {
  color: var(--text-muted);
}

.acc-marker {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.acc-marker::before,
.acc-marker::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 2px;
  margin-top: -1px;
  background: var(--text);
  transition: transform 0.25s ease;
}

.acc-marker::after {
  transform: rotate(90deg);
}

.acc-btn[aria-expanded="true"] .acc-marker::after {
  transform: rotate(0deg);
}

.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease, visibility 0.3s;
  visibility: hidden;
}

.acc-panel.is-open {
  grid-template-rows: 1fr;
  visibility: visible;
}

.acc-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.acc-panel-inner p {
  padding: 0 4px 20px;
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 68ch;
}

/* ---------- Témoignages (carousel + ratings) ---------- */
.agg-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: var(--sp-3);
}

.agg-value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
}

.agg-note {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stars {
  display: inline-flex;
  gap: 3px;
}

.star {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
}

.star svg {
  display: block;
  width: 100%;
  height: 100%;
}

.star svg polygon {
  fill: var(--text);
}

.star-half .star-outline polygon {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
}

.star-fill {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
}

.star-fill svg {
  width: 18px;
  height: 18px;
}

.carousel {
  max-width: 860px;
}

.carousel-viewport {
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  padding: var(--sp-4);
}

.carousel-slide blockquote p {
  margin-top: var(--sp-2);
  font-family: var(--font-head);
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  line-height: 1.4;
}

.carousel-slide figcaption {
  margin-top: var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.t-name {
  font-style: normal;
  font-weight: 700;
  font-size: 0.9375rem;
}

.t-role {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--text);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.carousel-btn:hover {
  background: var(--cta);
  color: var(--cta-text);
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
}

.carousel-dots {
  display: flex;
  gap: 10px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--text);
  background: transparent;
  transition: background-color 0.2s ease;
}

.carousel-dot.is-active {
  background: var(--text);
}

/* ---------- À propos ---------- */
.about-inner {
  display: grid;
  gap: var(--sp-4);
  align-items: center;
}

.about-copy h2 {
  margin-bottom: var(--sp-3);
}

.about-copy p + p {
  margin-top: var(--sp-2);
}

.about-copy p {
  color: var(--text-muted);
}

.about-media {
  border: 1px solid var(--border);
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

@media (min-width: 900px) {
  .about-inner {
    grid-template-columns: 6fr 5fr;
    gap: var(--sp-5);
  }

  .about-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
  }
}

/* ---------- Statistiques ---------- */
.stats {
  padding-block: var(--sp-5);
  background: var(--text);
  color: var(--cta-text);
}

.stats-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--sp-4);
}

.stats-grid {
  display: grid;
  gap: var(--sp-4);
}

.stat {
  padding-top: var(--sp-2);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.stat-value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.05;
}

.stat-suffix {
  font-size: 0.6em;
  vertical-align: 0.35em;
  margin-left: 2px;
}

.stat-label {
  margin-top: var(--sp-1);
  font-size: 0.875rem;
  color: #B8B8B8;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Contact ---------- */
.contact-inner {
  display: grid;
  gap: var(--sp-4);
}

.contact-details {
  display: grid;
  gap: var(--sp-3);
}

.contact-detail dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact-detail dd {
  font-size: 1rem;
  font-weight: 500;
}

.contact-detail a {
  border-bottom: 1px solid var(--text);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-detail a:hover {
  color: var(--text-muted);
  border-color: var(--text-muted);
}

.contact-mailto {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.contact-mailto a {
  display: block;
  margin-top: 4px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--text);
  width: fit-content;
}

/* Form */
.contact-form {
  display: grid;
  gap: var(--sp-3);
}

.form-row {
  display: grid;
  gap: var(--sp-3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
}

.req {
  color: var(--text-muted);
}

.field input,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.2s ease;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--text-muted);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}

.field-error {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.field-error::before {
  content: "— ";
}

.required-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.btn-submit {
  justify-self: start;
}

.btn-submit[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-status {
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 1.5em;
}

.form-status.is-success {
  border-left: 3px solid var(--text);
  padding-left: var(--sp-2);
}

.form-status.is-error {
  border-left: 3px solid var(--text);
  padding-left: var(--sp-2);
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .contact-inner {
    grid-template-columns: 4fr 7fr;
    gap: var(--sp-5);
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--text);
  color: #D6D6D6;
  padding-block: var(--sp-5) var(--sp-3);
}

.footer-grid {
  display: grid;
  gap: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-tagline {
  margin-top: var(--sp-2);
  font-size: 0.9375rem;
  max-width: 32ch;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--sp-3);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--cta-text);
  transition: color 0.2s ease;
}

.footer-social:hover {
  color: #B8B8B8;
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

.footer-nav h3,
.footer-contact h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9A9A9A;
  margin-bottom: var(--sp-2);
}

.footer-nav li,
.footer-contact li {
  margin-bottom: var(--sp-1);
  font-size: 0.9375rem;
}

.footer-nav a,
.footer-contact a {
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--cta-text);
}

.site-footer :focus-visible {
  outline-color: var(--cta-text);
}

.footer-bottom {
  padding-top: var(--sp-3);
  font-size: 0.8125rem;
  color: #9A9A9A;
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--sp-5);
  }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: var(--sp-3);
  bottom: var(--sp-3);
  z-index: 150;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: var(--cta);
  color: var(--cta-text);
  border: 1px solid var(--cta);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  background: var(--cta-hover);
}

.to-top svg {
  width: 20px;
  height: 20px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger within grids */
.services-grid .reveal:nth-child(2),
.process-steps .reveal:nth-child(2),
.security-grid .reveal:nth-child(2),
.access-modes .reveal:nth-child(2),
.stats-grid .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.services-grid .reveal:nth-child(3),
.process-steps .reveal:nth-child(3),
.security-grid .reveal:nth-child(3),
.access-modes .reveal:nth-child(3),
.stats-grid .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.services-grid .reveal:nth-child(4),
.process-steps .reveal:nth-child(4),
.stats-grid .reveal:nth-child(4) {
  transition-delay: 0.3s;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .reveal,
  .hw {
    opacity: 1;
    transform: none;
  }

  .marquee-track {
    animation: none;
    flex-wrap: wrap;
  }

  .acc-flow {
    animation: none;
  }
}
