/*
  Accessible contact form template. MIT licensed.
  Custom properties, system fonts, visible focus, no external dependencies.
*/
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #cbd5e1;
  --accent: #0d9488;
  --accent-ink: #ffffff;
  --error: #b91c1c;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.form-head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.lede {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
}

.req {
  color: var(--error);
}

.optional {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.9rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
}

.error {
  color: var(--error);
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
  min-height: 1.1em;
}

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.field-check input {
  width: auto;
  margin-top: 0.2rem;
}

.field-check label {
  margin: 0;
  font-weight: 400;
  font-size: 0.95rem;
}

.submit {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.submit:hover {
  background: #0f766e;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .submit { transition: none; }
}
