/* Process showcase — dark contrast band with 4 stage-cards, each holding a small
   "app screenshot" in browser/phone chrome. Palette is hardcoded dark here (page is
   light) so the band pops. CSS-only motion: a sequential highlight glow + progress bar. */

.showcase {
  position: relative;
  overflow: hidden;
  padding-block: 84px;
  color: #eaf3f4;
  background:
    radial-gradient(820px 420px at 18% 8%, rgba(22, 160, 106, 0.18), transparent 60%),
    radial-gradient(720px 440px at 86% 92%, rgba(52, 211, 153, 0.14), transparent 62%),
    linear-gradient(180deg, #0a1a16 0%, #081613 55%, #0a1712 100%);
  border-block: 1px solid rgba(200, 240, 240, 0.12);
}

.showcase .section-head {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 46px;
}
.showcase .eyebrow { color: rgba(234, 243, 244, 0.55); }
.showcase h2 { color: #fff; font-size: var(--step-h2); margin-top: 10px; }
.showcase .section-head p { color: rgba(234, 243, 244, 0.72); margin-top: 14px; }

/* the 4-card pipeline */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.pcard {
  position: relative;
  border: 1px solid rgba(200, 240, 240, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 20px 18px 20px;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}

/* traveling highlight — lights each card in turn, ~1.2s each, 4.8s loop */
.pcard .glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 30%, rgba(22, 160, 106, 0.42), transparent 66%);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.5);
  opacity: 0;
  animation: pwave 4.8s ease-in-out infinite;
}
.pcard[data-i="1"] .glow { animation-delay: 0s; }
.pcard[data-i="2"] .glow { animation-delay: 1.2s; }
.pcard[data-i="3"] .glow { animation-delay: 2.4s; }
.pcard[data-i="4"] .glow { animation-delay: 3.6s; }
@keyframes pwave {
  0%, 2% { opacity: 0; }
  8% { opacity: 1; }
  18% { opacity: 0.5; }
  25%, 100% { opacity: 0; }
}

/* connecting chevrons between cards (desktop) */
.pcard:not(:last-child)::after {
  content: "›";
  position: absolute;
  right: -13px;
  top: 44%;
  transform: translateY(-50%);
  font-size: 26px;
  line-height: 1;
  color: var(--aqua-2, #16a06a);
  z-index: 3;
  text-shadow: 0 0 10px rgba(22, 160, 106, 0.6);
}

/* art area holds one framed screenshot, vertically consistent height across cards */
.pcard-art {
  height: 250px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
}

/* ---- generic chrome frame ---- */
.frame {
  position: relative;
  background: #0d1f19;
  border: 1px solid rgba(200, 240, 240, 0.16);
  border-radius: 14px;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0,0,0,0.2);
  overflow: hidden;
}

/* browser-style frame (stages 1 & 2) — full width, top dot bar */
.frame-browser { width: 100%; }
.frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(200, 240, 240, 0.1);
}
.frame-bar span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(234, 243, 244, 0.35);
}
.frame-bar span:first-child { background: #f0685f; }
.frame-bar span:nth-child(2) { background: #f4bf4f; }
.frame-bar span:nth-child(3) { background: #4fce7c; }
.frame-body { padding: 13px; }

/* stage 1 — mock paste box */
.mock-paste {
  position: relative;
  background: #fff;
  border-radius: 10px;
  padding: 13px 13px 44px;
  box-shadow: inset 0 0 0 1px rgba(20, 40, 30, 0.08);
}
.mp-line {
  margin: 0 0 7px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #2b3d34;
  font-weight: 500;
}
.mp-line:last-of-type { color: #46584f; }
.mp-caret {
  display: inline-block;
  width: 1.5px; height: 12px;
  background: #10794f;
  margin-left: 2px;
  vertical-align: -2px;
  animation: mpblink 1s step-end infinite;
}
@keyframes mpblink { 50% { opacity: 0; } }
.mp-pill {
  position: absolute;
  right: 11px; bottom: 11px;
  font-family: var(--font-display);
  font-size: 10.5px; font-weight: 600;
  color: #fff;
  background: #10794f;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 12px -4px rgba(16, 121, 79, 0.7);
}

/* stage 2 — mock 2×3 storyboard grid */
.mock-plan {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 7px;
}
.mpl-cell {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  border: 1px solid rgba(200, 240, 240, 0.16);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6px 7px;
}
.mpl-cell .n {
  position: absolute;
  top: 5px; left: 6px;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 600;
  color: rgba(234, 243, 244, 0.6);
}
.mpl-cell .t {
  font-size: 9.5px; font-weight: 600;
  color: rgba(234, 243, 244, 0.9);
  line-height: 1.1;
}
.mpl-cell.mpl-on {
  border-color: #16a06a;
  background: rgba(22, 160, 106, 0.16);
  box-shadow: 0 0 0 1px rgba(22, 160, 106, 0.4);
}
.mpl-cell.mpl-on .t { color: #7ee0b0; }

/* phone-style frame (stages 3 & 4) — 9:16 portrait */
.frame-phone {
  height: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  padding: 5px;
  background: #0a1712;
  border: 1px solid rgba(200, 240, 240, 0.2);
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.8);
}
.ph-notch {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 34px; height: 4px;
  border-radius: 999px;
  background: rgba(234, 243, 244, 0.4);
  z-index: 2;
}
.ph-shot {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 16px;
  overflow: hidden;
  /* neutral placeholder if the frame image fails to load */
  background:
    radial-gradient(120% 90% at 50% 0%, #15352a, #0c211a 70%);
}
.ph-shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.ph-chip {
  position: absolute;
  top: 10px; left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 8.5px; font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(10, 23, 18, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 4px 8px;
  border-radius: 999px;
  z-index: 2;
}
.ph-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #16a06a;
  box-shadow: 0 0 0 0 rgba(22, 160, 106, 0.6);
  animation: phpulse 1.4s ease-out infinite;
}
@keyframes phpulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 160, 106, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(22, 160, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 160, 106, 0); }
}
.ph-chip-done { background: rgba(16, 121, 79, 0.85); }
/* thin progress bar pinned to bottom (stage 3) */
.ph-prog {
  position: absolute;
  left: 8px; right: 8px; bottom: 10px;
  height: 4px;
  border-radius: 999px;
  background: rgba(234, 243, 244, 0.22);
  overflow: hidden;
  z-index: 2;
}
.ph-prog i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10794f, #34d399);
  animation: phfill 2.6s ease-in-out infinite;
}
@keyframes phfill {
  0% { width: 8%; }
  60% { width: 66%; }
  100% { width: 82%; }
}
/* play button (stage 4) */
.ph-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(16, 121, 79, 0.92);
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(22, 160, 106, 0.18);
  z-index: 2;
}
.ph-play::after {
  content: "";
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}

.pcard-cap b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: #fff;
}
.pcard-cap span {
  color: rgba(234, 243, 244, 0.68);
  font-size: 0.9rem;
}

/* honour reduced motion — freeze the highlight + placeholder animations */
@media (prefers-reduced-motion: reduce) {
  .pcard .glow { animation: none; opacity: 0.12; }
  .mp-caret, .ph-chip .dot, .ph-prog i { animation: none; }
  .ph-prog i { width: 66%; }
}

@media (max-width: 900px) {
  .process { grid-template-columns: repeat(2, 1fr); }
  .pcard:not(:last-child)::after { display: none; }
  /* keep phone frames from getting too tall on 2-up */
  .pcard-art { height: 236px; }
}
@media (max-width: 520px) {
  .process { grid-template-columns: 1fr; }
  .pcard-art { height: 260px; }
}
