:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #21171d;
  background: #f6d243;
  --brand-yellow: #f6d243;
  --brand-orange: #ff7300;
  --brand-ink: #21171d;
  --brand-cream: #fff7df;
  --brand-white: #ffffff;
  --brand-shadow: rgba(33, 23, 29, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--brand-yellow);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.scan-display {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 40px);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.34), transparent 28%),
    radial-gradient(circle at 86% 82%, rgba(255, 115, 0, 0.18), transparent 34%),
    var(--brand-yellow);
}

.scan-hero {
  width: min(1120px, 100%);
  min-height: min(780px, calc(100vh - 48px));
  display: grid;
  align-content: space-between;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(22px, 5vw, 64px);
  border: 5px solid var(--brand-ink);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 247, 223, 0.88), rgba(246, 210, 67, 0.72)),
    var(--brand-yellow);
  box-shadow: 16px 16px 0 var(--brand-ink), 0 28px 80px var(--brand-shadow);
  overflow: hidden;
  position: relative;
}

.scan-hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -90px auto;
  width: 310px;
  height: 310px;
  border: 5px solid rgba(33, 23, 29, 0.16);
  border-radius: 999px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.brand-lockup img {
  width: clamp(76px, 12vw, 128px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 999px;
  background: var(--brand-yellow);
}

.eyebrow,
.kicker {
  margin: 0;
  color: var(--brand-orange);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-name {
  margin: 4px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 900;
}

.scan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  position: relative;
  z-index: 1;
}

.scan-copy {
  max-width: 620px;
}

h1 {
  margin: 14px 0 0;
  max-width: 650px;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-wrap: balance;
}

.intro {
  max-width: 560px;
  margin: 24px 0 0;
  color: rgba(33, 23, 29, 0.78);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.intro.compact {
  max-width: 520px;
  margin-top: 18px;
}

.details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 40px;
  border: 1px solid rgba(20, 33, 61, 0.14);
  background: rgba(20, 33, 61, 0.14);
}

.details div {
  min-width: 0;
  padding: 18px;
  background: #ffffff;
}

.details span {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 0.82rem;
}

.details strong {
  display: block;
  overflow-wrap: anywhere;
}

.qr-panel {
  display: none;
}

.qr-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: clamp(18px, 4vw, 30px);
  border: 5px solid var(--brand-ink);
  border-radius: 28px;
  background: var(--brand-white);
  box-shadow: 10px 10px 0 var(--brand-orange);
}

.qr-frame {
  position: relative;
  width: min(320px, 68vw);
  aspect-ratio: 1;
  padding: 14px;
  border: 3px solid rgba(33, 23, 29, 0.12);
  border-radius: 22px;
  background: var(--brand-white);
}

.qr-code {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 5px solid var(--brand-white);
  border-radius: 999px;
  background: var(--brand-yellow);
  box-shadow: 0 6px 18px rgba(33, 23, 29, 0.2);
}

.qr-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 999px;
}

.qr-card a {
  color: var(--brand-ink);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  border-bottom: 3px solid var(--brand-orange);
}

.qr-card a:hover {
  color: var(--brand-orange);
}

.flow-page,
.event-page {
  min-height: 100vh;
  padding: clamp(16px, 4vw, 42px);
  background:
    radial-gradient(circle at 8% 14%, rgba(255, 255, 255, 0.34), transparent 28%),
    radial-gradient(circle at 88% 86%, rgba(255, 115, 0, 0.15), transparent 32%),
    var(--brand-yellow);
}

.flow-shell,
.event-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  gap: clamp(22px, 4vw, 42px);
  padding: clamp(20px, 5vw, 52px);
  border: 5px solid var(--brand-ink);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 247, 223, 0.94), rgba(246, 210, 67, 0.78));
  box-shadow: 12px 12px 0 var(--brand-ink);
}

.flow-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.flow-brand img {
  width: clamp(64px, 10vw, 104px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 999px;
}

.check-in-panel,
.welcome-back,
.event-hero,
.event-grid article {
  border: 4px solid var(--brand-ink);
  border-radius: 26px;
  background: var(--brand-white);
  box-shadow: 8px 8px 0 var(--brand-orange);
}

.check-in-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(24px, 5vw, 52px);
  align-items: start;
  padding: clamp(20px, 4vw, 42px);
}

