/* Support intake form. Calm, high-contrast, large targets, light and dark. */

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #1c1d1f;
  --muted: #55595f;
  --border: #8a8f96;
  --border-soft: #d9d8d3;
  --accent: #1f5f8b;
  --accent-text: #ffffff;
  --accent-hover: #174a6d;
  --focus: #0b0c0c;
  --error: #b3261e;
  --error-bg: #fdf1f0;
  --notice-bg: #fff7e0;
  --notice-border: #c28a00;
  --success: #1e6b43;
  --success-bg: #eef7f1;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141516;
    --surface: #1d1f21;
    --text: #ececea;
    --muted: #b3b6ba;
    --border: #8e949b;
    --border-soft: #34373a;
    --accent: #6fb3e3;
    --accent-text: #0e1a24;
    --accent-hover: #93c7ec;
    --focus: #ffbf47;
    --error: #ff8a80;
    --error-bg: #2c1a19;
    --notice-bg: #2a2413;
    --notice-border: #d9a520;
    --success: #7fd3a4;
    --success-bg: #16261d;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}

@media (max-width: 480px) {
  .page { padding-top: 1rem; }
  .card { padding: 1.25rem 1rem; }
}

h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

.lede { margin: 0 0 0.5rem; }
.lede-small { margin: 0 0 1.5rem; color: var(--muted); font-size: 0.95rem; }

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

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

/* Fields */

.field { margin: 0 0 1.5rem; }
.field.has-error {
  border-left: 4px solid var(--error);
  padding-left: 0.875rem;
}

label, .label {
  display: block;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

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

.hint {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0 0.3em;
}

.error-message {
  display: block;
  color: var(--error);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
  display: block;
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  min-height: 2.9rem;
}

textarea { min-height: 8rem; resize: vertical; }

select { appearance: auto; }

.has-error input,
.has-error select,
.has-error textarea { border-color: var(--error); }

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
  box-shadow: inset 0 0 0 1px var(--text);
}

/* Honeypot: off-screen and hidden from assistive tech. */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Button */

.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  min-height: 2.9rem;
  cursor: pointer;
}

.button:hover { background: var(--accent-hover); }
.button[disabled] { opacity: 0.7; cursor: progress; }

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

/* Error summary */

.error-summary {
  border: 3px solid var(--error);
  background: var(--error-bg);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
}

.error-summary h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }
.error-summary ul { margin: 0; padding-left: 1.25rem; }
.error-summary a { color: var(--error); font-weight: 600; }

/* Notice banner (couldn't send) */

.notice {
  border-left: 5px solid var(--notice-border);
  background: var(--notice-bg);
  border-radius: 4px;
  padding: 0.875rem 1rem;
  margin: 0 0 1.5rem;
}

.notice p { margin: 0; }

/* Confirmation */

.confirmation h1 { color: var(--success); }
.confirmation .reference {
  background: var(--success-bg);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.reference-label { display: block; color: var(--muted); font-size: 0.95rem; }
.reference-value { display: block; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }
