/* Swing Lab registration — shares the Protocol / Studio visual system from
   site/styles.css: warm paper, hairline rules, mono labels, Space Grotesk
   headings, Inter body copy, and cobalt accent. */

:root {
  --paper: #f3f1eb;
  --paper-2: #ddd9ce;
  --card: #ffffff;
  --ink: #121212;
  --ink-2: #333333;
  --mute: #6b6b66;
  --line: #cfccc3;
  --line-strong: #b8b4a8;
  --accent: #1f3dff;
  --accent-deep: #1529cc;
  --accent-soft: rgba(31, 61, 255, 0.06);
  --danger: #b42318;
  --danger-bg: rgba(180, 35, 24, 0.06);
  --danger-border: rgba(180, 35, 24, 0.35);

  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --disp: "Space Grotesk", var(--sans);
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 2px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-tap-highlight-color: rgba(31, 61, 255, 0.2);
}

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

@media (pointer: fine) {
  body {
    overscroll-behavior: none;
  }
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

h1,
h2,
h3 {
  font-family: var(--disp);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ink);
  padding: 11px 20px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
}

.btn:hover,
.btn:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.btn--fill {
  background: var(--ink);
  color: var(--paper);
}

.btn--fill:hover,
.btn--fill:focus-visible {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn--accent:hover,
.btn--accent:focus-visible {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #ffffff;
}

/* ---------- Nav (matches site/styles.css) ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 9;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand span {
  color: var(--accent);
}

.nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: 14px;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--accent-deep);
}

/* ---------- Event Hero ---------- */

.event-hero {
  padding: 56px 0 48px;
}

.event-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 48px;
  align-items: center;
}

