.gate-demo {
  --demo-ink: var(--page-ink);
  --demo-quiet: var(--page-copy);
  --demo-muted: var(--page-muted);
  --demo-line: #e4d7cd;
  --demo-wine: var(--page-accent);
  --demo-paper: #fffcf8;
  --demo-green: #246041;
  --demo-green-soft: #e8f2e9;
  --gate-demo-step: 0;
  color: var(--demo-ink);
  padding: clamp(2.5rem, 4.5vw, 4.0625rem) clamp(1rem, 5vw, 3rem);
  font-family: Inter, sans-serif;
}

.gate-demo [hidden] {
  display: none;
}

.gate-demo__layout {
  display: grid;
  grid-template-columns: minmax(0, 536fr) minmax(0, 636fr);
  gap: clamp(2rem, 4.3vw, 3.875rem);
  max-width: 77.125rem;
  margin-inline: auto;
}

.gate-demo__intro {
  padding-top: clamp(1rem, 5vw, 4.5rem);
}

.gate-demo__title {
  margin: 0;
  font: 400 clamp(2.6rem, 4.58vw, 4.125rem) / 1.03 Fraunces, Georgia, serif;
  letter-spacing: -.028em;
}

.gate-demo__lead {
  margin-top: 1.1875rem;
  color: var(--demo-quiet);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.gate-demo__steps {
  position: relative;
  display: grid;
  gap: .375rem;
  max-width: 30rem;
  margin-top: clamp(2.5rem, 5.9vw, 5.3125rem);
}

.gate-demo__steps::before,
.gate-demo__steps::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.gate-demo__steps::before {
  bottom: 0;
  width: 1px;
  background: var(--demo-line);
}

.gate-demo__steps::after {
  width: 2px;
  height: 4.125rem;
  border-radius: 1px;
  background: var(--demo-wine);
  transform: translateY(calc(var(--gate-demo-step) * 4.5rem));
  transition: transform .3s ease-in-out;
}

.gate-demo__step {
  display: grid;
  align-content: center;
  gap: .25rem;
  position: relative;
  height: 4.125rem;
  padding: .375rem 2.5rem .375rem 1.125rem;
  text-align: left;
  border-radius: .5rem;
  color: var(--demo-ink);
}

.gate-demo__step strong {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.gate-demo__step span {
  color: var(--demo-quiet);
  font-size: .75rem;
  line-height: 1.42;
}

.gate-demo__step img {
  display: none;
  position: absolute;
  inset-inline-end: 1rem;
  inset-block-start: calc(50% - 7.5px);
}

.gate-demo__step:hover {
  background: #fff7f138;
}

.gate-demo__step[aria-selected="true"] {
  color: var(--demo-wine);
  background: #fff7f170;
}

.gate-demo__step[aria-selected="true"] img {
  display: block;
}

.gate-demo__intro-action {
  max-width: 30rem;
  margin-top: clamp(1.75rem, 3.6vw, 3.25rem);
}

.gate-demo__note {
  margin-top: .625rem;
  font-size: .75rem;
  line-height: 1.42;
  color: var(--demo-muted);
}

.gate-demo__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.75rem;
  padding: .625rem .9375rem;
  border: 1px solid transparent;
  border-radius: .5625rem;
  background: var(--demo-wine);
  color: #fff;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  transition: background-color .18s ease;
}

.gate-demo__action img {
  flex: none;
}

.gate-demo__action:hover {
  background: #641d30;
}

.gate-demo__action--outline {
  border-color: var(--demo-line);
  background: var(--demo-paper);
  color: var(--demo-wine);
}

.gate-demo__action--outline:hover {
  background: #f5e8ea;
}

.gate-demo__intro-action .gate-demo__action {
  min-width: 11.625rem;
  min-height: 2.875rem;
}

.gate-demo button:focus-visible {
  outline: 2px solid var(--demo-wine);
  outline-offset: 3px;
}

.gate-demo__stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 2.9375rem clamp(1rem, 4vw, 3rem);
}

.gate-demo__stage-glow,
.gate-demo__stage-shadow,
.gate-demo__camera-glow,
.gate-demo__camera-empty {
  position: absolute;
  max-width: none;
  pointer-events: none;
}

.gate-demo__stage-glow,
.gate-demo__stage-shadow {
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: -1;
}

.gate-demo__stage-glow {
  top: 50%;
  width: min(100%, 606px);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: .8;
}

.gate-demo__stage-shadow {
  bottom: 2.7rem;
}

