/* ==========================================================================
   BASE — reset, element defaults, typography primitives, utilities.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

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

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

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

a {
  color: inherit;
}

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

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* --- Typography primitives ------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  text-wrap: balance;
}

.display--xl { font-size: var(--text-display-xl); }
.display--lg { font-size: var(--text-display-lg); }
.display--md { font-size: var(--text-display-md); }

/* Blinking block cursor after the last word (mockup signature). */
.with-cursor::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  margin-left: 0.08em;
  vertical-align: -0.05em;
  background: var(--color-primary);
  animation: cursor-blink 1.1s steps(1) infinite;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

/* "> SECTION NAME" labels */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-primary-muted);
  margin-bottom: var(--space-5);
}

.eyebrow::before { content: "> "; }
.eyebrow--accent { color: var(--color-primary); }
.eyebrow--on-accent { color: var(--color-text-inverse-muted); }

/* "// lead text" */
.lead {
  max-width: 34rem;
  margin-top: var(--space-5);
  color: var(--color-text-inverse-muted);
}

.lead--code::before { content: "// "; }

.label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-inverse-muted);
  margin: var(--space-8) 0 var(--space-3);
}

/* --- Utilities -------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-paper);
  color: var(--color-ink);
}

.skip-link:focus { top: var(--space-4); }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
