:root {
  color-scheme: light dark;
  --bg: #f4f1e8;
  --surface: #ebe7dc;
  --text: #161612;
  --muted: #68665e;
  --line: #c9c4b7;
  --accent: #9b2c1f;
  --max: 72rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.06em;
}

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

a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 0.16rem solid var(--accent);
  outline-offset: 0.18rem;
}

header,
main,
footer {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

header {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.back-link {
  font-size: 0.86rem;
  font-weight: 700;
}

main { padding-bottom: 7rem; }

.intro {
  display: grid;
  max-width: 58rem;
  min-height: 42rem;
  align-content: center;
  padding: 7rem 0;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

h1 { max-width: 15ch; font-size: clamp(3rem, 7.5vw, 6.5rem); }
h2 { max-width: 16ch; font-size: clamp(2rem, 5vw, 3.8rem); }

.intro > p:not(.eyebrow) {
  max-width: 44rem;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.lede { margin-top: 2.25rem; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.principles p { margin: 0; font-size: 0.88rem; font-weight: 650; }

form {
  max-width: 52rem;
  padding-top: 6rem;
  border-top: 1px solid var(--line);
}

.form-heading { margin-bottom: 5rem; }
.form-heading > p:last-child { color: var(--muted); }

fieldset {
  margin: 0;
  padding: 0 0 4.5rem;
  border: 0;
}

legend {
  width: 100%;
  margin-bottom: 2rem;
  padding: 0 0 0.65rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

label,
.checkbox-group {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
  font-size: 0.94rem;
  font-weight: 650;
}

.field-grid { display: grid; gap: 1.25rem; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 450;
}

input,
select { min-height: 3.25rem; padding: 0.7rem 0.8rem; }
textarea { min-height: 9rem; padding: 0.8rem; resize: vertical; }

input::placeholder,
textarea::placeholder { color: var(--muted); opacity: 0.8; }

.optional,
.hint,
.privacy-note,
.checkbox-group > p { color: var(--muted); font-size: 0.8rem; font-weight: 450; }

.checkbox-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
}

.checkbox-group > p { grid-column: 1 / -1; margin: 0 0 0.5rem; }

.checkbox-group label,
.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  font-weight: 500;
}

input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.1rem;
  min-height: 1.1rem;
  margin-top: 0.22rem;
  accent-color: var(--accent);
}

.consent {
  padding: 1.25rem;
  border: 1px solid var(--line);
}

.privacy-note { max-width: 44rem; margin-top: 1rem; }

.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.submit-area {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 1rem;
}

button {
  min-height: 3.25rem;
  padding: 0.8rem 1.3rem;
  border: 1px solid var(--text);
  border-radius: 0;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
}

button:hover { background: var(--accent); border-color: var(--accent); }
button:disabled { cursor: wait; opacity: 0.58; }

#form-status { margin: 0; font-size: 0.9rem; }
#form-status[data-state="error"] { color: #a22318; }
#form-status[data-state="success"] { color: #24652f; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

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

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11110f;
    --surface: #1b1a17;
    --text: #ece9df;
    --muted: #aaa79d;
    --line: #3c3b35;
    --accent: #ef745f;
  }

  #form-status[data-state="error"] { color: #ff8878; }
  #form-status[data-state="success"] { color: #8bd49a; }
}

@media (max-width: 42rem) {
  .intro { min-height: auto; padding: 5rem 0; }
  .principles,
  .two-columns,
  .checkbox-group { grid-template-columns: 1fr; }
  .checkbox-group > p { grid-column: auto; }
  .submit-area,
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
