/* ==========================================================================
   EarTech — Design system
   ========================================================================== */

:root {
  --bg: #05070d;
  --bg-elevated: #0a0e18;
  --surface: #0d1220;
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf7;
  --text-dim: #8b93a8;
  --text-faint: #5c6478;

  --blue: #2f6bff;
  --blue-light: #5ea1ff;
  --cyan: #22e6ff;
  --gradient: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 55%, #7c5cff 100%);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-glow: 0 0 40px rgba(47, 107, 255, 0.25);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--cyan); }

.text-glow {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- preloader ---------- */
body.is-loading { overflow: hidden; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.preloader-mark {
  width: 200px;
  height: auto;
  animation: preloader-pulse 1.6s ease-in-out infinite;
}
@keyframes preloader-pulse {
  0%, 100% { opacity: 0.55; filter: drop-shadow(0 0 0 rgba(34, 230, 255, 0)); }
  50% { opacity: 1; filter: drop-shadow(0 0 14px rgba(34, 230, 255, 0.5)); }
}
.preloader-bar {
  width: 200px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gradient);
  box-shadow: 0 0 10px rgba(34, 230, 255, 0.6);
  transition: width .25s var(--ease);
}
.preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- background fx ---------- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  inset: -60px;
  background-image:
    linear-gradient(rgba(94, 161, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 161, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
  animation: grid-pan 26s linear infinite;
}

@keyframes grid-pan {
  to { background-position: 56px 56px; }
}

/* aurora blobs */
.aurora-layer {
  position: absolute;
  inset: 0;
  transition: transform .6s var(--ease);
  will-change: transform;
}
.aurora {
  position: absolute;
  filter: blur(120px);
  will-change: transform, border-radius;
  mix-blend-mode: screen;
}
.aurora-1 {
  width: 640px;
  height: 640px;
  top: -220px;
  left: -160px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 100%);
  opacity: 0.32;
  border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%;
  animation: aurora-drift-1 22s ease-in-out infinite;
}
.aurora-2 {
  width: 560px;
  height: 560px;
  bottom: -240px;
  right: -140px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
  opacity: 0.24;
  border-radius: 60% 40% 35% 65% / 55% 60% 40% 45%;
  animation: aurora-drift-2 26s ease-in-out infinite;
}

@keyframes aurora-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%; }
  33% { transform: translate(70px, 50px) scale(1.1); border-radius: 58% 42% 40% 60% / 55% 65% 35% 45%; }
  66% { transform: translate(-30px, 90px) scale(0.95); border-radius: 50% 50% 55% 45% / 40% 55% 45% 60%; }
}
@keyframes aurora-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); border-radius: 60% 40% 35% 65% / 55% 60% 40% 45%; }
  33% { transform: translate(-60px, -40px) scale(1.08); border-radius: 45% 55% 60% 40% / 40% 45% 55% 60%; }
  66% { transform: translate(40px, -80px) scale(0.96); border-radius: 55% 45% 50% 50% / 60% 40% 60% 40%; }
}

