/* ============================================
   StressAId — Base Styles
   Reset, typography, utilities
   ============================================ */

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

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

body {
  font-family: var(--sai-font-body);
  font-size: var(--sai-text-base);
  line-height: var(--sai-leading-normal);
  color: var(--sai-text-primary);
  background: var(--sai-bg-darkest);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--sai-teal-primary);
  text-decoration: none;
  transition: color var(--sai-ease-fast);
}
a:hover { color: var(--sai-teal-light); }

ul, ol { list-style: none; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button { cursor: pointer; }

table {
  border-collapse: collapse;
  width: 100%;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sai-font-display);
  font-weight: 700;
  line-height: var(--sai-leading-tight);
  color: var(--sai-text-primary);
}

h1 { font-size: var(--sai-text-hero); }
h2 { font-size: var(--sai-text-4xl); }
h3 { font-size: var(--sai-text-3xl); }
h4 { font-size: var(--sai-text-2xl); }
h5 { font-size: var(--sai-text-xl); }
h6 { font-size: var(--sai-text-lg); }

p {
  color: var(--sai-text-secondary);
  line-height: var(--sai-leading-relaxed);
  margin-bottom: var(--sai-space-md);
}
p:last-child { margin-bottom: 0; }

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

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

/* --- Utility Classes --- */
.sai-container {
  width: 100%;
  max-width: var(--sai-container-max);
  margin: 0 auto;
  padding: 0 var(--sai-container-padding);
}

.sai-section {
  padding: var(--sai-space-3xl) 0;
}

.sai-text-center { text-align: center; }
.sai-text-left { text-align: left; }
.sai-text-right { text-align: right; }

.sai-text-teal { color: var(--sai-teal-primary); }
.sai-text-gold { color: var(--sai-gold-primary); }
.sai-text-blue { color: var(--sai-blue-primary); }
.sai-text-muted { color: var(--sai-text-muted); }
.sai-text-danger { color: var(--sai-danger); }
.sai-text-success { color: var(--sai-success); }

.sai-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sai-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sai-hidden { display: none !important; }

/* --- Focus Visible --- */
:focus-visible {
  outline: 2px solid var(--sai-teal-primary);
  outline-offset: 2px;
}

/* --- Scrollbar (dark theme) --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--sai-text-muted);
  border-radius: var(--sai-radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--sai-text-secondary); }

/* --- Selection --- */
::selection {
  background: var(--sai-teal-muted);
  color: var(--sai-teal-light);
}

/* --- Print --- */
@media print {
  body {
    background: white;
    color: #000;
  }
}
