/* ============================================================
   Base — reset, typography, buttons, forms
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.2s, color 0.2s;
}

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

.serif { font-family: var(--font-serif); }
.mono { font-family: var(--font-mono); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.5px;
  margin: 0;
  color: var(--text);
  line-height: 1.15;
}

h1 { font-size: 32px; letter-spacing: -0.8px; }
h2 { font-size: 24px; letter-spacing: -0.5px; }
h3 { font-size: 18px; letter-spacing: -0.3px; }
h4 { font-size: 15px; }

p { margin: 0 0 1em; color: var(--text-2); line-height: 1.65; }

.eyebrow {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 14px;
}

.text-muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.text-accent { color: var(--accent); }
.text-warn { color: var(--warm); }
.text-rose { color: var(--rose); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-weight: 500;
  font-size: 13px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}
.btn-secondary:hover { background: var(--text); color: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text); }

.btn-danger {
  background: var(--rose);
  color: white;
  border: 1px solid var(--rose);
}

.btn-block { width: 100%; }
.btn-lg { padding: 12px 24px; font-size: 14px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* === Forms === */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color var(--transition-base);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--text);
}

label {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group { margin-bottom: 14px; }

.form-success,
.form-error,
.form-info {
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}
.form-success {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
}
.form-error {
  background: var(--rose-soft);
  border: 1px solid var(--rose);
  color: var(--rose);
}
.form-info {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
}

/* === Cards === */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 24px;
}

/* === Spinner === */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--border-2);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Hidden helper === */
.hidden { display: none !important; }
