/* WorkForPica — a game studio site.
 *
 * Reference point: kids'-app studios like Toca Boca — character art large and
 * sticker-like, everything rounded, bright saturated palette, chunky outlined
 * lettering. Not a muted portfolio.
 *
 * Deliberately ONE bright theme, no dark mode. A studio making a cheerful game
 * for six-year-olds should look like daylight; a light/dark muted pair is the
 * safe default that made the first attempt feel templated.
 *
 * Every colour is sampled from the game's own key art (assets/hero-keyart.webp):
 * the dragon's blue, the kitty's pink, the gold star and banner, the green
 * checkmarks on the chore clipboard. Type is chunky and rounded with a white
 * halo, echoing the "CHORE QUEST" banner lettering in that same art.
 *
 * Self-contained: no CDNs, no web fonts. `ui-rounded` resolves to SF Rounded on
 * Apple platforms, which is close to the app's Fredoka.
 */

:root {
  --ink:         #234057;
  --ink-soft:    #5C7387;
  --paper:       #E6F1FD;
  --sky:         #CFE6FA;
  --cream:       #FFF7E9;
  --card:        #FFFFFF;
  --line:        #DCE8F5;

  --dragon:      #62B4DE;
  --dragon-deep: #3B87B8;
  --kitty:       #F49CBE;
  --gold:        #F5C244;
  --gold-deep:   #D9962A;
  --green:       #5FBF57;
  --purple:      #A98FD8;

  /* Kept for the subpages' status/prose styles. */
  --cyan:        #3B87B8;
  --ok:          #3F9E45;
  --bad:         #C8342B;
  --warn:        #C07A12;
  --code-bg:     #F1F6FC;

  --display: ui-rounded, "SF Pro Rounded", "Baloo 2", Nunito,
             "Segoe UI Variable Display", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Chunky offset shadow — the game-UI device that makes cards feel like
     physical stickers rather than flat divs. */
  --lift: 0 5px 0 rgba(59, 135, 184, .16), 0 16px 34px -12px rgba(35, 64, 87, .28);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 88% -6%, #FFE9C2 0%, transparent 62%),
    radial-gradient(760px 460px at 4% 8%, #DCF0FF 0%, transparent 60%),
    linear-gradient(180deg, var(--sky) 0%, var(--paper) 34%, var(--cream) 100%);
  background-attachment: fixed;
}

::selection { background: var(--gold); color: #4A3208; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--dragon-deep); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1020px; margin: 0 auto; padding: 26px 22px 84px; position: relative; }

/* ---------- Masthead ---------- */

.masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 30px;
}

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--display);
  font-weight: 800; font-size: 19px; letter-spacing: -0.02em;
}

/* Confirmation mark: a parent confirms, then it counts — the game's central rule,
   reused as the studio's mark. Real Ionicon `checkmark-circle`, in the same green
   as the clipboard checks in the key art.
   Note: <use> content sits in shadow DOM, so `fill` must be set on the host
   element — a `.mark path {}` rule would never reach it. */
.mark { width: 30px; height: 30px; flex: none; fill: var(--green); }

.masthead nav { display: flex; gap: 8px; }

.masthead nav a {
  font: 600 14px var(--body); text-decoration: none; color: var(--ink);
  padding: 9px 15px; border-radius: 999px; background: rgba(255, 255, 255, .66);
  transition: background .15s, transform .12s;
}

.masthead nav a:hover { background: #fff; transform: translateY(-1px); }

/* ---------- Hero ---------- */

.hero {
  display: grid; grid-template-columns: 1.05fr .95fr;
  align-items: center; gap: 24px; padding: 18px 0 34px;
}

.eyebrow {
  display: inline-block; font: 700 11.5px var(--mono);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-deep); background: #fff;
  padding: 7px 13px; border-radius: 999px; margin: 0 0 18px;
  box-shadow: 0 3px 0 rgba(217, 150, 42, .18);
}

h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6.2vw, 66px);
  font-weight: 800; line-height: .96; letter-spacing: -0.04em;
  margin: 0 0 20px;
  /* White halo + soft drop: the banner lettering treatment from the key art. */
  text-shadow:
     2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff,
     2px 2px 0 #fff, -2px 2px 0 #fff, 2px -2px 0 #fff, -2px -2px 0 #fff,
     0 7px 0 rgba(59, 135, 184, .13);
}

h1 em { font-style: normal; color: var(--dragon-deep); }

.lede { font-size: 18px; line-height: 1.62; max-width: 46ch; margin: 0 0 26px; color: var(--ink); }

.hero-art { position: relative; display: grid; place-items: center; }

/* The app's own glow layer, sitting behind the character exactly as it does
   in-game. */
/* Width stays at 100% of the column: the source PNG already carries a generous
   transparent margin, so it reads as a halo without overflowing. Going wider
   (116%) pushed past the viewport on mobile and gave the page a horizontal
   scrollbar. */
.hero-art .glow {
  position: absolute; width: 100%; max-width: 430px; height: auto;
  opacity: .8; z-index: 0;
}

