/* ==========================================================================
   Sol Genesys — Base styles
   --------------------------------------------------------------------------
   1. Reset
   2. Page and text defaults
   3. Accessibility helpers (screen-reader text, skip link, focus ring)
   4. Inline SVG icons
   5. Container
   6. Reduced motion
   ========================================================================== */

/* 1. Reset ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Keep in-page link targets clear of the fixed header */
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

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

img {
  height: auto;
}

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

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

[hidden] {
  display: none !important;
}

/* 2. Page and text defaults ------------------------------------------------ */
body {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-heading);
  letter-spacing: -0.01em;
  color: var(--color-text);
  overflow-wrap: break-word;
}

p {
  overflow-wrap: break-word;
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

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

/* Links inside running text */
.prose a,
.inline-link {
  color: var(--color-accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover,
.inline-link:hover {
  color: var(--color-text);
}

::selection {
  background: var(--color-accent);
  color: #ffffff;
}

/* 3. Accessibility helpers ------------------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: #ffffff;
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

/* Headings that receive focus from script (form steps) */
[tabindex="-1"]:focus {
  outline: none;
}

/* 4. Inline SVG icons ------------------------------------------------------ */
.icon {
  flex-shrink: 0;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

/* 5. Container ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* 6. Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
