/* Hallmark · genre: playful · macrostructure: Narrative Workflow (3-step form) · theme: Hum (softened) · design-system: shared with home.css · nav: N1 wordmark + 1 link · footer: Ft2 inline single line
 * tone: bright, friendly · anchor hue: pear-yellow 95
 */

@import url("bright-tokens.css");

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

html,
body {
  overflow-x: clip;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.hs-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-paper);
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

/* ---------- top bar ---------- */

.hs-bar {
  max-width: 44rem;
  margin-inline: auto;
  padding: max(var(--space-sm), env(safe-area-inset-top)) var(--gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.hs-bar__mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--color-ink);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.hs-bar__dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--color-pear-deep);
}

.hs-bar__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 var(--space-sm);
  border: 1.5px solid var(--color-rule);
  border-radius: var(--radius-pill);
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.hs-bar__link:hover {
  background: var(--color-paper-2);
  border-color: var(--color-pear-deep);
}

/* ---------- page head ---------- */

.hs {
  max-width: 44rem;
  margin-inline: auto;
  padding: var(--space-lg) var(--gutter) var(--space-xl);
}

.hs-head {
  position: relative;
  isolation: isolate;
  margin-bottom: var(--space-lg);
}

.hs-head::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -1.1rem;
  left: -1rem;
  width: 4.25rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-pear);
}

.hs-head__title {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.hs-head__meta {
  margin: var(--space-2xs) 0 0;
  color: var(--color-ink-2);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.5;
}

/* ---------- cards & steps ---------- */

.hs-form {
  display: grid;
  gap: var(--space-sm);
}

.hs-card {
  min-width: 0;
  padding: var(--space-md) var(--space-sm);
  border-radius: var(--radius-tile);
  background: var(--color-surface);
  box-shadow: var(--shadow-rest);
}

.hs-step {
  margin: 0 0 var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.hs-step__n {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  background: var(--tone);
  font-family: var(--font-num);
  font-size: var(--text-md);
  font-weight: 800;
}

.hs-step--pear { --tone: var(--color-pear); }
.hs-step--sky { --tone: var(--color-sky); }
.hs-step--mint { --tone: var(--color-mint); }

/* ---------- step 1: pledge ---------- */

.hs-pledge {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-lg);
  line-height: 1.85;
}

.hs-hl {
  color: inherit;
  font-weight: 800;
  background-color: transparent;
  background-image: linear-gradient(color-mix(in oklab, var(--color-pear) 75%, transparent) 0 0);
  background-repeat: no-repeat;
  background-size: 100% 0.42em;
  background-position: 0 88%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hs-reqs {
  margin: 0 0 var(--space-md);
  padding: 0;
  list-style: none;
  counter-reset: req;
  display: grid;
  gap: var(--space-2xs);
}

.hs-reqs li {
  counter-increment: req;
  position: relative;
  padding: var(--space-xs) var(--space-sm) var(--space-xs) 3.25rem;
  border-radius: var(--radius-row);
  background: var(--color-paper);
  font-size: var(--text-md);
  line-height: 1.65;
}

.hs-reqs li::before {
  content: counter(req);
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: color-mix(in oklab, var(--tone, var(--color-pear)) 70%, var(--color-surface));
  font-family: var(--font-num);
  font-size: var(--text-sm);
  font-weight: 800;
}

.hs-reqs li:nth-child(3n + 2) { --tone: var(--color-sky); }
.hs-reqs li:nth-child(3n + 3) { --tone: var(--color-mint); }

.hs-agree {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-sm);
  border-radius: var(--radius-row);
  background: color-mix(in oklab, var(--color-pear) 28%, var(--color-surface));
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out);
}

.hs-agree input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.hs-agree__box {
  position: relative;
  flex: none;
  width: 1.625rem;
  height: 1.625rem;
  margin-top: 0.05rem;
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: inset 0 0 0 2px var(--color-pear-deep);
  transition: background-color var(--dur-short) var(--ease-out);
}

.hs-agree__box::after {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: 0.55rem;
  width: 0.45rem;
  height: 0.8rem;
  border-right: 3px solid var(--color-surface);
  border-bottom: 3px solid var(--color-surface);
  transform: rotate(45deg) scale(0.4);
  opacity: 0;
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-micro) linear;
}

.hs-agree input:checked + .hs-agree__box {
  background: var(--color-mint-deep);
  box-shadow: none;
}

.hs-agree input:checked + .hs-agree__box::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.hs-agree:has(input:checked) {
  background: color-mix(in oklab, var(--color-mint) 30%, var(--color-surface));
}