.gate-demo__device {
  position: relative;
  width: min(100%, 21.5rem);
  min-width: 0;
  padding: .625rem;
  border: 1px solid #312d2c;
  border-radius: 3.375rem;
  background: linear-gradient(90deg, #202020, #858282 2.8%, #333231 6.5%, #171718 30%, #29282a 78%, #655f5e 97%, #201f20);
  box-shadow: 14px 24px 44px #33211955, 4px 7px 12px #3420182c;
}

.gate-demo__device::before,
.gate-demo__device::after {
  content: "";
  position: absolute;
  width: 4px;
  border-radius: 2px;
  z-index: -1;
}

.gate-demo__device::before {
  top: 8.9375rem;
  left: -3px;
  height: 4rem;
  background: #6b6664;
}

.gate-demo__device::after {
  top: 10.875rem;
  right: -3px;
  height: 4.25rem;
  background: #5d5a59;
}

.gate-demo__glass {
  position: absolute;
  inset: 3px;
  border: 1px solid #ffffff30;
  border-radius: 3.125rem;
  background: linear-gradient(134deg, transparent 6%, #ffffff15 12%, transparent 25%);
  pointer-events: none;
}

.gate-demo__screen {
  position: relative;
  overflow: hidden;
  border-radius: 2.6875rem;
  background: var(--demo-paper);
  box-shadow: 0 0 0 5px #141416;
}

.gate-demo__status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.25rem;
  padding-inline: 1.375rem 1.0625rem;
  font-size: .6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.gate-demo__sensor {
  position: absolute;
  top: .5rem;
  left: 50%;
  width: 5.5rem;
  height: 1.375rem;
  transform: translateX(-50%);
  border: 1px solid #28272b;
  border-radius: 1rem;
  background: #111015;
}

.gate-demo__lens,
.gate-demo__lens-reflection {
  position: absolute;
}

.gate-demo__lens {
  right: .5rem;
  top: .375rem;
}

.gate-demo__lens-reflection {
  right: .625rem;
  top: .5rem;
}

.gate-demo__signals,
.gate-demo__reception {
  display: flex;
  align-items: center;
}

.gate-demo__signals {
  gap: .25rem;
  font-size: .5625rem;
}

.gate-demo__bars {
  width: 15px;
  height: 10px;
  background: linear-gradient(to top, var(--demo-ink), var(--demo-ink));
  clip-path: polygon(0 60%, 17% 60%, 17% 100%, 25% 100%, 25% 40%, 42% 40%, 42% 100%, 50% 100%, 50% 20%, 67% 20%, 67% 100%, 75% 100%, 75% 0, 92% 0, 92% 100%, 0 100%);
}

.gate-demo__battery {
  width: 19px;
  height: 9px;
  padding: 1px;
  border: 1px solid var(--demo-muted);
  border-radius: 2px;
  background: linear-gradient(var(--demo-ink), var(--demo-ink)) content-box;
}

.gate-demo__app-head {
  margin-inline: 1.125rem;
  padding: .4375rem 0 .5rem;
  border-bottom: 1px solid var(--demo-line);
}

.gate-demo__app-head p:first-child {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.32;
}

.gate-demo__reception {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .3125rem;
  color: var(--demo-muted);
  font-size: .6875rem;
}

.gate-demo__badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: .25rem .625rem;
  border-radius: 1rem;
  background: var(--demo-green-soft);
  color: var(--demo-green);
  font-size: .625rem;
  font-weight: 600;
}

.gate-demo__viewport {
  overflow: hidden;
  padding-top: .4375rem;
}

.gate-demo__track {
  display: flex;
  align-items: flex-start;
  min-height: 32.125rem;
  transform: translateX(calc(-100% * var(--gate-demo-step)));
  transition: transform .3s ease-in-out;
}

.gate-demo__panel {
  flex: 0 0 100%;
  min-width: 0;
  padding: .25rem 1.125rem 1rem;
}

.gate-demo__panel h3 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.36;
}

.gate-demo__panel p {
  overflow-wrap: anywhere;
}

.gate-demo__hint {
  margin: .1875rem 0 .8125rem;
  color: var(--demo-muted);
  font-size: .75rem;
  line-height: 1.42;
}

