/* NewForm — Casting Self-Tape Form
   Ported from the Claude Design component "Casting Self-Tape Form.dc.html".
   Design tokens lifted from the NewForm design system (colors_and_type.css). */

:root {
  --font-sans: "Rethink Sans", "Geist", -apple-system, "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --font-display: "Fraunces", "Newsreader", Georgia, serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --ink: #0E0E10;
  --ink-2: #2A2A2E;
  --mute: #6B6B72;
  --faint: #A8A399;
  --paper: #F6F4EF;
  --accent: #5E2BFF;
  --line: rgba(14, 14, 16, .12);
  --error: #C0392B;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.nf-root {
  position: relative;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

.nf-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(48% 38% at 88% 8%, rgba(94, 43, 255, .10), transparent 70%);
}

.nf-wrap {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 84px 28px 110px;
}

/* ---- Masthead ---- */
.nf-masthead { margin-bottom: 0; }

.nf-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
}
.nf-kicker--gap { margin-bottom: 24px; }

.nf-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--accent);
}

.nf-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 57px;
  line-height: 1.0;
  letter-spacing: -0.032em;
  margin: 0 0 30px;
}
.nf-title--success {
  font-size: 60px;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  white-space: normal;
  text-wrap: balance;
}

.nf-wordmark {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.08em;
  margin-right: 0.28em;
  vertical-align: -0.02em;
  color: var(--ink);
}

.nf-em { font-style: italic; color: var(--accent); }

.nf-lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  margin: 0;
}
.nf-lede--success {
  font-size: 24px;
  max-width: 32ch;
  margin: 0 0 36px;
}

.nf-meta-row {
  margin-top: 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  padding-bottom: 16px;
}

/* Force the asterisk to render in a font that has a text glyph for it —
   otherwise iOS substitutes Apple Color Emoji (the green star) and ignores color. */
.nf-req {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  vertical-align: middle;
}
/* Nudge the star up so it optically centers next to the label/note text. */
.nf-label .nf-req { position: relative; top: -2px; }
.nf-required-note .nf-req { position: relative; top: -2px; }
.nf-optional { font-size: 14px; font-weight: 400; color: var(--faint); }

.nf-required-note {
  margin: 34px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ---- Question block ---- */
.nf-q {
  display: flex;
  gap: 28px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
/* Closing divider under the last question. */
.nf-q--last { border-bottom: 1px solid var(--line); }

.nf-qnum {
  flex: none;
  width: 42px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding-top: 4px;
}

.nf-qbody { flex: 1; min-width: 0; }

.nf-label {
  display: block;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
}
.nf-label--spaced { margin-bottom: 18px; }

.nf-help {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--mute);
}
.nf-help--tight { margin: 0 0 18px; }
.nf-italic-ink { font-style: italic; color: var(--ink-2); }

/* ---- Text fields ---- */
.nf-fld {
  width: 100%;
  padding: 10px 0;
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--ink);
  border: none;
  border-bottom: 1.5px solid rgba(14, 14, 16, .22);
  outline: none;
  -webkit-appearance: none;
  background: transparent;
}
.nf-fld::placeholder { color: #ADA89B; }
.nf-fld:focus { border-bottom-color: var(--accent); }

.nf-err {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--error);
}
.nf-err:empty { display: none; }
.nf-err--form { margin-top: 18px; }

/* ---- Radios ---- */
.nf-radios { display: flex; flex-direction: column; }

.nf-radio {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-2);
}
.nf-radio:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.nf-radio-dot {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1.5px solid #B3B3B3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nf-radio[aria-checked="true"] .nf-radio-dot { border-color: var(--accent); }
.nf-radio[aria-checked="true"] .nf-radio-dot::after {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent);
}

/* ---- Self-tape spec list ---- */
.nf-vq {
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  counter-reset: vq;
}
.nf-vq li {
  counter-increment: vq;
  position: relative;
  padding: 0 0 12px 34px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}
.nf-vq li:last-child { padding-bottom: 0; }
.nf-vq li::before {
  content: "0" counter(vq);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

/* ---- File drop ---- */
.nf-drop-label { display: block; cursor: pointer; }
.nf-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.nf-drop {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1.5px dashed rgba(14, 14, 16, .26);
  background: rgba(94, 43, 255, .02);
  transition: border-color .2s ease, background .2s ease;
}
.nf-drop-label:hover .nf-drop,
.nf-file-input:focus-visible + .nf-drop {
  border-color: var(--accent);
  background: rgba(94, 43, 255, .05);
}

.nf-drop-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(94, 43, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nf-drop-text { min-width: 0; }
.nf-drop-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nf-drop-sub { font-size: 14px; color: var(--mute); margin-top: 4px; }
.nf-drop-replace {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 4px;
}

/* ---- Progress ---- */
.nf-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 30px 0 0;
  border-top: 1px solid var(--line);
}
.nf-progress-track {
  flex: 1;
  height: 3px;
  background: rgba(14, 14, 16, .1);
  overflow: hidden;
}
.nf-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width .3s var(--ease-out);
}
.nf-progress-text {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mute);
}

/* ---- Turnstile ---- */
.nf-turnstile {
  margin-top: 40px;
  display: flex;
  justify-content: flex-start;
}
.nf-turnstile:empty { display: none; }

/* ---- Consent ---- */
.nf-consent {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--mute);
}
.nf-consent a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nf-consent a:hover { color: var(--ink); }

/* ---- Actions ---- */
.nf-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.nf-submit {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 15px 30px;
  cursor: pointer;
  transition: background .2s ease;
}
.nf-submit:hover { background: var(--accent); }
.nf-submit:disabled { opacity: .55; cursor: progress; }

.nf-clear {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nf-clear:hover { color: var(--ink); }

.nf-colophon {
  margin-top: 48px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  border-top: 1px solid rgba(14, 14, 16, .1);
  padding-top: 20px;
}
.nf-colophon a { color: var(--faint); text-decoration: underline; text-underline-offset: 2px; }
.nf-colophon a:hover { color: var(--accent); }
.nf-colophon--success { margin-top: 40px; }

/* ---- Success ---- */
.nf-success { animation: nfUp .45s var(--ease-out) both; padding-top: 40px; }
.nf-success-check {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(94, 43, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

@keyframes nfUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .nf-wrap { padding: 56px 20px 80px; }
  .nf-title { font-size: 40px; white-space: normal; }
  .nf-title--success { font-size: 42px; }
  .nf-lede { font-size: 22px; }
  .nf-q { gap: 16px; }
  .nf-qnum { width: 28px; }
}