.hero-art .buddy {
  position: relative; z-index: 1;
  width: 100%; max-width: 400px; height: auto; display: block;
  filter: drop-shadow(0 16px 22px rgba(35, 64, 87, .2));
}

/* ---------- Buttons ---------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font: 800 16px var(--display); letter-spacing: -0.01em;
  text-decoration: none; padding: 14px 24px; border-radius: 999px;
  background: linear-gradient(180deg, #7CC4E8 0%, var(--dragon) 55%, #55A6D4 100%);
  color: #fff; border: 0;
  /* Hard bottom edge, so pressing it actually feels like pressing something —
     the same rule the app holds itself to: every tap gets a reaction. */
  box-shadow: 0 5px 0 var(--dragon-deep), 0 14px 22px -10px rgba(59, 135, 184, .7);
  transition: transform .1s, box-shadow .1s;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--dragon-deep), 0 18px 26px -10px rgba(59, 135, 184, .75); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--dragon-deep); }

.btn-ghost {
  font: 700 15px var(--body); text-decoration: none; color: var(--ink);
  padding: 13px 20px; border-radius: 999px; background: rgba(255, 255, 255, .74);
  box-shadow: 0 3px 0 rgba(35, 64, 87, .1);
}

.btn-ghost:hover { background: #fff; }

/* ---------- Ribbon section heads ---------- */

.ribbon {
  display: inline-flex; align-items: center; gap: 9px;
  font: 800 14px var(--display); letter-spacing: 0.02em; text-transform: uppercase;
  color: #6B4708; margin: 46px 0 20px;
  background: linear-gradient(180deg, #FBD877 0%, var(--gold) 60%, #EDB233 100%);
  padding: 9px 20px; border-radius: 10px;
  box-shadow: 0 4px 0 var(--gold-deep);
  transform: rotate(-1deg);
}

.ribbon .n { font: 700 12px var(--mono); opacity: .72; }

/* ---------- App cards ---------- */

.apps { display: grid; gap: 22px; }

.app {
  background: var(--card); border-radius: 26px; padding: 26px;
  box-shadow: var(--lift);
  display: grid; grid-template-columns: 104px 1fr; gap: 22px;
  transform: rotate(-.5deg);
  transition: transform .18s ease, box-shadow .18s ease;
}

.app:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 8px 0 rgba(59, 135, 184, .18), 0 24px 44px -14px rgba(35, 64, 87, .32);
}

.app-icon {
  width: 104px; height: 104px; border-radius: 24px; display: block;
  box-shadow: 0 4px 0 rgba(59, 135, 184, .18);
}

.app-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-bottom: 2px; }

.app-name { font: 800 27px var(--display); letter-spacing: -0.028em; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font: 800 11px var(--display); letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: var(--green); color: #fff;
  box-shadow: 0 3px 0 #418F3B;
}

.pill svg { width: 13px; height: 13px; fill: currentColor; }

