/* ═══════════════════════════════════════════════
   BASE.CSS — Reset, Typography & Layout
   ═══════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.75;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  min-height: 100vh;
}

img, video, svg { display:block; max-width:100%; }
a  { text-decoration:none; color:inherit; }
ul, ol { list-style:none; }
button { font-family:inherit; cursor:pointer; border:none; background:none; }
input, textarea, select { font-family:inherit; }

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

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--steel-3), var(--accent-2));
  border-radius: 10px;
}

/* ── SELECTION ── */
::selection { background:var(--accent-2); color:var(--bg-primary); }

/* ── FOCUS ── */
:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── LAYOUT ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--px);
}

.section {
  padding: var(--section-gap) 0;
  position: relative;
}

.section-alt { background: var(--bg-secondary); }

/* ── TYPOGRAPHY HELPERS ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent-3);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  transition: letter-spacing 0.3s ease;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent-2), var(--steel-3));
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-6);
}
.section-title em {
  font-style: italic;
  color: var(--accent-3);
}

.section-subtitle {
  font-size: var(--text-md);
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.8;
}

/* ── REVEAL ANIMATIONS ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
[data-reveal="left"]  { transform: translateX(-28px); }
[data-reveal="right"] { transform: translateX(28px); }
[data-reveal="scale"] { transform: scale(0.93); }
[data-reveal="fade"]  { transform: none; }
[data-reveal].in-view { opacity:1; transform:none; }

[data-delay="1"].in-view { transition-delay: 0.08s; }
[data-delay="2"].in-view { transition-delay: 0.16s; }
[data-delay="3"].in-view { transition-delay: 0.24s; }
[data-delay="4"].in-view { transition-delay: 0.32s; }
[data-delay="5"].in-view { transition-delay: 0.40s; }
[data-delay="6"].in-view { transition-delay: 0.48s; }
[data-delay="7"].in-view { transition-delay: 0.56s; }
[data-delay="8"].in-view { transition-delay: 0.64s; }

/* ── BACKGROUND ELEMENTS ── */
.bg-dots {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.6;
}
[data-theme="light"] .bg-dots {
  background-image: radial-gradient(circle, rgba(0,0,0,0.05) 1px, transparent 1px);
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px;
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-default) 30%, var(--border-default) 70%, transparent);
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:0.01ms !important; transition-duration:0.01ms !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity:1; transform:none; }
}
