@font-face {
  font-family: "Minion Pro";
  src: url("../public/fonts/MinionPro-Regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Minion Pro";
  src: url("../public/fonts/MinionPro-It.woff") format("woff");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("../public/fonts/AlbertSans-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("../public/fonts/AlbertSans-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #2a1710;
  --ink-soft: #654a40;
  --paper: #fffdfb;
  --canvas: #f7e8e0;
  --accent: #a95845;
  --accent-dark: #783c2f;
  --accent-pale: #f1d5ca;
  --line: #d8c3b8;
  --success: #2f6f57;
  --error: #9a342d;
  --focus: #297e7e;
  --shadow: 0 22px 60px rgba(67, 35, 24, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 3px;
}

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

.site-header {
  width: min(100% - 40px, 1160px);
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(85, 52, 40, 0.18);
}

.wordmark {
  color: var(--ink);
  font-family: "Minion Pro", Georgia, serif;
  font-size: 23px;
  line-height: 1;
  text-decoration: none;
}

.program-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-shell {
  width: min(100% - 40px, 1080px);
  margin: 0 auto;
  padding: 58px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: start;
}

.intro {
  padding-top: 18px;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Minion Pro", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  max-width: 540px;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 0.98;
}

.intro-copy {
  max-width: 500px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-family: "Minion Pro", Georgia, serif;
  font-size: 20px;
  line-height: 1.45;
}

.trust-note {
  max-width: 460px;
  margin: 38px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(85, 52, 40, 0.2);
  color: var(--ink-soft);
  font-size: 13px;
}

.trust-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 500;
}

.enrollment-card {
  min-height: 560px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(82, 48, 35, 0.18);
  border-radius: 6px;
  background: rgba(255, 253, 251, 0.92);
  box-shadow: var(--shadow);
}

.progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 38px;
  padding: 0;
  list-style: none;
}

.progress li {
  min-width: 0;
  color: #8e776d;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.progress li::before {
  content: "";
  display: block;
  height: 3px;
  margin-bottom: 9px;
  border-radius: 2px;
  background: #e7dbd5;
}

.progress li.is-active,
.progress li.is-complete {
  color: var(--ink);
}

.progress li.is-active::before,
.progress li.is-complete::before {
  background: var(--accent);
}

.panel[hidden],
.loading-state[hidden],
.invitation-state[hidden] {
  display: none;
}

.panel h2,
.invitation-state h2 {
  font-size: 34px;
  line-height: 1.05;
}

.panel-lead {
  margin: 12px 0 27px;
  color: var(--ink-soft);
  font-size: 14px;
}

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

.field {
  margin-bottom: 19px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.required {
  color: var(--accent-dark);
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #c9b4aa;
  border-radius: 4px;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:hover {
  border-color: #a8897a;
}

.field input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(41, 126, 126, 0.14);
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
}

.field-hint {
  display: block;
  margin-top: 7px;
  color: #796158;
  font-size: 12px;
  line-height: 1.45;
}

.form-error {
  min-height: 22px;
  margin: 4px 0 13px;
  color: var(--error);
  font-size: 13px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 160ms ease, border-color 160ms ease,
    color 160ms ease, opacity 160ms ease;
}

.primary-button {
  width: 100%;
  padding: 0 20px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.primary-button:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.secondary-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.button-row .primary-button {
  width: auto;
  min-width: 170px;
}

.code-input {
  max-width: 280px;
  font-size: 23px !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.24em !important;
  text-align: center;
}

.email-destination {
  margin: 18px 0 25px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: #fbf3ef;
  color: var(--ink-soft);
  font-size: 13px;
}

.email-destination strong {
  color: var(--ink);
  font-weight: 500;
}

.summary-list {
  margin: 20px 0 27px;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

.summary-list strong {
  color: var(--ink);
  font-weight: 500;
  text-align: right;
}

.check-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin: 15px 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent-dark);
}

.loading-state {
  min-height: 390px;
  display: grid;
  place-content: center;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border: 2px solid var(--accent-pale);
  border-top-color: var(--accent-dark);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.invitation-state {
  min-height: 390px;
  display: grid;
  align-content: center;
}

.invitation-state p {
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.status-mark {
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-dark);
  font-family: Georgia, serif;
  font-size: 22px;
}

.success-shell {
  width: min(100% - 40px, 680px);
  margin: 0 auto;
  padding: 90px 0;
}

.success-content {
  padding: clamp(32px, 7vw, 64px);
  border: 1px solid rgba(82, 48, 35, 0.18);
  border-radius: 6px;
  background: rgba(255, 253, 251, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
}

.success-content .status-mark {
  margin: 0 auto 25px;
  border-color: var(--success);
  color: var(--success);
}

.success-content h1 {
  margin: 0 auto;
  font-size: clamp(40px, 7vw, 58px);
}

.success-content h2 {
  margin-top: 16px;
  font-size: 24px;
}

.success-content p {
  margin: 17px auto 0;
  color: var(--ink-soft);
  font-family: "Minion Pro", Georgia, serif;
  font-size: 19px;
}

.reference {
  display: inline-block;
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

.reference strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 820px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 40px;
  }

  .intro {
    padding-top: 0;
  }

  h1 {
    font-size: 48px;
  }

  .intro-copy {
    margin-top: 19px;
  }

  .trust-note {
    display: none;
  }
}

@media (max-width: 520px) {
  .site-header,
  .page-shell,
  .success-shell {
    width: min(100% - 28px, 1080px);
  }

  .site-header {
    height: 68px;
  }

  .program-label {
    display: none;
  }

  .page-shell {
    padding: 32px 0 46px;
    gap: 29px;
  }

  h1 {
    font-size: 42px;
  }

  .intro-copy {
    font-size: 18px;
  }

  .enrollment-card {
    min-height: 520px;
    padding: 24px 20px 28px;
  }

  .progress {
    margin-bottom: 30px;
  }

  .progress li {
    font-size: 10px;
  }

  .panel h2,
  .invitation-state h2 {
    font-size: 30px;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .button-row .primary-button {
    width: 100%;
  }

  .secondary-button {
    min-height: 38px;
  }

  .summary-list li {
    display: block;
  }

  .summary-list strong {
    display: block;
    margin-top: 2px;
    text-align: left;
  }

  .success-shell {
    padding: 56px 0;
  }
}

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