/* ============================================================
   SCREEN SYNC — homepage v2 (staging): POV inventory section
   Pixel hands hold a phone running the marketplace; floating
   devices around it carry the inventory types. Beige section.
   Pixel outlines use the "notched corner" box-shadow trick.
   ============================================================ */

.pov {
  position: relative;
  overflow: hidden;
  background: var(--beige);
  color: var(--charcoal);
  padding-top: clamp(4.5rem, 8vw, 7rem);
}
.pov .h2 em { color: var(--cherry); }

.pov__head {
  width: min(1180px, 90vw);
  margin: 0 auto;
  text-align: center;
}
.pov__head .kicker { justify-content: center; }
.pov__lead {
  max-width: 52ch;
  margin: -0.4rem auto 0;
  color: #5b544a;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

/* pixel outline: 4px border with notched (1-step) corners + hard drop shadow */
.px {
  --o: #1d1b19;
  box-shadow:
    0 -4px 0 0 var(--o), 0 4px 0 0 var(--o),
    -4px 0 0 0 var(--o), 4px 0 0 0 var(--o),
    8px 10px 0 0 rgba(29, 27, 25, 0.16);
}

/* ---------- scene layout ---------- */
.pov__scene {
  width: min(1500px, 96vw);
  margin: 2.6rem auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 560px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 1.5rem;
  row-gap: 2.2rem;
  align-items: center;
}
.pdev--browser { grid-column: 1; grid-row: 1; justify-self: end;    rotate: -3deg; }
.pdev--board   { grid-column: 1; grid-row: 2; justify-self: center; rotate: 2deg; }
.pdev--crt     { grid-column: 3; grid-row: 1; justify-self: start;  rotate: 3deg; }
.pdev--psp     { grid-column: 3; grid-row: 2; justify-self: center; rotate: -2deg; }
.pov__stagewrap { grid-column: 2; grid-row: 1 / span 2; align-self: end; }

/* ---------- floating devices ---------- */
.pdev {
  position: relative;
  z-index: 2;
  width: min(360px, 100%);
  animation: povFloat 7s ease-in-out infinite;
}
.pdev--crt   { animation-delay: -1.8s; animation-duration: 7.6s; }
.pdev--board { animation-delay: -3.4s; animation-duration: 8.2s; }
.pdev--psp   { animation-delay: -5s;   animation-duration: 6.8s; }
@keyframes povFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -9px; }
}

.pdev__body { position: relative; background: #2f2b27; padding: 12px; }
.pdev__screen {
  position: relative;
  background: #151311;
  color: var(--beige);
  padding: 18px 18px 16px;
  box-shadow: inset 0 0 0 4px #0d0c0b, inset 0 0 34px rgba(194, 58, 82, 0.14);
}
.pdev__screen::after {        /* faint CRT scanlines */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
}
.pdev__title {
  font-family: "Silkscreen", var(--font-mono);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 0.45rem;
  /* same red gradient as the hero's cycling word + sprites */
  background: linear-gradient(135deg, #ff7a8c 0%, #e0435d 50%, #9e1f37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.pdev__text {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.5;
  color: #d9d0bd;
  margin-bottom: 0.6rem;
}
.pdev__tags {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cherry-bright);
}

/* Websites — browser window */
.pbrowser__bar { display: flex; align-items: center; gap: 6px; padding: 2px 2px 10px; }
.pbrowser__bar i { width: 10px; height: 10px; background: #5a534a; }
.pbrowser__bar i:first-child { background: var(--cherry-bright); }
.pbrowser__bar span {
  flex: 1;
  margin-left: 6px;
  padding: 3px 7px;
  background: #1d1b19;
  color: var(--beige-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}
.pbrowser__slot {
  margin-bottom: 0.75rem;
  padding: 7px 6px;
  border: 2px dashed rgba(194, 58, 82, 0.6);
  color: rgba(224, 67, 93, 0.9);
  font-family: "Silkscreen", var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-align: center;
}

/* Screens — CRT TV */
.pdev--crt { width: min(370px, 100%); }
.pcrt__ears { position: relative; height: 34px; }
.pcrt__ears i {               /* staircase antennas via stacked pixel shadows */
  position: absolute; bottom: 0;
  width: 4px; height: 4px;
  background: #1d1b19;
}
.pcrt__ears i:first-child {
  left: 44%;
  box-shadow: -4px -4px #1d1b19, -8px -8px #1d1b19, -12px -12px #1d1b19, -16px -16px #1d1b19,
              -20px -20px #1d1b19, -24px -24px #c23a52, -28px -24px #c23a52, -24px -28px #c23a52, -28px -28px #c23a52;
}
.pcrt__ears i:last-child {
  left: 56%;
  box-shadow: 4px -4px #1d1b19, 8px -8px #1d1b19, 12px -12px #1d1b19, 16px -16px #1d1b19,
              20px -20px #1d1b19, 24px -24px #c23a52, 28px -24px #c23a52, 24px -28px #c23a52, 28px -28px #c23a52;
}
.pcrt__body { display: flex; gap: 10px; padding: 12px; background: #3a352f; }
.pcrt__screen { flex: 1; box-shadow: inset 0 0 0 4px #0d0c0b, inset 0 0 40px rgba(194, 58, 82, 0.2); }
.pcrt__panel { width: 36px; display: flex; flex-direction: column; align-items: center; gap: 9px; padding-top: 4px; }
.pcrt__panel i { width: 16px; height: 16px; background: #1d1b19; box-shadow: inset -4px -4px 0 #5a534a; }
.pcrt__panel b { width: 20px; height: 3px; background: #1d1b19; }
.pcrt__legs { display: flex; justify-content: space-between; padding: 4px 60px 0; }
.pcrt__legs i { width: 14px; height: 12px; background: #1d1b19; }

/* Billboards — board on posts */
.pdev--board { width: min(380px, 100%); }
.pboard__lights { display: flex; justify-content: space-around; padding: 0 44px 8px; }
.pboard__lights i {
  width: 12px; height: 6px;
  background: #ffd27a;
  box-shadow: 0 0 10px rgba(255, 210, 122, 0.8), 0 4px #1d1b19;
}
.pboard__posts { display: flex; justify-content: space-between; padding: 4px 84px 0; }
.pboard__posts i { width: 14px; height: 60px; background: #2f2b27; box-shadow: inset -4px 0 0 #1d1b19; }

/* Games — PSP-style handheld */
.pdev--psp { width: min(390px, 100%); }
.ppsp__body {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px;
  background: #2f2b27;
}
.ppsp__screen { flex: 1; padding: 14px 15px 13px; }
.ppsp__screen .pdev__text { font-size: 0.8rem; }
.ppsp__dpad { position: relative; flex: none; width: 36px; height: 36px; }
.ppsp__dpad i { position: absolute; background: #1d1b19; box-shadow: inset 0 3px 0 #4a443d; }
.ppsp__dpad i:first-child { left: 0; top: 12px; width: 36px; height: 12px; }
.ppsp__dpad i:last-child  { left: 12px; top: 0; width: 12px; height: 36px; }
.ppsp__btns { position: relative; flex: none; width: 36px; height: 36px; }
.ppsp__btns i { position: absolute; width: 10px; height: 10px; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.35); }
.ppsp__btns i:nth-child(1) { left: 13px; top: 0;    background: #ff7a8c; }
.ppsp__btns i:nth-child(2) { left: 0;    top: 13px; background: #e0435d; }
.ppsp__btns i:nth-child(3) { left: 26px; top: 13px; background: #c23a52; }
.ppsp__btns i:nth-child(4) { left: 13px; top: 26px; background: #9e1f37; }

/* ---------- POV stage: hands + phone (560×700 design size, scaled by JS) ---------- */
.pov__stagewrap { position: relative; width: 100%; max-width: 560px; height: 700px; justify-self: center; }
.pov__stage {
  position: absolute; left: 0; top: 0;
  width: 560px; height: 700px;
  transform-origin: 0 0;
  transform: scale(var(--s, 1));
}
.pov__hands {
  position: absolute; left: 0; top: 0;
  width: 560px; height: 700px;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  z-index: 1;
  pointer-events: none;
}
.pov__hands--front { z-index: 3; }

.pov-phone {
  --o: #0f0e0d;
  position: absolute;
  left: 140px; top: 32px;
  width: 280px; height: 540px;
  background: #1d1b19;
  z-index: 2;
}
.pov-phone__island {
  position: absolute; top: 19px; left: 50%;
  width: 62px; height: 12px; margin-left: -31px;
  background: #0b0a09;
  z-index: 2;
}
.pov-phone__screen {
  position: absolute;
  inset: 14px 12px;
  overflow: hidden;
  padding: 6px 12px;
  background: #1f1d1b;
  color: var(--beige);
}

/* phone UI — a marketplace-app home feed (search, categories, listing grid, tab bar) */
.pp-status { display: flex; justify-content: space-between; align-items: center; padding: 1px 6px 9px; font: 600 9px var(--font-display); }
.pp-status__icons { display: flex; align-items: flex-end; gap: 2px; }
.pp-status__icons i { width: 3px; background: var(--beige); }
.pp-status__icons i:nth-child(1) { height: 4px; }
.pp-status__icons i:nth-child(2) { height: 6px; }
.pp-status__icons i:nth-child(3) { height: 8px; }
.pp-status__icons b { width: 14px; height: 7px; margin-left: 4px; border: 1px solid var(--beige); box-shadow: inset 0 0 0 1px #1f1d1b, inset 9px 0 0 var(--beige); }

.pp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.pp-head__logo { display: block; height: 11px; width: auto; }
.pp-head__btn { padding: 4px 10px; border-radius: 999px; background: var(--cherry); color: #fff; font: 600 7.5px var(--font-display); }

/* pixel icons (8×8 canvases, drawn in v2-pov.js in the element's text color) */
.pp-ico {
  flex: none;
  width: 8px; height: 8px;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.pp-search {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 9px;
  padding: 6px 9px;
  border: 1px solid #3a352f;
  border-radius: 999px;
  background: #2a2724;
  color: var(--beige-dim);
  font: 7.5px var(--font-body);
}
.pp-search span { flex: 1; }
.pp-search__filter { color: var(--cherry-bright); }

.pp-cats {
  display: flex; gap: 5px;
  margin-bottom: 9px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent);
  mask-image: linear-gradient(90deg, #000 80%, transparent);
}
.pp-cats span {
  flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 7px;
  border: 1px solid #3e3832;
  border-radius: 999px;
  color: #d9d0bd;
  font: 600 6.8px var(--font-body);
}
.pp-cats .is-on { background: var(--cherry); border-color: var(--cherry); color: #fff; }

.pp-banner {
  margin-bottom: 9px;
  padding: 4px 6px;
  border: 1px solid rgba(194, 58, 82, 0.35);
  border-radius: 5px;
  background: rgba(142, 31, 51, 0.12);
  color: #d9d0bd;
  font: 6.6px var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
}
.pp-banner span {
  margin-right: 4px;
  padding: 1px 4px;
  border: 1px solid rgba(194, 58, 82, 0.5);
  border-radius: 999px;
  color: var(--cherry-bright);
  font-size: 5.6px;
  letter-spacing: 0.1em;
}

.pp-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.pp-row b { font: 700 11px var(--font-display); }
.pp-row small { font: 600 7px var(--font-body); color: var(--cherry-bright); }

.pp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; }
.pp-tile__img { position: relative; margin-bottom: 4px; border-radius: 7px; overflow: hidden; }
.pp-tile__img canvas:first-child {
  display: block;
  width: 100%; height: auto;
  aspect-ratio: 58 / 26;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}
.pp-tile__type {
  position: absolute; left: 4px; top: 4px;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(15, 14, 13, 0.78);
  color: var(--beige);
  font: 700 5px var(--font-mono);
  letter-spacing: 0.12em;
}
.pp-tile__fav {
  position: absolute; right: 4px; top: 4px;
  box-sizing: border-box;
  width: 13px; height: 13px;
  padding: 2.5px;
  border-radius: 50%;
  background: rgba(15, 14, 13, 0.7);
  color: var(--beige);
}
.pp-tile__fav.is-on { color: var(--cherry-bright); }
.pp-tile__name { font: 600 7.6px var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-tile__meta { margin: 1px 0; color: var(--beige-dim); font: 6.4px var(--font-body); }
.pp-tile__price { color: var(--beige-dim); font: 6.6px var(--font-body); }
.pp-tile__price b { color: var(--beige); font-weight: 700; }

.pp-tabs {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-around;
  padding: 6px 6px 9px;
  border-top: 1px solid #34302b;
  background: rgba(24, 22, 20, 0.95);
}
.pp-tabs span { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--beige-dim); font: 600 6px var(--font-body); }
.pp-tabs .pp-ico { width: 16px; height: 16px; }
.pp-tabs .is-on { color: var(--cherry-bright); }

/* ---------- pixel-art city backdrop (generated with Higgsfield / Recraft V4.1) ---------- */
.pov {
  background-image:
    linear-gradient(180deg, rgba(234, 227, 211, 0.55) 0%, rgba(234, 227, 211, 0.2) 45%, rgba(234, 227, 211, 0) 100%),
    url("pov-bg.jpg");
  background-size: cover;
  background-position: center bottom;
}

/* ---------- responsive ---------- */
@media (max-width: 1400px) {
  .pov__scene { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; }
  .pdev--browser { grid-column: 1; grid-row: 1; justify-self: center; }
  .pdev--crt     { grid-column: 2; grid-row: 1; justify-self: center; }
  .pdev--board   { grid-column: 1; grid-row: 2; justify-self: center; }
  .pdev--psp     { grid-column: 2; grid-row: 2; justify-self: center; }
  .pov__stagewrap { grid-column: 1 / -1; grid-row: 3; }
}
@media (max-width: 680px) {
  .pov__scene { grid-template-columns: minmax(0, 1fr); row-gap: 2.6rem; }
  .pdev--browser, .pdev--crt, .pdev--board, .pdev--psp { grid-column: 1; grid-row: auto; max-width: 100%; }
  .pov__stagewrap { grid-column: 1; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .pdev { animation: none; }
}
