/* ============================================================
   NthLaw Technologies — Design System
   ============================================================ */

:root {
  /* Core palette */
  --bg: #050505;
  --bg-soft: #0a0a0c;
  --card: #0e0e11;
  --card-2: #131318;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* Accents */
  --indigo: #4f46e5;
  --cyan: #00d4ff;
  --violet: #8b5cf6;

  /* Text */
  --text: #ffffff;
  --muted: #9ca3af;
  --muted-2: #6b7280;

  /* Gradients */
  --grad-primary: linear-gradient(120deg, #00d4ff 0%, #4f46e5 50%, #8b5cf6 100%);
  --grad-soft: linear-gradient(120deg, rgba(0,212,255,0.16), rgba(139,92,246,0.16));
  --glow-cyan: 0 0 40px rgba(0, 212, 255, 0.35);
  --glow-violet: 0 0 40px rgba(139, 92, 246, 0.35);

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing rhythm */
  --section-pad: clamp(80px, 11vw, 180px);
  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1280px;

  --radius: 18px;
  --radius-lg: 26px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

::selection { background: rgba(0, 212, 255, 0.3); color: #fff; }

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

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; }

.section-pad { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }

/* ---------- Type scale ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.04; text-wrap: balance; }

.h-display { font-size: clamp(44px, 7.2vw, 92px); font-weight: 800; letter-spacing: -0.035em; }
.h-section { font-size: clamp(34px, 4.6vw, 60px); }
.h-sub { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; }

.lead {
  font-size: clamp(18px, 1.5vw, 21px);
  color: var(--muted);
  line-height: 1.6;
  max-width: 60ch;
  text-wrap: pretty;
}

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

.section-head { max-width: 760px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head .eyebrow { margin-bottom: 22px; }
.section-head .lead { margin-top: 22px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, background .25s, border-color .25s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s; }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  background-size: 160% 160%;
  background-position: 0% 50%;
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); background-position: 100% 50%; box-shadow: 0 12px 40px rgba(0,212,255,0.4); }

.btn-ghost {
  background: rgba(255,255,255,0.04);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.09); transform: translateY(-2px); border-color: rgba(255,255,255,0.25); }

/* ---------- Glass card base ---------- */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
}

/* ---------- Background fx ---------- */
.bg-grid {
  position: absolute; inset: 0;
  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;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Reveal animation (JS/rAF-driven for preview reliability) ---------- */
.reveal { opacity: 0; transform: translateY(28px); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

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