:root {
  color-scheme: light;
  --background: #f6f2ec;
  --text: #26231f;
  --muted: #6d665c;
  --rule: #d8d0c4;
  --link: #3e5f57;
  --link-hover: #263f39;
  --header-width: 34rem;
  --content-width: 38rem;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(100% - 48px, var(--content-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(68px, 12vh, 120px) 0 64px;
}

.identity {
  margin-bottom: clamp(48px, 9vw, 72px);
}

.identity:not(.compact-identity) {
  max-width: var(--header-width);
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.compact-identity {
  margin-bottom: clamp(36px, 7vw, 56px);
}

h1,
h2,
p,
label,
input,
textarea,
button {
  margin: 0;
}

h1 {
  max-width: none;
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.identity h1 {
  text-align: center;
}

.subtitle {
  max-width: var(--content-width);
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  line-height: 1.55;
  text-align: left;
}

.identity:not(.compact-identity) .subtitle {
  max-width: var(--header-width);
  text-align: center;
}

section {
  max-width: var(--content-width);
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

section + section {
  margin-top: 28px;
}

h2 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

p {
  max-width: var(--content-width);
  font-size: 1rem;
}

.supporting {
  margin-top: 10px;
  color: var(--muted);
}

.home-link {
  margin-bottom: clamp(52px, 10vw, 84px);
  font-size: 0.92rem;
}

a {
  outline: 1px solid transparent;
  outline-offset: 7px;
  color: var(--link);
  text-decoration-color: rgba(62, 95, 87, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition:
    color 220ms ease,
    outline-color 220ms ease,
    outline-offset 220ms ease,
    text-decoration-color 220ms ease;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline-color: rgba(62, 95, 87, 0.42);
  outline-offset: 5px;
}

.contact-form {
  max-width: 38rem;
  padding-top: 30px;
  border-top: 1px solid var(--rule);
}

.field {
  display: grid;
  gap: 8px;
  cursor: text;
}

.field + .field {
  margin-top: 24px;
}

label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  transition: color 220ms ease;
}

.field:hover label,
.field:focus-within label {
  color: var(--link-hover);
}

input,
textarea {
  width: 100%;
  outline: 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  line-height: 1.55;
  cursor: text;
  transition:
    border-color 240ms ease,
    box-shadow 240ms ease,
    background-color 240ms ease;
}

input {
  min-height: 44px;
}

textarea {
  min-height: 180px;
  padding: 10px 0;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible {
  outline: 0;
}

.field:hover input,
.field:hover textarea,
input:focus-visible,
textarea:focus-visible {
  border-bottom-color: var(--link);
  box-shadow: 0 8px 18px -18px rgba(38, 35, 31, 0.68);
}

input:focus-visible,
textarea:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

button {
  min-height: 44px;
  margin-top: 30px;
  padding: 0 0.1rem 2px;
  border: 0;
  border-bottom: 1px solid rgba(62, 95, 87, 0.45);
  outline: 1px solid transparent;
  outline-offset: 7px;
  color: var(--link);
  background: transparent;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition:
    color 220ms ease,
    border-color 220ms ease,
    outline-color 220ms ease,
    outline-offset 220ms ease;
}

button:hover,
button:focus-visible {
  color: var(--link-hover);
  border-bottom-color: currentColor;
}

button:focus-visible {
  outline-color: rgba(62, 95, 87, 0.42);
  outline-offset: 5px;
}

.screened-field {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.thanks-page {
  display: grid;
  align-items: center;
  padding-top: 64px;
}

.thanks-wrap {
  padding-bottom: clamp(80px, 16vh, 140px);
}

.confirmation-copy {
  color: var(--text);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.2;
  animation: quiet-dissolve 6s ease-in-out 0.2s forwards;
}

.return-link {
  margin-top: 28px;
}

::selection {
  color: var(--background);
  background: var(--text);
}

@keyframes quiet-dissolve {
  0%,
  54% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    letter-spacing: 0;
  }

  100% {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(-6px);
    letter-spacing: 0.025em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .confirmation-copy {
    animation: none;
  }
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 32px, var(--content-width));
    padding-top: 56px;
  }

  .home-link {
    margin-bottom: 44px;
  }
}
