/* Engine shell + design system. Sections use the variables and classes below. */
:root {
  color-scheme: dark;
  --paper: #060b10;
  --surface: rgba(255, 255, 255, .04);
  --ink: #eaf1f5;
  --muted: #8ea1ae;
  --line: rgba(255, 255, 255, .09);
  --accent: #5b86ff;
  --accent2: #2de2b0;
  --accent-ink: #04101a;
  --grad: linear-gradient(135deg, #5b86ff 0%, #2de2b0 100%);
  --bar-h: 68px;
  --maxw: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
  margin: 0; color: var(--ink); overflow-x: hidden;
  font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
/* Ambient background: slow aurora + faint grid, fixed behind everything. */
body::before {
  content: ""; position: fixed; inset: -20%; z-index: -2; filter: blur(50px);
  background:
    radial-gradient(38% 32% at 18% 12%, rgba(91, 134, 255, .34), transparent 70%),
    radial-gradient(32% 28% at 86% 8%, rgba(45, 226, 176, .2), transparent 70%),
    radial-gradient(42% 36% at 72% 92%, rgba(120, 80, 255, .2), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}
@keyframes drift { from { transform: translate3d(-3%, -2%, 0) scale(1); } to { transform: translate3d(3%, 3%, 0) scale(1.08); } }

a { color: inherit; }
::selection { background: rgba(91, 134, 255, .45); }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---- Navigation bar ---- */
.bar {
  position: sticky; top: 0; z-index: 50; height: var(--bar-h);
  background: rgba(6, 11, 16, .62); backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.bar-inner { max-width: var(--maxw); height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; }
.brand { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.04em; text-decoration: none; display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand::before { content: ""; width: 18px; height: 18px; background: var(--grad); border-radius: 5px 12px 5px 12px; box-shadow: 0 0 18px rgba(91, 134, 255, .6); }
.nav { display: flex; gap: 2px; }
.nav a { position: relative; text-decoration: none; padding: 8px 13px; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--muted); transition: color .15s, background .15s; }
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .07); }
.nav a[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, .09); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--grad); transition: width .25s ease, opacity .3s; }

.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button { font: 600 .78rem var(--font); padding: 5px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
[data-lang="fr"] [lang="en"], [data-lang="en"] [lang="fr"] { display: none !important; }

.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .2s, top .2s; }
.burger span:first-child { top: 16px; } .burger span:last-child { top: 24px; }
.burger[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .burger { display: block; }
  .nav {
    position: absolute; top: var(--bar-h); left: 0; right: 0; flex-direction: column; gap: 0; display: none;
    background: rgba(6, 11, 16, .96); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); background: none !important; box-shadow: none !important; }
}

/* ---- View ---- */
#view { min-height: calc(100vh - var(--bar-h)); outline: none; }
#view.enter { animation: viewIn .35s ease both; }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }
.state { max-width: 560px; margin: 18vh auto; padding: 0 var(--gutter); }
.state h1 { font-size: 1.75rem; letter-spacing: -0.02em; margin: 0 0 8px; }
.state p { color: var(--muted); margin: 0; }
code { font: .92em ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(255, 255, 255, .08); padding: 2px 6px; border-radius: 6px; }

