/* ==========================================================================
   GhazTech Design System — Base
   Resets, base typography, global utilities.
   ========================================================================== */

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

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

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

img,
svg {
  max-width: 100%;
  display: block;
}

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

button {
  font-family: inherit;
}

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

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: var(--lh-tight);
  margin: 0 0 var(--space-sm);
  font-weight: 600;
}

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

p {
  margin: 0 0 var(--space-sm);
}

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  display: inline-block;
  vertical-align: -0.125em;
}
.icon-fill {
  fill: currentColor;
  stroke: none;
}

::selection {
  background: var(--brand-primary);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-cream-200);
}
::-webkit-scrollbar-thumb {
  background: var(--color-blue-400);
  border-radius: var(--radius-pill);
}

/* ---- Global utilities ---- */
.container-wide {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: var(--space-sm);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--brand-accent-strong);
  display: inline-block;
}
.eyebrow.on-dark {
  color: var(--brand-accent);
}

.lead-text {
  font-size: var(--fs-lead);
  color: var(--text-body);
}

.text-accent {
  color: var(--brand-accent-strong);
}

.section-pad {
  padding-block: var(--space-3xl);
}
.section-pad-sm {
  padding-block: var(--space-2xl);
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: var(--space-sm);
  background: var(--color-ink-900);
  color: #fff;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 999;
  transition: top var(--duration-fast) var(--ease-premium);
}
.skip-link:focus {
  top: var(--space-sm);
}

/* ---- Scrollbars ----
   The platform default is a heavy 17px bar that sits inside the layout and
   crowds the page. These are slim, brand-tinted, and sit over the content
   rather than taking width from it. `scrollbar-gutter: stable` reserves the
   space up front so nothing shifts sideways when a scrollbar appears. */
html {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 58, 153, 0.32) transparent;
}
*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  border-radius: var(--radius-pill);
  background: rgba(22, 58, 153, 0.28);
  /* A transparent border painted over the background keeps the thumb clear
     of the track edges without needing a separate track colour. */
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(22, 58, 153, 0.48);
  background-clip: content-box;
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

/* The HTML `hidden` attribute is only a `display:none` in the UA stylesheet,
   so any later `display` rule silently beats it — Bootstrap's `.row`, for one.
   This makes the attribute mean what it says wherever it is used. */
[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
