/* Packinator: a plump little machine that stuffs texture maps into one. Dark, colourful,
   squashy, in the app's red, green, blue and white channel colours, with a coral machine. */
:root {
  --bg: #1c1c21;
  --bg2: #24242b;
  --panel: #2c2c34;
  --line: #3a3a44;
  --text: #f2f2f5;
  --muted: #a8a8b4;
  --coral: #ff6b5a; --coral-d: #c9392e;
  --red: #ff5c5c;   --red-d: #c42f2f;
  --green: #5ed68a; --green-d: #2a9a57;
  --blue: #4aa3ff;  --blue-d: #2366c4;
  --white: #f4f4f4; --white-d: #a4a4ac;
  --gold: #ffc94a;  --gold-d: #c98a12;
  --radius: 22px;
  --head: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
/* nothing may widen the page sideways ('clip' holds on phones where 'hidden' doesn't, and
   keeps the sticky nav working) */
@supports (overflow: clip) { html, body { overflow-x: clip; } }
a { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--head); line-height: 1.1; margin: 0 0 .5em; }
h2 { font-size: clamp(30px, 4.5vw, 46px); text-align: center; }
h3 { font-size: 21px; }
.small { color: var(--muted); font-size: 14px; }
section { padding: 72px 20px; max-width: 1140px; margin: 0 auto; position: relative; }
code { font-size: .92em; background: rgba(255, 255, 255, .07); padding: 1px 6px; border-radius: 6px; }

