/**
 * SheboyganScanner.us — Base Styles & Reset
 * Source of Authority: SKILLS.md & PRD.md
 */

/* ==========================================================================
   CSS Reset & Box Sizing
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   HTML & Document Root
   ========================================================================== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-size: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==========================================================================
   Headings & Typography
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-navy);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  text-rendering: optimizeLegibility;
}

h1 {
  font-size: var(--font-size-3xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-2xl);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--font-size-xl);
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--font-size-lg);
}

h5 {
  font-size: var(--font-size-md);
}

h6 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

strong,
b {
  font-weight: var(--font-weight-bold);
}

em,
i {
  font-style: italic;
}

/* Lists */
ul,
ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
}

li:last-child {
  margin-bottom: 0;
}

/* Code & Preformatted */
code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  padding: 0.15em 0.35em;
}

pre {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  background-color: var(--color-navy);
  color: var(--color-text-inverse);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-6);
}

pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

blockquote {
  border-left: 4px solid var(--color-blue);
  padding-left: var(--space-4);
  margin-left: 0;
  margin-bottom: var(--space-4);
  color: var(--color-navy-muted);
  font-style: italic;
}

hr {
  border: 0;
  height: 1px;
  background-color: var(--color-border);
  margin: var(--space-8) 0;
}

/* ==========================================================================
   Links & Navigation Interactivity
   ========================================================================== */
a {
  color: var(--color-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--color-blue-hover);
  text-decoration-thickness: 2px;
}

/* ==========================================================================
   Accessible Focus States (WCAG 2.2 AA)
   ========================================================================== */
:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-outline-width) solid var(--color-focus);
  outline-offset: var(--focus-outline-offset);
}

/* Skip to Main Content Link */
.skip-link {
  position: absolute;
  top: -999px;
  left: var(--space-4);
  background-color: var(--color-navy);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
  z-index: var(--z-skip-link);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--color-red);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: var(--space-4);
  outline: var(--focus-outline-width) solid var(--color-red);
  outline-offset: var(--focus-outline-offset);
}

/* ==========================================================================
   Media: Responsive Images, SVGs, Videos
   ========================================================================== */
img,
svg,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

svg:not([fill]) {
  fill: currentColor;
}

/* ==========================================================================
   Form Controls Base
   ========================================================================== */
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

/* ==========================================================================
   Accessibility: Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
