/* Additive state layer: current upstream waitlist/home CSS remains untouched. */

/* A local fallback with Switzer's advance widths and line box, so the web font swap does not rewrap or nudge text. */
@font-face { font-family: 'Switzer Fallback'; src: local('Arial'); size-adjust: 101.5%; ascent-override: 96.6%; descent-override: 24.8%; line-gap-override: 9.6%; }
:root { --waitlist-error: #803d29; --waitlist-field-line: #938f86; --waitlist-ease: cubic-bezier(.2, .7, .3, 1); }
/* Scoped to the waitlist shell: this sheet stays loaded after a soft navigation back to the homepage. */
.waitlist-header, .waitlist-layout { --font-body: 'Switzer', 'Switzer Fallback', 'Helvetica Neue', Arial, sans-serif; --font-display: var(--font-body); font-family: var(--font-body); }

/* Shared stage: /waitlist and /waitlist/success keep one header, card, record and heading origin. */
.waitlist-intro { position: relative; background: var(--accent-soft); }
.waitlist-intro h1 { font-size: clamp(34px, 4.3vw, 58px); letter-spacing: -.05em; }
.waitlist-intro p { max-width: 312px; }
/* The homepage's dot-matrix record, bleeding off the card corner behind the copy.
   It is layered twice so the dots hold on the tinted panel as they do on the white hero. */
.record-sleeve { display: block; position: absolute; z-index: -1; right: -34%; bottom: -30%; width: 118%; height: auto; aspect-ratio: 520 / 460; margin: 0; padding: 0; pointer-events: none; }
.sleeve-record { inset: 0; width: auto; aspect-ratio: auto; border-radius: 0; background: url("/media/dot-vinyl.svg") center / 100% 100% no-repeat, url("/media/dot-vinyl.svg") center / 100% 100% no-repeat; box-shadow: none; transform-origin: 52.9% 49.3%; }
.sleeve-record::before, .sleeve-record i { display: none; }
@media (min-width: 721px) {
  /* The stage sits in the middle of the viewport when it fits; both columns share one centre line. */
  .waitlist-layout { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(40px, 7vw, 104px); align-items: center; min-height: calc(100vh - 84px); min-height: calc(100svh - 84px); padding-block: 24px 64px; }
  /* Heights are set here, not by the copy, so nothing moves between the two routes. */
  .waitlist-intro { height: clamp(480px, min(50vw, 100vh - 220px), 600px); }
  .application { min-height: 456px; padding-block: 0; }
}

/* Form */
.application h2 { font-size: 32px; letter-spacing: -.045em; }
.availability { margin-top: 10px; font-size: 16px; }
#waitlist-form { gap: 18px; margin-top: 30px; }
#waitlist-form[hidden] { display: none; }
.has-waitlist-receipt #waitlist-form { visibility: hidden; }
.field { display: grid; gap: 8px; font-size: 14px; font-weight: 500; line-height: 1.4; }
.field input, .field textarea { min-height: 52px; margin-top: 0; padding: 14px 16px; border-color: var(--waitlist-field-line); border-radius: 14px; background: var(--paper); color: var(--ink); line-height: 1.4; transition: border-color 160ms ease, box-shadow 160ms ease; }
.field :is(input, textarea)::placeholder { color: #8b8f94; opacity: 1; }
.field :is(input, textarea):hover { border-color: var(--sand-ink); }
.field :is(input, textarea):focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-color: var(--focus); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input[aria-invalid="true"] { border-color: var(--waitlist-error); box-shadow: 0 0 0 1px var(--waitlist-error); }
.field input[aria-invalid="true"]:focus-visible { outline-color: var(--waitlist-error); box-shadow: 0 0 0 4px #f6e9e4; }
.field-hint { min-height: 20px; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 20px; }
.field-hint.is-error { color: var(--waitlist-error); }
/* The note is optional: quieter label, two rows, clearly secondary to the email and the button. */
.field-quiet { gap: 6px; color: var(--muted); font-size: 13px; font-weight: 400; }
.field-quiet .optional { margin-left: 4px; font-size: inherit; }
.field-quiet textarea { min-height: 74px; padding-block: 13px; }
.form-actions { display: grid; gap: 10px; justify-items: start; margin-top: 6px; }
.apply-button, .success-application .launch-link { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 13px 22px; border-radius: 999px; color: var(--ink); font: 500 14px/1.4 var(--font-body); text-decoration: none; transition: background-color 160ms var(--waitlist-ease), color 160ms var(--waitlist-ease); }
/* The homepage CTA: solid at rest, before hydration and while sending. */
.apply-button, .apply-button:disabled { background: var(--accent); color: var(--ink); }
.apply-button { min-width: 168px; cursor: pointer; }
.apply-button:disabled { cursor: default; }
.apply-button::after, .success-application .launch-link::before { content: ''; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--waitlist-arrow) center/contain no-repeat; mask: var(--waitlist-arrow) center/contain no-repeat; transition: transform 160ms var(--waitlist-ease); }
.apply-button, .success-application .launch-link { --waitlist-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6'/%3E%3C/svg%3E"); }
.apply-button:hover:enabled { background: var(--accent-hover); }
.apply-button:focus-visible, .success-application .launch-link:focus-visible { outline-offset: 4px; }
.apply-button.is-busy { cursor: progress; }
.apply-button.is-busy::after { background: radial-gradient(circle, currentColor 1.3px, transparent 1.5px) 0 0/6px 6px; -webkit-mask: none; mask: none; animation: waitlist-busy 900ms ease-in-out infinite; }
.form-status { min-height: 40px; line-height: 20px; }
.form-status:empty { display: block; }
@keyframes waitlist-busy { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* Confirmation: the card confirms, the column says what happens next. */
.success-steps { display: grid; gap: 28px; margin: 34px 0 0; padding: 0; list-style: none; counter-reset: waitlist-step; }
.success-steps li { position: relative; min-height: 28px; padding-left: 46px; color: #49525a; font-size: 17px; line-height: 1.55; counter-increment: waitlist-step; }
.success-steps li::before { content: counter(waitlist-step); position: absolute; top: -1px; left: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font: 500 13px/28px var(--font-body); text-align: center; }
.success-steps li:not(:last-child)::after { content: ''; position: absolute; top: 36px; bottom: -20px; left: 12px; width: 4px; background: radial-gradient(circle, var(--accent) 1.5px, transparent 1.7px) center top/4px 8px repeat-y; }
.success-application .launch-link { margin-top: 40px; background: var(--sand); }
.success-application .launch-link::before { transform: scaleX(-1); }
.success-application .launch-link:hover { background: #c9c3b5; }
/* One pass on a new accepted transition only: the record settles with a single turn while a
   halftone ripple leaves it. Transform and opacity alone, clipped by the card, resting frame unchanged. */
.is-celebrating .sleeve-record { animation: waitlist-turn 1300ms var(--waitlist-ease) both; }
.is-celebrating .record-sleeve::before, .is-celebrating .record-sleeve::after { content: ''; position: absolute; top: 49.3%; left: 52.9%; width: 240%; aspect-ratio: 1; margin: -120% 0 0 -120%; border-radius: 50%; background: radial-gradient(circle, var(--accent) 2px, transparent 2.3px) 0 0/11px 11px; -webkit-mask-image: radial-gradient(closest-side, transparent 58%, #000 68% 82%, transparent 96%); mask-image: radial-gradient(closest-side, transparent 58%, #000 68% 82%, transparent 96%); opacity: 0; animation: waitlist-ripple 1200ms var(--waitlist-ease) both; }
.is-celebrating .record-sleeve::after { animation-delay: 240ms; }
@keyframes waitlist-turn { from { transform: rotate(-32deg); } to { transform: rotate(0deg); } }
@keyframes waitlist-ripple { 0% { opacity: 0; transform: scale(.14); } 22% { opacity: .9; } 100% { opacity: 0; transform: scale(1); } }

@media (hover: hover) {
  .apply-button:hover:enabled::after { transform: translateX(2px); }
  .success-application .launch-link:hover::before { transform: scaleX(-1) translateX(2px); }
}
@media (max-width: 720px) {
  .waitlist-intro h1 { font-size: clamp(30px, 9.5vw, 44px); }
  /* A fixed measure and a reserved block keep the card the same height on both routes. */
  .waitlist-intro p { max-width: 228px; min-height: 112.5px; margin-top: 16px; font-size: 15px; line-height: 1.5; }
  /* The record keeps clear of the copy on a narrow card and follows the corner on a wide one. */
  .record-sleeve { --waitlist-record: max(320px, 56vw); top: calc(100% - 36px - .436 * var(--waitlist-record)); right: auto; bottom: auto; left: max(198px, calc(100% - .475 * var(--waitlist-record))); width: var(--waitlist-record); }
  .application h2 { font-size: 28px; }
  .success-steps li { font-size: 16px; }
  .apply-button, .success-application .launch-link { width: 100%; }
}
@media (min-width: 481px) and (max-width: 720px) {
  .waitlist-intro p { max-width: 312px; min-height: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .is-celebrating .sleeve-record, .is-celebrating .record-sleeve::before, .is-celebrating .record-sleeve::after, .apply-button.is-busy::after { animation: none; }
  .apply-button:hover:enabled::after { transform: none; }
  .success-application .launch-link:hover::before { transform: scaleX(-1); }
}
@media (forced-colors: active) {
  .record-sleeve { display: none; }
  .field input, .field textarea { border-color: FieldText; }
  .apply-button::after, .apply-button.is-busy::after, .success-application .launch-link::before { background: ButtonText; }
  .success-application .launch-link { border: 1px solid ButtonText; }
  .success-steps li::before { border: 1px solid CanvasText; }
}