.form-copy h1,
.welcome-back h1,
.event-hero h1 {
  font-size: clamp(2.35rem, 6vw, 5.2rem);
}

.check-in-form {
  display: grid;
  gap: 16px;
}

.field,
.choice-field,
.consent-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field span,
.choice-field legend {
  color: var(--brand-ink);
  font-size: 0.95rem;
  font-weight: 900;
}

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  border: 3px solid rgba(33, 23, 29, 0.22);
  border-radius: 16px;
  padding: 0 15px;
  background: #fffaf0;
  color: var(--brand-ink);
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 4px rgba(255, 115, 0, 0.18);
}

.field.has-error input,
.field.has-error select,
.choice-field.has-error .segmented {
  border-color: #b42318;
}

.field-error {
  min-height: 18px;
  color: #b42318;
  font-size: 0.84rem;
  font-weight: 800;
}

.field-group {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr);
  gap: 14px;
}

.choice-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-radius: 18px;
}

.segmented label {
  min-width: 0;
}

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

.segmented span {
  display: grid;
  min-height: 52px;
  place-items: center;
  border: 3px solid rgba(33, 23, 29, 0.22);
  border-radius: 16px;
  background: #fffaf0;
  font-weight: 900;
}

.segmented input:checked + span {
  border-color: var(--brand-ink);
  background: var(--brand-yellow);
  box-shadow: inset 0 -4px 0 rgba(255, 115, 0, 0.32);
}

.consent-field {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  color: rgba(33, 23, 29, 0.78);
  font-size: 0.95rem;
  line-height: 1.45;
}

.consent-field input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--brand-orange);
}

.primary-action,
.secondary-action {
  min-height: 54px;
  border: 3px solid var(--brand-ink);
  border-radius: 16px;
  padding: 0 18px;
  font-weight: 950;
  text-align: center;
}

.primary-action {
  color: var(--brand-white);
  background: var(--brand-ink);
  box-shadow: 5px 5px 0 var(--brand-orange);
}

.secondary-action {
  color: var(--brand-ink);
  background: var(--brand-white);
}

.full-width {
  width: 100%;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.form-status {
  min-height: 22px;
  margin: 0;
  font-weight: 850;
}

.form-status.is-error {
  color: #b42318;
}

.form-status.is-success {
  color: #087443;
}

.welcome-back,
.event-hero {
  padding: clamp(22px, 5vw, 46px);
}

.is-hidden {
  display: none !important;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.event-grid article {
  padding: 22px;
}

.event-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--brand-orange);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.event-grid strong {
  display: block;
  font-size: 1.35rem;
}

.event-grid p {
  margin: 12px 0 0;
  color: rgba(33, 23, 29, 0.72);
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .scan-hero {
    align-content: start;
    min-height: calc(100vh - 36px);
  }

  .scan-layout {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
  }

  .scan-copy {
    max-width: 760px;
  }

  .scan-copy h1 {
    max-width: 760px;
    font-size: clamp(3.2rem, 9vw, 6rem);
  }

  .qr-card {
    width: min(460px, 100%);
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .check-in-panel {
    grid-template-columns: 1fr;
  }

  .field-group,
  .event-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .scan-display {
    padding: 12px;
  }

  .scan-hero {
    min-height: calc(100vh - 24px);
    border-radius: 24px;
    box-shadow: 8px 8px 0 var(--brand-ink);
  }

  .brand-lockup {
    gap: 12px;
  }

  .scan-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .scan-copy h1 {
    font-size: clamp(2.7rem, 15vw, 4.5rem);
  }

  .flow-page,
  .event-page {
    padding: 12px;
  }

  .flow-shell,
  .event-shell {
    border-radius: 24px;
    box-shadow: 8px 8px 0 var(--brand-ink);
  }

  .details {
    grid-template-columns: 1fr;
  }

  .qr-card {
    width: 100%;
    box-shadow: 6px 6px 0 var(--brand-orange);
  }

  .qr-badge {
    width: 48px;
    height: 48px;
  }
}
