/* ==========================================================================
   Reset + base element styles
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto; /* Lenis owns smooth scrolling when active */
}

html.lenis, html.lenis body {
  height: auto;
}

html.lenis.lenis-smooth {
  scroll-behavior: auto;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

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

p {
  text-wrap: pretty;
}

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

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

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

ul, ol {
  list-style: none;
}

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

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

/* Scrollbar kept native and visible for orientation on a long dark site */

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

/* ==========================================================================
   Topographic contour background — sitewide ambient texture
   ========================================================================== */

.topo-bg {
  display: none;
}

.topo-bg__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.topo-bg__group {
  animation: topo-drift 70s var(--ease) infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}

.topo-line {
  fill: none;
  stroke: rgba(245, 243, 238, 0.07);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  animation: topo-pulse 26s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * -1.7s);
}

.topo-line--accent {
  stroke: rgba(201, 163, 78, 0.16);
}

@keyframes topo-pulse {
  0%, 100% { transform: scale(1) translate(0, 0); }
  50%      { transform: scale(1.025) translate(0, -0.6%); }
}

@keyframes topo-drift {
  0%   { transform: translate(-1%, -0.5%) rotate(-0.4deg) scale(1.02); }
  100% { transform: translate(1%, 0.5%) rotate(0.4deg) scale(1.02); }
}

@media (max-width: 767px) {
  .topo-bg {
    opacity: 0.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topo-bg__group,
  .topo-line {
    animation: none;
  }
}
