:root {
  color-scheme: light dark;

  --bg: #f6f6f4;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --field-border: #c4c4c0;
  --field-bg: #ffffff;
  --field-focus: #1a1a1a;
  --submit-bg: #1a1a1a;
  --submit-text: #f6f6f4;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;

  --size-line-1: clamp(2rem, 4.5vw + 1rem, 3.75rem);
  --size-line-2: clamp(1.25rem, 2vw + 0.75rem, 2rem);
  --size-lead: clamp(1.125rem, 1.2vw + 0.75rem, 1.5rem);

  --fade-duration: 0.85s;
  --fade-ease: ease-out;

  --stage-max: 80rem;
  --headline-max: 36rem;
  --contact-max: 24rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1218;
    --text: #f2f2f0;
    --text-muted: #9a9aa3;
    --field-border: #3a4250;
    --field-bg: #161b24;
    --field-focus: #f2f2f0;
    --submit-bg: #f2f2f0;
    --submit-text: #0e1218;
  }
}

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

html,
body {
  margin: 0;
  height: 100%;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(1.5rem, 3vh, 2.5rem);
  min-height: 100dvh;
  width: 100%;
  max-width: var(--stage-max);
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 3.5rem);
}

.pane {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-height: 0;
}

.pane.headline {
  max-width: var(--headline-max);
}

.pane.contact {
  align-self: flex-end;
  max-width: var(--contact-max);
}

.headline__lines {
  margin: 0;
  width: 100%;
  font-weight: inherit;
  font-size: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.35em;
}

.headline__line {
  display: block;
  margin: 0;
  line-height: 1.15;
}

.headline__line--primary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--size-line-1);
  text-align: left;
  font-optical-sizing: auto;
}

.headline__line--secondary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--size-line-2);
  color: var(--text-muted);
  text-align: right;
  font-optical-sizing: auto;
}

.contact {
  gap: 1.25rem;
}

.contact__lead {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--size-lead);
  letter-spacing: 0.01em;
  text-align: right;
  width: 100%;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.contact-form__label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.contact-form__input {
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--field-border);
  border-radius: 0.4rem;
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.4;
}

.contact-form__input:focus {
  outline: 2px solid var(--field-focus);
  outline-offset: 2px;
  border-color: var(--field-focus);
}

.contact-form__textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.contact-form__submit {
  align-self: flex-end;
  margin-top: 0.25rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 0.4rem;
  background: var(--submit-bg);
  color: var(--submit-text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}

.contact-form__submit:hover {
  opacity: 0.9;
}

.contact-form__submit:focus-visible {
  outline: 2px solid var(--field-focus);
  outline-offset: 3px;
}

.fade-in {
  opacity: 0;
  animation: fade-in var(--fade-duration) var(--fade-ease) forwards;
}

.fade-in--1 {
  animation-delay: 0.15s;
}

.fade-in--2 {
  animation-delay: 0.55s;
}

.fade-in--3 {
  animation-delay: 0.95s;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    animation: none;
  }
}
