/* Pendi landing: extended sections (steps, phone gallery, family, demo, signup). */

.section__head--center {
  margin-inline: auto;
  text-align: center;
  max-width: 46ch;
}

/* ---- How capture works: a real 3-step sequence ---- */
.steps {
  /* This is an <ol>: kill the native decimal markers and their indent so the
     only visible numbering is the styled .step__n badges inside each card. */
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  counter-reset: step;
}
.steps > .step::marker {
  content: none;
}
.step {
  position: relative;
  padding: clamp(1.4rem, 3vw, 1.9rem);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.step__n {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: color-mix(in oklch, var(--brand) 14%, var(--surface));
  color: var(--brand);
  font-family: var(--display);
  font-weight: 720;
  font-size: 1.15rem;
  margin-bottom: 1.05rem;
}
.step h3 {
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}
.step p {
  color: var(--muted);
  margin-top: 0.55rem;
  font-size: 0.99rem;
}

/* ---- Phone frames + screenshot gallery ---- */
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.4rem 0.2rem 1.4rem;
  scrollbar-width: thin;
}
.phone {
  scroll-snap-align: center;
  margin: 0;
}
.phone__screen {
  aspect-ratio: 1080 / 2400;
  border-radius: 28px;
  overflow: hidden;
  border: 7px solid color-mix(in oklch, var(--ink) 82%, #000);
  background: #0b0910;
  box-shadow: var(--shadow);
  position: relative;
}
.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.phone figcaption {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.shot-dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-dark {
    display: block;
  }
  :root:not([data-theme="light"]) .shot-light {
    display: none;
  }
}
:root[data-theme="dark"] .shot-dark {
  display: block;
}
:root[data-theme="dark"] .shot-light {
  display: none;
}
:root[data-theme="light"] .shot-dark {
  display: none;
}
:root[data-theme="light"] .shot-light {
  display: block;
}

/* ---- Family spaces (split on a tinted band) ---- */
.split {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  background: var(--bg-tint);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: clamp(1.8rem, 4vw, 3.4rem);
}
.split h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem);
}
.split p {
  color: var(--muted);
  margin-top: 0.9rem;
  max-width: 42ch;
}
.split ul {
  list-style: none;
  padding: 0;
  margin-top: 1.3rem;
  display: grid;
  gap: 0.7rem;
}
.split li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.99rem;
}
.split li svg {
  flex: none;
  margin-top: 2px;
  color: var(--brand);
}
.split__art {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.split__art .phone {
  width: min(58%, 220px);
}
.split__art .phone:nth-child(2) {
  margin-top: 2.4rem;
}

/* ---- Demo placeholder (intentional poster, accepts a real GIF later) ---- */
.demo-wrap {
  display: grid;
  place-items: center;
}
.demo-frame {
  width: min(300px, 78vw);
  aspect-ratio: 1080 / 2400;
  border-radius: 30px;
  border: 7px solid color-mix(in oklch, var(--ink) 82%, #000);
  background: linear-gradient(160deg, var(--violet), #4c1d95 78%);
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-brand);
  text-align: center;
  padding: 1.5rem;
}
.demo-frame::before {
  content: "";
  position: absolute;
  inset: -30% 30% auto -30%;
  height: 60%;
  background: radial-gradient(circle, oklch(0.82 0.16 82 / 0.3), transparent 65%);
}
.demo-play {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.16);
  border: 1px solid oklch(1 0 0 / 0.34);
  display: grid;
  place-items: center;
  color: #fff;
  position: relative;
  z-index: 1;
}
.demo-frame p {
  color: oklch(0.95 0.03 293);
  font-size: 0.95rem;
  max-width: 22ch;
  position: relative;
  z-index: 1;
}
.demo-frame b {
  color: #fff;
  font-family: var(--display);
  font-size: 1.15rem;
}

/* ---- Beta signup / waitlist ---- */
.signup {
  text-align: center;
  border: 1px solid var(--hairline);
  background: linear-gradient(
    150deg,
    var(--bg-tint),
    color-mix(in oklch, var(--brand) 8%, var(--surface))
  );
  border-radius: var(--r-xl);
  padding: clamp(2.2rem, 5vw, 3.6rem);
}
.signup h2 {
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem);
  max-width: 20ch;
  margin-inline: auto;
}
.signup > p {
  color: var(--muted);
  margin-top: 0.85rem;
  max-width: 48ch;
  margin-inline: auto;
}
.wl-form {
  display: flex;
  gap: 0.6rem;
  max-width: 470px;
  margin: 1.5rem auto 0;
}
.wl-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.wl-form input::placeholder {
  color: var(--muted);
}
.wl-form input:focus-visible {
  border-color: var(--brand);
  outline-offset: 1px;
}
.wl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.wl-status {
  min-height: 1.4em;
  margin-top: 0.95rem;
  font-weight: 620;
  font-size: 0.95rem;
}
.wl-status[data-state="success"] {
  color: oklch(0.62 0.15 155);
}
.wl-status[data-state="error"] {
  color: oklch(0.62 0.2 27);
}
.wl-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.9rem;
}
.wl-note a,
.wl-fallback a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
:root[data-theme="dark"] .wl-note a,
:root[data-theme="dark"] .wl-fallback a {
  color: var(--violet-500);
}

/* ---- Product video slot (native <video>, revealed only when the file loads) ---- */
.video-frame {
  display: grid;
  place-items: center;
  width: 100%;
}
.demo-video {
  width: min(320px, 80vw);
  aspect-ratio: 1080 / 2400;
  border-radius: 30px;
  border: 7px solid color-mix(in oklch, var(--ink) 82%, #000);
  background: #0b0910;
  box-shadow: var(--shadow-brand);
  object-fit: cover;
}
.demo-video[hidden] {
  display: none;
}
.demo-fallback[hidden] {
  display: none;
}

/* ---- Lightbox (native <dialog>, dependency-free) ---- */
.gallery .phone__screen img {
  cursor: zoom-in;
}
dialog.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  max-width: 100vw;
  max-height: 100dvh;
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
  place-items: center;
}
dialog.lightbox[open] {
  display: grid;
}
dialog.lightbox::backdrop {
  background: oklch(0.14 0.02 293 / 0.84);
  backdrop-filter: blur(6px);
}
.lightbox__img {
  max-width: min(92vw, 460px);
  max-height: 90dvh;
  width: auto;
  height: auto;
  border-radius: 26px;
  border: 6px solid color-mix(in oklch, var(--ink) 82%, #000);
  box-shadow: var(--shadow-brand);
}
.lightbox__close {
  position: fixed;
  top: clamp(0.9rem, 3vw, 1.6rem);
  right: clamp(0.9rem, 3vw, 1.6rem);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid oklch(1 0 0 / 0.32);
  background: oklch(1 0 0 / 0.16);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.lightbox__close:hover {
  background: oklch(1 0 0 / 0.28);
}

@media (max-width: 780px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .split__art {
    order: -1;
  }
}
@media (max-width: 620px) {
  .wl-form {
    flex-direction: column;
  }
  .wl-form .btn {
    justify-content: center;
  }
}
