/* backend/src/main/resources/static/infrastructure/gabion-reset.css */

/* ==============================================
   GABION RESET v1.0
   
   Minimal framework reset.
   Uses contract variables.
   Loaded after gabion-contract.css.
   ============================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  /* Every scroll-into-view operation — fragment navigation, keyboard
     focus, scrollIntoView() — lands its target below the fixed header
     instead of underneath it. Declared on the scroll container, so it
     covers every target on the page; per-element scroll-margin would
     be a second owner of the same offset and the two would add up. */
  scroll-padding-top: calc(var(--gb-header-height) + var(--gb-spacing-xl));
}

/* A user who disabled animation system-wide must not receive animated
   scrolling: on long pages a keyboard focus jump animates thousands of
   pixels, which is motion the user explicitly opted out of. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--gb-font-primary);
  font-size: var(--gb-type-body-size);
  line-height: var(--gb-type-body-leading);
  letter-spacing: var(--gb-type-body-tracking);
  color: var(--gb-text-primary);
  background: var(--gb-bg-primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

main {
  flex: 1;
}

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

::selection {
  background: var(--gb-accent-subtle);
  color: inherit;
}

/* Utility: hidden by default, toggled via JS classList */
.module-hidden {
  display: none;
}