/* ============================================================
   AETHRION SOLUTIONS — Design System
   "Un toit, deux univers"
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Hanken+Grotesk:ital,wght@0,300;0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* surfaces — near-black blue-ink (brand-aligned) */
  --bg:        #06080f;
  --bg-1:      #080b14;
  --bg-2:      #0b0f1b;
  --bg-3:      #101627;
  --panel:     #0a0e18;

  /* hairlines — blue-tinted */
  --line:      rgba(150, 175, 230, 0.14);
  --line-2:    rgba(150, 175, 230, 0.07);
  --line-str:  rgba(150, 175, 230, 0.30);

  /* foreground — desaturated off-white, cool */
  --fg:        #eaedf5;
  --fg-dim:    #9aa3bd;
  --fg-faint:  #626c87;
  --fg-ghost:  #39415a;

  /* brand gradient — from the symbol: cyan -> blue -> violet */
  --brand-cyan:   #16e0ff;
  --brand-blue:   #2f74ff;
  --brand-violet: #7b2cff;
  --brand-grad: linear-gradient(105deg, #16e0ff 0%, #2f74ff 46%, #7b2cff 100%);
  --brand-grad-soft: linear-gradient(105deg, rgba(22,224,255,0.16) 0%, rgba(47,116,255,0.16) 46%, rgba(123,44,255,0.16) 100%);

  /* accents */
  --cyber:      oklch(0.80 0.145 232);  /* cyan-azure — cybergrid */
  --cyber-deep: oklch(0.62 0.15 245);
  --studio:     oklch(0.62 0.215 298);  /* violet — studio */
  --studio-deep: oklch(0.52 0.20 298);
  --holding:    oklch(0.68 0.185 258);  /* electric blue — holding */
  --holding-deep: oklch(0.56 0.19 262);

  /* the live accent — overridden per-section/page */
  --accent:    var(--holding);
  --accent-deep: var(--holding-deep);
  --accent-glow: oklch(0.68 0.185 258 / 0.34);
  --accent-soft: oklch(0.68 0.185 258 / 0.11);

  /* type */
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1280px;
  --gut: clamp(20px, 5vw, 72px);
  --nav-h: 72px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* page-level accent themes */
body[data-theme="studio"] {
  --accent: var(--studio);
  --accent-deep: var(--studio-deep);
  --accent-glow: oklch(0.62 0.215 298 / 0.34);
  --accent-soft: oklch(0.62 0.215 298 / 0.12);
}
body[data-theme="cyber"] {
  --accent: var(--cyber);
  --accent-deep: var(--cyber-deep);
  --accent-glow: oklch(0.80 0.145 232 / 0.30);
  --accent-soft: oklch(0.80 0.145 232 / 0.11);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--accent); color: #04090b; }

/* ---------- page texture ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 0%, transparent 75%);
  opacity: 0.6;
}
.bg-glow {
  position: fixed; z-index: 0; pointer-events: none;
  width: 60vw; height: 60vw; left: 50%; top: -20vw; transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  filter: blur(40px); opacity: 0.5;
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.shell { position: relative; z-index: 1; }
section { position: relative; }

/* ---------- typography ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.6em;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; background: var(--accent);
  transform: rotate(45deg); flex: none;
}
.eyebrow.muted { color: var(--fg-faint); }
.eyebrow.muted::before { background: var(--fg-faint); }

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.02; letter-spacing: -0.02em; }
.display {
  font-size: clamp(44px, 8.5vw, 132px); font-weight: 600;
  line-height: 0.94; letter-spacing: -0.035em;
}
.h2 { font-size: clamp(32px, 4.6vw, 64px); letter-spacing: -0.028em; }
.h3 { font-size: clamp(23px, 2.6vw, 34px); letter-spacing: -0.02em; }
.lede {
  font-size: clamp(18px, 2vw, 23px); line-height: 1.5; color: var(--fg-dim);
  font-weight: 400; max-width: 56ch; text-wrap: pretty;
}
.mono { font-family: var(--mono); }
.accent-txt { color: var(--accent); }
.fg-dim { color: var(--fg-dim); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo .glyph {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  transition: transform .5s var(--ease), filter .5s var(--ease);
  filter: drop-shadow(0 2px 10px rgba(47,116,255,0.35));
}
.logo:hover .glyph { transform: rotate(-4deg) scale(1.06); }
.logo .glyph img { width: 100%; height: 100%; object-fit: contain; }
.logo .word {
  font-family: var(--display); font-weight: 500; font-size: 19px;
  letter-spacing: 0.2em; text-indent: 0.2em; line-height: 1; text-transform: uppercase;
}
.logo .word-img { height: 19px; width: auto; filter: brightness(1.6) contrast(1.05); }
.footer .logo .word-img { height: 21px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em;
  padding: 9px 14px; color: var(--fg-dim); border-radius: 2px;
  transition: color .25s, background .25s; position: relative;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a.active { color: var(--fg); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1.5px;
  background: var(--accent);
}
.nav-right { display: flex; align-items: center; gap: 14px; }

/* language toggle */
.lang {
  display: inline-flex; align-items: center; font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--line); border-radius: 2px; overflow: hidden;
}
.lang button { padding: 7px 11px; color: var(--fg-faint); letter-spacing: 0.04em; transition: .2s; }
.lang button.on { background: var(--accent); color: #04090b; }
.lang button:not(.on):hover { color: var(--fg); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono);
  font-size: 13px; letter-spacing: 0.03em; padding: 13px 22px; border-radius: 2px;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .3s;
  position: relative; white-space: nowrap;
}
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary {
  background: var(--accent); color: #04090b; font-weight: 600;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 8px 40px -8px var(--accent-glow); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line-str); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 16px 28px; font-size: 14px; }

/* mobile nav toggle */
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { width: 22px; height: 1.5px; background: var(--fg); transition: .3s; }

/* ---------- generic section frames ---------- */
.section { padding-block: clamp(80px, 12vh, 160px); }
.section-sm { padding-block: clamp(56px, 8vh, 100px); }
.rule { height: 1px; background: var(--line); border: 0; }
.kicker-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.idx { font-family: var(--mono); font-size: 12px; color: var(--fg-ghost); letter-spacing: 0.1em; }

/* card */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 3px; transition: border-color .4s var(--ease), transform .4s var(--ease), background .4s;
  overflow: hidden;
}
.card:hover { border-color: var(--line-str); }
.card .corner {
  position: absolute; width: 9px; height: 9px; border: 1px solid var(--accent);
  opacity: 0; transition: opacity .4s;
}
.card:hover .corner { opacity: 0.8; }
.corner.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.corner.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