/* grain texture */
.grain {
  position: absolute;
  inset: -100px;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  animation: grain-shift 1.1s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 2%); }
  50% { transform: translate(2%, -1%); }
  75% { transform: translate(-1%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(34, 230, 255, 0.6);
  z-index: 200;
}

/* ---------- custom cursor ---------- */
html.custom-cursor,
html.custom-cursor a,
html.custom-cursor button,
html.custom-cursor input,
html.custom-cursor textarea,
html.custom-cursor select {
  cursor: none;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 300;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
html.custom-cursor .cursor-dot,
html.custom-cursor .cursor-ring {
  opacity: 1;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  box-shadow: 0 0 10px 2px rgba(34, 230, 255, 0.8);
  transform: translate3d(-50%, -50%, 0);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(94, 161, 255, 0.5);
  background: radial-gradient(circle, rgba(47, 107, 255, 0.08), transparent 70%);
  transform: translate3d(-50%, -50%, 0);
  transition: opacity .3s var(--ease), width .25s var(--ease), height .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.cursor-ring.hovering {
  width: 60px;
  height: 60px;
  border-color: var(--cyan);
  background: radial-gradient(circle, rgba(34, 230, 255, 0.14), transparent 70%);
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(5, 7, 13, 0.6);
  border: 1px solid transparent;
  border-radius: 0;
  box-shadow: none;
  transition: top .45s var(--ease), width .45s var(--ease), border-radius .45s var(--ease),
    background .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
}
.site-header.scrolled {
  top: 14px;
  width: min(1160px, calc(100% - 32px));
  border-radius: 999px;
  background: rgba(10, 13, 22, 0.78);
  border-color: var(--surface-border);
  box-shadow: 0 20px 50px -22px rgba(0, 0, 0, 0.65), 0 0 32px -14px rgba(47, 107, 255, 0.3);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  transition: height .45s var(--ease);
}
.site-header.scrolled .header-inner { height: 62px; }

.logo { display: inline-flex; align-items: center; }
.logo-img {
  display: block;
  height: 46px;
  width: auto;
  transition: height .45s var(--ease);
}
.site-header.scrolled .logo-img { height: 36px; }

.logo-img--footer { height: 62px; }

.main-nav {
  display: flex;
  gap: 36px;
}
.main-nav a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color .2s var(--ease);
  position: relative;
  padding-bottom: 2px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a.active { color: var(--text); }
.main-nav a.active::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.28), transparent 60%);
  opacity: 0;
  transition: opacity .3s var(--ease);
  z-index: 1;
  pointer-events: none;
}
.btn:hover::before { opacity: 1; }
.btn > * { position: relative; z-index: 2; }

.btn-primary {
  background: var(--gradient);
  color: #04070f;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 55px rgba(47, 107, 255, 0.45); }
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-ghost {
  background: transparent;
  border-color: var(--surface-border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--blue-light); background: rgba(94, 161, 255, 0.06); transform: translateY(-2px); }
.btn-ghost::before { background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%), rgba(94, 161, 255, 0.18), transparent 60%); }

.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-block { width: 100%; padding: 15px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  padding: 190px 0 120px;
  overflow: hidden;
}
.hero-inner { text-align: center; position: relative; z-index: 1; }

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.particle {
  position: absolute;
  bottom: -10px;
  width: var(--size, 3px);
  height: var(--size, 3px);
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0;
  box-shadow: 0 0 6px 1px rgba(34, 230, 255, 0.7);
  animation: particle-float var(--duration, 12s) linear infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes particle-float {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.4; }
  100% { transform: translate(var(--drift, 30px), -420px); opacity: 0; }
}

.mask-line {
  display: block;
  overflow: hidden;
}
.mask-inner {
  display: inline-block;
  transform: translateY(115%);
  opacity: 0;
}
.mask-inner.play {
  animation: mask-reveal .9s var(--ease) forwards;
}
@keyframes mask-reveal {
  to { transform: translateY(0); opacity: 1; }
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1;
  opacity: 0.8;
  transition: opacity .3s var(--ease);
}
.scroll-indicator:hover { opacity: 1; }
.scroll-indicator-mouse {
  width: 24px;
  height: 38px;
  border: 1.5px solid var(--text-faint);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.scroll-indicator-mouse span {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--cyan);
  animation: scroll-wheel 1.8s ease-in-out infinite;
}
@keyframes scroll-wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(10px); opacity: 0; }
  71% { transform: translateY(0); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.scroll-indicator-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.scroll-indicator.hide {
  opacity: 0;
  visibility: hidden;
}

.eyebrow, .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 20px;
}
.section-eyebrow { justify-content: center; }

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 230, 255, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(34, 230, 255, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 230, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 230, 255, 0); }
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  max-width: 850px;
  margin: 0 auto 26px;
}

.rotate-word {
  display: inline-block;
  transition: opacity .35s var(--ease), transform .35s var(--ease), filter .35s var(--ease);
}
.rotate-word.swap {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(6px);
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 40px;
  font-size: 1.08rem;
  color: var(--text-dim);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 90px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- shared section styles ---------- */
section { position: relative; z-index: 1; padding: 120px 0; }

.section-fx { overflow: hidden; }
.section-fx::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    transparent 42%,
    rgba(94, 161, 255, 0.28) 48%,
    rgba(34, 230, 255, 0.5) 50%,
    rgba(94, 161, 255, 0.28) 52%,
    transparent 58%);
  transform: translateX(-140%);
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: screen;
}
.section-fx.wipe-in::before {
  animation: section-wipe 1.1s var(--ease) forwards;
}
@keyframes section-wipe {
  to { transform: translateX(140%); }
}

