/* ==========================================================================
   SEGAL — Base Styles
   Reset + typographic foundation. Logical properties used throughout
   so a future RTL (Arabic) build does not require structural rework.
   ========================================================================== */

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

* {
  margin: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-body);
  background-color: var(--color-concrete);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
svg {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
  padding-inline-start: 0;
}

/* ---- Typography defaults ---- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

p {
  max-inline-size: 62ch;
}

/* ---- Focus visibility (accessibility) ---- */

:focus-visible {
  outline: 2px solid var(--color-signage-blue);
  outline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-signage-blue);
  outline-offset: 3px;
}

/* ---- Skip link ---- */

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: var(--space-sm);
  z-index: var(--z-skip-link);
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--fs-mono-label);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  transition: inset-block-start var(--duration-fast) var(--ease-standard);
}

.skip-link:focus {
  inset-block-start: var(--space-sm);
}

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

::selection {
  background: var(--color-signage-blue);
  color: var(--color-white);
}

/* ---- Screen-reader only ---- */

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
