/* ============================================================
   John Jeff — Base elements & brand utilities
   ============================================================ */

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  color: var(--text-strong);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
  margin: 0 0 0.5em;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--text-link); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ---- Display headline (hero) ---- */
.jj-display {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  color: var(--text-strong);
  margin: 0;
}

/* ---- Eyebrow / overline ---- */
.jj-eyebrow {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-overline);
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Lead paragraph ---- */
.jj-lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  font-weight: var(--fw-light);
  color: var(--text-body);
}

/* ---- Hand-drawn emphasis underline (Bloodrush) ----
   A clean, hand-drawn underline used sparingly on a short word/phrase. */
.jj-underline {
  background: url("../assets/illustrations/emphasis-underline.svg") no-repeat center bottom 0.12em / 100% 0.26em;
  padding-bottom: 0.02em;
}

/* ---- Glued-poster background texture ----
   Subtle by default (per brand: light grain on backgrounds only). */
.jj-texture {
  position: relative;
  isolation: isolate;
}
.jj-texture::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../assets/textures/bone-texture-3.png") center / cover no-repeat;
  opacity: var(--texture-opacity-light);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.jj-texture--dark::before {
  mix-blend-mode: screen;
  opacity: var(--texture-opacity-dark);
}

/* ---- Dark section helper ---- */
.jj-dark {
  background: var(--surface-page-dark);
  color: var(--text-on-dark);
}
.jj-dark h1, .jj-dark h2, .jj-dark h3, .jj-dark h4 { color: var(--text-on-dark); }

/* ---- Wandering line decorative element ----
   Pre-colored SVG variants ship in assets/illustrations/ as
   jjh-wandering-line-NN--{lilac|deepcut|bone|acid}.svg — reference
   the variant matching your background and place it with <img>. */
.jj-wander { display: inline-block; }
.jj-wander img, img.jj-wander { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ---- Container ---- */
.jj-container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.jj-measure   { max-width: var(--container-text); }

/* ---- Focus ---- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: var(--border-strong) solid var(--focus-ring);
  outline-offset: 2px;
}
