:root {
  --bg: #061526;
  --bg-elevated: #0b2438;
  --surface: #102a42;
  --text: #f2f7fc;
  --muted: #9bb4c9;
  --line: rgba(255, 255, 255, 0.12);
  --blue: #1a7fd4;
  --blue-deep: #0d4f8a;
  --cyan: #3ec4ff;
  --brand-blue: #0080ff;
  --accent: #5ad0ff;
  --radius: 1.25rem;
  --header-h: 4.5rem;
  --font-display: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(26, 127, 212, 0.28), transparent 55%),
    radial-gradient(900px 500px at 90% 20%, rgba(62, 196, 255, 0.12), transparent 50%),
    linear-gradient(180deg, #04101c 0%, var(--bg) 40%, #071a2c 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
}

p {
  margin: 0;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(6, 21, 38, 0.78);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  min-width: 0;
}

.logo img {
  width: auto;
  height: 2.65rem;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.1;
  min-width: 0;
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #e8eef5;
  white-space: nowrap;
}

.logo-name em {
  font-style: normal;
  color: var(--brand-blue);
}

.logo-tagline {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.logo--footer {
  gap: 0.9rem;
}

.logo--footer img {
  height: 3.4rem;
}

.logo--footer .logo-name {
  font-size: 1.2rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s ease;
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text) !important;
  transition: border-color 0.25s ease, background 0.25s ease !important;
}

.nav-cta:hover {
  border-color: var(--cyan);
  background: rgba(62, 196, 255, 0.08);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 1.35rem;
  height: 2px;
  margin: 0.3rem auto;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  padding:
    calc(var(--header-h) + 1.5rem)
    clamp(1.25rem, 5vw, 4rem)
    4.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("img/background.png");
  background-size: cover;
  background-position: center right;
  transform: scale(1.06);
  will-change: transform;
  animation: hero-drift 28s ease-in-out infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(4, 16, 28, 0.88) 0%, rgba(4, 16, 28, 0.62) 34%, rgba(4, 16, 28, 0.18) 58%, rgba(4, 16, 28, 0.2) 100%),
    linear-gradient(180deg, rgba(4, 16, 28, 0.4) 0%, transparent 42%, rgba(4, 16, 28, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 40rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.35rem;
  max-width: 100%;
}

.brand-logo {
  width: clamp(4.5rem, 12vw, 6.25rem);
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
}

.brand-text {
  position: relative;
  min-width: 0;
  padding: 0.35rem 0.85rem 0.45rem 0;
  border-radius: 0.5rem;
}

.brand-text::before {
  content: "";
  position: absolute;
  inset: -0.6rem -1.2rem -0.7rem -0.4rem;
  border-radius: 1rem;
  background: radial-gradient(ellipse at left center, rgba(4, 16, 28, 0.72) 0%, rgba(4, 16, 28, 0.35) 55%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 8px 40px rgba(4, 16, 28, 0.45);
}

.brand-name em {
  font-style: normal;
  color: var(--brand-blue);
}

.brand-tagline {
  position: relative;
  margin-top: 0.55rem;
  max-width: 34rem;
  font-size: clamp(0.72rem, 1.6vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f5f9fd;
  text-shadow:
    0 1px 2px rgba(4, 16, 28, 0.95),
    0 2px 14px rgba(4, 16, 28, 0.75);
}

.hero h1 {
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  max-width: 18ch;
}

.hero-lead {
  color: #d7e6f4;
  text-shadow: 0 1px 12px rgba(4, 16, 28, 0.55);
  font-size: 1.05rem;
  max-width: 34ch;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #04101c;
  box-shadow: 0 10px 30px rgba(26, 127, 212, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 14px 36px rgba(62, 196, 255, 0.4);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  width: 1.5rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 0.45rem;
  z-index: 1;
}

.scroll-hint span {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--cyan);
  animation: scroll-dot 1.6s var(--ease) infinite;
}

/* Sections */
.section-intro {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.85rem;
}

.section-intro h2,
.contact-panel h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 0.85rem;
}

.section-intro p:last-child,
.contact-panel > p {
  color: var(--muted);
  font-size: 1.05rem;
}

.services,
.realisations,
.contact {
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 5vw, 4rem);
}

/* Service blocks */
.service {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: clamp(3.5rem, 8vw, 6rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: calc(var(--radius) + 0.35rem);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 55%),
    rgba(16, 42, 66, 0.35);
  border: 1px solid var(--line);
}

.service:last-child {
  margin-bottom: 0;
}

.service--scan {
  grid-template-columns: 0.85fr 1.15fr;
}

.service-index {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
}

.service-copy h3 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.9rem;
}

