﻿/* â”€â”€â”€ Design tokens â”€â”€â”€ */
:root {
  --black:   #0D0D0D;
  --white:   #FFFFFF;
  --bg:      #FFFFFF;
  --bg-alt:  #F5F5F5;
  --text:    #0D0D0D;
  --muted:   #5A5A5A;
  --light:   #888888;
  --border:  #E3E3E3;
  --blue:    #1C33FF;
  --font:    "Inter", system-ui, -apple-system, sans-serif;
  --w:       1560px; /* still available as a max-content cap where individual sections want it */
  --px:      clamp(40px, 10vw, 192px); /* viewport-scaled side padding (doubled from the initial clamp) */
  --content: 720px;
}

/* â”€â”€â”€ Resets â”€â”€â”€ */
html { scroll-behavior: smooth; overflow-x: hidden; }
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* width: 100% guards against children that escape the viewport on iOS */
  width: 100%;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Obfuscated email rendering. The literal "@" and "." characters are
   emitted via CSS pseudo-elements so they never appear in the document's
   textContent — a scraper stripping HTML tags reads "contactexwayzfr"
   with no usable address. Sighted users see "contact@exwayz.fr"
   rendered normally; screen readers use the link's aria-label until JS
   replaces textContent with the real address (at which point JS also
   strips the aria-label so the SR reads the now-correct text). */
.js-email .ea-at::after  { content: "@"; }
.js-email .ea-dot::after { content: "."; }

input, textarea { cursor: text; }

/* â”€â”€â”€ NAV â”€â”€â”€ */
nav#mainNav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  height: 58px; padding: 0 var(--px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  transition: background .3s, border-color .3s;
}
nav#mainNav.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
/* Light-page variant: start with a light nav (for pages without a dark hero). */
nav#mainNav.light {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 26px; width: auto; transition: filter .3s; }
/* When the bar is transparent over a dark hero, invert the logo to white.
   `:not(.open)` so this doesn't fight the open-menu-on-light-sheet state
   below (the open menu has its own white-bg styles and needs the dark logo). */
