/* biome-ignore-all lint/style/noDescendingSpecificity: Form and admin parts style independent elements. */
/* biome-ignore-all lint/complexity/noImportantStyles: hidden, print and reduced-motion overrides must win. */
/* Founder Lift briefing and restricted area.
   Contrast on ivory #f2eee7: graphite 15.6:1, ink-muted 5.9:1, copper-strong 5.9:1. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/fraunces-latin-opsz-normal.woff2") format("woff2-variations");
}

:root {
  --graphite: #15191a;
  --graphite-soft: #24282a;
  --ivory: #f2eee7;
  --paper: #faf8f4;
  --ivory-muted: #d3cec6;
  --ink-muted: #625a53;
  --line: #d6cec2;
  --line-soft: #e4ddd2;
  --light-muted: #e9e2d8;
  --copper: #bf835c;
  --copper-hover: #d19870;
  --copper-strong: #875137;
  --copper-tint: #f4e6db;
  --danger: #a3352b;
  --display: "Fraunces Variable", Georgia, "Times New Roman", serif;
  --sans: "Inter Variable", Arial, sans-serif;
  --header-h: 60px;
  --shell: min(100% - 40px, 760px);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 96px);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1:focus,
h2:focus {
  outline: none;
}

p {
  margin: 0;
}

a {
  color: var(--copper-strong);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--copper-strong);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  background: var(--copper);
  color: var(--graphite);
  padding: 10px 16px;
  font-weight: 600;
}
.skip:focus {
  top: 10px;
}

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

.eyebrow {
  color: var(--copper-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Header */

