@import './tokens.css';

/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-body);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
}

/* ─── Typography Scale ────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--color-body);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.lead {
  font-size: var(--text-lg);
  line-height: 1.75;
  font-weight: 300;
  color: var(--color-secondary);
}

/* ─── Layout Utilities ────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding: var(--space-32) 0;
}

.section--large {
  padding: var(--space-40) 0;
}

.section--small {
  padding: var(--space-20) 0;
}

/* ─── Dark section overrides ─────────────────────────── */
.section--dark {
  background-color: var(--color-dark-bg);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--color-bg);
}

.section--dark p {
  color: var(--color-light-body);
}

.section--dark .eyebrow {
  color: var(--color-accent);
}

.section--dark .lead {
  color: var(--color-light-body);
}

/* ─── Helpers ─────────────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.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;
}

/* ─── Selection ────────────────────────────────────────── */
::selection {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-dark-bg); }
::-webkit-scrollbar-thumb { background: var(--color-dark-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 var(--space-6); }
  .section { padding: var(--space-20) 0; }
  .section--large { padding: var(--space-24) 0; }
}
