/* ============================================================
   BASE.CSS — Reset, Variables, Typography, Global Rules
   ============================================================ */

/* ---------- RESET ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: calc(var(--island-height) + var(--island-top-offset) + 16px);
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

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

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------- CSS VARIABLES ---------- */
:root {
  /* Colors — Light theme */
  --bg: #ffffff;
  --bg-subtle: #f8f9fb;
  --text: #0a0a0a;
  --text-2: #5a5a5a;
  --text-3: #8a8a8a;
  --border: #e2e5ea;
  --border-light: #eff1f4;
  --accent: #2b6fdb;
  --accent-hover: #1d5ab8;
  --accent-soft: #edf3fe;
  --card: #ffffff;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.04);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Layout */
  --max: 1280px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);

  /* ============================================
     NAV TRANSPARENCY
     Adjust to control nav glass opacity.
     Range: 0 (transparent) → 1 (solid)
     ============================================ */
  --nav-transparency: 0.4;
  /* ============================================ */

  /* Nav island geometry */
  --island-height: 62px;
  --island-radius: 40px;
  --island-top-offset: 14px;
  --island-max-width: 1180px;
  --island-padding-x: 8px;
}

/* Colors — Dark theme */
[data-theme="dark"] {
  --bg: #0b0d10;
  --bg-subtle: #12161c;
  --text: #f0f2f5;
  --text-2: #a0a8b4;
  --text-3: #6b7582;
  --border: #262c34;
  --border-light: #1c2128;
  --accent: #4d8eff;
  --accent-hover: #6b9fff;
  --accent-soft: #141a24;
  --card: #12161c;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---------- TYPOGRAPHY ---------- */
.h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.h2 {
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.h3 {
  font-size: 1.15rem;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.lead {
  font-size: 1.02rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 560px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
  display: block;
}

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

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}