/* Base: reset, typography, root element behaviors */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .nav-container,
  .nav-menu-sub {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

html { scrollbar-gutter: stable; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--theme-site-bg, var(--color-bg));
  color: var(--theme-body-text, var(--color-text));
  font-size: var(--font-size-step-0);
  line-height: var(--font-line-height-body);
}

a { color: var(--theme-link-default, var(--theme-link-base, var(--color-primary))); }
a:hover { color: var(--theme-link-hover, var(--color-shell-accent)); }
a:active { color: var(--theme-link-active, var(--theme-link-default, var(--color-primary))); }
a:visited { color: var(--theme-link-visited, var(--theme-link-default, var(--color-primary))); }

*, *::before, *::after { box-sizing: border-box; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--font-line-height-heading);
  color: var(--color-heading);
}
h1 {
  font-family: var(--type-h1-font-family, var(--font-heading));
  font-size: var(--type-h1-font-size);
  font-weight: var(--type-h1-font-weight);
  color: var(--theme-h1-color);
}
h2 {
  font-family: var(--type-h2-font-family, var(--font-heading));
  font-size: var(--type-h2-font-size);
  font-weight: var(--type-h2-font-weight);
  color: var(--theme-h2-color);
}
h3 {
  font-family: var(--type-h3-font-family, var(--font-heading));
  font-size: var(--type-h3-font-size);
  font-weight: var(--type-h3-font-weight);
  color: var(--theme-h3-color);
}
h4 {
  font-family: var(--type-h4-font-family, var(--font-heading));
  font-size: var(--type-h4-font-size);
  font-weight: var(--type-h4-font-weight);
  color: var(--theme-h4-color);
}
h5 {
  font-family: var(--type-h5-font-family, var(--font-heading));
  font-size: var(--type-h5-font-size);
  font-weight: var(--type-h5-font-weight);
  color: var(--theme-h5-color);
}
h6 {
  font-family: var(--type-h6-font-family, var(--font-heading));
  font-size: var(--type-h6-font-size);
  font-weight: var(--type-h6-font-weight);
  color: var(--theme-h6-color);
}
.heading-7 {
  font-family: var(--type-h7-font-family, var(--font-heading));
  font-size: var(--type-h7-font-size);
  font-weight: var(--type-h7-font-weight);
  line-height: var(--font-line-height-heading);
  color: var(--theme-heading-7-color);
}

.container {
  width: 100%;
  max-width: var(--layout-content-max-width, 1200px);
  margin-inline: auto;
  padding-inline: var(--layout-page-padding-inline, var(--space-4));
}
.container--narrow { max-width: 800px; }
.container--tight  { max-width: 480px; }

@media (max-width: 768px) {
  .container {
    padding-inline: var(--space-3);
  }
  .container--narrow {
    max-width: 100%;
  }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: var(--space-4);
  top: var(--space-4);
  width: auto;
  height: auto;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 2px solid var(--color-focus);
  z-index: 1000;
}

.inline-form { display: inline; }
