/* ============================================================
   BASE — Reset, Typography, Element Defaults
   Dr. Arndt Schwaiger Website V.5.00
   ============================================================ */


/* ============================================================
   FONT FACES — Self-hosted IBM Plex (woff2 only)
   ============================================================ */

/* IBM Plex Sans (variable font — single file covers weights 400–800) */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/IBMPlexSans-Regular.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* IBM Plex Serif */
@font-face {
  font-family: 'IBM Plex Serif';
  src: url('../fonts/IBMPlexSerif-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Serif';
  src: url('../fonts/IBMPlexSerif-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Serif';
  src: url('../fonts/IBMPlexSerif-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* IBM Plex Mono */
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}


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

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: var(--line-height-body);
  color: var(--color-text-body);
  background-color: var(--color-surface-page);
  overflow-x: hidden;
}

::selection {
  background: var(--raw-blue);
  color: var(--raw-white);
}

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
  border-radius: var(--raw-radius-sm);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}


/* ============================================================
   TYPOGRAPHY: HEADINGS
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-heading);
  line-height: var(--line-height-heading);
  font-weight: 600;
}

h1 {
  font-size: var(--raw-text-3xl);
  font-weight: 800;
  margin-bottom: var(--raw-space-6);
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--raw-text-2xl);
  font-weight: 700;
  margin-bottom: var(--raw-space-5);
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--raw-text-lg);
  margin-bottom: var(--raw-space-3);
  letter-spacing: -0.015em;
}

h4 {
  font-size: var(--raw-text-base);
  margin-bottom: var(--raw-space-2);
}

h5 {
  font-size: var(--raw-text-md);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: var(--raw-space-2);
}

h6 {
  font-size: var(--raw-text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-caption);
  margin-bottom: var(--raw-space-2);
}


/* ============================================================
   TYPOGRAPHY: BODY TEXT
   ============================================================ */
p {
  margin-bottom: var(--baseline);
  max-width: 65ch;
}

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

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

.lead {
  font-size: var(--raw-text-lg);
  line-height: var(--line-height-tight);
  color: var(--color-text-secondary);
  margin-bottom: var(--raw-space-8);
  max-width: 65ch;
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: var(--raw-text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  margin-bottom: var(--raw-space-3);
}


/* ============================================================
   LINKS
   ============================================================ */
a {
  color: var(--color-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--raw-transition-fast),
              text-decoration-thickness var(--raw-transition-fast);
}

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


/* ============================================================
   LISTS
   ============================================================ */
ul, ol {
  margin-bottom: var(--baseline);
  padding-left: var(--raw-space-6);
}

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

li::marker {
  color: var(--color-brand);
  font-weight: 700;
}

ul.checklist {
  list-style: none;
  padding-left: 0;
}

ul.checklist li {
  padding-left: var(--raw-space-6);
  position: relative;
}

ul.checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--raw-teal);
  font-weight: 700;
  font-size: var(--raw-text-lg);
}


/* ============================================================
   BLOCKQUOTES
   ============================================================ */
blockquote {
  position: relative;
  margin: var(--raw-space-8) 0;
  padding: var(--raw-space-6) var(--raw-space-8);
  border-left: 4px solid transparent;
  border-image: linear-gradient(to bottom, var(--raw-blue), var(--raw-sky)) 1;
  color: var(--color-text-secondary);
  font-style: italic;
}

blockquote::before {
  content: "\201C";
  position: absolute;
  top: -0.15em;
  left: 0.15em;
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--raw-blue);
  opacity: 0.12;
  pointer-events: none;
}

blockquote p {
  margin-bottom: var(--raw-space-2);
}

blockquote cite {
  display: block;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: var(--raw-text-sm);
  color: var(--color-text-caption);
  margin-top: var(--raw-space-3);
}

blockquote cite::before {
  content: "\2014\00a0";
}


/* ============================================================
   TABLES
   ============================================================ */
.table-container {
  margin: var(--raw-space-8) 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--raw-radius-xl);
  box-shadow: var(--raw-shadow-sm);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-ui);
  font-size: var(--raw-text-sm);
  line-height: var(--line-height-tight);
}

thead th {
  background: var(--color-surface-warm);
  color: var(--color-text-heading);
  font-weight: 700;
  font-size: var(--raw-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--raw-space-4) var(--raw-space-5);
  text-align: left;
  border-bottom: 2px solid var(--color-surface-rule);
}

tbody td {
  padding: var(--raw-space-4) var(--raw-space-5);
  border-bottom: 1px solid var(--color-surface-rule);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:nth-child(even) td {
  background: var(--color-surface-warm);
}


/* ============================================================
   HORIZONTAL RULE
   ============================================================ */
hr {
  border: none;
  border-top: 1px solid var(--color-surface-rule);
  margin: var(--raw-space-10) 0;
}


/* ============================================================
   RESPONSIVE TYPOGRAPHY
   ============================================================ */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  h1 {
    font-size: var(--raw-text-2xl);
  }

  h2 {
    font-size: var(--raw-text-xl);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  h1 {
    font-size: var(--raw-text-xl);
  }
}


/* ============================================================
   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;
  }
}


/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
