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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  transition: background var(--dur-med) var(--ease-soft), color var(--dur-med) var(--ease-soft);
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; line-height: 1.7; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-m);
  padding: 13px 22px;
  font-size: 1rem;
  font-weight: 700;
  transition: transform var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft),
              background var(--dur-fast) var(--ease-soft);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { box-shadow: var(--shadow-lift); }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field label { font-weight: 500; font-size: 0.92rem; color: var(--text-soft); }
.field input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-m);
  padding: 13px 16px;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-soft);
}
.field input:focus { border-color: var(--primary); outline: none; }
.field .hint { font-size: 0.8rem; color: var(--text-faint); }
.field .error { font-size: 0.82rem; color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
