/* ==========================================================================
   RESET + PRIMITIVES
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--ink-100);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

::selection {
  background: var(--brand-primary);
  color: var(--ink-000);
}

:focus-visible {
  outline: 2px solid var(--brand-accent-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   BACKGROUND ATMOSPHERE, grain and gradient mesh, no external assets
   ========================================================================== */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.atmosphere::before {
  /* gradient mesh */
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(38% 32% at 14% 8%, rgba(37, 99, 235, 0.24), transparent 60%),
    radial-gradient(30% 28% at 88% 18%, rgba(6, 182, 212, 0.16), transparent 60%),
    radial-gradient(46% 40% at 70% 92%, rgba(37, 99, 235, 0.10), transparent 65%);
  filter: blur(10px);
}

.atmosphere::after {
  /* film grain via inline SVG noise, tiled */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>");
  background-size: 120px 120px;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--hairline) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hairline) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 62%);
  opacity: 0.5;
}

/* ==========================================================================
   LAYOUT PRIMITIVES
   ========================================================================== */

.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--edge);
  position: relative;
  z-index: 1;
}

section {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-accent-soft);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.text-gradient {
  background: linear-gradient(100deg, var(--brand-primary-soft), var(--brand-accent-soft) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(120deg, var(--brand-primary), var(--brand-accent));
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 12px 30px -12px rgba(37, 99, 235, 0.65);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 18px 36px -12px rgba(6, 182, 212, 0.55);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--hairline-strong);
  color: var(--ink-100);
}
.btn-ghost:hover {
  border-color: var(--brand-accent-soft);
  background: rgba(6, 182, 212, 0.06);
  transform: translateY(-2px);
}

.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* ==========================================================================
   CODE / MONO CHROME
   ========================================================================== */

code, pre, .mono {
  font-family: var(--font-mono);
}

pre {
  margin: 0;
  padding: 20px 22px;
  background: var(--bg-void);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-100);
  position: relative;
}

/* A soft fade on the trailing edge hints a long command scrolls further,
   instead of letting it look simply cut off at the card's edge. Purely
   decorative and non-interactive, so it can't block the real scroll. */
pre.is-scrollable-hint::after {
  content: "";
  position: absolute;
  top: 1px; right: 1px; bottom: 1px;
  width: 28px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: linear-gradient(to right, transparent, var(--bg-void) 78%);
  pointer-events: none;
}

code {
  font-size: 0.92em;
}

:not(pre) > code {
  background: rgba(6, 182, 212, 0.1);
  color: var(--brand-accent-soft);
  padding: 0.15em 0.45em;
  border-radius: 5px;
}

/* ==========================================================================
   SCROLLBAR (webkit), subtle, on-brand
   ========================================================================== */

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--bg-panel-2);
  border-radius: 8px;
  border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-primary); }

/* ==========================================================================
   UTILITIES
   ========================================================================== */

@media (max-width: 640px) {
  .hide-mobile { display: none; }
}

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