/*
  base.css
  Global typography and base page structure. The Comrade theme is locked
  to light mode: color-scheme: light is declared once, on :root in
  variables.css (the single token source), and no media query anywhere
  in the project is allowed to swap the palette.
*/

body {
  background-color: var(--comrade-bg);
  color: var(--comrade-text);
  font-family: var(--comrade-font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--comrade-bg);
}

::-webkit-scrollbar-thumb {
  background-color: var(--comrade-border-strong);
  border-radius: var(--comrade-radius-pill);
  transition: background-color var(--comrade-transition-hover);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--comrade-primary);
}

/* For Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--comrade-border-strong) var(--comrade-bg);
}

main#main-content {
  flex: 1;
}

h1,
h2,
h3,
h4 {
  font-family: var(--comrade-font-body);
  font-weight: 700;
  color: var(--comrade-text);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

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

a:hover {
  color: var(--comrade-primary-hover);
}

::selection {
  background-color: var(--comrade-primary-light-strong);
  color: var(--comrade-primary);
}

/* Consistent, visible focus state for keyboard users everywhere. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--comrade-primary);
  outline-offset: 3px;
  border-radius: var(--comrade-radius-sm);
}

.comrade-container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--comrade-space-lg);
}

.comrade-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--comrade-space-xs);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--comrade-text-muted);
}

.comrade-eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--comrade-primary);
}

.comrade-section {
  padding-block: var(--comrade-space-xl);
}

.comrade-skip-link {
  position: absolute;
  top: -80px;
  left: var(--comrade-space-sm);
  z-index: 1000;
  padding: 0.6rem 1rem;
  background-color: var(--comrade-primary);
  color: var(--comrade-text-on-primary);
  border-radius: var(--comrade-radius-sm);
  font-weight: 700;
  transition: top var(--comrade-transition-fast);
}

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

.comrade-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
