/* eigenein.dev theme: shared by every page. Page-specific styles live next to each page. */

/* Every page's theme-color metas repeat --paper: keep them in sync. */
:root {
  --paper: #f6f4f0;
  --paper-raised: #ffffff;
  --ink: #16151a;
  --ink-soft: #55525c;
  --ink-faint: #6e6b75;
  --rule: #e2ded6;
  --accent: #b4532a;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px -8px rgb(0 0 0 / 0.18);

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 48px);
  --measure: 1120px;
  --section-space: clamp(56px, 8vw, 96px);
  --bar-height: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121115;
    --paper-raised: #1b1a1f;
    --ink: #f1efeb;
    --ink-soft: #b3afb8;
    --ink-faint: #8f8b95;
    --rule: #2a2830;
    --accent: #e8875c;
    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -8px rgb(0 0 0 / 0.5);
  }
}

/* Base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

/* Round the ring around inline text, links or not. Zero specificity, so any box with its own corners keeps them. */
:where(a, [tabindex]):focus-visible {
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 8px;
}

/* Top bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
}

.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--bar-height);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 650 19px/1 var(--font);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.bar nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
}

.bar nav a {
  color: var(--ink-soft);
  font-size: 15px;
  text-decoration: none;
}

.bar nav a:hover {
  color: var(--ink);
}

/* Hero */

.hero {
  padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 96px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font: 600 13px/1 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 14ch;
  margin: 0 auto;
  font: 700 clamp(44px, 8.4vw, 96px)/0.98 var(--font);
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.lede {
  max-width: 34em;
  margin: 28px auto 0;
  color: var(--ink-soft);
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.5;
  text-wrap: pretty;
}

/* Sections */

.section {
  padding: var(--section-space) 0;
}

.section + .section {
  border-top: 1px solid var(--rule);
}

.section-head {
  max-width: 40em;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.section-head h2 {
  margin: 0;
  font: 700 clamp(32px, 5vw, 52px)/1.04 var(--font);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-head :where(p) {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 19px;
  text-wrap: pretty;
}

/* Motion */

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

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