.service-copy p {
  color: var(--muted);
  margin-bottom: 1.25rem;
  max-width: 36ch;
}

.service-copy ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.service-copy li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

.service-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(62, 196, 255, 0.7);
}

.service-media {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.service-media--single {
  grid-template-columns: 1fr;
}

.service--modelisation .service-media {
  grid-template-columns: 1fr 1fr;
}

.service-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform 0.7s var(--ease), filter 0.7s ease;
  filter: saturate(1.05) contrast(1.05);
}

.service-media img:hover {
  transform: scale(1.03);
  filter: saturate(1.15) contrast(1.08);
}

.service-media--single img {
  aspect-ratio: 16 / 10;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.gallery-item--wide {
  grid-column: 1 / -1;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.gallery-item--wide img {
  aspect-ratio: 21 / 9;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem 1.35rem;
  background: linear-gradient(transparent, rgba(4, 16, 28, 0.92));
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.gallery-item figcaption span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.25rem;
}

/* Contact */
.contact {
  padding-top: 0;
}

.contact-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  border-radius: calc(var(--radius) + 0.5rem);
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 280px at 85% 20%, rgba(62, 196, 255, 0.18), transparent 60%),
    linear-gradient(135deg, rgba(13, 79, 138, 0.45), rgba(6, 21, 38, 0.9));
}

.contact-panel::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -40px;
  bottom: -60px;
  border: 1px solid rgba(62, 196, 255, 0.25);
  border-radius: 40% 60% 55% 45%;
  animation: morph 10s ease-in-out infinite;
  pointer-events: none;
}

.contact-location {
  margin-top: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.contact-panel .btn {
  margin-top: 1.5rem;
}

.contact-domain {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 2rem clamp(1.25rem, 5vw, 4rem) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-meta {
  display: grid;
  gap: 0.25rem;
  text-align: right;
}

.footer-meta p:first-child {
  color: var(--text);
  font-weight: 500;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.32s; }

.hero .reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: rise-in 0.9s var(--ease) forwards;
}

.hero .reveal-delay-1 { animation-delay: 0.15s; }
.hero .reveal-delay-2 { animation-delay: 0.28s; }
.hero .reveal-delay-3 { animation-delay: 0.4s; }

@keyframes rise-in {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-drift {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); }
}

@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@keyframes morph {
  0%, 100% { border-radius: 40% 60% 55% 45%; transform: rotate(0deg); }
  50% { border-radius: 55% 45% 40% 60%; transform: rotate(18deg); }
}

@media (max-width: 900px) {
  .service,
  .service--scan {
    grid-template-columns: 1fr;
  }

  .service--scan .service-copy {
    order: 1;
  }

  .service--scan .service-media {
    order: 2;
  }

  .gallery-item--wide img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
    z-index: 42;
  }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(4, 16, 28, 0.96);
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    font-size: 1.35rem;
    color: var(--text);
  }

  .service--modelisation .service-media {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery-item--wide {
    grid-column: auto;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .scroll-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal,
  .hero .reveal,
  .hero-bg,
  .scroll-hint span,
  .contact-panel::before,
  .service-media img,
  .gallery-item img {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .hero .reveal {
    opacity: 1;
    transform: none;
  }
}
