/* ===========================================================================
   ArbeeStudios — Playground
   Characterful and colorful. Bouncy. Channels the toy-box DNA of the apps.
   Light + airy: color pops on a warm near-white field.
   =========================================================================== */

html { background: #fffaf2; }

body {
  --bg: #fffaf2;
  --ink: #2a2438;
  --ink-soft: #6e6580;
  --c-orange: #FF6B35;
  --c-yellow: #FFC93C;
  --c-blue: #3DA5D9;
  --c-green: #8BC34A;
  --c-pink: #FF8FB1;
  --c-violet: #9B5DE5;
  --c-violet-deep: #8A47D6; /* AA-safe violet for the white-text kick badge */
  --pad: clamp(20px, 5vw, 60px);

  min-height: 100dvh;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 14%, #ffe7d6 0%, transparent 30%),
    radial-gradient(circle at 88% 8%, #e3f0ff 0%, transparent 28%),
    radial-gradient(circle at 80% 92%, #e8ffe0 0%, transparent 30%),
    radial-gradient(circle at 18% 88%, #ffe1ee 0%, transparent 28%);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
}

/* ---- floating draggable confetti shapes -------------------------------- */
.pg-field { position: fixed; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.pg-shape {
  position: absolute;
  /* Decorative by default; draggable only on fine (mouse) pointers so a touch
     swipe is never captured by a viewport-fixed shape and the page can scroll. */
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 8px 0 rgba(42, 36, 56, 0.14));
  animation: pgBob var(--bob, 5s) ease-in-out infinite;
}
@media (hover: hover) and (pointer: fine) {
  .pg-shape { pointer-events: auto; cursor: grab; }
  .pg-shape:active { cursor: grabbing; }
}
@keyframes pgBob {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(-16px) rotate(calc(var(--rot, 0deg) + 6deg)); }
}

.pg-wrap { position: relative; z-index: 1; }

/* ---- topline ----------------------------------------------------------- */
.pg-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: clamp(18px, 4vw, 30px) var(--pad); }
.pg-mark {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 700; font-size: 21px; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px; color: var(--ink);
}
.pg-mark .a { color: var(--c-orange); }
.pg-rb {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: #FFF3DC; border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  font-family: "Fredoka", system-ui, sans-serif; font-weight: 700; font-size: 18px;
  letter-spacing: -0.07em; line-height: 1; flex: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
}
.pg-mark:hover .pg-rb { transform: translateY(-2px) rotate(-3deg); box-shadow: 0 5px 0 var(--ink); }
.pg-rb .r { color: var(--c-orange); }
.pg-rb .b { color: var(--ink); }
.pg-pill {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 13px; font-weight: 500; color: var(--ink);
  background: #fff; border: 2.5px solid var(--ink); border-radius: 999px;
  padding: 8px 16px; box-shadow: 0 4px 0 var(--ink); white-space: nowrap;
}

/* ---- hero -------------------------------------------------------------- */
.pg-hero { padding: clamp(40px, 9vh, 96px) var(--pad) clamp(48px, 9vh, 96px); text-align: center; display: flex; flex-direction: column; align-items: center; }
.pg-kick {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: 0.04em;
  color: #fff; background: var(--c-violet-deep); border: 2.5px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  border-radius: 999px; padding: 9px 20px; margin-bottom: 30px;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  transform: rotate(-2deg);
}
.pg-display {
  font-family: "Fredoka", system-ui, sans-serif;
  margin: 0; font-weight: 700;
  font-size: clamp(54px, 12vw, 168px); line-height: 0.92; letter-spacing: -0.03em;
  color: var(--ink);
}
.pg-display .pop { display: inline-block; }
.pg-display .pop:nth-child(1) { color: var(--c-orange); }
.pg-display .pop:nth-child(2) { color: var(--ink); }
.pg-display .wobble { display: inline-block; animation: pgWobble 4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes pgWobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
.pg-sub {
  font-family: "Nunito", system-ui, sans-serif;
  margin: 30px auto 0; max-width: 560px; font-size: clamp(18px, 2.3vw, 23px);
  font-weight: 600; line-height: 1.45; color: var(--ink-soft); text-wrap: balance;
}
.pg-sub b { color: var(--ink); }
.pg-hint {
  margin-top: clamp(34px, 7vh, 64px);
  font-family: "Fredoka", system-ui, sans-serif; font-size: 14px; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 9px;
}
.pg-hint .grab { font-size: 18px; animation: pgPoint 1.6s ease-in-out infinite; }
@keyframes pgPoint { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }

/* ---- work -------------------------------------------------------------- */
.pg-work { padding: clamp(36px, 7vh, 80px) var(--pad) clamp(50px, 8vh, 100px); }
.pg-work h2 {
  font-family: "Fredoka", system-ui, sans-serif;
  text-align: center; margin: 0 0 8px; font-size: clamp(26px, 5vw, 46px); font-weight: 600; letter-spacing: -0.02em;
}
.pg-work .lead { text-align: center; color: var(--ink-soft); font-weight: 600; margin: 0 auto clamp(34px, 5vh, 56px); max-width: 460px; }
.pg-grid { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.6vw, 30px); }
@media (max-width: 820px) { .pg-grid { grid-template-columns: 1fr; } }

/* On phones there are no side gutters for the viewport-fixed shapes to live in,
   so they would sit over the copy. Keep the full draggable toy-box on larger
   screens; on small screens drop the confetti (and its hint) for a clean read. */
@media (max-width: 640px) {
  .pg-field { display: none; }
  .pg-hint { display: none; }
  .pg-pill { font-size: 12px; padding: 7px 13px; }
}
@media (max-width: 360px) {
  /* Below ~360px the lockup + pill overflow the row; the domain is in the footer. */
  .pg-pill { display: none; }
}
/* Touch devices: the hint points at a mouse-only interaction, so hide it. */
@media (hover: none), (pointer: coarse) { .pg-hint { display: none; } }

.pg-card {
  background: #fff; border: 3px solid var(--ink); border-radius: 30px;
  padding: clamp(20px, 2.6vw, 30px); display: flex; flex-direction: column; gap: 20px;
  box-shadow: 0 10px 0 var(--ink);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s;
}
.pg-card:hover { transform: translate(-3px, -6px) rotate(-0.6deg); box-shadow: 0 16px 0 var(--ink); }
.pg-card__stage { border-radius: 22px; height: 280px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; border: 2.5px solid var(--ink); }
.pg-card__stage.s-ysb { background: radial-gradient(120% 100% at 50% 0%, #2b1f4d, #0e0a1e); }
.pg-card__stage.s-fmk { background: #FFF4DE; }
.pg-card__meta { display: flex; flex-direction: column; gap: 11px; }
.pg-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pg-card__name { font-family: "Fredoka", system-ui, sans-serif; margin: 0; font-size: 25px; font-weight: 600; letter-spacing: -0.01em; }
.pg-card__tag {
  font-family: "Fredoka", system-ui, sans-serif; font-size: 11px; font-weight: 500;
  color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 11px; white-space: nowrap;
}
.pg-card.k-ysb .pg-card__tag { background: var(--c-yellow); }
.pg-card.k-fmk .pg-card__tag { background: var(--c-orange); color: var(--ink); }
.pg-card__desc { margin: 0; color: var(--ink-soft); font-weight: 600; font-size: 15.5px; line-height: 1.5; }

.pg-more {
  grid-column: 1 / -1; margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  border: 3px dashed var(--ink); border-radius: 26px; padding: 26px;
  font-family: "Fredoka", system-ui, sans-serif; font-size: 17px; color: var(--ink);
  background: #fff;
}
.pg-more .dots { display: inline-flex; gap: 6px; }
.pg-more .dots i { width: 11px; height: 11px; border-radius: 50%; animation: pgBlink 1.4s ease-in-out infinite; }
.pg-more .dots i:nth-child(1) { background: var(--c-orange); }
.pg-more .dots i:nth-child(2) { background: var(--c-blue); animation-delay: .2s; }
.pg-more .dots i:nth-child(3) { background: var(--c-green); animation-delay: .4s; }
@keyframes pgBlink { 0%, 100% { transform: scale(0.7); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }

/* ---- footer ------------------------------------------------------------ */
.pg-foot {
  max-width: 1080px; margin: 0 auto; padding: 36px var(--pad) 80px; text-align: center;
  font-family: "Fredoka", system-ui, sans-serif; color: var(--ink-soft);
}
.pg-foot a { color: var(--ink); text-decoration: none; border-bottom: 2.5px solid var(--c-orange); }
.pg-foot .row { margin-top: 8px; font-family: "Nunito", system-ui, sans-serif; font-weight: 600; font-size: 14px; }

/* ===========================================================================
   Faithful mini app previews (shared component, reused inside the work cards)
   YourStoryBook: midnight + gold, starfield, parchment card, serif title.
   ForMyKid:      cream, chunky tiles, hard offset shadow, warm.
   =========================================================================== */
.ysb-mini {
  width: 168px; height: 268px; border-radius: 26px;
  background: radial-gradient(120% 90% at 50% 0%, #251a45 0%, #0e0a1e 70%);
  box-shadow: 0 22px 40px -20px rgba(20, 10, 40, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative; overflow: hidden; padding: 16px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.ysb-mini .star { position: absolute; border-radius: 50%; background: #fff6d6; box-shadow: 0 0 6px #fff6d6; animation: ysbTw 4s ease-in-out infinite; }
@keyframes ysbTw { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
.ysb-mini .moon { position: absolute; top: 22px; right: 24px; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d6, #e9c970); box-shadow: 0 0 22px #e9c97099; }
.ysb-mini .card {
  background: linear-gradient(#fbf6ea, #f3ead2); border-radius: 12px; padding: 13px 13px 15px;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.6);
}
.ysb-mini .card .ttl { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700; font-size: 18px; line-height: 1.08; color: #2a1d10; letter-spacing: -0.01em; }
.ysb-mini .card .by { font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: 11px; color: #8a6f3e; margin-top: 8px; }
.ysb-mini .spark { color: #e9c970; font-size: 13px; margin-top: 9px; letter-spacing: 3px; }

.fmk-mini {
  width: 250px; height: 196px; border-radius: 22px;
  background: #FFF4DE;
  background-image: radial-gradient(circle at 8% 6%, #FFE0A6 0%, transparent 40%), radial-gradient(circle at 95% 96%, #C5E8FF 0%, transparent 42%);
  box-shadow: 0 22px 40px -22px rgba(46, 35, 23, 0.5), inset 0 0 0 1px rgba(46, 35, 23, 0.06);
  position: relative; overflow: hidden; padding: 16px;
  font-family: "Fredoka", system-ui, sans-serif;
}
.fmk-mini .bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.fmk-mini .bar b { color: #2E2317; font-size: 15px; font-weight: 600; white-space: nowrap; }
.fmk-mini .bar .dot { width: 22px; height: 22px; border-radius: 50%; background: #FF6B35; box-shadow: 0 3px 0 #2E2317; }
.fmk-mini .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.fmk-mini .tile {
  height: 58px; border-radius: 16px; border: 2.5px solid #2E2317;
  box-shadow: 0 5px 0 #2E2317; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.fmk-mini .tile .shape { width: 22px; height: 22px; }
.fmk-mini .tile.t1 { background: #FF6B35; } .fmk-mini .tile.t1 .shape { border-radius: 50%; background: #fff; }
.fmk-mini .tile.t2 { background: #FFC93C; } .fmk-mini .tile.t2 .shape { background: #2E2317; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.fmk-mini .tile.t3 { background: #3DA5D9; } .fmk-mini .tile.t3 .shape { background: #fff; border-radius: 5px; }
.fmk-mini .tile.t4 { background: #8BC34A; } .fmk-mini .tile.t4 .shape { background: #fff; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.fmk-mini .float { animation: fmkFloat 3.4s ease-in-out infinite; }
.fmk-mini .tile:nth-child(2) { animation-delay: .3s; }
.fmk-mini .tile:nth-child(3) { animation-delay: .6s; }
.fmk-mini .tile:nth-child(4) { animation-delay: .9s; }
@keyframes fmkFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
