/* ==========================================================================
   PEPTIDESTX — BASE / RESET / GLOBAL
   ========================================================================== */

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

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

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

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-obsidian);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
}

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

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

h1, h2, h3, h4, p {
  margin: 0;
}

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

@media (max-width: 480px) {
  .container {
    padding-inline: var(--container-margin-mobile);
  }
}

/* ---- Visually hidden (for accessible labels) ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-6);
  z-index: var(--z-skip-link);
  background: var(--color-obsidian);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  transition: top var(--dur-base) var(--ease-out);
}

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

/* ---- Global focus-visible treatment ----
   2px royal-violet outline, 2px offset, applied consistently to every
   interactive element per the Phase 3 accessibility baseline. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-royal-violet);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Buttons on dark-on-white surfaces get an inset gap so the outline
   remains legible against a white fill, per hero primary-button spec. */
.btn--primary-light:focus-visible {
  outline-offset: 3px;
  box-shadow: 0 0 0 1px var(--color-white);
}

/* ---- Reduced motion: global kill-switch ----
   Individual components also guard specific animations, but this acts
   as a safety net for any transform/opacity transitions not explicitly
   scoped elsewhere. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Selection ---- */
::selection {
  background: var(--color-royal-violet);
  color: var(--color-white);
}
