/* RWT Base Styles — reset, body defaults, typography baseline,
   container utility, accessibility helpers.
   Loads after tokens.css. Do not put component styles here. */

/* === Modern reset === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@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;
  }
}

body {
  background: var(--bg-black);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Typography baseline === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-headline);
  font-weight: 400;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
}

p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text-headline);
}

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

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--text-primary);
}

ul, ol {
  list-style: none;
}

/* === Eyebrow label (red small uppercase tag above section titles) === */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  display: inline-block;
  margin-bottom: var(--space-3);
}

/* === Container utility (caps content max-width, applies page padding) === */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--pad-mobile);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--pad-tablet); }
}

@media (min-width: 1024px) {
  .container { padding-inline: var(--pad-desktop); }
}

/* === Section rhythm (96px desktop / 48px mobile top+bottom) === */
.section {
  padding-block: var(--space-7);
}

@media (min-width: 768px) {
  .section { padding-block: var(--space-8); }
}

@media (min-width: 1024px) {
  .section { padding-block: var(--space-9); }
}

/* Edge-to-edge section: background spans viewport, content stays in container */
.section--edge {
  width: 100%;
}

/* === Accessibility helpers === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus ring — visible on keyboard navigation, hidden on mouse */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-4);
  background: var(--bg-slate);
  color: var(--text-headline);
  padding: var(--space-2) var(--space-4);
  z-index: 100;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Body lock for mobile menu open */
body.no-scroll {
  overflow: hidden;
}

/* Main content fills available height (footer sticks to bottom on short pages) */
main {
  flex: 1;
}
