/* The Recording Club: membership application (/apply), 2026-11-18.
   Uses site.css tokens only. Signature: the progress rule, with the red
   record dot riding its tip (the page's one statement red). */

.apply-main { min-height: 100svh; }
.apply-intro[hidden], .apply-flow[hidden], .apply-done[hidden], .apply-return[hidden], .apply-step[hidden] { display: none; }

/* ---------- intro: the photograph is the section ---------- */
.apply-intro { position: relative; overflow: hidden; min-height: 100svh; display: flex; align-items: flex-end; }
.apply-intro .stage-photo { object-position: 50% 40%; }
.apply-intro-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,9,8,0.62) 0%, rgba(10,9,8,0.1) 26%, rgba(10,9,8,0.55) 58%, rgba(10,9,8,0.96) 100%),
    linear-gradient(90deg, rgba(10,9,8,0.7) 0%, rgba(10,9,8,0.2) 60%, rgba(10,9,8,0) 100%);
}
.apply-intro-inner {
  position: relative; z-index: 2;
  padding: clamp(140px, 20vh, 220px) var(--pad) clamp(56px, 10vh, 120px);
  padding-bottom: max(clamp(56px, 10vh, 120px), env(safe-area-inset-bottom));
  max-width: min(100%, 980px);
}
.apply-intro h1 { margin-bottom: 22px; max-width: 14ch; }
.apply-intro-lede { color: rgba(238,238,238,0.86); max-width: 36em; margin-bottom: 30px; }
.apply-parts {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px;
  margin-bottom: 38px; counter-reset: part;
}
.apply-parts li {
  counter-increment: part;
  font-size: var(--t-micro); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(238,238,238,0.78);
}
.apply-parts li::before { content: counter(part); margin-inline-end: 0.7em; color: var(--ink-low); font-variant-numeric: tabular-nums; }
.apply-intro-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.apply-intro-actions .inq-hint { color: rgba(238,238,238,0.78); }

/* ---------- the flow ---------- */
.apply-flow { padding: clamp(110px, 15vh, 170px) var(--pad) clamp(64px, 10vh, 120px); }
.apply-wrap { max-width: 640px; margin: 0 auto; min-width: 0; }

.apply-progress { margin: -6px -6px clamp(30px, calc(6vh - 6px), 50px); padding: 6px; overflow: hidden; }
.apply-progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.apply-step-count {
  font-size: var(--t-micro); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mid); font-variant-numeric: tabular-nums;
}
.apply-save { font-size: var(--t-small); color: var(--ink-mid); font-variant-numeric: tabular-nums; min-height: 1.5em; }
.apply-save.is-error { color: var(--ink); }
.apply-save button { background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; border-bottom: 1px solid var(--hairline); padding: 0 0 1px; margin-inline-start: 6px; }
.apply-bar { position: relative; height: 1px; background: var(--hairline); }
.apply-bar-fill {
  position: absolute; left: 0; top: 0; height: 1px; width: 100%;
  background: var(--ink); transform-origin: 0 50%; transform: scaleX(0.2);
  transition: transform 0.6s cubic-bezier(0.19,1,0.22,1);
}
.apply-bar-dot {
  position: absolute; inset: 0; pointer-events: none;
  transform: translateX(calc(var(--p, 0.2) * 100%));
  transition: transform 0.6s cubic-bezier(0.19,1,0.22,1);
}
.apply-bar-dot::after {
  content: ""; position: absolute; top: 50%; left: 0;
  inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--red);
  transform: translate(-50%, -50%);
}
@media (prefers-reduced-motion: reduce) { .apply-bar-fill, .apply-bar-dot { transition: none; } }


.apply-step-head { margin-bottom: clamp(34px, 5vh, 48px); }
.apply-step-head h2 { margin-bottom: 14px; }
.apply-step-head p { color: var(--ink-mid); max-width: 34em; }

.apply-q { display: grid; gap: 10px; margin-bottom: 38px; border: 0; min-width: 0; }
.apply-q > label, .apply-q > legend {
  font-family: var(--display); font-weight: 200; font-size: var(--t-sub); line-height: 1.35;
  color: var(--ink); padding: 0;
}
.apply-q > legend { margin-bottom: 10px; }
.apply-q .apply-opt { font-size: var(--t-small); color: var(--ink-low); letter-spacing: 0.02em; margin-inline-start: 0.5em; font-family: var(--body); font-weight: 400; }
.apply-q .inq-hint { max-width: 40em; }
.apply-q .apply-caliber { color: var(--ink-mid); border-left: 1px solid var(--hairline); padding-left: 14px; }

