/* =========================================================
   Base: reset, typography, layout primitives
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Soft film grain + vignette, same mood as Hooked's dark canvas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 0% 0%, #ff6a3d14, transparent 70%),
    radial-gradient(50% 60% at 100% 100%, #7f3ff014, transparent 70%);
}

main, .site-footer { position: relative; z-index: 1; }

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

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.05; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
figure { margin: 0; }

a { color: inherit; text-decoration: none; }
a:not([class]) { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
a:not([class]):hover { text-decoration-color: var(--pink); }

button { font: inherit; color: inherit; cursor: pointer; }

.mono { font-family: var(--mono); }
.break { word-break: break-all; }

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

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

.skip-link {
  position: fixed;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

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

::selection { background: #ff2e9366; color: #fff; }

/* Chrome text: Hooked's gradient word treatment */
.chrome {
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  padding-right: .04em;
}

.dim { color: var(--ink3); }

/* Eyebrow: mono caps with a leading rule, as on hookedpad.com */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink2);
}
.eyebrow i {
  width: 22px;
  height: 1px;
  background: var(--ink3);
}

.fine {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink3);
}
.fine a { color: var(--ink2); }
.center { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
