/* WHY: This global reset removes browser defaults so layout spacing remains predictable across pages. */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* WHY: This smooth scrolling aids orientation on long pages; reduced-motion disables it below. */
html {
  scroll-behavior: smooth;
}

/* WHY: This base typography setup enforces corporate fonts and comfortable line spacing project-wide. */
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* WHY: The letterhead background ties the page to print media; a warm tint keeps the palette and readability. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top left, rgb(250 247 242 / 0.18), rgb(250 247 242 / 0.78)),
    url("../../media/dina4_background.webp") top right / cover no-repeat;
}

::selection {
  background: rgb(45 74 143 / 0.18);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
}

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--slate);
}

/* WHY: This sticky navigation bar improves orientation and access to legal pages on long sections. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(250 247 242 / 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}

/* WHY: This header row aligns logo, navigation and language switch for desktop and collapses on mobile. */
.header-inner {
  width: min(1140px, 92vw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem 1.6rem;
  padding-block: 0.9rem;
}

/* WHY: This page shell keeps full-width bands edge-to-edge while centering regular content. */
main.page-shell {
  flex: 1;
  width: 100%;
  padding-block: clamp(2rem, 4vw, 3rem) clamp(3.5rem, 6vw, 5rem);
}

main.page-shell > * + * {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

/* WHY: Every direct child except the full-width bands shares one centered reading column. */
main.page-shell > :not(.band):not(.cta-band) {
  width: min(1140px, 92vw);
  margin-inline: auto;
}

/* WHY: Sand bands alternate with plain groups so sections read as separate chapters. */
.band {
  background: var(--sand);
  border-block: 1px solid var(--hair);
  padding-block: clamp(2.8rem, 5vw, 4rem);
}

.band > * {
  width: min(1140px, 92vw);
  margin-inline: auto;
}

.band > * + *,
.group > * + * {
  margin-top: clamp(1.8rem, 3.5vw, 2.6rem);
}

/* WHY: This footer frame clearly separates legal and corporate note content from interactive sections. */
.site-footer {
  border-top: 1px solid var(--hair);
  background: var(--sand);
}

.site-footer .page-shell {
  width: min(1140px, 92vw);
  margin-inline: auto;
  padding-block: 1.9rem;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.site-footer p:empty {
  display: none;
}

/* WHY: This responsive tweak collapses the header on small screens; it lives here because no component rule overrides .header-inner. */
@media (max-width: 620px) {
  .header-inner {
    gap: 0.5rem 1rem;
    padding-block: 0.6rem;
  }
}

/* WHY: Reduced motion users get static end states and instant scrolling. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