.event-hero__copy {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.event-hero__eyebrow {
  color: var(--accent-deep);
}

.event-hero h1 {
  font-size: clamp(44px, 6vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.event-hero h1 span {
  color: var(--accent);
}

.event-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.event-hero__frame {
  border: 1px solid var(--line-strong);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--paper-2);
}

.event-hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

/* ---------- Page Body ---------- */

.page {
  padding-bottom: 84px;
}

.page--narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 32px 84px;
}

.page__rule {
  border-top: 1px solid var(--line);
  padding-top: 56px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: start;
}

/* ---------- Left column: Event details ---------- */

.info {
  display: grid;
  gap: 48px;
}

/* Workshops list */

.classes {
  list-style: none;
}

.class-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.class-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.class-row__name {
  flex: 1 1 12rem;
  font-family: var(--disp);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.class-row__meta {
  flex: none;
  font-size: 14px;
  white-space: nowrap;
  color: var(--accent-deep);
}

.class-row__note {
  font-size: 14px;
  color: var(--mute);
}

.class-row__desc {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 46ch;
}

/* Location */

.venue {
  margin-top: 36px;
  display: grid;
  gap: 16px;
  max-width: 52ch;
  padding-top: 24px;
}

.venue__heading {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.venue__text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.venue__text strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.venue__price {
  display: grid;
  gap: 8px;
}

.venue__price > strong {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.venue__price ul {
  list-style: none;
  border-top: 1px solid var(--line);
}

.venue__price li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.venue__price b {
  flex: none;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}

.venue__price > p {
  font-size: 13px;
  color: var(--mute);
}

.venue__notes {
  list-style: none;
  display: grid;
  gap: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.venue__notes li {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.venue__notes li:last-child {
  border-bottom: 1px solid var(--line);
}

.venue__notes strong {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.venue__notes span {
  display: block;
}

.venue a {
  color: var(--accent-deep);
  font-weight: 500;
  text-decoration: none;
}

.venue a:hover,
.venue a:focus-visible {
  color: var(--ink);
}

/* ---------- Right column: Registration card ---------- */

.register {
  position: sticky;
  top: 84px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 32px;
}

.intro {
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

.intro strong {
  color: var(--ink);
  font-weight: 500;
}

/* Fieldsets */

.form-section {
  border: 0;
  margin: 0 0 26px;
  padding: 0;
  transition: opacity 0.15s ease;
}

.form-section:disabled {
  opacity: 0.42;
}

.form-section legend {
  width: 100%;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.req {
  color: var(--accent-deep);
}

.opt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mute);
  margin-left: 6px;
}

/* Inputs */

.field {
  margin-bottom: 16px;
}

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

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, background-color 0.15s ease;
  appearance: none;
  touch-action: manipulation;
}

input::placeholder {
  color: var(--mute);
}

input[type="text"]:focus-visible,
input[type="email"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  background: var(--card);
}

input.input-error {
  border-color: var(--danger);
}

.help {
  margin-top: 6px;
  font-size: 13px;
  color: var(--mute);
  line-height: 1.45;
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--danger);
}

/* Radio options */

.options {
  display: grid;
  gap: 8px;
}

.options--row {
  grid-template-columns: repeat(3, 1fr);
}

.options--error {
  padding: 6px;
  margin: -6px;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
}

.option {
  display: block;
  cursor: pointer;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.options--row .option__body {
  justify-content: center;
  padding: 11px 10px;
}

.option:hover .option__body {
  background: var(--card);
  border-color: var(--ink);
}

.option input:checked + .option__body {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option input:focus-visible + .option__body {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.option.is-sold-out,
.workshop-option.is-sold-out > .option {
  cursor: not-allowed;
}

.option.is-sold-out .option__body,
.workshop-option.is-sold-out > .option .option__body {
  opacity: 0.5;
}

.option__title {
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.option__price {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-deep);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.workshop-option {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  border: 1px solid var(--line-strong);
  border-top: 0;
}

.workshop-table-head {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.workshop-table-head span:last-child {
  padding-left: 12px;
}

.workshop-option > .option .option__body {
  height: 100%;
  border: 0;
  border-radius: 0;
}

.workshop-role {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-left: 1px solid var(--line-strong);
  background: var(--paper);
  opacity: 0.42;
}

.workshop-role:not(:disabled) {
  opacity: 1;
  background: var(--accent-soft);
}

.workshop-solo {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 12px;
  border-left: 1px solid var(--line-strong);
  color: var(--mute);
}

.workshop-role > label:not(.workshop-partner) {
  position: relative;
  min-width: 0;
  padding: 8px 2px;
  font-size: 12px;
  text-align: center;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  cursor: pointer;
}

.workshop-role > label:not(.workshop-partner):has(input:checked) {
  border-color: var(--accent);
  background: rgba(31, 61, 255, 0.1);
}

.workshop-role input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.workshop-role > label:not(.workshop-partner):has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.workshop-partner {
  grid-column: 1 / -1;
  display: block;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.workshop-partner > span {
  display: none;
}

.workshop-partner input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.payment-options label {
  position: relative;
  cursor: pointer;
}

.payment-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-options label > span {
  display: grid;
  gap: 4px;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.payment-options input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.payment-options input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.payment-options strong {
  font-size: 14px;
  font-weight: 500;
}

.payment-options small,
.payment-balance {
  font-size: 12px;
  line-height: 1.4;
  color: var(--mute);
}

.payment-balance {
  margin-top: 8px;
  text-align: right;
}

@media (max-width: 760px) {
  .workshop-table-head {
    display: none;
  }

  .workshop-option {
    grid-template-columns: 1fr;
    border-top: 1px solid var(--line-strong);
  }

  .workshop-role {
    grid-template-columns: repeat(3, 1fr);
    border-left: 0;
    border-top: 1px solid var(--line-strong);
  }

  .workshop-solo {
    border-left: 0;
    border-top: 1px solid var(--line-strong);
  }

  .workshop-partner {
    grid-column: 1 / -1;
  }

  .workshop-partner > span {
    display: block;
    margin-bottom: 6px;
  }

  .payment-options {
    grid-template-columns: 1fr;
  }
}

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

/* Stripe Card Element */

#card-element {
  padding: 13px 14px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

#card-element.StripeElement--focus {
  border-color: var(--accent);
  background: var(--card);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#card-element.StripeElement--invalid {
  border-color: var(--danger);
}

/* Total bar */

.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}

.total__amount {
  font-family: var(--disp);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Submit button */

#submit-button {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
}

#submit-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Notices */

.notice {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
}

.notice.error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.notice.info {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}

.notice--closed {
  margin-top: 0;
  padding: 24px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.notice--closed__tag {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--mute);
}

.notice--closed h2 {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--ink);
}

.notice--closed p {
  font-size: 14px;
  color: var(--ink-2);
  max-width: 40ch;
}

/* Legal & card footer */

.legal {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--mute);
}

.legal a,
.card__footer a,
.result a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal a:hover,
.legal a:focus-visible,
.card__footer a:hover,
.card__footer a:focus-visible,
.result a:hover,
.result a:focus-visible {
  color: var(--ink);
}

.card__footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--mute);
}

/* ---------- Success page ---------- */

.result {
  display: grid;
  gap: 18px;
}

.result__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  background: var(--accent-soft);
}

.result h1 {
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.05;
}

.result__lede {
  font-size: 15px;
  color: var(--ink-2);
}

.result__lede strong {
  color: var(--ink);
  font-weight: 500;
}

.summary {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.summary__row:last-child {
  border-bottom: 0;
}

.summary dt {
  color: var(--mute);
}

.summary dd {
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

.steps {
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- Footer (matches site/styles.css) ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
}

.footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 80px;
}

.footer__col ul {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.footer__col a {
  font-size: 15px;
  color: var(--ink-2);
}

.footer__col a:hover,
.footer__col a:focus-visible {
  color: var(--accent-deep);
}

.wordmark {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(72px, 13vw, 180px);
  letter-spacing: -0.05em;
  line-height: 0.85;
  margin-top: 40px;
  color: var(--ink);
  pointer-events: none;
}

.wordmark span {
  color: var(--accent);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .event-hero__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .register {
    position: static;
  }
}

@media (max-width: 760px) {
  .wrap {
    padding: 0 20px;
  }

  .page--narrow {
    padding: 40px 20px 64px;
  }

  .nav__links {
    display: none;
  }

  .event-hero {
    padding: 36px 0 32px;
  }

  .page__rule {
    padding-top: 36px;
  }

  .card {
    padding: 24px 20px;
  }

  .options--row {
    grid-template-columns: 1fr;
  }

  .class-row__main {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .class-row__name {
    flex: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
