/* ==========================================================================
   Sobha Seinna — Base typography and global elements
   ========================================================================== */

body {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--color-ink-soft);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Headings ------------------------------------------------------------ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }

h4, h5, h6 {
  font-family: var(--font-body);
  color: var(--color-ink);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: var(--lh-snug);
}

p { max-width: 72ch; }

p + p { margin-top: var(--space-4); }

strong, b { color: var(--color-ink); font-weight: 600; }

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

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

a {
  color: var(--color-accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease);
}

a:hover { color: var(--color-ink); }

/* ---- Focus: always visible, never removed -------------------------------- */

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

/* ---- Lists in prose ------------------------------------------------------ */

.prose ul,
.prose ol {
  margin: var(--space-4) 0;
  padding-left: 1.25rem;
  max-width: 72ch;
}

.prose li + li { margin-top: var(--space-2); }

.prose ul { list-style: none; padding-left: 0; }

.prose ul > li {
  position: relative;
  padding-left: 1.4rem;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.68em;
  width: 5px;
  height: 5px;
  background: var(--color-accent);
  transform: rotate(45deg);
}

.prose h3 { margin-top: var(--space-6); margin-bottom: var(--space-3); }

/* ---- Accessibility helpers ----------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 200;
  padding: var(--space-3) var(--space-5);
  background: var(--color-ink);
  color: var(--color-inverse);
  text-decoration: none;
  border-radius: var(--radius);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--color-inverse);
}

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

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

/* ---- Utility ------------------------------------------------------------- */

.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.no-wrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.lead {
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--color-ink-soft);
}

/* Scroll lock applied when a drawer / modal / lightbox is open */
body.is-locked {
  overflow: hidden;
  /* Preserve scroll position without layout shift where supported */
  scrollbar-gutter: stable;
}

/* ---- Spacing utilities (keep inline styles out of the markup) ------------- */

.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-7 { margin-bottom: var(--space-7); }

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

/* Fieldsets used purely for grouping should not paint a browser border. */
.fieldset-plain {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
