/*
 * Palette and type lifted from alix-site's tailwind-theme.css so this page reads
 * as a continuation of alixhorton.com rather than a third-party form.
 *
 * Measured contrast on the #F7F6F3 ground (from the source theme's own notes):
 *   ink      #22303A  12.52:1
 *   ink-soft #4A5A66   6.60:1
 *   teal     #2F5D62   6.79:1
 *   clay     #9C5142   5.30:1
 * All clear WCAG AA for body text.
 *
 * FONTS: the site self-hosts Fraunces and DM Sans via @fontsource-variable. This
 * service ships neither yet, so the stacks below are the fallbacks the site uses
 * during font swap. Copying the woff2 files across is a later refinement; the
 * page is readable and on-palette without them.
 */

:root {
  --ground: #f7f6f3;
  --surface: #ffffff;
  --ink: #22303a;
  --ink-soft: #4a5a66;
  --line: #e2dfd8;
  --teal: #2f5d62;
  --teal-dark: #24484c;
  --clay: #9c5142;
  --radius: 0.5rem;

  --font-heading: "Fraunces Variable", Georgia, "Times New Roman", serif;
  --font-sans:
    "DM Sans Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;

  color-scheme: light;
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding-block: clamp(2rem, 6vw, 3.5rem);
  padding-inline: 1.25rem;
  padding-top: calc(clamp(2rem, 6vw, 3.5rem) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(clamp(2rem, 6vw, 3.5rem) + env(safe-area-inset-bottom, 0px));
}

h1 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.875rem, 5vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.lede {
  color: var(--ink-soft);
  font-size: 1.0625rem;
  margin: 0 0 1.75rem;
}

/* The disclaimer block. Clay rather than teal so it reads as a note, not chrome. */
.notice {
  background: var(--surface);
  border-left: 3px solid var(--clay);
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
  margin: 0 0 2rem;
}

.notice p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.notice p + p {
  margin-top: 0.75rem;
}

.crisis {
  color: var(--ink);
}

.field {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
}

.req {
  font-weight: 400;
  color: var(--ink-soft);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  display: block;
  width: 100%;
  /* 1rem minimum, or iOS zooms the viewport on focus. */
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.625rem 0.75rem;
  transition: border-color 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 5.5rem;
  line-height: 1.5;
}

input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-color: var(--teal);
}

.hint {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

button[type="submit"] {
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  color: var(--ground);
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.6875rem 1.5rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background-color 0.15s ease;
}

button[type="submit"]:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

button[type="submit"]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/*
 * Honeypot. Positioned off-screen rather than display:none — some bots skip
 * fields that are explicitly hidden, and the point is that they fill it in.
 * aria-hidden and tabindex="-1" in the markup keep it away from real people.
 */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.back {
  margin-top: 2rem;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

footer p {
  margin: 0 0 0.375rem;
}

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