nav#mainNav:not(.scrolled):not(.light):not(.open) .nav-logo img { filter: brightness(0) invert(1); }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.8); transition: color .15s; white-space: nowrap; }
.nav-links a:hover { color: #fff; font-weight: 800; }
nav#mainNav.scrolled .nav-links a,
nav#mainNav.light    .nav-links a { color: var(--muted); }
nav#mainNav.scrolled .nav-links a:hover,
nav#mainNav.light    .nav-links a:hover { color: var(--black); }
/* Active page indicator (set by nav.njk based on page URL or activeNav fm key). */
.nav-links a.active { color: #fff; font-weight: 500; }
nav#mainNav.scrolled .nav-links a.active,
nav#mainNav.light    .nav-links a.active { color: var(--black); font-weight: 500; }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-ghost { font-size: 14px; font-weight: 600; color: #fff; padding: 6px 14px; border: 1px solid rgba(255,255,255,0.3); border-radius: 5px; transition: color .15s, background .15s, border-color .15s; background: transparent; font-family: inherit; cursor: pointer; line-height: 1.4; }
.nav-ghost:hover { color: #fff; }
nav#mainNav.scrolled .nav-ghost,
nav#mainNav.light    .nav-ghost { color: var(--muted); }
nav#mainNav.scrolled .nav-ghost:hover,
nav#mainNav.light    .nav-ghost:hover { color: var(--black); background: var(--bg-alt); }
.nav-cta { font-size: 14px; font-weight: 500; color: var(--white); background: var(--black); padding: 7px 18px; border-radius: 5px; transition: background .15s; white-space: nowrap; }
.nav-cta:hover { background: #2a2a2a; }

/* Hamburger button (hidden on desktop, shown on mobile). */
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  background: transparent; border: 0; padding: 0;
  align-items: center; justify-content: center;
  cursor: pointer; color: #fff;
  transition: color .3s;
}
nav#mainNav.scrolled .nav-burger,
nav#mainNav.light    .nav-burger { color: var(--black); }
.nav-burger-box { position: relative; width: 22px; height: 16px; }
.nav-burger-box::before,
.nav-burger-box::after,
.nav-burger-box span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: currentColor; border-radius: 1px;
  transition: transform .25s ease, top .25s ease, opacity .2s ease;
}
.nav-burger-box::before { top: 0; }
.nav-burger-box span   { top: 7px; }
.nav-burger-box::after { top: 14px; }
nav#mainNav.open .nav-burger-box::before { top: 7px; transform: rotate(45deg); }
nav#mainNav.open .nav-burger-box::after  { top: 7px; transform: rotate(-45deg); }
nav#mainNav.open .nav-burger-box span    { opacity: 0; }

/* Mobile nav (â‰¤ 860px): the bar wraps to multiple rows; links + actions
   collapse with a max-height transition when the burger is toggled. */
@media (max-width: 860px) {
  .nav-burger { display: inline-flex; }
  nav#mainNav {
    flex-wrap: wrap;
    height: auto; min-height: 58px;
    align-items: center;
    /* Kill row-gap between wrapped flex lines: when the menu is closed
       the hidden .nav-links and .nav-right still occupy flex lines, and
       the 24px desktop gap was adding ~48px below the logo, dropping
       the nav's bottom border well past the logo. */
    row-gap: 0;
  }
  .nav-logo { order: 1; height: 58px; }
  .nav-burger { order: 2; margin-left: auto; }
  .nav-links,
  .nav-right {
    flex-basis: 100%;
    max-height: 0; overflow: hidden;
    transition: max-height .25s ease, padding .25s ease;
    padding: 0;
  }
  .nav-links {
    order: 3;
    flex-direction: column;
    gap: 0;
  }
  .nav-right {
    order: 4;
    flex-direction: column;
    gap: 8px;
  }
  nav#mainNav.open {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
  }
  nav#mainNav.open .nav-logo img { filter: none; }
  /* The open menu sits on a white sheet (even when the bar is otherwise
     transparent over a dark hero, e.g. case studies). Re-color the
     foreground so the burger/X, links and ghost button stay readable. */
  nav#mainNav.open .nav-burger { color: var(--black); }
  nav#mainNav.open .nav-links a { color: var(--muted); }
  nav#mainNav.open .nav-links a:hover,
  nav#mainNav.open .nav-links a.active { color: var(--black); }
  nav#mainNav.open .nav-ghost { color: var(--muted); border-color: var(--border); }
  nav#mainNav.open .nav-ghost:hover { color: var(--black); background: var(--bg-alt); }
  nav#mainNav.open .nav-links { max-height: 500px; padding: 8px 0; }
  nav#mainNav.open .nav-right { max-height: 220px; padding: 0 0 16px; }
  .nav-links a {
    display: block; padding: 14px 0;
    font-size: 16px; font-weight: 600;
    border-bottom: 1px solid var(--border);
    /* Color handled by the `nav#mainNav.open .nav-links a` rules above,
       which differentiate active vs idle. */
  }
  .nav-links li { list-style: none; }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-ghost,
  .nav-cta {
    text-align: center; padding: 12px 18px; font-size: 15px;
  }
  .nav-ghost { color: var(--muted) !important; }
}

/* â”€â”€â”€ Buttons â”€â”€â”€ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 500;
  padding: 13px 28px; border-radius: 6px;
  transition: all .15s; cursor: pointer; border: none;
  text-decoration: none;
}
.btn-black { background: var(--black); color: var(--white); }
.btn-black:hover { background: #2a2a2a; transform: translateY(-1px); }
.btn-outline-dark { background: var(--white); color: var(--black); border: 1.5px solid var(--border); }
.btn-outline-dark:hover { border-color: #999; transform: translateY(-1px); }
.btn-white { background: var(--white); color: var(--black); }
.btn-white:hover { background: var(--bg-alt); transform: translateY(-1px); }
.btn-outline-white { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.4); }
.btn-outline-white:hover { border-color: var(--white); transform: translateY(-1px); }

/* Button size variants — replaces inline padding/font-size overrides. */
.btn-sm   { font-size: 13px; padding: 8px 18px; white-space: nowrap; }
.btn-lg   { font-size: 14px; padding: 14px 40px; }
.btn-yt   { font-size: 15px; padding: 14px 32px; letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 10px; }
.btn-yt svg { flex-shrink: 0; }

/* Centered CTA wrappers — used below grids/sections. */
.sec-cta-center { text-align: center; }
.sec-cta-center.is-lg { margin-top: 40px; }
.sec-cta-center.is-md { margin-top: 32px; }

/* Compact uppercase label that sits above a list/grid (e.g. "LiDAR Sensors"). */
.sec-label-cap { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 14px; }
.sec-label-cap.is-mid { margin-top: 28px; }

/* sec-tag inline variant (renders inline with margin-bottom). */
.sec-tag.is-inline { display: inline-block; margin-bottom: 16px; }

