/* =============================================================================
   BASE STYLES
   ============================================================================= */

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

/* Screen reader only - visually hidden but accessible */
.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;
}

body {
  font-family: var(--font-main);
  font-weight: lighter;
  background: var(--color-background);
  overflow: hidden;
  color: var(--color-text-primary);
}

@media screen and (prefers-reduced-motion: no-preference) {
  body.switched {
    transition:
      color var(--transition-slow),
      background-color var(--transition-slow);
  }
}

h1,
h2,
h3,
h4 {
  text-align: center;
  font-family: var(--font-heading);
  line-height: var(--line-height-heading);
  margin: 0;
  padding: 0;
}

h1,
h2 {
  font-size: var(--text-size-title);
  font-weight: var(--font-weight-bold);
  margin-top: var(--spacing-massive);
  margin-bottom: var(--spacing-massive);
}

h3 {
  text-align: left;
  font-size: var(--text-size-title-smaller);
  font-style: strong;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  margin-top: var(--spacing-huge);
  margin-bottom: var(--spacing-huge);
}

h4 {
  text-align: left;
  font-size: var(--text-size-subtitle);
  font-style: strong;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
}

/* Title elements that get populated by JavaScript */
.title {
  font-family: var(--font-heading);
  font-weight: 700;
}

/* =============================================================================
   TEXT STYLES
   ============================================================================= */

p {
  font-size: var(--text-size-base);
  color: var(--color-text-primary);
  line-height: var(--line-height-text);
  font-weight: var(--font-weight-light);
}

a {
  font-weight: 700;
  color: var(--color-accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.unclickable {
  font-weight: 700;
  color: var(--color-accent-secondary);
  text-decoration: none;
  cursor: not-allowed;
}

a:hover {
  color: var(--color-accent-secondary);
  text-decoration: none;
}

@media screen and (prefers-reduced-motion: no-preference) {
  a {
    transition: color var(--transition-slow);
  }

  a:hover {
    transition: color var(--transition-fast);
  }
}

strong {
  color: var(--color-text-strong);
  font-weight: var(--font-weight-bold);
}

/* =============================================================================
   LISTS AND QUOTES
   ============================================================================= */

ul {
  margin: 0.5em 0;
  padding-left: 1.5em;
  color: var(--color-text-primary);
}

li {
  margin: 0.3em 0;
  line-height: var(--line-height-list);
  color: var(--color-text-primary);
  font-size: var(--text-size-base);
}

blockquote {
  margin: 1em 0;
  padding: 0.5em 1em;
  border-left: 3px solid var(--color-blockquote-border);
  background: var(--color-blockquote-bg);
  font-style: italic;
  color: var(--color-blockquote-text);
}

/* =============================================================================
   SPECIAL ELEMENTS
   ============================================================================= */

hr {
  border-top: 1px solid var(--color-separator-line);
  color: transparent;
  width: 50%;
  margin: 0 auto;
  margin-top: var(--spacing-massive);
  margin-bottom: var(--spacing-massive);
}
.end {
  text-align: center;
  font-weight: bold;
  color: var(--color-text-strong);
  padding-top: var(--spacing-huge);
  padding-bottom: var(--spacing-huge);
}

img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.container .hide {
  opacity: 0;
}

.container .invisible {
  display: none;
}

@media screen and (prefers-reduced-motion: no-preference) {
  .container > * {
    transition: opacity var(--transition-very-slow);
  }
}

body .container > * {
  transition: opacity var(--transition-very-slow);
}

@media screen and (prefers-reduced-motion: reduce) {
  body .container > * {
    transition: none;
  }
}
