/* ============================================================
   WILDMAN - Base
   Reset, document defaults, typography scale, primitives.
   ============================================================ */

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

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

body {
  margin: 0;
  background: var(--wm-bg);
  color: var(--wm-text);
  font-family: var(--wm-font-body);
  font-size: var(--wm-text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--wm-font-heading);
  color: var(--wm-fg, var(--wm-text));
  text-wrap: balance;
}

a {
  color: var(--wm-blue-bright);
  text-decoration: none;
  transition: color var(--wm-transition-spring);
}
a:hover { color: var(--wm-fg, var(--wm-text)); }

img, svg, video, canvas { max-width: 100%; height: auto; display: block; }

button { font-family: var(--wm-font-heading); cursor: pointer; }

summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

::selection { background: var(--wm-blue); color: #fff; }

:focus-visible {
  outline: 2px solid var(--wm-blue-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #05080d; }
::-webkit-scrollbar-thumb { background: rgba(90, 155, 255, 0.22); border-radius: var(--wm-radius-pill); }
::-webkit-scrollbar-thumb:hover { background: rgba(90, 155, 255, 0.4); }

/* Accessibility helpers */

.wm-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--wm-blue);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 12px 0;
  font-family: var(--wm-font-heading);
  font-size: 14px;
  font-weight: var(--wm-weight-semibold);
}
.wm-skip-link:focus { left: 0; color: #fff; }

.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Grid floors are written minmax(min(Npx, 100%), 1fr) throughout the theme.
   A bare minmax(Npx, 1fr) cannot shrink below N, so on a container narrower
   than N the single track overflows instead of collapsing. */

/* Layout primitives */

.wm-section {
  padding: var(--wm-section-y) var(--wm-gutter);
  border-bottom: 1px solid var(--wm-rule);
}
.wm-section--tight { padding-block: var(--wm-section-y-sm); }
.wm-section--flush { border-bottom: 0; }

.wm-wrap { max-width: var(--wm-maxw); margin-inline: auto; width: 100%; }
.wm-wrap--narrow { max-width: 820px; }
.wm-wrap--prose  { max-width: 720px; }

.wm-grid { display: grid; gap: clamp(20px, 3vw, 34px); }
.wm-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.wm-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.wm-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }

/* Type scale */

.wm-display {
  font-family: var(--wm-font-heading);
  font-weight: var(--wm-weight-extrabold);
  font-size: clamp(33px, min(7.2vw, 10.5vh), 104px);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.wm-h1 {
  font-family: var(--wm-font-heading);
  font-weight: var(--wm-weight-extrabold);
  font-size: clamp(30px, 5.6vw, 80px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.wm-h2 {
  font-family: var(--wm-font-heading);
  font-weight: var(--wm-weight-bold);
  font-size: clamp(30px, 4.2vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.wm-h3 {
  font-family: var(--wm-font-heading);
  font-weight: var(--wm-weight-bold);
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.wm-h4 {
  font-family: var(--wm-font-heading);
  font-weight: var(--wm-weight-semibold);
  font-size: var(--wm-text-xl);
  line-height: 1.3;
}

.wm-lead {
  font-family: var(--wm-font-body);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.62;
  color: var(--wm-fg-soft);
}

.wm-p {
  font-family: var(--wm-font-body);
  font-size: var(--wm-text-base);
  line-height: 1.6;
  color: var(--wm-fg-soft);
}

.wm-label {
  font-family: var(--wm-font-heading);
  font-size: var(--wm-text-xs);
  font-weight: var(--wm-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--wm-blue-bright);
}

.wm-caption {
  font-family: var(--wm-font-body);
  font-size: var(--wm-text-sm);
  color: var(--wm-fg-muted);
}

.wm-gradient-text {
  background-image: var(--wm-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* background-image, not the background shorthand: the shorthand resets
   background-clip back to border-box and the gradient paints the whole box
   instead of the glyphs. */
.wm-gradient-text--hero { background-image: var(--wm-gradient-hero-text); }

/* Motion */

@keyframes wmUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes wmPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.35); }
}
@keyframes wmSweep {
  from { transform: translateX(-100%); }
  to   { transform: translateX(320%); }
}

/* Reveal-on-scroll. Opt in with data-r; JS adds .is-in.
   Without JS the element is simply visible. */
.js [data-r] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--wm-ease-spring), transform 0.7s var(--wm-ease-spring);
}
.js [data-r].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .js [data-r] { opacity: 1; transform: none; }
}