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

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scrollbar-gutter: stable;
  scroll-padding-top: 6rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  /* The photo stays put while the page scrolls, with the scrim laid over it.
     --bg still paints underneath, so the page is never bare while the image
     loads. */
  background-color: var(--bg);
  background-image: linear-gradient(var(--bg-scrim), var(--bg-scrim)), var(--bg-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-base);
  font-size: var(--font-size-md);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  font-optical-sizing: auto;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Lock page scroll while a modal or sheet is open. */
html.neu-no-scroll {
  overflow: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

@media (hover: hover) {
  a:hover {
    color: var(--accent-hover);
  }
}

/* --- Typography: hierarchy from weight + size + leading as a set --- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-3);
  font-weight: 650;
  color: var(--text-primary);
  line-height: var(--leading-title);
  letter-spacing: var(--tracking-title);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5vw, var(--font-size-xxl));
  font-weight: 700;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

p {
  margin: 0 0 var(--space-3);
  color: var(--text-secondary);
  text-wrap: pretty;
}

small {
  font-size: var(--font-size-sm);
}

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

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: inherit;
}

/* No double-tap zoom delay on anything pressable. */
button,
a,
label,
input,
[role="button"] {
  touch-action: manipulation;
}

/* One visible, consistent focus indicator for keyboard users. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* Scrollbar - subtle, matches surface */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--shadow-dark);
  border-radius: var(--radius-pill);
}