/* Headings with a leading icon (logo + label). */
.sec-h2.with-icon     { display: flex; align-items: center; gap: 10px; }
.sec-h2.with-icon img { height: 1em; flex-shrink: 0; }

/* sec-p variant that should not wrap (one-line subtitles).
   Only enforced when the viewport is wide enough — on phones/tablets
   we let the text wrap so it doesn't trigger horizontal scroll. */
.sec-p.is-nowrap { max-width: 100%; }
@media (min-width: 900px) {
  .sec-p.is-nowrap { white-space: nowrap; }
}

/* hero h1 line break helper (<span> children rendered as block lines). */
.hero-h1 > span { display: block; }

/* Reset a wrapping anchor used as a card (e.g. team-card) so nested
   text inherits color and isn't underlined. */
.team-card { text-decoration: none; color: inherit; }

/* Specific framing for the Mathys headshot (face sits high in frame). */
.team-photo img.is-shift-up { object-position: center 25%; }

/* Generic clickable button helper (resets default <button> styles when
   used as a tile/card opener). */
.is-clickable { cursor: pointer; }

/* Generic hidden-on-render helper. JS may toggle this for show/hide. */
.is-hidden { display: none; }

/* â”€â”€â”€ Footer â”€â”€â”€ */
footer {
  background: #000;
  padding: 18px var(--px);
  border-top: 1px solid #222;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 12px; color: #666; }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a { font-size: 12px; color: #666; transition: color .15s; }
.footer-legal a:hover { color: #fff; }

/* ─── Contact modal (anti-harvest gate) ─── */
.contact-modal {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.contact-modal.is-open { display: flex; animation: contactModalFade .18s ease-out; }
@keyframes contactModalFade { from { opacity: 0; } to { opacity: 1; } }
.contact-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(13, 13, 13, 0.65);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.contact-modal-card {
  position: relative;
  background: var(--bg);
  border-radius: 14px;
  padding: 36px 32px 28px;
  max-width: 440px; width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  text-align: center;
  animation: contactModalPop .22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes contactModalPop {
  from { transform: translateY(10px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}
.contact-modal-close {
  position: absolute; top: 10px; right: 14px;
  width: 32px; height: 32px;
  background: transparent; border: 0; padding: 0;
  font-size: 26px; line-height: 1; color: var(--muted);
  cursor: pointer; border-radius: 6px;
  transition: background .15s, color .15s;
}
.contact-modal-close:hover { background: var(--bg-alt); color: var(--black); }
.contact-modal-emoji { font-size: 36px; margin-bottom: 10px; }
.contact-modal-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.contact-modal-sub { font-size: 14px; color: var(--muted); line-height: 1.55; margin-bottom: 20px; }
.contact-modal-turnstile { display: flex; justify-content: center; min-height: 70px; margin-bottom: 16px; }
.contact-modal-reveal {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-top: 4px;
  animation: contactModalFade .25s ease-out;
}
.contact-modal-email-pill {
  display: flex; align-items: stretch;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.contact-modal-email-pill:focus-within,
.contact-modal-email-pill:hover { border-color: #c2c2c2; box-shadow: 0 1px 0 rgba(0,0,0,0.02); }
.contact-modal-email-text {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  padding: 11px 14px;
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--text);
  text-align: left;
  word-break: break-all;
  user-select: all;
  cursor: text;
}
.contact-modal-copy {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600;
  background: var(--white); color: var(--text);
  border: 0; border-left: 1px solid var(--border);
  padding: 0 16px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.contact-modal-copy:hover { background: var(--black); color: var(--white); }
.contact-modal-copy:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.contact-modal-copy.is-copied { background: #0d8050; color: var(--white); }
.contact-modal-copy-icon { width: 14px; height: 14px; flex-shrink: 0; }
.contact-modal-copy.is-copied .contact-modal-copy-icon { display: none; }
.contact-modal-mailto {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s, gap .15s;
}
.contact-modal-mailto:hover { color: var(--black); gap: 9px; }
.contact-modal-mailto-icon { width: 14px; height: 14px; flex-shrink: 0; }
.contact-modal-footnote { margin-top: 18px; font-size: 12px; color: var(--light); }
.contact-modal-footnote a { color: var(--muted); text-decoration: underline; }
.contact-modal-footnote a:hover { color: var(--black); }
@media (max-width: 480px) {
  .contact-modal-card { padding: 28px 22px 22px; }
  .contact-modal-title { font-size: 19px; }
}

