/* ==========================================================================
   NordAxis Technologies — Landing Site
   Brand: Navy #033364 · Gray #E0E5E7 · Orange #FF8002 · Teal #14B8A6
   ========================================================================== */

/* Light theme (default). Dark-theme overrides live in the
   :root[data-theme="dark"] block further down — see js/theme.js for the
   toggle that flips the attribute (persisted, defaults to light). */
:root{
  --navy: #033364;
  --navy-2: #04406f;
  --navy-3: #0a4d80;
  --gray: #E0E5E7;
  --orange: #FF8002;
  --teal: #14B8A6;
  --ink: #0d1b2a;
  --text: #33424f;
  --muted: #6b7a86;
  --bg: #ffffff;
  --bg-alt: #f5f7f8;
  --surface: #ffffff;
  --heading: #033364;
  --border: #e3e8ea;
  --header-bg: rgba(255,255,255,.92);
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(3,51,100,0.18);
  --container: 1180px;
  font-size: 16px;
}

:root[data-theme="dark"]{
  --text: #c3d1de;
  --muted: #8296a8;
  --bg: #0a1420;
  --bg-alt: #0d1a29;
  --surface: #11202f;
  --heading: #eef4f9;
  --border: #1e2f42;
  --header-bg: rgba(10,20,32,.9);
  --shadow: 0 10px 30px -12px rgba(0,0,0,.55);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
li{ overflow-wrap:break-word; }
/* overflow-wrap safety net: French compound/long words (and any other
   long unbroken string) must never force a narrow card/column wider than
   its box — this is what caused a real mobile overflow bug once already. */
h1,h2,h3,h4{ color:var(--heading); font-weight:800; margin:0 0 .6em; line-height:1.2; overflow-wrap:break-word; }
p{ margin:0 0 1em; overflow-wrap:break-word; }

.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 24px;
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.85rem 1.7rem;
  border-radius:999px;
  font-weight:600;
  font-size:.95rem;
  border:1px solid transparent;
  cursor:pointer;
  white-space:nowrap;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover{ transform:translateY(-2px); }
.btn-primary{ background:var(--navy); color:#fff; }
.btn-primary:hover{ background:var(--navy-2); box-shadow:0 8px 20px -6px rgba(3,51,100,.5); }
.btn-accent{ background:var(--orange); color:#fff; }
.btn-accent:hover{ background:#e57300; box-shadow:0 8px 20px -6px rgba(255,128,2,.55); }
.btn-ghost{ background:transparent; color:#fff; border-color:rgba(255,255,255,.55); }
.btn-ghost:hover{ background:rgba(255,255,255,.12); }
.btn-block{ width:100%; }

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:100;
  background:var(--header-bg);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--border);
}
/* The header's row needs more horizontal room than page content does —
   logo + full nav + language/theme switch + CTA is wider than the
   1180px content column, especially with longer French nav labels. Give
   just this .container instance a wider cap so it doesn't need to wrap
   at ordinary desktop sizes (the flex-wrap on .main-nav is still there
   as a safety net for genuinely narrow windows). */
.site-header .container{ max-width:1400px; }
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  min-height:76px; padding:12px 0; gap:1.5rem;
}
/* The logo, language/theme controls, CTA button and hamburger must never
   be compressed when the nav grows (e.g. longer French labels) — only
   .main-nav (flex:1, and itself allowed to wrap) gives up space. Without
   this, flex-shrink defaulting to 1 on every header child let a wide nav
   visibly squash the logo's aspect ratio. */
.brand{ flex-shrink:0; }
.brand-logo{ height:68px; width:auto; max-width:none; flex-shrink:0; }
.header-utils{ flex-shrink:0; }
.header-cta{ flex-shrink:0; }
.nav-toggle{ flex-shrink:0; }
.main-nav{
  display:flex; flex-wrap:wrap; gap:.6rem 1.6rem; flex:1; justify-content:center;
  min-width:0;
}
.main-nav a{ font-weight:600; font-size:.92rem; color:var(--heading); opacity:.85; white-space:nowrap; }
.main-nav a:hover{ opacity:1; color:var(--orange); }
.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:0; cursor:pointer; padding:6px; }
.nav-toggle span{ width:24px; height:2px; background:var(--navy); border-radius:2px; }

/* ---------- Header utilities: language + theme switch ---------- */
/* Always visible in the top bar, on every breakpoint (unlike .main-nav /
   .header-cta, which collapse behind the hamburger on mobile) — kept
   compact so it never crowds the logo/hamburger. */
.header-utils{ display:flex; align-items:center; gap:.6rem; }

.lang-switch{
  display:flex; align-items:center; background:var(--bg-alt);
  border:1px solid var(--border); border-radius:999px; padding:2px;
}
.lang-switch button{
  border:0; background:none; cursor:pointer; padding:.3rem .6rem;
  font-size:.72rem; font-weight:700; letter-spacing:.03em; color:var(--muted);
  border-radius:999px; transition:background .15s ease, color .15s ease;
}
.lang-switch button.active{ background:var(--navy); color:#fff; }
.lang-switch button:not(.active):hover{ color:var(--heading); }

.theme-toggle{
  display:flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:50%;
  background:var(--bg-alt); border:1px solid var(--border); color:var(--heading);
  cursor:pointer; transition:background .15s ease;
}
.theme-toggle:hover{ background:var(--border); }
.theme-toggle svg{ width:17px; height:17px; }
.theme-toggle .icon-sun{ display:none; }
:root[data-theme="dark"] .theme-toggle .icon-sun{ display:block; }
:root[data-theme="dark"] .theme-toggle .icon-moon{ display:none; }

/* ---------- Hero ---------- */
.hero, .cta-banner{ position:relative; overflow:hidden; color:#fff; }

/* Background artwork: oversized (extra top/bottom bleed) so the scroll
   parallax below has room to move without exposing an edge, and given a
   little breathing room for the idle shape-drift animation on each
   polygon. Driven by main.js via the --parallax custom property. */
.hero-bg{
  position:absolute; top:-10%; left:0; right:0; bottom:-10%; z-index:0;
  transform:translateY(var(--parallax, 0px));
  will-change:transform;
}
.hero-bg svg{ position:absolute; inset:0; width:100%; height:100%; display:block; }
.hero-bg svg polygon{
  transform-box:fill-box; transform-origin:center;
  animation:shape-drift 14s ease-in-out infinite;
}
.hero-bg svg polygon:nth-of-type(1){ animation-duration:18s; }
.hero-bg svg polygon:nth-of-type(2){ animation-duration:15s; animation-delay:-3s; }
.hero-bg svg polygon:nth-of-type(3){ animation-duration:12s; animation-delay:-6s; }
.hero-bg svg polygon:nth-of-type(4){ animation-duration:16s; animation-delay:-2s; }
.hero-bg svg polygon:nth-of-type(5){ animation-duration:20s; animation-delay:-9s; }

@keyframes shape-drift{
  0%, 100%{ transform:translate(0, 0) scale(1); }
  50%{ transform:translate(0, -2.5%) scale(1.03); }
}

/* Hero background video (Assets/circuit-video.mp4): fills the bled box,
   cropped via object-fit, with a navy gradient overlay on top so the
   hero copy stays fully legible against whatever the footage is doing —
   strongest over the text column on the left, fading out toward the
   right so the video itself still reads. The angular orange/navy accent
   shapes sit above that, echoing the same triangle motif used site-wide.
   Autoplay/loop/muted, no scroll-based pause logic anywhere — it keeps
   playing continuously while the user scrolls past or back to it. */
.hero-video{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; object-position:center;
  opacity:1;
  transition:opacity .18s ease;
}
/* Applied by main.js right as the loop restarts (seeking back to 0 and
   resuming playback in the same tick — never actually paused), removed
   ~180ms later. Dips opacity just enough to hide the seek; playback
   itself never stops, so the loop reads as continuous, not a pause. */
.hero-video.is-looping{ opacity:.35; }
.hero-video-overlay{
  position:absolute; inset:0;
  background:linear-gradient(100deg,
    rgba(3,51,100,.94) 0%,
    rgba(3,51,100,.82) 32%,
    rgba(3,51,100,.5) 60%,
    rgba(3,51,100,.22) 100%);
}
.hero-accent{ z-index:1; }

@media (prefers-reduced-motion: reduce){
  .hero-bg{ transform:none !important; }
  .hero-bg svg polygon{ animation:none; }
  .hero-video{ display:none; }
  .hero-video-overlay{ background:var(--navy); }
}

.hero{ background:var(--navy); padding:7rem 0 6rem; }
.hero-inner{ position:relative; z-index:1; max-width:760px; }
.eyebrow{
  text-transform:uppercase; letter-spacing:.12em; font-size:.78rem; font-weight:700;
  color:var(--orange); margin-bottom:.9rem;
}
.eyebrow-light{ color:#ffc98a; }
.hero h1{ color:#fff; font-size:clamp(2.2rem, 5vw, 3.4rem); }
.hero-sub{ color:#cfe0ee; font-size:1.08rem; max-width:600px; }
.hero-actions{ display:flex; gap:1rem; margin-top:2rem; flex-wrap:wrap; }

/* Scroll-reveal: applied by main.js via IntersectionObserver. Starts
   slightly lowered/faded, settles into place the first time a section
   enters the viewport. */
.reveal-on-scroll{
  opacity:0; transform:translateY(28px);
  transition:opacity .7s ease, transform .7s ease;
}
.reveal-on-scroll.is-revealed{ opacity:1; transform:translateY(0); }

/* ---------- Trust strip ---------- */
.trust-strip{ background:var(--bg-alt); padding:1.6rem 0; border-bottom:1px solid var(--border); }
.trust-label{ text-align:center; font-size:.78rem; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); margin-bottom:.8rem; font-weight:700; }
.trust-row{ display:flex; flex-wrap:wrap; gap:1.2rem 2.2rem; justify-content:center; }
.trust-row span{ font-weight:600; color:var(--heading); font-size:.92rem; opacity:.8; }

/* ---------- Sections ---------- */
.section{ padding:6rem 0; }
.section-alt{ background:var(--bg-alt); }
.section-dark{ background:var(--navy); color:#fff; }
.section-dark h2{ color:#fff; }
.eyebrow + h2, h2{ max-width:640px; }
.section-sub{ color:var(--muted); max-width:620px; font-size:1.05rem; }

/* ---------- Cards / grids ---------- */
.grid{ display:grid; gap:1.6rem; margin-top:2.8rem; }
.services-grid{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
.industries-grid{ grid-template-columns:repeat(4, minmax(0, 1fr)); }

.card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:1.8rem; box-shadow:var(--shadow);
  transition:transform .18s ease, box-shadow .18s ease;
}
.card:hover{ transform:translateY(-4px); box-shadow:0 16px 34px -14px rgba(3,51,100,.25); }

.icon-badge{
  width:48px; height:48px; border-radius:12px;
  background:linear-gradient(135deg, var(--navy), var(--navy-3));
  color:#fff; display:flex; align-items:center; justify-content:center;
  margin-bottom:1.1rem;
}
.icon-badge svg{ width:24px; height:24px; }
.icon-badge-sm{ width:38px; height:38px; border-radius:10px; flex-shrink:0; }
.icon-badge-sm svg{ width:18px; height:18px; }

.service-card h3{ font-size:1.05rem; margin-bottom:.7rem; }
.check-list li{ position:relative; padding-left:1.3rem; margin-bottom:.5rem; font-size:.92rem; color:var(--text); }
.check-list li::before{ content:"›"; position:absolute; left:0; color:var(--orange); font-weight:800; }
.check-list-light li{ color:#dbe7f1; }

.industry-card h3{ font-size:1.1rem; }
.industry-card p{ font-size:.92rem; color:var(--muted); margin:0; }

/* ---------- Process ---------- */
.process-row{ display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:1.8rem; margin-top:3rem; }
.process-step{ position:relative; padding-top:.5rem; }
.process-num{
  display:inline-block; font-size:1.6rem; font-weight:800; color:var(--orange);
  -webkit-text-stroke:0; margin-bottom:.6rem;
}
.process-step h3{ font-size:1.05rem; }
.process-step p{ font-size:.92rem; color:var(--muted); }

/* ---------- Product spotlight ---------- */
.product-grid{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:3rem; align-items:center; }
.product-copy h2{ color:#fff; }
.mockup{
  background:#0e2c47; border:1px solid rgba(255,255,255,.12); border-radius:16px; overflow:hidden;
  box-shadow:0 30px 60px -20px rgba(0,0,0,.5);
}
.mockup-bar{ display:flex; gap:6px; padding:.9rem 1rem; background:#0a2038; }
.mockup-bar span{ width:10px; height:10px; border-radius:50%; background:rgba(255,255,255,.25); }
.mockup-body{ padding:1.4rem; }
.mockup-kpi{
  display:inline-flex; flex-direction:column; gap:.2rem;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1);
  border-radius:10px; padding:.7rem 1.1rem; margin:0 .6rem .9rem 0;
}
.kpi-label{ font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; color:#9fb7cc; }
.kpi-value{ font-size:1.3rem; font-weight:800; color:var(--orange); }
.mockup-bars{ display:flex; align-items:flex-end; gap:8px; height:80px; margin:1.2rem 0 .6rem; }
.mockup-bars span{ flex:1; background:linear-gradient(180deg, var(--teal), #0a7c6f); border-radius:4px 4px 0 0; }
.mockup-line{ height:50px; }
.mockup-line svg{ width:100%; height:100%; }

/* ---------- Technologies ---------- */
.tech-chip{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:1rem .9rem; text-align:center; box-shadow:var(--shadow);
  transition:transform .18s ease;
  flex:0 0 auto; width:118px;
}
.tech-chip:hover{ transform:translateY(-3px); }
.tech-mark{
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; border-radius:11px; margin:0 auto .7rem;
  background:color-mix(in srgb, var(--c, var(--navy)) 12%, white);
  color:var(--c, var(--navy));
  font-weight:800; font-size:.74rem;
}
.tech-chip p{ margin:0; font-size:.78rem; font-weight:600; color:var(--heading); line-height:1.3; }
.tech-chip-more{ opacity:.6; }
.tech-chip-more .tech-mark{ background:var(--bg-alt); color:var(--muted); }

.tech-mark-logo{ background:var(--bg-alt); padding:9px; }
.tech-mark-logo img{ width:100%; height:100%; object-fit:contain; }

.tech-group{ margin-top:2.2rem; }
.tech-group:first-of-type{ margin-top:2.4rem; }
.tech-group-title{
  font-size:.76rem; text-transform:uppercase; letter-spacing:.1em; font-weight:700;
  color:var(--muted); margin:0 0 1rem;
}

/* Auto-scrolling logo strip — keeps each category to a single compact row
   no matter how many items it holds. The scroll itself is a plain CSS
   keyframe animation (smooth, GPU-friendly, no per-frame JS). `.tech-drag`
   is a second, independent transform layer: hovering/touching pauses the
   animation and lets JS (see main.js) nudge `.tech-drag`'s translateX by
   mouse/touch, so drag and auto-scroll never fight over the same transform. */
.tech-marquee{
  overflow:hidden;
  cursor:grab;
  touch-action:pan-y;
  -webkit-mask-image:linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image:linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.tech-marquee.dragging{ cursor:grabbing; }
.tech-drag{ transform:translateX(var(--drag, 0px)); }
.tech-track{
  display:flex; gap:1rem; width:max-content;
  animation:tech-scroll 26s linear infinite;
}
.tech-track-reverse{ animation-direction:reverse; }
.tech-marquee:hover .tech-track,
.tech-marquee.dragging .tech-track{ animation-play-state:paused; }

@keyframes tech-scroll{
  from{ transform:translateX(0); }
  to{ transform:translateX(-50%); }
}

@media (prefers-reduced-motion: reduce){
  .tech-track{ animation:none; }
}

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

@media (max-width: 760px){
  .tech-chip{ width:100px; }
}

/* ---------- About / Why ---------- */
.about-grid{ display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:3.5rem; align-items:center; }
.why-list{ display:flex; flex-direction:column; gap:1.3rem; }
.why-item{ display:flex; align-items:center; gap:1rem; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:1rem 1.2rem; box-shadow:var(--shadow); }
.why-item h3{ font-size:.98rem; margin:0; }

/* ---------- FAQ ---------- */
.faq-container{ max-width:820px; }
.accordion{ margin-top:2.5rem; border-top:1px solid var(--border); }
.accordion-item{ border-bottom:1px solid var(--border); }
.accordion-trigger{
  width:100%; display:flex; justify-content:space-between; align-items:center;
  background:none; border:0; text-align:left; padding:1.3rem 0;
  font-size:1.02rem; font-weight:700; color:var(--heading); cursor:pointer;
}
.accordion-icon{ font-size:1.3rem; color:var(--orange); transition:transform .2s ease; }
.accordion-item.open .accordion-icon{ transform:rotate(45deg); }
.accordion-panel{ max-height:0; overflow:hidden; transition:max-height .25s ease; }
.accordion-panel p{ padding-bottom:1.3rem; color:var(--muted); margin:0; }

/* ---------- CTA banner ---------- */
.cta-banner{ background:var(--navy); padding:5rem 0; text-align:center; }
.cta-inner{ position:relative; z-index:1; }
.cta-banner h2{ color:#fff; }
.cta-banner p{ color:#cfe0ee; margin-bottom:1.8rem; }

/* ---------- Contact ---------- */
.contact-grid{ display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:3.5rem; }
.contact-info{ display:flex; flex-direction:column; gap:1.3rem; margin-top:1rem; }
.contact-info-item{ display:flex; flex-direction:column; gap:.2rem; }
.contact-info-item strong{ color:var(--heading); font-size:.8rem; text-transform:uppercase; letter-spacing:.08em; }
.contact-info-item a{ color:var(--orange); font-weight:600; }

.contact-form{ background:var(--bg-alt); border:1px solid var(--border); border-radius:var(--radius); padding:2rem; }
.form-row{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1rem; }
.contact-form label{ display:block; font-size:.85rem; font-weight:600; color:var(--heading); margin-bottom:1rem; }
.contact-form input, .contact-form textarea{
  width:100%; margin-top:.4rem; padding:.75rem .9rem; border-radius:8px; border:1px solid var(--border);
  font-family:inherit; font-size:.95rem; background:var(--surface); color:var(--text); resize:vertical;
}
.contact-form input:focus, .contact-form textarea:focus{ outline:2px solid var(--teal); outline-offset:1px; }
.form-note{ font-size:.85rem; color:var(--teal); font-weight:600; min-height:1.2em; margin-top:.6rem; }

/* ---------- Footer ---------- */
.site-footer{ background:var(--navy); color:#cfe0ee; padding:4rem 0 1.5rem; }
.footer-inner{ display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr); gap:2.5rem; margin-bottom:2.5rem; }
.footer-logo{ height:68px; margin-bottom:.8rem; }
.footer-brand p{ font-size:.85rem; color:#9fb7cc; }
.footer-col h4{ color:#fff; font-size:.8rem; text-transform:uppercase; letter-spacing:.08em; margin-bottom:1rem; }
.footer-col{ display:flex; flex-direction:column; gap:.6rem; font-size:.9rem; }
.footer-col a:hover{ color:var(--orange); }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.12); padding-top:1.5rem; font-size:.8rem; color:#87a0b6; }

/* ---------- Scroll-to-top ---------- */
.scroll-top{
  position:fixed; right:1.5rem; bottom:1.5rem; z-index:90;
  width:46px; height:46px; border-radius:50%; border:0; cursor:pointer;
  background:var(--navy); color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 24px -8px rgba(3,51,100,.45);
  opacity:0; visibility:hidden; transform:translateY(12px);
  transition:opacity .25s ease, transform .25s ease, visibility .25s, background .2s ease;
}
.scroll-top.visible{ opacity:1; visibility:visible; transform:translateY(0); }
.scroll-top:hover{ background:var(--orange); }
.scroll-top svg{ width:20px; height:20px; }

@media (max-width: 760px){
  .scroll-top{ right:1rem; bottom:1rem; width:42px; height:42px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .services-grid, .industries-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .process-row{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .product-grid, .about-grid, .contact-grid{ grid-template-columns:minmax(0,1fr); }
  .footer-inner{ grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
}

/* Nav-collapse breakpoint is deliberately wider than the general 760px
   content breakpoint below: with the FR/EN + theme controls added to the
   bar, the full nav + utils + CTA needs more room to stay on one line
   without ever squeezing the logo (see .brand/.brand-logo flex-shrink:0
   above) — so it collapses to the hamburger earlier, at 900px. */
@media (max-width: 900px){
  .main-nav, .header-cta{ display:none; }
  .nav-toggle{ display:flex; }
  .site-header.nav-open .main-nav{
    display:flex; position:absolute; top:100%; left:0; right:0; background:var(--surface);
    flex-direction:column; padding:1.2rem 1.5rem; gap:1rem; border-bottom:1px solid var(--border);
  }
  .site-header.nav-open .header-cta{
    display:flex; position:absolute; top:calc(100% + 210px); left:0; right:0; background:var(--surface);
    padding:0 1.5rem 1.2rem;
  }
}

@media (max-width: 760px){
  .brand-logo{ height:40px; }
  .header-utils{ gap:.4rem; }
  .lang-switch button{ padding:.28rem .5rem; font-size:.68rem; }
  .theme-toggle{ width:30px; height:30px; }
  .theme-toggle svg{ width:15px; height:15px; }
  .services-grid, .industries-grid{ grid-template-columns:minmax(0, 1fr); }
  .process-row{ grid-template-columns:minmax(0,1fr); }
  .form-row{ grid-template-columns:minmax(0,1fr); }
  .footer-inner{ grid-template-columns:minmax(0,1fr); }
}
