/* ============================================================
   CallD.AI — Base Styles
   Global typography, links, colours, body defaults
   ============================================================ */

body {
  font-family: var(--f-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--c-body);
  background-color: var(--c-cream);
  line-height: var(--lh-body);
}

/* ── Headings ── */
h1, h2, h3, h4 {
  font-family: var(--f-serif);
  color: var(--c-ink);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
}

h1 {
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-2xl);
}

h3 {
  font-size: var(--fs-xl);
}

h4 {
  font-size: var(--fs-lg);
  font-family: var(--f-sans);
  font-weight: var(--fw-semibold);
}

h5 {
  font-size: var(--fs-md);
  font-family: var(--f-sans);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
}

h6 {
  font-size: var(--fs-base);
  font-family: var(--f-sans);
  font-weight: var(--fw-semibold);
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
}

/* ── Body text ── */
p {
  margin-block-end: var(--sp-4);
  max-width: 65ch;
}

p:last-child {
  margin-block-end: 0;
}

.lead {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--c-body);
}

small, .text-sm {
  font-size: var(--fs-sm);
}

strong {
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
}

/* ── Links ── */
a {
  transition: color var(--transition-fast);
}

.link {
  color: var(--c-green);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.link:hover {
  color: var(--c-green-dark);
  text-decoration-color: var(--c-green-dark);
}

/* ── Monospace / Label Tags ── */
.tag, .label-mono {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--c-green);
}

/* MT-style dashed label: ── SECTION NAME */
.section-label {
  font-family: var(--f-mono);
  font-size: clamp(1.008rem, 0.936rem + 0.36vw, 1.08rem);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--c-green);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-block-end: var(--sp-4);
}

.section-label::before,
.section-label::after {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background-color: var(--c-green);
  flex-shrink: 0;
}

/* ── Code / Pre ── */
code {
  font-family: var(--f-mono);
  font-size: 0.9em;
  background-color: var(--c-cream-cool);
  padding: 0.15em 0.4em;
  border-radius: var(--r-sm);
}

pre {
  font-family: var(--f-mono);
  font-size: var(--fs-sm);
  background-color: var(--c-ink);
  color: var(--c-cream);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  overflow-x: auto;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* ── Selection ── */
::selection {
  background-color: var(--c-green);
  color: var(--c-white);
}

/* ── Focus styles ── */
:focus-visible {
  outline: 2px solid var(--c-green);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Horizontal rule ── */
hr {
  border: none;
  height: 1px;
  background-color: var(--c-border);
  margin-block: var(--sp-12);
}

/* ── Italic serif accent (Inworld AI style) ── */
.accent-italic {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--c-green);
}