.pill.soon { background: #fff; color: var(--gold-deep); box-shadow: 0 3px 0 rgba(217, 150, 42, .3); }

.app-tag {
  font: 700 17px var(--display); color: var(--dragon-deep);
  margin: 0 0 12px; letter-spacing: -0.015em;
}

.app-desc { margin: 0 0 16px; color: var(--ink-soft); font-size: 15.5px; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.badges span {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 12.5px var(--body); color: var(--ink);
  background: var(--code-bg); padding: 7px 13px; border-radius: 999px;
}

.badges svg { width: 14px; height: 14px; flex: none; fill: var(--dragon-deep); }

/* ---------- A look inside ---------- */

.peek {
  display: grid; grid-template-columns: 420px 1fr; gap: 30px; align-items: center;
  background: var(--card); border-radius: 26px; padding: 26px;
  box-shadow: var(--lift); transform: rotate(.4deg);
}

.peek > img {
  width: 100%; height: auto; display: block; border-radius: 18px;
  box-shadow: 0 4px 0 rgba(59, 135, 184, .16);
}

.peek p { margin: 0 0 16px; font-size: 16px; color: var(--ink-soft); }
.peek b { color: var(--ink); }

.inside-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }

.inside-list li {
  display: flex; align-items: center; gap: 11px;
  font-size: 15px; color: var(--ink);
}

.inside-list svg { width: 20px; height: 20px; flex: none; fill: var(--gold-deep); }

.disclosure { font-size: 13.5px; color: var(--ink-soft); margin: 16px 0 0; }

/* ---------- Privacy index + policy pages ---------- */

.crumbs {
  display: flex; gap: 8px; align-items: center;
  font: 600 13px var(--body); color: var(--ink-soft); margin-bottom: 18px;
}

.crumbs a { color: var(--dragon-deep); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Says plainly which app a policy covers, so it can't be read as studio-wide. */
.applies-to {
  display: flex; align-items: center; gap: 15px;
  background: var(--card); border-radius: 18px; padding: 16px 18px;
  box-shadow: var(--lift); margin-bottom: 26px;
}

.applies-to img { width: 52px; height: 52px; border-radius: 13px; flex: none; }
.applies-to p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.applies-to b { color: var(--ink); }
.applies-to a { color: var(--dragon-deep); font-weight: 600; }

.policy {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 18px;
  background: var(--card); border-radius: 22px; padding: 20px 22px;
  box-shadow: var(--lift); text-decoration: none; color: var(--ink);
  transition: transform .16s ease, box-shadow .16s ease;
}

.policy:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 rgba(59, 135, 184, .18), 0 24px 40px -14px rgba(35, 64, 87, .3);
}

.policy img { width: 64px; height: 64px; border-radius: 16px; }
.policy span { display: grid; gap: 3px; }
.policy b { font: 800 19px var(--display); letter-spacing: -0.02em; }
.policy small { font-size: 13.5px; color: var(--ink-soft); }
.policy em { font: 800 22px var(--display); color: var(--dragon-deep); font-style: normal; }

@media (max-width: 480px) {
  .policy { grid-template-columns: 48px 1fr; gap: 14px; padding: 18px; }
  .policy img { width: 48px; height: 48px; border-radius: 12px; }
  .policy em { display: none; }
  .applies-to { gap: 12px; padding: 14px; }
  .applies-to img { width: 44px; height: 44px; }
}

/* ---------- In progress ---------- */

.wip {
  background: rgba(255, 255, 255, .6); border-radius: 20px; padding: 20px 24px;
  border: 2px dashed #C9DCEE; font-size: 15.5px; color: var(--ink-soft);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
}

.wip b { font: 800 12px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }

/* ---------- Sparkles ---------- */

/* fill on the host, not a descendant — <use> content is in shadow DOM. */
.spark { position: absolute; pointer-events: none; fill: var(--gold); opacity: .85; }
.spark.a { top: 92px;  right: 41%; width: 20px; }
.spark.b { top: 300px; right: 2%;  width: 28px; }
.spark.c { top: 215px; left: 1%;   width: 15px; }

/* ---------- Footer ---------- */

footer {
  margin-top: 54px; padding-top: 24px; border-top: 2px dashed #CFDFEF;
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  font-size: 14px; color: var(--ink-soft);
}

footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Subpage bits ---------- */

.card { background: var(--card); border-radius: 22px; padding: 26px; margin-bottom: 20px; box-shadow: var(--lift); }

.section-head { display: flex; align-items: baseline; gap: 12px; margin: 40px 0 18px; }
.section-head h2 { font: 800 15px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 0; }
.section-head .count { font: 12px var(--mono); color: var(--ink-soft); margin-left: auto; }

pre { background: var(--code-bg); border-radius: 14px; padding: 16px; margin: 0; overflow-x: auto; font: 13px/1.55 var(--mono); }
code { font: 12.5px var(--mono); background: var(--code-bg); padding: 2px 6px; border-radius: 6px; }

/* ---------- Motion ---------- */

@keyframes bob   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
@keyframes twink { 0%,100% { transform: scale(.85) rotate(0deg); opacity: .55; }
                   50%     { transform: scale(1.15) rotate(18deg); opacity: 1; } }
@keyframes pop   { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* Animation is opt-in and content is visible without it — never make legibility
   depend on an animation running. */
@media (prefers-reduced-motion: no-preference) {
  /* Only the character floats — the glow stays put, or the whole thing swims. */
  .hero-art .buddy { animation: bob 5.5s ease-in-out infinite; }
  .spark { animation: twink 3.4s ease-in-out infinite; }
  .spark.b { animation-delay: .9s; }
  .spark.c { animation-delay: 1.8s; }
  .pop { animation: pop .5s cubic-bezier(.2,.7,.3,1) backwards; }
  .pop:nth-of-type(2) { animation-delay: .08s; }
  .pop:nth-of-type(3) { animation-delay: .16s; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 6px; text-align: center; }
  .hero-text { order: 2; }
  .hero-art  { order: 1; }
  .hero-art .buddy { max-width: 260px; }
  .lede { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .spark.a, .spark.c { display: none; }
}

@media (max-width: 860px) {
  .peek { grid-template-columns: 1fr; gap: 22px; }
  .peek > img { max-width: 340px; margin-inline: auto; }
}

@media (max-width: 560px) {
  .app { grid-template-columns: 1fr; gap: 16px; text-align: left; padding: 22px; }
  .app-icon { width: 84px; height: 84px; border-radius: 20px; }
  h1 { letter-spacing: -0.03em; }
  .masthead nav a { padding: 8px 12px; font-size: 13.5px; }
}

/* iPhone SE and similar: the wordmark plus two nav pills stop fitting on one
   line, which gave the whole page a 3px horizontal scroll. */
@media (max-width: 380px) {
  .masthead { gap: 8px; }
  .wordmark { font-size: 17px; gap: 8px; }
  .mark { width: 26px; height: 26px; }
  .masthead nav { gap: 6px; }
  .masthead nav a { padding: 7px 10px; font-size: 13px; }
}
