/* Valiant Sign — same ink/orange system as the proposal decks, tuned for a form flow. */

@font-face {
  font-family: "FT Sterling";
  src: url("fonts/FTSterling-Book.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "FT Sterling";
  src: url("fonts/FTSterling-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "FT Sterling";
  src: url("fonts/FTSterling-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: rgb(7, 24, 33);
  --ink-2: rgb(10, 29, 47);
  --accent: #fd6c1d;
  --fg: #fff;
  --fg-80: rgba(255, 255, 255, 0.8);
  --fg-60: rgba(255, 255, 255, 0.6);
  --fg-40: rgba(255, 255, 255, 0.4);
  --fg-20: rgba(255, 255, 255, 0.2);
  --fg-10: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.04);
  --r-sm: 6px;
  --r-md: 10px;
  --font: "FT Sterling", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --danger: #ff6b6b;
  --ok: #4ade80;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 42%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px 96px; }

/* ---------- Header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 34px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 14px;
  text-decoration: none;
  color: var(--fg);
}
.brand__mark {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(253, 108, 29, 0.8);
}
.top__meta { font-size: 12px; color: var(--fg-40); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- Step rail ---------- */
.rail { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; }
.rail__step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--fg-40);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.rail__dot {
  width: 22px; height: 22px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--fg-20);
  font-size: 11px; font-weight: 700;
  color: var(--fg-40);
}
.rail__step[data-state="current"] { color: var(--fg); }
.rail__step[data-state="current"] .rail__dot {
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 0 0 4px rgba(253, 108, 29, 0.14);
}
.rail__step[data-state="done"] { color: var(--fg-60); }
.rail__step[data-state="done"] .rail__dot {
  border-color: transparent; background: var(--accent); color: #1a1005;
}
.rail__line { flex: 1; height: 1px; background: var(--fg-10); min-width: 12px; }
@media (max-width: 620px) { .rail__step span:last-child { display: none; } }

/* ---------- Cards & type ---------- */
h1 {
  margin: 0 0 8px;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
h1 em { font-style: normal; color: var(--accent); }
.lede { margin: 0 0 30px; color: var(--fg-60); font-size: 15.5px; max-width: 58ch; }

.card {
  background: var(--glass);
  border: 1px solid var(--fg-10);
  border-radius: var(--r-md);
  padding: 26px 26px 24px;
}
.card + .card { margin-top: 14px; }

/* ---------- Option picker ---------- */
.opts { display: grid; gap: 14px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt__box {
  display: block;
  border: 1px solid var(--fg-10);
  border-radius: var(--r-md);
  background: var(--glass);
  padding: 24px 24px 22px;
  transition: border-color .18s ease, background .18s ease;
}
.opt:hover .opt__box { border-color: var(--fg-20); }
.opt input:focus-visible + .opt__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt input:checked + .opt__box {
  border-color: rgba(253, 108, 29, 0.55);
  background: rgba(253, 108, 29, 0.08);
}
.opt__head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.opt__name { display: block; font-size: 17px; font-weight: 500; }
.opt__price { display: block; }
.opt__tag {
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(253, 108, 29, 0.16);
  border: 1px solid rgba(253, 108, 29, 0.4);
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
  vertical-align: 2px;
}
.opt__price { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; }
.opt__price span { font-size: 13px; color: var(--fg-40); letter-spacing: 0; }
.opt__summary { display: block; margin: 12px 0 0; color: var(--fg-60); font-size: 14px; }
.opt__list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.opt__list li { position: relative; padding-left: 20px; font-size: 13.5px; color: var(--fg-60); }
.opt__list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(253, 108, 29, 0.22);
  box-shadow: inset 0 0 0 1px rgba(253, 108, 29, 0.55);
}

/* ---------- Fields ---------- */
.fields { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-60); }
.field input, .field textarea {
  font: inherit;
  color: var(--fg);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--fg-10);
  border-radius: var(--r-sm);
  padding: 12px 13px;
  width: 100%;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(253, 108, 29, 0.6);
  box-shadow: 0 0 0 3px rgba(253, 108, 29, 0.12);
}
.field input::placeholder { color: var(--fg-20); }
.field__hint { font-size: 12px; color: var(--fg-40); }
@media (max-width: 620px) { .fields { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: 0;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  border-radius: 999px;
  padding: 15px 28px;
  background: linear-gradient(180deg, #fff 0%, #ececec 100%);
  color: #15161e;
  box-shadow: 0 8px 30px rgba(253, 108, 29, 0.28);
  transition: transform .16s ease, box-shadow .16s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 38px rgba(253, 108, 29, 0.36); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn--ghost {
  background: transparent;
  color: var(--fg-60);
  box-shadow: none;
  padding: 15px 18px;
}
.btn--ghost:hover:not(:disabled) { color: var(--fg); transform: none; box-shadow: none; }
.actions { display: flex; align-items: center; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.actions--split { justify-content: space-between; }

/* Reserve the space Stripe's Payment Element will occupy, so the button does not
   jump up the page while the iframe is still loading. */
#paymentElement { min-height: 220px; }
.payloading {
  display: flex; align-items: center; gap: 10px;
  height: 220px;
  color: var(--fg-40); font-size: 13.5px;
}
.payloading::before {
  content: ""; width: 14px; height: 14px; flex: none;
  border-radius: 50%;
  border: 2px solid var(--fg-20);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .payloading::before { animation: none; } }

/* ---------- Summary bar ---------- */
.summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 18px 22px;
  border-radius: var(--r-md);
  background: rgba(253, 108, 29, 0.07);
  border: 1px solid rgba(253, 108, 29, 0.3);
  margin-bottom: 20px;
}
.summary__what { font-size: 14px; color: var(--fg-80); }
.summary__what b { color: var(--fg); font-weight: 500; }
.summary__amount { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.summary__amount span { font-size: 12px; color: var(--fg-40); letter-spacing: 0; }

/* ---------- Letter ---------- */
.letter {
  max-height: 46vh;
  overflow-y: auto;
  padding: 26px 26px 22px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid var(--fg-10);
  border-radius: var(--r-md);
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--fg-60);
  scroll-behavior: smooth;
}
.letter h2 { margin: 0 0 14px; font-size: 15px; font-weight: 700; letter-spacing: 0.02em; color: var(--fg); }
.letter h3 { margin: 20px 0 5px; font-size: 13.5px; font-weight: 500; color: var(--fg-80); }
.letter p { margin: 0 0 10px; }
.letter__meta { margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--fg-10); font-size: 12.5px; }
.letter__meta div { color: var(--fg-40); }
.letter__meta b { color: var(--fg-60); font-weight: 400; }
.letter__ack { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--fg-10); color: var(--fg-80); }

/* ---------- Signature pad ---------- */
.sigwrap { margin-top: 20px; }
.sigwrap__label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sigwrap__label span { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-60); }
.sigwrap__clear {
  appearance: none; border: 0; background: none; font: inherit;
  font-size: 12px; color: var(--fg-40); cursor: pointer; text-decoration: underline;
}
.sigwrap__clear:hover { color: var(--fg-80); }
.sigpad {
  width: 100%;
  height: 150px;
  display: block;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--fg-10);
  border-radius: var(--r-sm);
  cursor: crosshair;
  touch-action: none;
}