.apply-q input[type="text"], .apply-q input[type="email"], .apply-q input[type="tel"], .apply-q input[type="url"], .apply-q textarea {
  width: 100%; border: 1px solid var(--hairline); border-radius: 0;
  background: rgba(255,255,255,0.03); color: var(--ink);
  font-family: var(--body); font-weight: 400; font-size: 16px; line-height: 1.5;
  padding: 13px 14px; min-height: 48px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.apply-q textarea { resize: vertical; min-height: 120px; }
.apply-q input:hover, .apply-q textarea:hover { border-color: rgba(255,255,255,0.28); }
.apply-q input:focus, .apply-q textarea:focus { border-color: var(--ink-mid); background: rgba(255,255,255,0.05); }
.apply-q [aria-invalid="true"] { border-color: var(--red); }
.apply-q input::placeholder, .apply-q textarea::placeholder { color: var(--ink-low); }
.apply-q > label.apply-sub { font-family: var(--body); font-size: var(--t-micro); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mid); margin-top: 6px; }

.apply-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; min-height: 44px; }
.apply-mic {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  background: none; border: 1px solid var(--hairline); color: var(--ink);
  padding: 0 16px 0 12px; cursor: pointer;
  font-family: var(--body); font-size: var(--t-micro); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.apply-mic:hover { border-color: var(--ink-mid); }
.apply-mic .mk { --s: 16px; }
.apply-mic .mk::after { inline-size: calc(var(--s) * 0.1535); block-size: calc(var(--s) * 0.1535); background: var(--ink); }
.apply-mic[aria-pressed="true"] { border-color: var(--ink); background: rgba(255,255,255,0.06); }
.apply-mic[aria-pressed="true"] .mk::after { inline-size: calc(var(--s) * 0.5); block-size: calc(var(--s) * 0.5); background: var(--red); animation: trc-breathe 1.6s ease-in-out infinite; }
.apply-mic[disabled] { opacity: 0.5; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .apply-mic[aria-pressed="true"] .mk::after { animation: none; } }
.apply-field-save { font-size: var(--t-small); color: var(--ink-low); font-variant-numeric: tabular-nums; }
.apply-live { font-size: var(--t-small); color: var(--ink-mid); font-style: italic; min-height: 0; }
.apply-live:empty { display: none; }
.apply-count { font-size: var(--t-small); color: var(--ink-low); font-variant-numeric: tabular-nums; }

/* choice pills: real radios and checkboxes, the label is the target */
.apply-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.apply-choice { position: relative; }
.apply-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.apply-choice span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  border: 1px solid var(--hairline); color: var(--ink-mid); background: rgba(255,255,255,0.02);
  font-size: 15px; letter-spacing: 0.03em; cursor: pointer; user-select: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.apply-choice:hover span { border-color: rgba(255,255,255,0.32); color: var(--ink); }
.apply-choice input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.apply-choice input:focus-visible + span { outline: 1px solid var(--blue); outline-offset: 3px; }
.apply-q[aria-invalid="true"] .apply-choice span, fieldset.apply-q.is-invalid .apply-choice span { border-color: rgba(240,50,34,0.7); }

.apply-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; padding-top: 30px; border-top: 1px solid var(--hairline); }
.apply-nav .submit { min-height: 48px; }
.apply-nav .submit[disabled] { opacity: 0.6; cursor: progress; }
.apply-back { min-height: 48px; }
.apply-back[hidden] { display: none; }
.apply-nav .apply-back[hidden] + .submit { margin-inline-start: auto; }
.apply-return { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.apply-copy { background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font-family: var(--body); min-height: 32px; }

/* ---------- done ---------- */
.apply-done { padding: clamp(130px, 18vh, 200px) var(--pad) clamp(70px, 10vh, 120px); }
.apply-done:focus { outline: none; }
.apply-done-title { margin-bottom: 20px; }
.apply-done-lede { margin-bottom: clamp(40px, 6vh, 60px); max-width: 32em; }
.apply-recap { border: 1px solid var(--hairline); padding: clamp(24px, 4vw, 40px); background: rgba(255,255,255,0.02); }
.apply-recap .register dd { color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.apply-done-foot { margin-top: 40px; }

@media (max-width: 760px) {
  .apply-flow { padding-top: 104px; }
  .apply-intro h1 { font-size: clamp(38px, 11vw, 58px); }
  .apply-q { margin-bottom: 32px; }
  .apply-choice span { padding: 0 16px; }
}