.hs-agree input:focus-visible + .hs-agree__box {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* ---------- step 2: fields ---------- */

.hs-field {
  min-width: 0;
  margin: 0 0 var(--space-md);
  padding: 0;
  border: 0;
}

.hs-field:last-child {
  margin-bottom: 0;
}

.hs-label {
  display: block;
  margin: 0 0 var(--space-2xs);
  padding: 0;
  font-size: var(--text-md);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hs-help {
  margin: var(--space-2xs) 0 0;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.hs-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0 var(--space-sm);
  border: 1.5px solid var(--color-rule-strong);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 700;
  transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}

.hs-input::placeholder {
  color: var(--color-ink-2);
  font-weight: 400;
}

.hs-input--select {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%23262a33' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.5 7 7l5.5-5.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

.hs-input:hover {
  border-color: var(--color-pear-deep);
}

.hs-input:focus-visible {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-focus) 28%, transparent);
}

.hs-field:has(.field-error:not([hidden])) .hs-input:required {
  border-color: var(--color-coral);
}

.hs-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xs);
}

.hs-sub {
  display: grid;
  gap: var(--space-3xs);
  min-width: 0;
}

.hs-sub__hint {
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  font-weight: 700;
}

.hs-stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-3xs);
  border-radius: var(--radius-pill);
  background: var(--color-paper);
  box-shadow: inset 0 0 0 1.5px var(--color-rule);
}

.hs-stepper__btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-rest);
  color: var(--color-ink);
  font-family: var(--font-num);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--dur-micro) var(--ease-press), background-color var(--dur-short) var(--ease-out);
}

.hs-stepper__btn:hover {
  background: var(--color-pear);
}

.hs-stepper__btn:active {
  transform: scale(0.94);
}

.hs-stepper__btn:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.hs-stepper__input {
  width: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  font-family: var(--font-num);
  font-size: var(--text-2xl);
  font-weight: 800;
  text-align: center;
  -moz-appearance: textfield;
}

.hs-stepper__input::-webkit-outer-spin-button,
.hs-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.hs-stepper__input:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 8px;
}

.hs-stepper__unit {
  margin-right: var(--space-2xs);
  font-weight: 800;
}

.hs-choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2xs);
}

.hs-choice {
  position: relative;
  display: block;
  cursor: pointer;
}

.hs-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.hs-choice span {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 3.25rem;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-input);
  background: var(--color-paper);
  box-shadow: inset 0 0 0 1.5px var(--color-rule);
  font-weight: 700;
  transition: background-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}

.hs-choice span::before {
  content: "";
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: inset 0 0 0 2px var(--color-rule-strong);
  transition: box-shadow var(--dur-short) var(--ease-out);
}

.hs-choice:hover span {
  box-shadow: inset 0 0 0 1.5px var(--color-sky-deep);
}

.hs-choice input:checked + span {
  background: color-mix(in oklab, var(--color-sky) 32%, var(--color-surface));
  box-shadow: inset 0 0 0 2px var(--color-sky-deep);
}

.hs-choice input:checked + span::before {
  box-shadow: inset 0 0 0 6px var(--color-sky-deep);
}

.hs-choice input:focus-visible + span {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* ---------- step 3: signatures ---------- */

.hs-date {
  margin: 0 0 var(--space-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 2.25rem;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--color-mint) 30%, var(--color-surface));
  font-size: var(--text-sm);
  font-weight: 700;
}

.hs-date span {
  font-weight: 800;
}

.hs-signs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-sm);
}

.hs-sign {
  min-width: 0;
}

.hs-sign__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-xs);
}

.hs-sign__head .hs-label {
  margin-bottom: var(--space-2xs);
}

.hs-clear {
  border: 0;
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--radius-pill);
  background: var(--color-paper-2);
  color: var(--color-ink-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}

.hs-clear:hover {
  background: var(--color-pear);
  color: var(--color-ink);
}

.hs-clear:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.sign__pad {
  display: block;
  width: 100%;
  height: 9.5rem;
  border-radius: var(--radius-row);
  background:
    linear-gradient(to bottom, transparent calc(100% - 2.25rem), var(--color-rule) calc(100% - 2.25rem), var(--color-rule) calc(100% - 2.25rem + 1.5px), transparent calc(100% - 2.25rem + 1.5px)),
    var(--color-surface);
  box-shadow: inset 0 0 0 1.5px var(--color-rule-strong);
  touch-action: none;
  cursor: crosshair;
}

.sign__pad:hover {
  box-shadow: inset 0 0 0 1.5px var(--color-pear-deep);
}

.sign__pad:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.sign__pad.is-error {
  box-shadow: inset 0 0 0 2px var(--color-coral);
}

/* ---------- errors & status ---------- */

.field-error {
  margin: var(--space-2xs) 0 0;
  color: var(--color-coral-ink);
  font-size: var(--text-sm);
  font-weight: 700;
}

.field-error::before {
  content: "! ";
}

.form-status {
  margin: 0 0 var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-row);
  background: var(--color-surface);
  font-weight: 700;
  text-align: center;
}

.form-status.is-error {
  color: var(--color-coral-ink);
  background: color-mix(in oklab, var(--color-coral) 14%, var(--color-surface));
}

.form-status.is-ok {
  color: var(--color-ok-ink);
  background: color-mix(in oklab, var(--color-mint) 30%, var(--color-surface));
}

/* ---------- submit ---------- */

.hs-submit {
  padding-top: var(--space-xs);
}

