/* ============================================================
   BASE — reset, typography, primitives
   ============================================================ */

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

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

body {
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
  transition: background-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}

p { line-height: 1.7; }

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  text-align: inherit;
}

input, select, textarea {
  font: inherit;
  color: inherit;
}

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

ul, ol { list-style: none; }

::selection {
  background: var(--red);
  color: var(--white);
}

/* Focus visibility — keyboard only */
:focus { outline: none; }
:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 9999;
  background: var(--ink);
  color: var(--white);
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: 8px; }

/* Container */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

/* Eyebrow — small caps label with leading dash */
.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  margin-bottom: var(--sp-4);
}
.eyebrow-dash {
  width: 28px;
  height: 1.5px;
  background: var(--red);
  display: inline-block;
}

/* Page management */
.page { display: none; }
.page[data-active="true"] { display: block; animation: page-in var(--dur-slow) var(--ease-out); }

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section heads */
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--sp-9);
}
.section-title {
  font-family: var(--f-display);
  font-size: var(--fs-3xl);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: var(--sp-3);
}
.section-title em {
  color: var(--red);
  font-style: normal;
}
.section-desc {
  color: var(--text-mid);
  font-size: var(--fs-md);
  line-height: 1.7;
  margin-top: var(--sp-3);
}

/* Utility: visually hide */
.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;
}

[hidden] { display: none !important; }

/* Scrollbar styling (subtle) */
@media (pointer: fine) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--r-pill);
    border: 2px solid var(--bg);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }
}
