/* Figure 8 Sharpening
   Brand colors carried over from the 2019 stylesheet: #005b96 body copy,
   #e8efff contact surface. */

:root {
  --brand: #005b96;
  --brand-dark: #00426d;
  --ink: #16242e;
  --ink-muted: #4c5c68;
  --surface: #ffffff;
  --surface-alt: #e8efff;
  --border: #a9c3dd;
  --error: #9b1c1f;
  --success: #14602c;
  --page-padding: 1.25rem;
  --measure: 62ch;
  --radius: 10px;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font: 400 clamp(1rem, 0.96rem + 0.2vw, 1.125rem) / 1.6 system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--brand);
}

h1 {
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
}

h2 {
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.75rem);
}

.wrap {
  max-width: var(--measure);
  margin-inline: auto;
}

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

/* Header — the banner asset is 960px wide, so capping display at 480px
   renders it at 2x and keeps it crisp on retina screens. */
.site-header {
  padding: var(--page-padding);
  display: flex;
  justify-content: center;
}

.site-header img {
  width: 100%;
  max-width: 480px;
}

main {
  flex: 1 0 auto;
}

/* Hero — a real <img>, not a fixed background. The 2019 site used
   background-attachment: fixed, which janks badly on iOS Safari. */
.hero img {
  width: 100%;
  max-height: clamp(200px, 42vh, 420px);
  object-fit: cover;
  object-position: center 40%;
}

.welcome {
  background: var(--surface-alt);
  padding: clamp(1.5rem, 5vw, 3rem) var(--page-padding);
}

.welcome p {
  margin: 0;
  color: var(--brand);
}

.contact {
  padding: clamp(1.5rem, 5vw, 3rem) var(--page-padding);
}

.contact > .wrap > p {
  color: var(--ink-muted);
  margin-top: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

label {
  font-weight: 600;
}

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

input,
textarea {
  font: inherit;
  color: inherit;
  width: 100%;
  padding: 0.6rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

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

button {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 0.7rem 1.5rem;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

button:hover {
  background: var(--brand-dark);
}

button[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.cf-turnstile {
  margin-bottom: 1rem;
}

.form-status {
  margin: 0.75rem 0 0;
  min-height: 1.5rem;
  font-weight: 600;
}

.form-status--error {
  color: var(--error);
}

.form-status--success {
  color: var(--success);
}

/* Footer — margin-top:auto pins it to the bottom of a short page without
   position:absolute, which is what made the 2019 footer overlap the copy. */
.site-footer {
  margin-top: auto;
  padding: var(--page-padding);
  background: var(--brand);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.footer-name {
  margin: 0;
}

.social {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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