/* ==========================================================================
   LEPTIR — Base, typography, layout
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.62;
  font-weight: 400;
  letter-spacing: var(--tracking-snug);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "cv05" 1, "ss03" 1;
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; letter-spacing: var(--tracking-snug); }
h4 { font-size: var(--step-0); line-height: 1.3; }

p { margin: 0 0 var(--sp-3); max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--accent); }

ul, ol { margin: 0 0 var(--sp-3); padding-left: 1.15em; }
li { margin-bottom: var(--sp-1); }

strong { font-weight: 560; color: var(--bone); }

::selection { background: var(--accent); color: var(--on-accent); }

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

/* ---- Skip link ---------------------------------------------------------- */
.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--step--1);
  font-weight: 520;
  border-radius: var(--radius);
  transition: top 180ms var(--ease);
}
.skip:focus { top: 0.85rem; }

/* ---- Layout ------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: clamp(4rem, 10vw, var(--sp-8)); position: relative; }
.band--tight { padding-block: clamp(3rem, 7vw, var(--sp-6)); }
.band + .band { border-top: 1px solid var(--line-soft); }

.lede {
  font-size: var(--step-1);
  line-height: 1.42;
  color: var(--ash);
  max-width: 34ch;
  font-weight: 380;
}

.prose { color: var(--ash); }
.prose h3 { color: var(--bone); margin-top: var(--sp-5); margin-bottom: var(--sp-2); }
.prose h3:first-child { margin-top: 0; }

/* Section opener: heading left, supporting copy right */
.opener {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}
.opener p { color: var(--ash); margin: 0; }

/* Small metadata line */
.meta {
  font-size: var(--step--2);
  color: var(--ash-dim);
  letter-spacing: var(--tracking-wide);
  margin: 0;
}

/* Index marker used where content genuinely is a sequence */
.marker {
  font-size: var(--step--2);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.hairline { height: 1px; background: var(--line-soft); border: 0; margin: 0; }
