/* ============================================
   NomadBridge: Base Styles
   Typography, body, links, headings
   ============================================ */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--ink);
  background-color: var(--pure-white);
  line-height: var(--leading-relaxed);
  /* Keep numbers on the cap line in every face */
  font-variant-numeric: lining-nums;
}

/* ---- Headings ----
   h1-h3: Fraunces (display), medium weight. h4 and UI labels:
   Instrument Sans. Self-hosted Fraunces covers weights 300-600. */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  color: var(--ink);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-display-1);
  line-height: var(--leading-display);
}

h2 {
  font-size: var(--text-display-2);
  line-height: var(--leading-heading);
}

h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 1.5px;
  background-color: var(--terracotta);
  margin-top: var(--space-4);
}

h3 {
  font-size: var(--text-display-3);
  line-height: var(--leading-heading);
}

h4 {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--ink);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}

/* One accent per page, on a word the PRD sets in italic:
   Fraunces italic in the heading's own colour. */
.accent {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: var(--weight-regular);
  font-size: 1em;
  letter-spacing: 0;
  color: inherit;
}

/* "Your new life starts with one conversation." on light backgrounds:
   tight display setting in ink, with only the accent word in terracotta */
.headline-tight {
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 0.82;   /* half the visible gap of 0.95; these lines have no descenders */
  text-wrap: balance;
}

/* terracotta-dark: 5.12 on white, clearly apart from the ink */
.accent--terracotta {
  color: var(--terracotta-dark);
}

/* ---- Body text ---- */

p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: var(--weight-medium);
}

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

/* ---- Links ---- */

a {
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--terracotta-dark);
}

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

/* ---- Selection ---- */

::selection {
  background-color: var(--terracotta-15);
  color: var(--forest);
}

/* ---- Section Header ---- */

.section-header {
  max-width: var(--container-text);
  margin-bottom: var(--space-8);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--text-md);
  color: var(--muted);
  max-width: 600px;
}

/* Secondary text on sand surfaces needs the stronger step (5.30 vs 4.23) */
.section--sand .section-header p,
.section--sand-deep .section-header p {
  color: var(--muted-strong);
}

.section-divider {
  display: none;
}

/* ---- Skip to content ---- */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background-color: var(--forest);
  color: var(--white);
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  z-index: 999;
  transition: top var(--duration-fast);
}

.skip-link:focus {
  top: var(--space-2);
}