.site-header {
  background: var(--graphite);
  color: var(--ivory);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header__inner {
  width: min(100% - 40px, 1120px);
  height: var(--header-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header__logo {
  display: block;
  height: 24px;
  width: auto;
}
.site-header__tag {
  color: var(--ivory-muted);
  font-size: 14px;
}

/* Progress */

.progress {
  position: sticky;
  top: var(--header-h);
  z-index: 9;
  background: color-mix(in srgb, var(--ivory) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.progress__steps {
  width: var(--shell);
  margin: 0 auto;
  padding: 14px 0 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.progress__step {
  all: unset;
  display: grid;
  gap: 8px;
  width: 100%;
  cursor: pointer;
  border-radius: 2px;
}
.progress__step:disabled {
  cursor: default;
}
.progress__step:focus-visible {
  outline: 2px solid var(--copper-strong);
  outline-offset: 4px;
}
.progress__bar {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.progress__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--copper);
  transform: scaleX(var(--fill, 0));
  transform-origin: left;
  transition: transform 300ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.progress__label {
  font-size: 12px;
  line-height: 1.25;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress__step[aria-current="step"] .progress__label {
  color: var(--graphite);
  font-weight: 600;
}
.progress__step:not(:disabled):hover .progress__label {
  color: var(--copper-strong);
}
.progress__meta {
  width: var(--shell);
  margin: 0 auto;
  padding: 6px 0 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-muted);
}
.progress__saved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.progress__saved:not(:empty)::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--copper);
}

@media (max-width: 640px) {
  .progress__label {
    display: none;
  }
  .progress__steps {
    padding-top: 12px;
  }
}

/* Form shell and steps */

.form-shell {
  width: var(--shell);
  margin: 0 auto;
  padding: 48px 0 64px;
}

.briefing {
  margin: 0;
}

.step + .step {
  margin-top: 72px;
}
.js .step + .step {
  margin-top: 0;
}
.js .step:not(.is-active) {
  display: none;
}
.js .step.is-active {
  animation: step-in 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.step__header {
  display: grid;
  gap: 12px;
  margin-bottom: 36px;
}
.step__header h2 {
  font-size: clamp(34px, 6vw, 48px);
}
.step__intro {
  color: var(--ink-muted);
  font-size: 18px;
}

/* Intro */

.intro {
  padding-top: clamp(8px, 4vw, 40px);
}
.intro h1 {
  font-size: clamp(44px, 9vw, 76px);
  line-height: 0.98;
  margin: 16px 0 24px;
}
.intro__lead {
  font-size: clamp(18px, 2.4vw, 21px);
  line-height: 1.5;
  max-width: 36em;
}
.intro__facts {
  list-style: none;
  margin: 40px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  border-top: 1px solid var(--line);
}
.intro__facts li {
  display: grid;
  gap: 4px;
  padding: 18px 20px 18px 0;
  border-bottom: 1px solid var(--line);
}
.intro__facts strong {
  font-family: var(--display);
  font-weight: 500;
  font-size: 21px;
}
.intro__facts span {
  color: var(--ink-muted);
  font-size: 15px;
}
.intro__actions {
  margin-top: 8px;
}
.intro__privacy {
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-muted);
}
.resume {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: -16px 0 32px;
  padding: 14px 18px;
  background: var(--copper-tint);
  border: 1px solid var(--copper-line, #bf835c70);
  font-size: 16px;
}

/* Questions */

.step__questions {
  counter-reset: question;
  display: grid;
}
.q {
  counter-increment: question;
  margin: 0;
  padding: 28px 0 32px;
  border: 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
/* A floated legend leaves the fieldset border alone, so every question
   shares the same top rule. */
legend.q__label {
  float: left;
  width: 100%;
}
.q > :not(legend) {
  clear: both;
}
.q__label {
  display: block;
  padding: 0;
  font-size: 19px;
  font-weight: 560;
  line-height: 1.4;
  margin-bottom: 14px;
  text-wrap: pretty;
}
.q__label::before {
  content: counter(question, decimal-leading-zero);
  display: block;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  color: var(--copper-strong);
  margin-bottom: 6px;
}
.q__optional {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  vertical-align: 3px;
}
.q__hint {
  margin: -6px 0 14px;
  color: var(--ink-muted);
  font-size: 15px;
}
.q.is-revealed {
  animation: step-in 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--graphite);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 13px 15px;
  transition:
    border-color 150ms,
    box-shadow 150ms;
}
textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.5;
  field-sizing: content;
  max-height: 60vh;
}
input::placeholder,
textarea::placeholder {
  color: #8d847b;
}
input:hover,
textarea:hover {
  border-color: #bdb2a3;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--copper-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--copper) 28%, transparent);
}
.q.is-invalid input[type="text"],
.q.is-invalid input[type="email"],
.q.is-invalid input[type="tel"],
.q.is-invalid textarea,
.q.is-invalid .choice {
  border-color: var(--danger);
}

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}
.contact__field label {
  display: block;
  font-size: 15px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

/* Choices */

.choices {
  display: grid;
  gap: 8px;
}
.choices--compact {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
}
.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.4;
  transition:
    border-color 150ms,
    background-color 150ms;
  -webkit-tap-highlight-color: transparent;
}
.choice:hover {
  border-color: #bdb2a3;
  background: #fffdf9;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.choice__mark {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid #a99d8e;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition:
    border-color 150ms,
    background-color 150ms;
}
.choice input[type="checkbox"] + .choice__mark {
  border-radius: 4px;
}
.choice__mark::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ivory);
  transform: scale(0);
  transition: transform 160ms cubic-bezier(0.2, 0.7, 0.2, 1.4);
}
.choice input[type="checkbox"] + .choice__mark::after {
  width: 10px;
  height: 6px;
  border-radius: 0;
  background: none;
  border-left: 2px solid var(--ivory);
  border-bottom: 2px solid var(--ivory);
  transform: translateY(-1px) rotate(-45deg) scale(0);
}
.choice:has(input:checked) {
  border-color: var(--copper-strong);
  background: var(--copper-tint);
}
.choice input:checked + .choice__mark {
  border-color: var(--copper-strong);
  background: var(--copper-strong);
}
.choice input:checked + .choice__mark::after {
  transform: scale(1);
}
.choice input[type="checkbox"]:checked + .choice__mark::after {
  transform: translateY(-1px) rotate(-45deg) scale(1);
}
.choice:has(input:focus-visible) {
  outline: 2px solid var(--copper-strong);
  outline-offset: 2px;
}
.choice--exclusive {
  grid-column: 1 / -1;
  border-style: dashed;
}

.q__other {
  margin-top: 10px;
}
.js .q__other {
  display: none;
}
.js .q__other.is-open {
  display: block;
  animation: step-in 200ms ease-out;
}

.q__error,
.step__summary {
  margin-top: 10px;
  color: var(--danger);
  font-size: 15px;
  font-weight: 500;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.q__error::before,
.step__summary::before {
  content: "!";
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  transform: translateY(2px);
}
.step__summary {
  margin: 8px 0 0;
  padding: 14px 16px;
  background: #f8e3df;
  border-radius: 4px;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--copper);
  border-radius: 0;
  background: var(--copper);
  color: var(--graphite);
  font: inherit;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms,
    border-color 160ms,
    transform 100ms;
  -webkit-tap-highlight-color: transparent;
}
.button:hover {
  background: var(--copper-hover);
  border-color: var(--copper-hover);
}
.button:active {
  transform: translateY(1px);
}
.button span {
  transition: transform 160ms;
}
.button:hover span {
  transform: translateX(3px);
}
.button--large {
  min-height: 60px;
  padding: 0 34px;
  font-size: 21px;
}
.button--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--graphite);
}
.button--ghost:hover {
  background: var(--light-muted);
  border-color: #bdb2a3;
}
.button--small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 16px;
}
.button--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.button--danger:hover {
  background: #8a2b23;
  border-color: #8a2b23;
}
.button[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}
.button[aria-busy="true"] span {
  animation: pulse 900ms ease-in-out infinite alternate;
}
@keyframes pulse {
  to {
    opacity: 0.2;
  }
}