/* magnetic buttons: snappier transform tracking, keep the rest of .btn's transitions */
.btn.magnetic {
  transition: transform .15s ease-out, box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}

.section-eyebrow { display: block; text-align: center; }
.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

/* ---------- services ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}

.services-flow {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 50%;
  height: 1px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(94, 161, 255, 0.28), transparent);
}
.services-flow span {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px 2px rgba(34, 230, 255, 0.7);
  opacity: 0;
  animation: flow-travel 6s linear infinite;
}
.services-flow span:nth-child(2) { animation-delay: 2s; }
.services-flow span:nth-child(3) { animation-delay: 4s; }
@keyframes flow-travel {
  0% { left: 0%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.card {
  background: linear-gradient(180deg, var(--surface) 0%, rgba(13, 18, 32, 0.4) 100%);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 36px 30px;
  position: relative;
  isolation: isolate;
  transform: perspective(800px) rotateX(0) rotateY(0) translateY(0);
  transition: transform .35s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  transform-style: preserve-3d;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(94, 161, 255, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity .35s var(--ease);
  pointer-events: none;
  z-index: 0;
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card:hover {
  border-color: rgba(94, 161, 255, 0.35);
  box-shadow: 0 20px 60px -20px rgba(47, 107, 255, 0.35);
}

/* stronger flip-in entrance, specific to service cards */
.services .card.reveal {
  transform: perspective(900px) translateY(40px) rotateX(-14deg) scale(0.94);
  transform-origin: bottom center;
}
.services .card.reveal.in-view {
  transform: perspective(900px) translateY(0) rotateX(0) scale(1);
}

.card-index {
  position: absolute;
  top: 30px;
  right: 30px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  transition: color .3s var(--ease);
  z-index: 1;
}
.card:hover .card-index { color: var(--cyan); }

.card-highlight {
  background: linear-gradient(180deg, rgba(34, 230, 255, 0.06) 0%, var(--surface) 60%);
  border-color: transparent;
}

@property --angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.card-highlight::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle), var(--cyan), var(--blue), #7c5cff, var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin-border 4s linear infinite;
  z-index: 0;
  pointer-events: none;
}
@keyframes spin-border {
  to { --angle: 360deg; }
}

.card:not(.card-highlight)::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle), transparent 0deg, var(--cyan) 35deg, var(--blue-light) 70deg, transparent 130deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  animation: spin-border 2.4s linear infinite;
  animation-play-state: paused;
  transition: opacity .3s var(--ease);
  z-index: 0;
  pointer-events: none;
}
.card:not(.card-highlight):hover::after {
  opacity: 1;
  animation-play-state: running;
}

.card-icon-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
}
.icon-halo {
  position: absolute;
  inset: -9px;
  border-radius: 16px;
  background: conic-gradient(from 0deg, transparent, rgba(34, 230, 255, 0.5) 25%, transparent 45%);
  filter: blur(3px);
  opacity: 0.7;
  animation: halo-spin 5s linear infinite;
}
@keyframes halo-spin {
  to { transform: rotate(360deg); }
}

.card-icon {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 161, 255, 0.08);
  color: var(--cyan);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card-icon svg { width: 24px; height: 24px; }
.card:hover .card-icon {
  transform: scale(1.1) rotate(-4deg);
  box-shadow: 0 0 24px rgba(34, 230, 255, 0.35);
}

.card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.card p { margin-bottom: 18px; font-size: 0.94rem; }

.card-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.88rem;
  color: var(--text-faint);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.card.in-view .card-list li { opacity: 1; transform: translateX(0); }
.card.in-view .card-list li:nth-child(1) { transition-delay: .15s; }
.card.in-view .card-list li:nth-child(2) { transition-delay: .27s; }
.card.in-view .card-list li:nth-child(3) { transition-delay: .39s; }
.card-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-light);
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.card-link svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.card-link:hover { color: var(--cyan); gap: 10px; }
.card-link:hover svg { transform: translateX(2px); }

