/* ═══════════════════════════════════════════
   BASE STYLES — base.css
   ════════════════════════════════════════════ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 { font-size: var(--text-3xl); letter-spacing: 0; }
h2 { font-size: var(--text-xl);  letter-spacing: 0; }
h3 { font-size: var(--text-lg);  font-weight: 600; }

p { line-height: 1.6; color: var(--color-text-muted); }

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

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

kbd {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

/* ── Forms base ── */
input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: auto;
  appearance: auto;
  width: auto;
  padding: 0;
  border: none;
  background: none;
}

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

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-accent);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6E80' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── Lists ── */
ul, ol { list-style: none; }

/* ── Images ── */
img, svg { display: block; }

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.hidden { display: none !important; }

.accent { color: var(--color-accent); }

.text-muted { color: var(--color-text-muted); }

.link-btn {
  background: none;
  border: none;
  color: var(--color-accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}
.link-btn:hover { color: var(--color-accent-dark); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-gray-400); }

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
