/* =========================================================
   Roiatek AI · base.css
   Design tokens, reset, typography, layout primitives
   ========================================================= */

@property --led-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  /* Surfaces: deep navy, never neutral black */
  --navy-950: #061330;
  --navy-900: #0a1a40;
  --navy-850: #0d2050;
  --navy-800: #122659;
  --navy-700: #1b3470;
  --line: rgba(120, 150, 230, 0.16);
  --line-strong: rgba(120, 160, 255, 0.28);

  /* Text */
  --text: #eaf1ff;
  --text-2: #a9b8da;
  --text-3: #7d8eb5;

  /* Signal colours, taken from the reference image */
  --cyan: #22e4f5;
  --aqua: #2bd9b9;
  --blue: #3d6bff;
  --violet: #8c5cff;
  --magenta: #ee3fa6;
  --green: #46e08a;
  --amber: #ffb547;
  --tone: var(--cyan); /* default accent, overridden per component */

  --grad-led: linear-gradient(90deg, var(--cyan), var(--blue) 40%, var(--violet) 72%, var(--magenta));
  --glow-cyan: 0 0 18px rgba(34, 228, 245, 0.45);
  --glow-soft: 0 0 32px -8px rgba(34, 228, 245, 0.35), 0 0 60px -20px rgba(140, 92, 255, 0.45);

  /* Type */
  --font-display: "Archivo", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-h1: clamp(2.5rem, 1.55rem + 3.6vw, 4.375rem);
  --fs-h2: clamp(1.9rem, 1.35rem + 2vw, 3rem);
  --fs-h3: 1.3125rem;
  --fs-lede: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;

  /* Shape: radius encodes hierarchy */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(72px, 7.5vw, 112px);
  --header-h: 72px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy-950);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Page atmosphere: a soft blue aurora plus a faint blueprint grid.
   Both layers are fixed and static, so scrolling never repaints them. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  z-index: -2;
  background:
    radial-gradient(70vw 60vh at 88% -8%, rgba(61, 107, 255, 0.26), transparent 70%),
    radial-gradient(60vw 60vh at -10% 108%, rgba(140, 92, 255, 0.18), transparent 70%),
    radial-gradient(40vw 40vh at 50% 55%, rgba(34, 228, 245, 0.05), transparent 70%),
    linear-gradient(180deg, #08183d 0%, #061330 55%, #071637 100%);
}
body::after {
  z-index: -1;
  background-image:
    linear-gradient(rgba(130, 165, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 165, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(90% 80% at 50% 40%, #000 30%, transparent 85%);
  mask-image: radial-gradient(90% 80% at 50% 40%, #000 30%, transparent 85%);
}

img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

::selection { background: rgba(34, 228, 245, 0.3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--text);
  text-wrap: balance;
}

h2 {
  font-size: var(--fs-h2);
  font-stretch: 112%;
  letter-spacing: -0.022em;
}

h3 {
  font-size: var(--fs-h3);
  font-stretch: 104%;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p { text-wrap: pretty; }

.lede {
  font-size: var(--fs-lede);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 62ch;
}

.text-link {
  color: var(--cyan);
  border-bottom: 1px solid rgba(34, 228, 245, 0.35);
  transition: border-color 0.2s;
}
.text-link:hover { border-color: var(--cyan); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

/* Alternating soft band: gives long pages a calm rhythm */
.section--band {
  background: linear-gradient(180deg, transparent, rgba(18, 40, 98, 0.42) 16%, rgba(18, 40, 98, 0.42) 84%, transparent);
}

/* ---------- Icons ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico .fill,
symbol .fill { fill: currentColor; stroke: none; }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-xs);
  background: var(--cyan);
  color: var(--navy-950);
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* Scroll reveal: only active when JS is running */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
