/* ============================================================
   ALIFY — typography.css
   Type scale & editorial text primitives. Loaded on every page.
   Font files self-hosted via /assets/vendor/fonts/fonts.css
   ============================================================ */

body {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
}

/* ---------- Headings (Clash Display) ---------- */
h1, h2, h3, .h-display {
  font-family: var(--ff-display);
  font-weight: 600;
  letter-spacing: -.018em;
  color: var(--off);
  text-wrap: balance;
}

h1 { font-size: clamp(2.625rem, 5.6vw, 4.5rem); line-height: 1.02; }
h2 { font-size: clamp(2.125rem, 4vw, 3.25rem);  line-height: 1.06; }
h3 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); line-height: 1.18; }

h4, .h4 {
  font-family: var(--ff-display);
  font-size: 1.125rem; font-weight: 600;
  color: var(--off); line-height: 1.3;
}

/* editorial oversized display (home hero, CTA bands) */
.display {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: clamp(2.9rem, 8.2vw, 6.9rem);
  line-height: .96;
  letter-spacing: -.024em;
  color: var(--off);
  text-wrap: balance;
}

/* italic accent word inside headlines (Playfair) — gradient ink */
.display em, h1 em, h2 em {
  font-family: var(--ff-accent);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -.005em;
  background: linear-gradient(100deg, var(--green) 5%, #66E58E 45%, var(--teal-2) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* split headlines: words are re-wrapped into transformed .wi spans inside
   overflow masks — the em-level background-clip can no longer reach the
   text, so each word span must carry the gradient itself */
.display em .wi, h1 em .wi, h2 em .wi {
  background: linear-gradient(100deg, var(--green) 5%, #66E58E 45%, var(--teal-2) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* gradient ink is unreadable on sand — fall back to solid ink there */
.section--sand .display em, .section--sand h1 em, .section--sand h2 em,
.section--sand .display em .wi, .section--sand h1 em .wi, .section--sand h2 em .wi {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #15150B;
}
.hl { color: var(--green); }
.hl-sand { color: var(--sand); }
.hl-teal { color: var(--teal-2); }

.section--sand h1, .section--sand h2, .section--sand h3, .section--sand .display { color: #15150B; }

/* ---------- Body & leads (General Sans) ---------- */
.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.62;
  color: var(--muted);
  max-width: 58ch;
}
.section--sand .lead { color: rgba(23, 23, 14, .72); }

.muted { color: var(--muted); }
.small { font-size: .9rem; }

.mono {
  font-family: var(--ff-mono);
  font-size: .82rem; letter-spacing: .1em;
}

strong { font-weight: 600; color: var(--off); }
.section--sand strong { color: #15150B; }

/* ---------- Eyebrow kickers (Space Grotesk) ---------- */
.eyebrow {
  font-family: var(--ff-mono);
  font-size: .78rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--green);
  display: inline-flex; align-items: center; gap: .85rem;
}
.eyebrow::before {
  content: "";
  width: 2.25rem; height: 1px;
  background: currentColor;
  flex: none;
}
/* live pulse dot at the end of every kicker */
.eyebrow::after {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
  animation: eye-pulse 2.6s ease-in-out infinite;
}
@keyframes eye-pulse {
  0%, 100% { opacity: .3; transform: scale(.75); }
  50% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 10px currentColor; }
}
.eyebrow--teal { color: var(--teal-2); }
.eyebrow--sage { color: var(--sage-2); }
.eyebrow--sand { color: var(--sand); }
.eyebrow--off  { color: var(--muted); }
.section--sand .eyebrow { color: var(--teal); }

/* ---------- Editorial pull-quotes (Playfair Display) ---------- */
.quote {
  font-family: var(--ff-accent);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.375rem, 2.8vw, 1.95rem);
  line-height: 1.4;
  color: var(--off);
}
.quote--big { font-size: clamp(1.75rem, 3.6vw, 3rem); line-height: 1.32; }
.section--sand .quote { color: #1B1B10; }

/* inline text link */
.t-link {
  color: var(--off);
  text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--teal-2);
  transition: color .3s, box-shadow .3s;
}
.t-link:hover { color: var(--green); box-shadow: inset 0 -1px 0 var(--green); }

/* ---------- Long-form prose (blog articles, legal) ---------- */
.prose { max-width: 68ch; font-size: 1.0625rem; line-height: 1.78; color: rgba(236, 236, 228, .8); }
.prose > * + * { margin-top: 1.3em; }
.prose h2 { margin-top: 2em; font-size: clamp(1.6rem, 2.6vw, 2.125rem); }
.prose h3 { margin-top: 1.7em; }
.prose h2, .prose h3 { line-height: 1.18; }
.prose ul { list-style: none; display: grid; gap: .65rem; }
.prose ul li { position: relative; padding-left: 1.6rem; }
.prose ul li::before {
  content: "";
  position: absolute; left: 0; top: .78em;
  width: .6rem; height: 2px;
  background: var(--teal-2);
}
.prose ol { padding-left: 1.35rem; list-style: decimal; display: grid; gap: .5rem; }
.prose ol li::marker { color: var(--teal-2); font-family: var(--ff-mono); }
.prose a { color: var(--green); text-decoration: none; box-shadow: inset 0 -1px 0 rgba(12, 220, 42, .4); }
.prose a:hover { box-shadow: inset 0 -1.3em 0 rgba(12, 220, 42, .12); }
.prose blockquote {
  font-family: var(--ff-accent); font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.45;
  color: var(--sand);
  border-left: 2px solid var(--green);
  padding-left: 1.5rem;
  margin-block: 1.6em;
}
.prose blockquote cite {
  display: block; margin-top: .9rem;
  font-family: var(--ff-mono); font-style: normal;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.prose img { border-radius: var(--r); border: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }

/* definition-style label+value (case studies, service meta) */
.dl { display: grid; gap: 1.5rem; }
.dl__item { border-top: 1px solid var(--line); padding-top: 1rem; }
.dl__term { font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sage-2); margin-bottom: .4rem; }
.dl__value { font-family: var(--ff-display); font-size: 1.15rem; font-weight: 500; color: var(--off); }
