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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ─── Typography ─── */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.15;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); line-height: 1.05; }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); font-weight: 700; }
h4 { font-size: var(--text-xl); font-weight: 700; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

strong {
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── Layout helpers ─── */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

section {
  padding: var(--section-pad);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--text-lg);
  max-width: 640px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  margin-bottom: var(--space-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── Grid ─── */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── Divider ─── */

.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 0;
}

/* ─── Scroll reveal ─── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Scrollbar ─── */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.35); }

/* ─── Selection ─── */

::selection {
  background: rgba(0, 188, 219, 0.25);
  color: var(--text-primary);
}
