/*
  Modal 05 — Onboarding Welcome Dialog — standalone HTML/CSS/JS.
  No build step, no framework, no external dependency: copy index.html,
  this file, and script.js into any project as-is.
*/

:root {
  --welcome-fg: oklch(0.17 0 0);
  --welcome-muted: oklch(0.5 0 0);
  --welcome-line: oklch(0.91 0 0);
  --welcome-soft: oklch(0.965 0 0);
  --welcome-ink: oklch(0.16 0 0);
  --welcome-accent: #39ff14;
}

.modal05 {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

.modal05[hidden] {
  display: none;
}

.modal05 p,
.modal05 h2,
.modal05 ul {
  margin: 0;
}

.modal05 ul {
  padding: 0;
  list-style: none;
}

.modal05 svg {
  display: block;
}

/* A bright frosted scrim, not a dark dim: a welcome should feel like the
   lights came on. */
.modal05__backdrop {
  position: fixed;
  inset: 0;
  background-color: oklch(0.97 0 0 / 0.72);
  backdrop-filter: blur(4px);
  animation: modal05-fade-in 240ms ease-out both;
}

.modal05[data-state="closing"] .modal05__backdrop {
  animation: modal05-fade-out 180ms ease-in both;
}

.modal05__positioner {
  position: relative;
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Grows in from slightly smaller — the largest entrance in the set. */
.modal05__panel {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 48rem;
  overflow: hidden;
  border: 1px solid var(--welcome-line);
  border-radius: 1.5rem;
  background-color: #ffffff;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.3);
  animation: modal05-scale-in 300ms cubic-bezier(0.2, 0.9, 0.25, 1.05) both;
}

.modal05[data-state="closing"] .modal05__panel {
  animation: modal05-scale-out 180ms ease-in both;
}

/* An abstract picture of the product, drawn in CSS. */
.modal05__art {
  position: relative;
  height: 10rem;
  overflow: hidden;
  background-color: var(--welcome-ink);
}

.modal05__window {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  bottom: 0;
  left: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  border-radius: 0.75rem 0.75rem 0 0;
  background-color: rgba(255, 255, 255, 0.04);
  padding: 1rem;
}

.modal05__chrome {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.modal05__chrome span {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.25);
}

.modal05__chrome span:last-child {
  width: 3rem;
  margin-left: auto;
  background-color: rgba(255, 255, 255, 0.15);
}

.modal05__line {
  height: 0.5rem;
  width: 66.666%;
  margin-top: 1rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.7);
}

.modal05__line--short {
  height: 0.375rem;
  width: 50%;
  margin-top: 0.5rem;
  background-color: rgba(255, 255, 255, 0.2);
}

.modal05__bars {
  display: flex;
  height: 4rem;
  align-items: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.modal05__bars span {
  flex: 1;
  border-radius: 0.125rem 0.125rem 0 0;
  background-color: rgba(255, 255, 255, 0.15);
}

.modal05__trace-track {
  display: none;
  height: 0.25rem;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.1);
}

/* The trace across the illustration follows your progress. */
.modal05__trace {
  display: block;
  height: 100%;
  border-radius: 9999px;
  background-color: var(--welcome-accent);
  transition: width 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal05__people {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.modal05__people span {
  display: flex;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.15);
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.modal05__people span.modal05__person--you {
  background-color: var(--welcome-accent);
  color: var(--welcome-ink);
}

.modal05__people span:last-child {
  width: 4rem;
  height: 0.375rem;
  background-color: rgba(255, 255, 255, 0.15);
}

.modal05__content {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.modal05__eyebrow {
  font-size: 11px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--welcome-muted);
}

/* Each step's copy crossfades in when the step changes. */
.modal05__step {
  flex: 1;
  margin-top: 0.75rem;
  animation: modal05-step-in 260ms ease-out both;
}

.modal05__title {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--welcome-fg);
}

.modal05__description {
  margin-top: 0.5rem !important;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: var(--welcome-muted);
}

.modal05__benefits {
  margin-top: 1.25rem !important;
}

.modal05__benefit {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--welcome-fg);
}

.modal05__benefit + .modal05__benefit {
  margin-top: 0.625rem;
}

.modal05__check {
  display: flex;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
  border-radius: 9999px;
  background-color: var(--welcome-fg);
  color: #ffffff;
}

.modal05__check svg {
  width: 0.625rem;
  height: 0.625rem;
}

.modal05__footer {
  display: flex;
  flex-direction: column-reverse;
  gap: 1rem;
  margin-top: 1.75rem;
}

.modal05__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.modal05__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: var(--welcome-line);
  transition:
    width 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 200ms ease-out;
}