/* ---- Footer ---- */
.foot { margin-top: 40px; padding: 0 0 56px; color: var(--muted); font-size: .95rem; }
.tricolor { display: flex; height: 3px; margin-bottom: 40px; opacity: .85; }
.tricolor i { flex: 1; } .tricolor i:nth-child(1) { background: #2b4bff; } .tricolor i:nth-child(2) { background: #f2f5f7; } .tricolor i:nth-child(3) { background: #ef4455; }
.foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-in p { margin: 6px 0 0; max-width: 46ch; }
.foot strong { color: var(--ink); }
.foot a { color: var(--ink); text-underline-offset: 3px; }

/* ---- Content kit ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.hero { padding-top: clamp(48px, 8vw, 100px); padding-bottom: clamp(48px, 7vw, 90px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 24px;
  background: linear-gradient(180deg, #ffffff 30%, #a9bcd0 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: clamp(1.08rem, 1.8vw, 1.28rem); color: var(--muted); max-width: 54ch; margin: 0 0 32px; }
.art { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 60px rgba(40, 80, 220, .25)); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px; background: var(--grad); color: var(--accent-ink);
  font: 700 1rem var(--font); text-decoration: none; border: 0; cursor: pointer;
  box-shadow: 0 8px 30px -6px rgba(91, 134, 255, .65), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -6px rgba(91, 134, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn.ghost { background: rgba(255, 255, 255, .05); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }

.block { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); }
.block > .wrap > h2, .block h2.t { font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -0.035em; line-height: 1.08; margin: 0 0 14px; max-width: 24ch; }
.block .sub { color: var(--muted); max-width: 62ch; margin: 0 0 40px; }

.rows > div { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 8px 40px; padding: 28px 0; border-top: 1px solid var(--line); transition: background .25s; }
.rows > div:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { margin: 0; font-size: 1.25rem; letter-spacing: -0.02em; }
.rows h3::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 12px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px var(--accent2); vertical-align: 2px; }
.rows p, .rows ul { margin: 0 0 8px; color: var(--muted); }
.rows ul { padding-left: 1.1em; } .rows li { margin: 2px 0; }
.rows a { color: var(--ink); text-underline-offset: 3px; }

.swap { width: 100%; border-collapse: collapse; }
.swap th, .swap td { text-align: left; padding: 18px 14px 18px 0; border-top: 1px solid var(--line); vertical-align: top; }
.swap thead th { color: var(--muted); font-weight: 500; font-size: .9rem; border-top: 0; }
.swap td:first-child { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .3); }
.swap td:nth-child(2) { font-weight: 700; font-size: 1.1rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.swap td:last-child { color: var(--muted); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 36px); }
.panel {
  position: relative; border-radius: 22px; padding: clamp(24px, 3vw, 40px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 30px 60px -30px rgba(0, 0, 0, .6);
  transition: transform .3s ease, border-color .3s ease;
}
.panel:hover { transform: translateY(-4px); border-color: rgba(91, 134, 255, .5); }
.panel h3 { margin: 0 0 10px; font-size: 1.5rem; letter-spacing: -0.025em; }
.panel p, .panel ul { color: var(--muted); margin: 0 0 8px; } .panel ul { padding-left: 1.1em; }
.panel.solid { background: linear-gradient(135deg, rgba(91, 134, 255, .38), rgba(45, 226, 176, .18)); border-color: rgba(120, 160, 255, .45); }
.panel.solid p, .panel.solid ul { color: rgba(234, 241, 245, .82); }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 72px 1fr; gap: 8px 16px; padding: 26px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); font-weight: 800; font-size: 2.4rem; line-height: 1; letter-spacing: -0.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps h3 { margin: 0 0 4px; font-size: 1.2rem; } .steps p { margin: 0; color: var(--muted); }
.note { color: var(--muted); font-size: .95rem; max-width: 70ch; }

/* Technology marquee */
.marq { overflow: hidden; border-block: 1px solid var(--line); padding: 20px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marq-track { display: flex; width: max-content; gap: 56px; animation: marq 38s linear infinite; }
.marq-track span { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; color: rgba(234, 241, 245, .5); white-space: nowrap; }
@keyframes marq { to { transform: translateX(-50%); } }

/* Scroll reveal (added by the engine) */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms), transform .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }
.panel.rv.in { transition: transform .3s ease, border-color .3s ease; }

@media (max-width: 860px) {
  .hero-grid, .two, .rows > div { grid-template-columns: 1fr; }
  .art { max-width: 460px; margin: 0 auto; }
  .swap th:last-child, .swap td:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}