.hs-btn {
  --btn-face: var(--color-pear);
  --btn-edge: var(--shadow-btn-edge);
  --btn-cast: var(--shadow-btn-cast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.75rem;
  padding: 0 var(--space-md);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--btn-face);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
  box-shadow: 0 4px 0 0 var(--btn-edge), 0 6px 12px -3px var(--btn-cast);
  transform: translateY(0);
  transition:
    transform 140ms var(--ease-press),
    box-shadow 140ms var(--ease-press),
    background-color var(--dur-short) var(--ease-out);
}

.hs-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 0 var(--btn-edge), 0 12px 22px -4px var(--btn-cast);
}

.hs-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 0 var(--btn-edge), 0 2px 6px -2px var(--btn-cast);
  transition-duration: 70ms;
}

.hs-btn:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}

.hs-btn:disabled,
.hs-btn[data-state="loading"] {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.hs-btn[data-state="error"] {
  --btn-face: color-mix(in oklab, var(--color-coral) 30%, var(--color-surface));
  --btn-edge: var(--color-coral);
  --btn-cast: color-mix(in oklab, var(--color-coral) 35%, transparent);
}

.hs-btn[data-state="success"] {
  --btn-face: var(--color-mint);
  --btn-edge: var(--color-mint-deep);
  --btn-cast: color-mix(in oklab, var(--color-mint-deep) 35%, transparent);
}

/* ---------- footer ---------- */

.hs-foot p {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 var(--gutter) max(var(--space-lg), env(safe-area-inset-bottom));
  color: var(--color-ink-2);
  font-size: var(--text-xs);
}

/* ---------- entry ---------- */

.hs-card,
.hs-submit {
  animation: hs-rise var(--dur-long) var(--ease-out) both;
}

.hs-card:nth-child(2) { animation-delay: 70ms; }
.hs-card:nth-child(3) { animation-delay: 140ms; }
.hs-submit { animation-delay: 210ms; }

@keyframes hs-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- wider screens ---------- */

@media (min-width: 560px) {
  .hs-card {
    padding: var(--space-lg) var(--space-lg);
  }

  .hs-pair,
  .hs-choices,
  .hs-signs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hs-btn {
    width: auto;
    min-width: 16rem;
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-card,
  .hs-submit {
    animation: none;
  }

  .hs-btn,
  .hs-stepper__btn,
  .hs-agree__box::after {
    transition: none;
  }

  .hs-btn:hover,
  .hs-btn:active,
  .hs-stepper__btn:active {
    transform: none;
  }
}

@media print {
  .hs-bar,
  .hs-foot,
  .hs-submit,
  .hs-clear,
  .hs-help,
  .hs-stepper__btn {
    display: none !important;
  }

  body.hs-body {
    background: white;
  }

  .hs-card {
    box-shadow: none;
    border: 1px solid var(--color-rule);
    animation: none;
  }
}

/* ---------- Ivory & Gold refinements (overrides the playful defaults above) ---------- */

.hs-bar__mark {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hs-bar__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 0;
  background: var(--color-gold);
  transform: rotate(45deg);
}

.hs-bar__link {
  border-width: 1px;
  border-color: var(--color-rule-strong);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hs-bar__link:hover {
  background: var(--color-surface);
  border-color: var(--color-gold);
}

.hs-head {
  margin-bottom: var(--space-lg);
}

.hs-head::before {
  display: none;
}

.hs-head__title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.hs-head__title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  margin-top: var(--space-sm);
  background: var(--color-gold);
}

.hs-head__meta {
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hs-step {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hs-step__n {
  width: 2rem;
  height: 2rem;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--color-gold);
  color: var(--color-gold-deep);
  font-family: var(--font-num);
  font-size: 1.2rem;
  font-weight: 600;
}

.hs-card {
  border-radius: var(--radius-tile);
}

.hs-label {
  font-weight: 600;
  letter-spacing: 0;
}

.hs-input {
  border-width: 1px;
  font-weight: 500;
}

.hs-input:hover {
  border-color: var(--color-gold);
}

.hs-flash {
  font-weight: 600;
  box-shadow: inset 0 0 0 1px currentColor;
}

.hs-empty,
.hs-nothing {
  font-weight: 500;
}

.hs-foot p {
  letter-spacing: 0.04em;
}

.hs-btn,
.hs-cta {
  background: var(--btn-bg);
  color: var(--btn-ink);
  border-radius: var(--radius-btn);
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-btn);
}

.hs-btn:hover,
.hs-cta:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn);
}

.hs-btn:active,
.hs-cta:active {
  transform: translateY(0);
  box-shadow: var(--shadow-btn);
}

.hs-reqs li::before {
  font-weight: 600;
  font-size: 1rem;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--color-gold);
  color: var(--color-gold-deep);
}

.hs-agree {
  font-weight: 600;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-gold) 45%, transparent);
}

.hs-hl {
  font-weight: 700;
}

.hs-choice span {
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--color-rule-strong);
}

.hs-stepper__input {
  font-weight: 600;
}