/* ============================================================
   AXELYA — Design System
   Dark tech · Geneva precision
   ============================================================ */

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

:root {
  /* Surfaces */
  --bg:        #070B1F;
  --bg-2:      #0B1129;
  --bg-3:      #0F1733;
  --bg-card:   #0C1330;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.14);

  /* Ink */
  --ink:       #F0F0F5;
  --ink-soft:  #C3C8DD;
  --muted:     #888FAB;
  --faint:     #5A6188;

  /* Accents */
  --violet:    #6C63FF;
  --indigo:    #4F46E5;
  --cyan:      #18D9F2;
  --cyan-deep: #00B8D9;

  /* Effects */
  --grad-accent: linear-gradient(100deg, #6C63FF 0%, #18D9F2 100%);
  --grad-text:   linear-gradient(100deg, #C9C5FF 0%, #8AE9F7 60%, #18D9F2 100%);
  --glow-violet: rgba(108,99,255,0.45);
  --glow-cyan:   rgba(24,217,242,0.40);

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Instrument Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --maxw: 1200px;
  --pad:  clamp(20px, 5vw, 56px);
  --radius: 18px;
  --radius-lg: 26px;
  --header-h: 76px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* Subtle page grain + grid backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 0%, transparent 75%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: rgba(108,99,255,0.35); color: #fff; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); position: relative; z-index: 1; }
.section { padding-block: clamp(72px, 11vw, 140px); position: relative; z-index: 1; }
.section--tight { padding-block: clamp(56px, 8vw, 96px); }

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1.display { font-size: clamp(40px, 6.4vw, 84px); }
h2.display { font-size: clamp(32px, 4.6vw, 60px); }
h3.display { font-size: clamp(23px, 2.4vw, 32px); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }

.lead { font-size: clamp(18px, 2vw, 22px); color: var(--ink-soft); line-height: 1.5; text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
}

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn .ar { transition: transform .25s ease; }
.btn:hover .ar { transform: translateX(4px); }

.btn--primary {
  background: var(--grad-accent);
  color: #07112B;
  box-shadow: 0 8px 30px -8px var(--glow-violet);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px var(--glow-cyan); }

.btn--ghost {
  background: rgba(255,255,255,0.04);
  border-color: var(--line-2);
  color: var(--ink);
}
.btn--ghost:hover { background: rgba(255,255,255,0.09); transform: translateY(-2px); }

.btn--sm { padding: 11px 18px; font-size: 14.5px; }

/* ---------- Chips / pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.03);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  backdrop-filter: blur(6px);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--glow-cyan); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), rgba(108,99,255,0.10), transparent 60%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.card:hover::after { opacity: 1; }

/* glass variant */
.glass {
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7,11,31,0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.brand .mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--grad-accent);
  box-shadow: 0 4px 16px -4px var(--glow-violet);
}
.brand .mark svg { width: 17px; height: 17px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  font-size: 15px;
  color: var(--ink-soft);
  padding: 9px 14px;
  border-radius: 10px;
  transition: color .2s ease, background .2s ease;
}
.nav a:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.nav a.active { color: var(--ink); }

.header-cta { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  align-items: center; justify-content: center;
}
.menu-toggle svg { width: 22px; height: 22px; }

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 55;
  background: rgba(7,11,31,0.97);
  backdrop-filter: blur(20px);
  padding: 32px var(--pad);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.mobile-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-nav a { font-family: var(--font-display); font-size: 26px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--ink); }
.mobile-nav .btn { margin-top: 22px; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 40px; position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-grid .col h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.footer-grid .col a { display: block; color: var(--ink-soft); padding: 6px 0; font-size: 15px; transition: color .2s; }
.footer-grid .col a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13.5px; font-family: var(--font-mono); }

/* ---------- Section heading block ---------- */
.sec-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head .eyebrow { margin-bottom: 18px; }
.sec-head p { margin-top: 18px; }

/* ---------- Reveal animation ----------
   Base state is VISIBLE (robust for print/export/offscreen capture).
   JS adds .r-hide only to below-the-fold elements, then removes it on
   scroll so they animate in. Above-the-fold content never hides. */
.reveal {
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.r-hide { opacity: 0; transform: translateY(28px); }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.reveal[data-d="5"] { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.r-hide { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Numbered marker ---------- */
.num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  letter-spacing: 0.1em;
}

/* ---------- Divider glow line ---------- */
.glowline { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); border: 0; }

/* ---------- Utility ---------- */
.stack-sm > * + * { margin-top: 12px; }
.grid { display: grid; gap: 22px; }
.flex { display: flex; }
.center { align-items: center; }
.gap-sm { gap: 12px; }
.gap { gap: 20px; }
.mt-s { margin-top: 14px; }
.mt-m { margin-top: 28px; }
.mt-l { margin-top: 44px; }

@media (max-width: 860px) {
  .nav, .header-cta .btn--ghost { display: none; }
  .menu-toggle { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
