/* ==========================================================================
   Shared foundation for all three redesign mockups.
   Only resets, accessibility primitives, and cross-design helpers live here.
   Everything visual belongs in field-journal.css / riso.css / ascent.css.
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Stops in-page anchor targets from landing underneath the fixed masthead. */
  scroll-padding-top: calc(var(--nav-height, 4.5rem) + 1.5rem);
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  height: auto;
}

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

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

h1,
h2,
h3,
h4,
p,
li {
  overflow-wrap: break-word;
}

:is(ul, ol)[class] {
  list-style: none;
  padding: 0;
}

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

/* Every design sets --focus-ring to something that clears 3:1 against its
   own background, so the ring never disappears on a dark or saturated band. */
:focus-visible {
  outline: 3px solid var(--focus-ring, currentColor);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% -110%;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--skip-bg, #000);
  color: var(--skip-fg, #fff);
  font-size: 0.9rem;
  transition: translate 0.2s ease;
}

.skip-link:focus-visible {
  translate: -50% 0;
}

/* --------------------------------------------------------------------------
   Scroll reveal
   Gated behind .js so the content is never invisible when JavaScript fails.
   site.js adds .is-visible, or adds it to everything under reduced motion.
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
