/* Diastema public site. One stylesheet, no web fonts, follows the system
   light/dark setting. Colours meet WCAG AA against their backgrounds. */

:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --fg: #1d2327;
  --muted: #545d64;      /* 6.4:1 on --bg */
  --accent: #1f6f78;     /* 5.7:1 on --bg; white text on it 6.0:1 */
  --accent-fg: #ffffff;
  --line: #d9dcd6;
  --soft: #eef4f3;
  --error: #a3261b;
  --ok: #1d6b3a;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181b;
    --surface: #1b2024;
    --fg: #e8ecee;
    --muted: #a3adb4;    /* 7.6:1 on --bg */
    --accent: #6cc3cc;   /* 9.0:1 on --bg */
    --accent-fg: #0b2327;
    --line: #333b41;
    --soft: #1d272a;
    --error: #ff9b8f;
    --ok: #8fd6a6;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1rem; }
/* Narrow text columns share the left edge of the wide ones. */
.narrow > * { max-width: 44rem; }

.skip { position: absolute; left: -999px; top: 0; padding: .5rem 1rem; background: var(--accent); color: var(--accent-fg); z-index: 10; }
.skip:focus { left: 1rem; }

/* Header and nav */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .75rem; padding-bottom: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--fg); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.site-header nav a { color: var(--fg); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Type */
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin: 0 0 .75rem; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }
.small { font-size: .9rem; color: var(--muted); }

/* Sections */
.hero { padding: 3.5rem 0 2.5rem; }
.section { padding: 1rem 0 2.5rem; }
.band { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 2rem 0; margin: 1rem 0 2rem; }
.band h2 { margin-top: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; list-style: none; padding: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.feature { border-top: 1px solid var(--line); padding: 1.5rem 0; }
.feature h2 { margin-top: 0; }
.checklist { padding-left: 1.2rem; }
.checklist li { margin-bottom: .35rem; }

.button {
  display: inline-block; background: var(--accent); color: var(--accent-fg); border: 0;
  border-radius: var(--radius); padding: .75rem 1.25rem; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.button:hover { filter: brightness(1.08); }
.button[disabled] { opacity: .6; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; }

/* FAQ */
.faq dt { font-weight: 700; margin-top: 1.5rem; }
.faq dd { margin: .35rem 0 0; }

/* Forms */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.form fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.form legend { font-weight: 700; padding: 0; margin-bottom: .5rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 600; }
.req { color: var(--error); font-weight: 400; }
.hint { font-size: .9rem; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--muted);
  border-radius: 6px; padding: .55rem .65rem; width: 100%;
}
textarea { min-height: 7rem; resize: vertical; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.choices label, .check { font-weight: 400; display: inline-flex; gap: .45rem; align-items: center; }
input[type="radio"], input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
/* The honeypot: invisible to people, still in the form for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: 1rem 0 0; font-weight: 600; }
.status.error { color: var(--error); }
.status.ok { color: var(--ok); }
.field-error { color: var(--error); font-size: .9rem; font-weight: 600; }
[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 0 3rem; color: var(--muted); font-size: .95rem; }
.site-footer nav { margin: 1rem 0; }
.site-footer a { color: var(--fg); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero { padding: 2rem 0 1.5rem; }
  .form { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