.link-button {
  all: unset;
  color: var(--copper-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
}
.link-button:focus-visible {
  outline: 2px solid var(--copper-strong);
  outline-offset: 3px;
}
.link-button--danger {
  color: var(--danger);
}

.step__nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.step__nav [data-next],
.step__nav [data-submit] {
  margin-left: auto;
}
.step[data-step="1"] [data-prev] {
  visibility: hidden;
}
.no-js-hide,
html:not(.js) .step__nav [data-prev],
html:not(.js) .step__nav [data-next],
html:not(.js) [data-start] {
  display: none;
}

@media (max-width: 640px) {
  .js .step__nav {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-inline: -20px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--ivory) 94%, transparent);
    backdrop-filter: blur(10px);
  }
  .step__nav .button {
    flex: 1;
    padding: 0 16px;
  }
  .step[data-step="1"] [data-prev] {
    display: none;
  }
  .intro__actions .button {
    width: 100%;
  }
}

/* Review */

.review__list {
  display: grid;
  gap: 16px;
}
.review__section {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  padding: 22px 24px;
}
.review__section header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.review__section h3 {
  font-size: 23px;
}
.review__section dl {
  margin: 0;
  display: grid;
}
.review__row {
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.review__row dt {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 3px;
}
.review__row dd {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.review__row dd.is-empty {
  color: #8d847b;
  font-style: italic;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Done and messages */

.done {
  text-align: center;
  padding-top: 40px;
}
.done h2 {
  font-size: clamp(40px, 8vw, 64px);
  margin: 24px 0 18px;
}
.done .intro__lead {
  margin: 0 auto 32px;
}
.done__mark {
  width: 76px;
  height: 76px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--copper);
  display: grid;
  place-items: center;
  animation: pop 420ms cubic-bezier(0.2, 0.7, 0.2, 1.3);
}
.done__mark::after {
  content: "";
  width: 28px;
  height: 15px;
  border-left: 3px solid var(--graphite);
  border-bottom: 3px solid var(--graphite);
  transform: translateY(-4px) rotate(-45deg);
}
@keyframes pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

.message h1 {
  font-size: clamp(40px, 8vw, 60px);
  margin-bottom: 20px;
}
.message .intro__lead {
  margin-bottom: 28px;
}
.missing {
  margin: 0 0 28px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

/* Restricted area */

.admin {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: 40px 0 80px;
}
.admin h1 {
  font-size: clamp(34px, 5vw, 48px);
}
.admin__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 28px;
}
.admin__head .eyebrow {
  margin-bottom: 10px;
}
.admin__head .muted {
  margin-top: 6px;
}
.admin__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin__back {
  margin-bottom: 20px;
  font-size: 15px;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.admin-table th {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--light-muted);
}
.admin-table tbody tr:hover {
  background: #fffdf9;
}
.admin-table td a {
  font-weight: 600;
}
.nowrap {
  white-space: nowrap;
}
.empty {
  padding: 40px 24px;
  background: var(--paper);
  border: 1px dashed var(--line);
  text-align: center;
}

.answers {
  margin-top: 28px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  padding: 24px 28px 8px;
}
.answers h2 {
  font-size: 25px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.answers__num {
  color: var(--copper-strong);
  font-size: 18px;
}
.answers dl {
  margin: 0;
}
.answers__row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 8px 32px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}
.answers__row dt {
  color: var(--ink-muted);
  font-size: 15px;
}
.answers__row dd {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.answers__row dd ul {
  margin: 0;
  padding-left: 18px;
  white-space: normal;
}
.admin__delete {
  margin-top: 40px;
}
@media (max-width: 720px) {
  .answers {
    padding: 20px 18px 4px;
  }
  .answers__row {
    grid-template-columns: 1fr;
  }
}

@media print {
  .site-header,
  .admin__back,
  .admin__actions,
  .admin__delete,
  .skip {
    display: none !important;
  }
  body {
    background: #fff;
    font-size: 12pt;
  }
  .admin {
    width: 100%;
    padding: 0;
  }
  .answers {
    border: 0;
    padding: 0;
    break-inside: auto;
  }
  .answers__row {
    break-inside: avoid;
  }
}

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