/* tag chip */
.chip {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.05em; color: var(--fg-dim); padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 999px;
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 72px 40px; position: relative; z-index: 1; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 18px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer ul a { color: var(--fg-dim); font-size: 14.5px; transition: color .2s; }
.footer ul a:hover { color: var(--accent); }
.footer-brand .lede { font-size: 15px; max-width: 34ch; margin-top: 18px; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 12px; color: var(--fg-faint);
}
.footer-bottom .status { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom .status .led {
  width: 7px; height: 7px; border-radius: 50%; background: var(--cyber);
  box-shadow: 0 0 8px var(--cyber); animation: pulse 2.4s var(--ease) infinite;
}
.grad-txt {
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* ---------- image placeholder ---------- */
.ph {
  position: relative; border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  background-color: var(--bg-2);
  background-image: repeating-linear-gradient(135deg, var(--line-2) 0 1px, transparent 1px 11px);
  display: grid; place-items: center; color: var(--fg-faint);
}
.ph::after {
  content: attr(data-label); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-faint); padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: color-mix(in oklab, var(--bg) 70%, transparent);
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- scroll reveal ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- i18n: hide the inactive language ---------- */
[data-en] { } /* values swapped by JS into textContent */

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .nav-links, .nav-right .btn { display: none; }
  .nav-burger { display: flex; }
  .footer-top { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

/* mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 55; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: var(--gut); transform: translateY(-100%); transition: transform .5s var(--ease);
}
.mobile-menu.open { transform: none; }
.mobile-menu a {
  font-family: var(--display); font-size: clamp(34px, 9vw, 56px); font-weight: 500;
  letter-spacing: -0.02em; color: var(--fg-dim); padding: 8px 0;
  border-bottom: 1px solid var(--line-2); transition: color .2s, padding .3s;
}
.mobile-menu a:hover { color: var(--accent); padding-left: 12px; }
.mobile-menu .mm-foot { margin-top: 40px; font-family: var(--mono); font-size: 13px; color: var(--fg-faint); }
