/* ==========================================================================
   Base Reset, Typography & Accessibility Primitives — Midnight Digital
   ========================================================================== */

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

html {
  font-size: 16px;
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-primary);
  background-color: var(--bg-canvas);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--gutter);
  z-index: 200;
  padding: 0.7rem 1.2rem;
  background-color: var(--accent-solid);
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: top var(--dur-micro) var(--ease-expo);
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Section Labels & Headings */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section-kicker__idx {
  color: var(--accent);
}

.section-heading {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
}

.section-lead {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--ink-secondary);
  max-width: 54ch;
}

/* Buttons with Purposeful Micro-Interactions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.85rem 1.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition:
    background-color var(--dur-micro) var(--ease-smooth),
    color var(--dur-micro) var(--ease-smooth),
    border-color var(--dur-micro) var(--ease-smooth),
    box-shadow var(--dur-micro) var(--ease-smooth),
    transform var(--dur-micro) var(--ease-expo);
}

.btn:active {
  transform: scale(0.975);
}

.btn--primary {
  background-color: var(--ink-primary);
  color: #070b14;
  border-color: var(--ink-primary);
  font-weight: 600;
}

.btn--primary:hover {
  background-color: var(--accent-solid);
  border-color: var(--accent-solid);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.3);
}

.btn--ghost {
  background-color: rgba(15, 23, 42, 0.52);
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  border-color: var(--accent);
  background-color: rgba(96, 165, 250, 0.12);
  color: #ffffff;
}

.btn__arrow {
  display: inline-flex;
  transition: transform var(--dur-micro) var(--ease-expo);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}