.gate-demo__camera {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  height: 15.25rem;
  border-radius: .875rem;
  background: linear-gradient(126deg, #2c302a, #4f5446 35%, #4b4037 72%, #282722);
}

.gate-demo__camera--compact {
  height: 7.4375rem;
}

.gate-demo__camera-glow {
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.gate-demo__camera-frame {
  display: contents;
}

.gate-demo__specimen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .25rem;
  width: 11rem;
  height: 6.5625rem;
  padding: .375rem .5rem .375rem .625rem;
  transform: translate(3px, -6px) rotate(-8deg);
  color: var(--demo-ink);
  background: linear-gradient(110deg, #fffdf2, #f2e7d9 72%, #d9c7b4);
  border-top: 1rem solid var(--demo-wine);
  border-radius: .5rem;
  box-shadow: 3px 12px 19px #12100ebb;
}

.gate-demo__specimen strong {
  display: block;
  font-size: .5rem;
  font-weight: 700;
  white-space: nowrap;
}

.gate-demo__specimen small {
  display: block;
  margin-block: .375rem .5rem;
  color: var(--demo-quiet);
  font-size: .625rem;
}

.gate-demo__specimen i {
  display: block;
  width: 75%;
  height: 6px;
  border-top: 2px solid #ad8f7d;
  border-bottom: 1px solid #bda392;
}

.gate-demo__qr {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 4px;
  background: #fff;
}

.gate-demo__qr img {
  max-width: none;
  transform: rotate(8deg);
}

.gate-demo__camera--compact .gate-demo__specimen {
  width: 7.1875rem;
  height: 4.0625rem;
  padding: 2px 4px 2px 7px;
  border-top-width: 9px;
}

.gate-demo__camera--compact .gate-demo__specimen strong {
  font-size: 5px;
}

.gate-demo__camera--compact .gate-demo__specimen small {
  margin-block: 3px;
  font-size: 7px;
}

.gate-demo__camera--compact .gate-demo__qr {
  width: 49px;
  height: 49px;
}

.gate-demo__target {
  position: absolute;
  top: calc(50% - 6px);
  left: 50%;
  width: min(100% - 24px, 182px);
  height: 128px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.gate-demo__target i {
  position: absolute;
  width: 15px;
  height: 15px;
  border: solid #c9f1cc;
  border-width: 2px 0 0 2px;
}

.gate-demo__target i:nth-child(2) {
  right: 0;
  transform: rotate(90deg);
}

.gate-demo__target i:nth-child(3) {
  bottom: 0;
  left: 0;
  transform: rotate(-90deg);
}

.gate-demo__target i:nth-child(4) {
  bottom: 0;
  right: 0;
  transform: rotate(180deg);
}

.gate-demo__target::after {
  content: "";
  position: absolute;
  top: 48%;
  inset-inline: 8px;
  height: 1px;
  background: #c3facbd9;
}

.gate-demo__camera--compact .gate-demo__target {
  width: 118px;
  height: 86px;
}

.gate-demo__camera-empty {
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.gate-demo__panel .gate-demo__action {
  width: 100%;
  margin-top: 1.0625rem;
}

.gate-demo__panel .gate-demo__action + .gate-demo__action {
  margin-top: .6875rem;
}

.gate-demo__identity {
  padding: .9375rem;
  border: 1px solid var(--demo-line);
  border-radius: .875rem;
  background: #fff;
}

.gate-demo__identity-head,
.gate-demo__confirmed,
.gate-demo__record {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.gate-demo__avatar,
.gate-demo__confirmation-icon,
.gate-demo__record-icon {
  display: grid;
  place-items: center;
  flex: none;
}

.gate-demo__avatar > *,
.gate-demo__confirmation-icon > *,
.gate-demo__record-icon > * {
  grid-area: 1 / 1;
}

.gate-demo__avatar span {
  color: var(--demo-wine);
  font-size: .8125rem;
  font-weight: 700;
}

.gate-demo__identity-name {
  font-size: 1.0625rem;
  font-weight: 600;
}

.gate-demo__identity-level {
  color: var(--demo-muted);
  font-size: .75rem;
}

.gate-demo__identity dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: .875rem 0 1rem;
  padding-top: .6875rem;
  border-top: 1px solid var(--demo-line);
}

.gate-demo__identity dt {
  color: var(--demo-muted);
  font-size: .6875rem;
}

.gate-demo__identity dd {
  font-size: 1rem;
  font-weight: 600;
}

.gate-demo__confirmed {
  min-height: 4.0625rem;
  padding: .6875rem;
  border-radius: .75rem;
  background: var(--demo-green-soft);
  color: var(--demo-green);
}

.gate-demo__confirmed strong {
  display: block;
  font-size: .875rem;
  font-weight: 600;
}

.gate-demo__confirmed p {
  margin-top: .125rem;
  font-size: .6875rem;
}

.gate-demo__ready {
  margin-top: 1.25rem;
}

.gate-demo__ready h3 {
  font-size: 1.1875rem;
}

.gate-demo__recent {
  margin-top: 1.375rem;
}

.gate-demo__recent h4 {
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.35;
}

.gate-demo__recent > p {
  margin-top: .375rem;
  color: var(--demo-muted);
  font-size: .6875rem;
}

.gate-demo__recent ul {
  margin-top: .375rem;
  padding: 0;
  list-style: none;
}

.gate-demo__record {
  min-height: 2.375rem;
  padding-block: .25rem;
  border-top: 1px solid var(--demo-line);
  font-size: .6875rem;
}

.gate-demo__record span[data-gate-demo-name] {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.gate-demo__record time {
  margin-inline-start: auto;
  color: var(--demo-quiet);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.gate-demo__home {
  width: 6.25rem;
  height: 4px;
  margin: 1rem auto .75rem;
  border-radius: 999px;
  background: var(--demo-ink);
}

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

@media (max-width: 900px) {
  .gate-demo__layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 40rem;
  }

  .gate-demo__intro {
    padding-top: 0;
  }

  .gate-demo__stage {
    padding-block: 1.75rem;
    scroll-margin-top: 6rem;
  }
}

@media (max-width: 370px) {
  .gate-demo__screen {
    border-radius: 2rem;
  }

  .gate-demo__status {
    padding-inline: .875rem;
  }

  .gate-demo__app-head {
    margin-inline: .875rem;
  }

  .gate-demo__panel {
    padding-inline: .875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-demo__action,
  .gate-demo__steps::after,
  .gate-demo__track {
    transition: none;
  }
}
