/* ============================================================
   CN Web Co. — Design Tokens
   The ONLY source of colors, type, spacing, effects, and shared
   classes. Section agents reference these — never reinvent them.
   ============================================================ */

:root {
  /* ---- Color ---- */
  --bg:          #0A0A0B;   /* page background, near-black, slightly cool */
  --bg-alt:      #0E0E11;   /* alternating section band */
  --surface:     #141418;   /* card / raised surface */
  --surface-2:   #1A1A21;   /* nested / hover surface */
  --border:      #26262E;   /* card + divider borders */
  --border-soft: #1C1C23;   /* faint hairlines */
  --text:        #F4F4F6;   /* primary text */
  --text-soft:   #A2A2AE;   /* body / secondary */
  --text-faint:  #6A6A78;   /* captions, meta, footnotes */
  --accent:      #7C5CFF;   /* electric violet — primary accent */
  --accent-2:    #3DD4F5;   /* electric cyan — gradient partner */
  --accent-soft: rgba(124, 92, 255, 0.12); /* tinted fills, hover washes */
  --accent-ink:  #07070A;   /* dark text that sits on the bright gradient */

  --gradient-accent: linear-gradient(135deg, #7C5CFF 0%, #3DD4F5 100%);
  --gradient-text:   linear-gradient(120deg, #B7A6FF 0%, #7FE3F7 100%);

  /* ---- Type ---- */
  --font-heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --text-h1:      clamp(2.7rem, 6vw, 4.6rem);
  --text-h2:      clamp(2rem, 4vw, 2.9rem);
  --text-h3:      1.35rem;
  --text-lead:    clamp(1.05rem, 1.6vw, 1.25rem);
  --text-body:    1.0625rem;   /* 17px */
  --text-small:   0.9rem;
  --text-eyebrow: 0.8rem;

  /* ---- Spacing & shape ---- */
  --space-section:        120px;
  --space-section-mobile: 72px;
  --gap:          28px;
  --radius:       14px;
  --radius-lg:    22px;
  --radius-pill:  999px;
  --container-max: 1180px;

  /* ---- Effects ---- */
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 50px rgba(0, 0, 0, 0.45);
  --glow-accent: 0 0 0 1px rgba(124, 92, 255, 0.4), 0 14px 40px rgba(124, 92, 255, 0.35);
  --ring: 0 0 0 1px var(--border);
}

/* ---- Reset & base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
p  { color: var(--text-soft); }
img { max-width: 100%; display: block; }
a  { color: var(--accent); text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

/* ---- Layout helpers ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}
@media (max-width: 760px) {
  .section {
    padding-top: var(--space-section-mobile);
    padding-bottom: var(--space-section-mobile);
  }
}

/* ---- Section head (eyebrow + h2 + lead) ---- */
.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head .eyebrow { justify-content: center; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { font-size: var(--text-lead); }

/* ---- Eyebrow (mono kicker) ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---- Gradient text ---- */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 15px 28px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn-primary {
  background: var(--gradient-accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-accent);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}

/* ---- Card ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

/* ---- Badge (pill) ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
}

/* ---- Tag (small mono label, accent-tinted) ---- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
}

/* ---- Reduced motion: ensure everything stays visible ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}