@media (hover: hover) and (pointer: fine) {
  .card-link {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), color .2s var(--ease), gap .2s var(--ease);
  }
  .card:hover .card-link,
  .card:focus-within .card-link {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- approche / timeline ---------- */
.approche { background: var(--bg-elevated); }

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.timeline-step {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.timeline-step:hover {
  transform: translateY(-5px);
  border-color: rgba(94, 161, 255, 0.3);
  box-shadow: 0 16px 40px -18px rgba(47, 107, 255, 0.35);
}
.step-num {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
  border: 1px solid rgba(34, 230, 255, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 18px;
  transition: box-shadow .3s var(--ease);
}
.timeline-step:hover .step-num {
  box-shadow: 0 0 16px rgba(34, 230, 255, 0.4);
}
.timeline-step h3 { font-size: 1.05rem; margin-bottom: 10px; }
.timeline-step p { font-size: 0.88rem; }

/* ---------- a propos ---------- */
.apropos-inner { max-width: 780px; margin: 0 auto; text-align: center; }
.apropos-text .section-title { margin-bottom: 20px; }
.lead {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 56px;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: left;
}
.value h4 {
  font-size: 0.98rem;
  margin-bottom: 8px;
  color: var(--text);
}
.value p { font-size: 0.85rem; }

/* ---------- contact ---------- */
.contact { background: var(--bg-elevated); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.contact-intro .section-eyebrow,
.contact-intro .section-title { text-align: left; margin-left: 0; }
.contact-intro .lead { margin-left: 0; }

.contact-info {
  margin-top: 32px;
}
.contact-info a {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cyan);
  border-bottom: 1px solid rgba(34, 230, 255, 0.3);
  padding-bottom: 2px;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  background: rgba(94, 161, 255, 0.05);
}
.form-field select { color-scheme: dark; }

.form-status {
  margin-top: 14px;
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
}
.form-status.success { color: #4ade80; }
.form-status.error { color: #f87171; }

.confetti-bit {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 350;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  animation: confetti-burst .8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes confetti-burst {
  to {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3);
    opacity: 0;
  }
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 56px 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  padding-bottom: 32px;
}

.footer-brand { max-width: 380px; }
.footer-brand .logo-img { margin-bottom: 8px; }
.footer-tagline {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text);
  opacity: 0.75;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 13px;
}
.footer-links a {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color .2s var(--ease);
}
.footer-links a:hover { color: var(--cyan); }

.footer-divider {
  height: 1px;
  background: var(--surface-border);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
}
.footer-bottom p {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(8px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ---------- back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: rgba(13, 18, 32, 0.85);
  backdrop-filter: blur(10px);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.back-to-top svg { width: 18px; height: 18px; }
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  border-color: var(--blue-light);
  box-shadow: 0 0 24px rgba(47, 107, 255, 0.35);
  transform: translateY(-3px);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grid-overlay,
  .aurora-1, .aurora-2,
  .grain,
  .card-highlight::after,
  .card:not(.card-highlight)::after,
  .icon-halo,
  .services-flow span,
  .eyebrow-dot,
  .preloader-mark,
  .particle,
  .scroll-indicator-mouse span,
  .mask-inner,
  .section-fx::before {
    animation: none !important;
  }
  .mask-inner { opacity: 1; transform: translateY(0); }
  .reveal {
    transition-duration: .01ms;
    filter: none;
  }
  .cursor-dot, .cursor-ring { display: none; }
  html.custom-cursor,
  html.custom-cursor a,
  html.custom-cursor button {
    cursor: auto;
  }
  .preloader { transition-duration: .01ms; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: 1fr; }
  .services-flow { display: none; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .contact-intro .section-eyebrow,
  .contact-intro .section-title,
  .contact-intro .lead { text-align: center; margin-left: auto; margin-right: auto; }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(8, 11, 20, 0.97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s var(--ease);
  }
  .main-nav.open { max-height: 320px; }
  .main-nav a { padding: 18px 0; width: 100%; text-align: center; }
  .nav-toggle { display: flex; }
  .header-actions .btn-sm { display: none; }

  .hero { padding: 150px 0 80px; }
  .hero-stats { gap: 32px; }

  .timeline { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 80px 0; }

  .footer-top { flex-direction: column; }
  .footer-links { align-items: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  /* perf: trim the heaviest always-on effects on small/mobile screens */
  .aurora { filter: blur(70px); }
  .grain { animation: none; opacity: 0.035; }
  .icon-halo { animation: none; opacity: 0.35; filter: blur(1px); }
  .grid-overlay { animation: none; }
}