/* ---------- Checkbox ---------- */
.check { display: flex; gap: 11px; align-items: flex-start; margin-top: 18px; font-size: 13.5px; color: var(--fg-60); cursor: pointer; }
.check input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }

/* ---------- Status ---------- */
.err {
  margin-top: 16px;
  padding: 12px 15px;
  border-radius: var(--r-sm);
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #ffc9c9;
  font-size: 13.5px;
}
.note { margin-top: 18px; font-size: 12.5px; color: var(--fg-40); line-height: 1.55; }
.note a { color: var(--fg-60); }

.locked {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; padding: 13px 16px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--fg-10);
  font-size: 13px; color: var(--fg-60);
}
.locked b { color: var(--fg-80); font-weight: 500; }

/* ---------- Done ---------- */
.done { text-align: center; padding: 40px 0 20px; }
.done__tick {
  width: 60px; height: 60px; margin: 0 auto 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: var(--ok);
  font-size: 26px;
}
.done__facts { display: grid; gap: 10px; margin: 28px auto 0; max-width: 460px; text-align: left; }
.done__fact {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  background: var(--glass);
  border: 1px solid var(--fg-10);
  font-size: 13px;
}
.done__fact span { color: var(--fg-40); }
.done__fact b { font-weight: 500; word-break: break-all; text-align: right; }

.skeleton { color: var(--fg-40); padding: 60px 0; text-align: center; }
[hidden] { display: none !important; }