.modal05__dot[data-state="done"] {
  background-color: var(--welcome-fg);
}

.modal05__dot[data-state="current"] {
  width: 1.25rem;
  background-color: var(--welcome-accent);
}

.modal05__buttons {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
}

.modal05__secondary,
.modal05__primary {
  display: flex;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  cursor: pointer;
  outline: none;
  transition:
    background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
    color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal05__secondary {
  background: transparent;
  padding: 0 1rem;
  font-weight: 500;
  color: var(--welcome-muted);
}

.modal05__secondary:hover {
  background-color: var(--welcome-soft);
  color: var(--welcome-fg);
}

.modal05__primary {
  background-color: var(--welcome-fg);
  padding: 0 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.modal05__primary svg {
  width: 1rem;
  height: 1rem;
}

.modal05__primary:hover {
  background-color: oklch(0.3 0 0);
}

.modal05__secondary:focus-visible,
.modal05__primary:focus-visible {
  outline: 2px solid var(--welcome-fg);
  outline-offset: 2px;
}

@keyframes modal05-fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal05-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes modal05-scale-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes modal05-scale-out {
  to {
    opacity: 0;
    transform: scale(0.97);
  }
}

@keyframes modal05-step-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 40rem) {
  .modal05__panel {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
  .modal05__art {
    height: auto;
    min-height: 20rem;
  }
  .modal05__window {
    top: 2rem;
    right: 1.75rem;
    left: 1.75rem;
  }
  .modal05__bars {
    height: 6rem;
  }
  .modal05__trace-track {
    display: block;
  }
  .modal05__people {
    display: flex;
  }
  .modal05__content {
    padding: 2rem;
  }
  .modal05__footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .modal05__dots {
    justify-content: flex-start;
  }
  .modal05__buttons {
    flex-direction: row;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal05__panel {
    animation-name: modal05-fade-in;
    animation-duration: 120ms;
  }
  .modal05[data-state="closing"] .modal05__panel {
    animation-name: modal05-fade-out;
  }
  .modal05__step {
    animation: none;
  }
  .modal05__trace,
  .modal05__dot {
    transition: none;
  }
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
p {
  margin: 0;
}
.modal05-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem;
}
.modal05-layout__app {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 60rem;
  height: 46rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 18px 44px -20px rgba(0, 0, 0, 0.18);
  transform: translateZ(0);
}
@media (min-width: 25rem) {
  .modal05-layout__app {
    height: 42rem;
  }
}
.modal05-layout__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid oklch(0.97 0 0);
  padding: 0.875rem 1.5rem;
}
.modal05-layout__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.modal05-layout__mark {
  display: flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background: oklch(0.205 0 0);
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
}
.modal05-layout__name {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: oklch(0.205 0 0);
}
.modal05-layout__tour {
  display: flex;
  height: 2.25rem;
  align-items: center;
  border: 1px solid oklch(0.922 0 0);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: oklch(0.371 0 0);
  cursor: pointer;
  outline: none;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal05-layout__tour:hover {
  background: oklch(0.985 0 0);
}
.modal05-layout__tour:focus-visible {
  outline: 2px solid oklch(0.205 0 0);
  outline-offset: 2px;
}
.modal05-layout__cards {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}
.modal05-layout__card {
  border: 1px dashed oklch(0.922 0 0);
  border-radius: 0.75rem;
  padding: 1.25rem;
}
.modal05-layout__card-title {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: oklch(0.205 0 0);
}
.modal05-layout__card-note {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
  color: oklch(0.556 0 0);
}
@media (min-width: 40rem) {
  .modal05-layout__app {
    height: 29rem;
  }
  .modal05-layout__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