/* floating background glows: gradients moved only with transform (phones flicker with blur) */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; width: 560px; height: 560px; border-radius: 50%; opacity: .36;
  background: radial-gradient(closest-side, var(--c), transparent);
  animation: drift 22s ease-in-out infinite alternate; will-change: transform;
}
.blob.red { --c: var(--red); top: -150px; left: -130px; }
.blob.green { --c: var(--green); top: 30%; right: -190px; animation-delay: -6s; }
.blob.blue { --c: var(--blue); bottom: -170px; left: 20%; animation-delay: -12s; }
.blob.white { --c: #9a9aa8; top: 60%; left: -210px; animation-delay: -18s; opacity: .22; }
@keyframes drift { to { transform: translate(80px, 60px) scale(1.15); } }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(28, 28, 33, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand span { font-family: var(--head); font-weight: 700; font-size: 26px; letter-spacing: .5px; }
.brand img { transition: transform .4s cubic-bezier(.3, 1.8, .5, 1); }
.brand:hover img { transform: scale(1.15, .85) rotate(-6deg); }
.nav nav { display: flex; align-items: center; gap: clamp(10px, 2.5vw, 28px); }
.nav nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav nav a:not(.btn):hover { color: var(--text); }

/* squashy buttons */
.btn {
  --c: var(--gold); --d: var(--gold-d); --fg: #2a1d00;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--head); font-weight: 600; font-size: 19px;
  padding: 13px 26px; border-radius: 999px; text-decoration: none; cursor: pointer;
  color: var(--fg); background: var(--c); border: 3px solid var(--d);
  box-shadow: 0 5px 0 var(--d), 0 10px 24px rgba(0, 0, 0, .35);
  transition: transform .18s cubic-bezier(.3, 1.8, .5, 1), box-shadow .18s;
}
.btn:hover { transform: translateY(-2px) scale(1.04, .97); }
.btn:active { transform: translateY(4px) scale(1.08, .9); box-shadow: 0 1px 0 var(--d), 0 4px 10px rgba(0, 0, 0, .3); }
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.btn-coral { --c: var(--coral); --d: var(--coral-d); --fg: #fff; }
.btn-green { --c: var(--green); --d: var(--green-d); --fg: #0d2b19; }
.btn-ghost { --c: transparent; --d: var(--line); --fg: var(--text); box-shadow: none; font-size: 15px; }
.btn-small { padding: 8px 18px; font-size: 16px; box-shadow: 0 3px 0 var(--d); }
.btn-big { font-size: 23px; padding: 16px 34px; }

/* hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  padding-top: 64px;
}
.kicker {
  display: inline-block; margin: 0 0 14px; padding: 4px 14px; border-radius: 999px;
  background: rgba(255, 107, 90, .15); color: var(--coral); font-weight: 800; font-size: 14px;
  letter-spacing: 1px; text-transform: uppercase;
}
.hero h1 { font-size: clamp(40px, 6vw, 72px); }
.rgba { white-space: nowrap; }
.rgba b { display: inline-block; animation: hop 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
.rgba b:nth-child(1) { color: var(--red); }
.rgba b:nth-child(2) { color: var(--green); animation-delay: .12s; }
.rgba b:nth-child(3) { color: var(--blue); animation-delay: .24s; }
.rgba b:nth-child(4) { color: var(--white); animation-delay: .36s; }
@keyframes hop {
  0%, 62%, 100% { transform: none; }
  70% { transform: translateY(-10px) scale(.94, 1.08); }
  78% { transform: scale(1.14, .84); }
  86% { transform: scale(.97, 1.03); }
}
.lead { font-size: 20px; color: #d6d6de; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 16px; margin: 28px 0 14px; }

/* hero toy: four maps go in, the press comes down, one packed texture comes out */
.hero-toy { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.stage {
  --u: min(420px, 82vw);
  position: relative; width: var(--u); aspect-ratio: 1 / 1; cursor: pointer;
  border-radius: 34px; background: rgba(255, 255, 255, .03);
  border: 2px solid rgba(255, 255, 255, .05); overflow: hidden;
}
.press {
  position: absolute; left: 50%; top: 0; width: 66%; transform: translateX(-50%) translateY(-62%);
  transition: transform .22s cubic-bezier(.6, 0, .9, .4);
}
.press .rod { width: 9%; height: calc(var(--u) * .3); margin: 0 auto; background: #9aa0a8; border: 3px solid #5c626a; border-top: 0; }
.press .plate { height: calc(var(--u) * .07); background: #9aa0a8; border: 3px solid #5c626a; border-radius: 10px; }
.stage.slam .press { transform: translateX(-50%) translateY(calc(var(--u) * .045)); }
.stage.lift .press { transform: translateX(-50%) translateY(-62%); transition: transform .5s cubic-bezier(.3, 1.5, .5, 1); }

.chans {
  position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%);
  display: flex; align-items: flex-end; gap: calc(var(--u) * .045);
  transition: gap .45s cubic-bezier(.5, 0, .3, 1);
}
.chan {
  position: relative; width: calc(var(--u) * .19); height: calc(var(--u) * .19);
  border-radius: 14px; background: var(--c); border: 3px solid var(--d);
  transition: width .45s cubic-bezier(.5, 0, .3, 1), height .45s cubic-bezier(.4, 1.6, .5, 1),
    border-radius .45s, transform .2s;
}
.chan::before { /* the greyscale map, until it turns into its channel */
  content: ""; position: absolute; inset: 0; border-radius: 10px; background: var(--map);
  transition: opacity .35s;
}
.chan::after { /* shine */
  content: ""; position: absolute; left: 18%; top: 9%; width: 22%; height: 18%;
  border-radius: 50%; background: rgba(255, 255, 255, .4); opacity: 0; transition: opacity .3s;
}
.chan span {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  font-family: var(--head); font-weight: 600; font-size: 13px; color: var(--text);
  background: var(--d); padding: 1px 9px; border-radius: 999px; white-space: nowrap;
  transition: opacity .25s;
}
.c-r { --c: var(--red); --d: var(--red-d);
  --map: radial-gradient(circle at 30% 30%, #fff 0 14%, transparent 15%) 0 0 / 50% 50%,
         radial-gradient(circle, #7a7a7a 0 40%, #f0f0f0 70%) 0 0 / 50% 50%; }
.c-g { --c: var(--green); --d: var(--green-d);
  --map: conic-gradient(from 30deg, #6a6a6a, #c8c8c8, #8a8a8a, #e0e0e0, #6a6a6a) 0 0 / 34% 34%; }
.c-b { --c: var(--blue); --d: var(--blue-d);
  --map: radial-gradient(circle, #fff 0 30%, #111 33%) 0 0 / 33.3% 33.3%; }
.c-a { --c: var(--white); --d: var(--white-d);
  --map: linear-gradient(135deg, #222, #ddd 45%, #555 60%, #f4f4f4); }

/* stage 1: the maps become tall channel bars */
.stage.bars .chan { width: calc(var(--u) * .13); height: calc(var(--u) * .42); border-radius: 22px; }
.stage.bars .chan::before { opacity: 0; }
.stage.bars .chan::after { opacity: 1; }
.stage.bars .chan span { opacity: 0; }
/* stage 2: squashed by the press */
.stage.slam .chan { transform: scaleY(.86); transform-origin: 50% 100%; }
/* stage 3: one packed tile */
.stage.packed .chans { gap: 0; }
.stage.packed .chan { border-radius: 0; border-left-width: 0; border-right-width: 0; }
.stage.packed .chan:first-child { border-radius: 22px 0 0 22px; border-left-width: 3px; }
.stage.packed .chan:last-child { border-radius: 0 22px 22px 0; border-right-width: 3px; }
.stage.packed .chan:not(:first-child)::after { opacity: 0; }
.stamp {
  position: absolute; left: 0; right: 0; bottom: 6%; text-align: center;
  font-family: var(--head); font-weight: 700; font-size: calc(var(--u) * .11); color: var(--coral);
  opacity: 0; transform: scale(.2);
  transition: opacity .2s, transform .45s cubic-bezier(.3, 1.9, .5, 1);
}
.stage.packed .stamp { opacity: 1; transform: none; }
.sparks { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.stage.slam .sparks { opacity: 1; }
.sparks i {
  position: absolute; width: calc(var(--u) * .07); height: 5px; border-radius: 3px;
  background: var(--gold); top: 50%;
}
.sparks i:nth-child(1) { left: 6%; transform: rotate(-25deg); top: 44%; }
.sparks i:nth-child(2) { left: 5%; }
.sparks i:nth-child(3) { left: 6%; transform: rotate(25deg); top: 56%; }
.sparks i:nth-child(4) { right: 6%; transform: rotate(25deg); top: 44%; }
.sparks i:nth-child(5) { right: 5%; }
.sparks i:nth-child(6) { right: 6%; transform: rotate(-25deg); top: 56%; }

/* screenshot */
.shot { padding-top: 10px; }
.window {
  border-radius: 18px; overflow: hidden; background: #2b2b2b;
  border: 3px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 10px rgba(255, 255, 255, .02);
  transform: perspective(1600px) rotateX(5deg);
  transition: transform .6s cubic-bezier(.3, 1.6, .5, 1);
}
.window:hover { transform: perspective(1600px) rotateX(0) scale(1.01); }
.window-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #202024; }
.window-bar i { width: 12px; height: 12px; border-radius: 50%; background: var(--red); }
.window-bar i:nth-child(2) { background: var(--green); }
.window-bar i:nth-child(3) { background: var(--blue); }
.window-bar span { margin-left: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }

/* presets strip */
.presets h2 { margin-bottom: 10px; }
.presets .sub { text-align: center; color: var(--muted); margin: 0 auto 34px; max-width: 40em; }
.preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.preset {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px 18px;
}
.preset h3 { font-size: 18px; margin-bottom: 4px; }
.preset .who { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.preset ul { list-style: none; margin: 0; padding: 0; }
.preset li { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 15px; }
.preset li i {
  flex: none; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  font-style: normal; font-family: var(--head); font-weight: 700; font-size: 14px;
}
.preset li .r { background: var(--red); color: #4a1010; }
.preset li .g { background: var(--green); color: #0d3b20; }
.preset li .b { background: var(--blue); color: #0d2a50; }
.preset li .a { background: var(--white); color: #333; }
.preset li.off { color: #6e6e7a; }

/* features */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
.card {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; transition: transform .45s cubic-bezier(.3, 1.8, .5, 1), border-color .2s;
}
.card:hover { transform: translateY(-6px) rotate(-1deg); border-color: #4a4a56; }
.card:hover .ico { animation: wobble .8s ease; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
@keyframes wobble {
  0% { transform: none; } 20% { transform: scale(1.2, .8); } 40% { transform: scale(.88, 1.12); }
  60% { transform: scale(1.07, .93); } 80% { transform: scale(.97, 1.03); } 100% { transform: none; }
}
.ico {
  --c: var(--coral); --d: var(--coral-d);
  width: 64px; height: 64px; border-radius: 20px; margin-bottom: 16px;
  display: grid; place-items: center; background: rgba(255, 255, 255, .05);
  border: 2px solid rgba(255, 255, 255, .06);
}
.ico svg { width: 46px; height: 46px; }
.ico svg * { fill: var(--c); stroke: var(--d); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ico svg .r { fill: var(--red); stroke: var(--red-d); }
.ico svg .g { fill: var(--green); stroke: var(--green-d); }
.ico svg .b { fill: var(--blue); stroke: var(--blue-d); }
.ico svg .a { fill: var(--white); stroke: var(--white-d); }
.ico svg .line { fill: none; stroke-width: 4; }
.ico svg .dark { fill: #4a2420; stroke: none; }
.ico-coral { --c: var(--coral); --d: var(--coral-d); }
.ico-red { --c: var(--red); --d: var(--red-d); }
.ico-green { --c: var(--green); --d: var(--green-d); }
.ico-blue { --c: var(--blue); --d: var(--blue-d); }
.ico-gold { --c: var(--gold); --d: var(--gold-d); }

/* the machine at work */
.machine { text-align: center; }
.machine .sub { color: var(--muted); max-width: 36em; margin: 0 auto 26px; }
.machine img {
  margin: 0 auto; border-radius: 22px; border: 3px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45); width: min(560px, 100%);
}

/* steps */
.steps ol { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { text-align: center; padding: 10px 18px; }
.steps p { color: var(--muted); margin: 0; }
.num {
  display: inline-grid; place-items: center; width: 66px; height: 66px; margin-bottom: 14px;
  font-family: var(--head); font-weight: 700; font-size: 32px; color: #fff;
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  animation: blobby 6s ease-in-out infinite alternate;
}
.n1 { background: var(--red); box-shadow: 0 5px 0 var(--red-d); }
.n2 { background: var(--green); box-shadow: 0 5px 0 var(--green-d); animation-delay: -2s; color: #0d3b20; }
.n3 { background: var(--blue); box-shadow: 0 5px 0 var(--blue-d); animation-delay: -4s; }
@keyframes blobby { to { border-radius: 58% 42% 45% 55% / 45% 58% 42% 55%; } }

/* pricing */
.pricing { text-align: center; }
.price-card {
  max-width: 460px; margin: 36px auto 0; padding: 36px 32px 28px;
  background: linear-gradient(160deg, #33333d, #26262d);
  border: 3px solid var(--line); border-radius: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  position: relative;
}
.price-card::before { /* four channel bars peeking over the top */
  content: ""; position: absolute; top: -28px; left: 50%; width: 112px; height: 46px;
  transform: translateX(-50%);
  background:
    linear-gradient(var(--red), var(--red)) 0 0 / 26px 46px no-repeat,
    linear-gradient(var(--green), var(--green)) 28px 0 / 26px 46px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 56px 0 / 26px 46px no-repeat,
    linear-gradient(var(--white), var(--white)) 84px 0 / 26px 46px no-repeat;
  border-radius: 12px;
}
.price { font-family: var(--head); font-weight: 700; font-size: 96px; line-height: 1; margin-bottom: 18px; }
.currency { font-size: 44px; vertical-align: top; position: relative; top: 12px; margin-right: 2px; color: var(--green); }
.once { font-size: 22px; color: var(--muted); margin-left: 8px; font-weight: 600; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 28px; text-align: left; }
.price-card li { padding: 7px 0 7px 36px; position: relative; }
.price-card li::before {
  content: ""; position: absolute; left: 4px; top: 11px; width: 18px; height: 18px;
  border-radius: 6px; background: var(--red); box-shadow: 0 3px 0 var(--red-d);
}
.price-card li:nth-child(2)::before { background: var(--green); box-shadow: 0 3px 0 var(--green-d); }
.price-card li:nth-child(3)::before { background: var(--blue); box-shadow: 0 3px 0 var(--blue-d); }
.price-card li:nth-child(4)::before { background: var(--white); box-shadow: 0 3px 0 var(--white-d); }
.pay-note { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }
.pay {
  font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: #dcdce4; border: 1px solid rgba(255, 255, 255, .1);
}
.gpay { background: #fff; color: #3c4043; }
.try { margin-top: 26px; color: var(--muted); }
/* until the store exists the price card says so instead of offering a Buy button */
.soon { display: none; margin: 0; padding: 14px 16px; border-radius: 16px;
  background: rgba(94, 214, 138, .1); border: 2px dashed rgba(94, 214, 138, .4); color: #cfeedd; }
.not-ready .soon { display: block; }
.not-ready .price-card .buy, .not-ready .price-card .pay-note { display: none; }

/* faq */
.faq { max-width: 780px; }
.faq h2 { margin-bottom: 30px; }
details {
  background: var(--panel); border: 2px solid var(--line); border-radius: 18px;
  margin-bottom: 12px; padding: 0 22px; transition: border-color .2s;
}
details[open] { border-color: #4a4a56; }
summary {
  cursor: pointer; list-style: none; padding: 18px 30px 18px 0; position: relative;
  font-family: var(--head); font-weight: 600; font-size: 19px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: var(--green); color: #0d3b20; font-size: 22px; line-height: 1;
  transition: transform .3s cubic-bezier(.3, 1.8, .5, 1);
}
details[open] summary::after { content: "\2212"; transform: translateY(-50%) rotate(180deg); background: var(--coral); color: #fff; }
details p { margin: 0 0 18px; color: #cfcfd8; }

/* footer */
.footer { text-align: center; padding: 50px 20px 60px; border-top: 1px solid rgba(255, 255, 255, .06); margin-top: 40px; }
.footer p { margin: 6px 0; color: var(--muted); }
.small-brand { justify-content: center; margin-bottom: 10px; }
.small-brand span { font-size: 20px; }

/* responsive */
@media (max-width: 980px) {
  .cards, .preset-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav { backdrop-filter: none; background: rgba(28, 28, 33, .96); }
  .blob { animation-duration: 40s; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
  .hero .lead { margin: 0 auto; }
  .cta { justify-content: center; }
  .steps ol { grid-template-columns: 1fr; }
  .nav nav a:not(.btn) { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  section { padding: 56px 16px; }
  .cards, .preset-grid { grid-template-columns: 1fr; }
  .btn { font-size: 17px; padding: 12px 22px; }
  .btn-big { font-size: 20px; }
  .price { font-size: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
