/* ==========================================================================
   Base Styles (base.css)
   ==========================================================================
   Reset + default element styling. Uses variables from settings.css.
   No classes here — only element selectors.
   ========================================================================== */

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

html {
  font-size: 100%;           /* 16px base */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* ------------------------------------------------------------------
   Body
   ------------------------------------------------------------------ */
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------------
   Headings
   ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); font-weight: var(--weight-semibold); }
h4 { font-size: var(--text-h4); font-weight: var(--weight-semibold); }

/* ------------------------------------------------------------------
   Paragraphs & Text
   ------------------------------------------------------------------ */
p {
  margin-bottom: var(--space-md);
  color: var(--color-text-light);
}

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

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

/* ------------------------------------------------------------------
   Links
   ------------------------------------------------------------------ */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* ------------------------------------------------------------------
   Images
   ------------------------------------------------------------------ */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

li {
  margin-bottom: var(--space-xs);
  color: var(--color-text-light);
}

/* ------------------------------------------------------------------
   Horizontal Rule
   ------------------------------------------------------------------ */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

/* ------------------------------------------------------------------
   Forms — Base
   ------------------------------------------------------------------ */
input,
textarea,
select {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  width: 100%;
  transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 131, 143, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

label {
  display: block;
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-xs);
  font-size: var(--text-small);
}

/* ------------------------------------------------------------------
   Tables — Base
   ------------------------------------------------------------------ */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-lg);
}

th, td {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

td {
  color: var(--color-text-light);
}
