/* Pawket's site: the same pixel look as the app's drawer. Colours come from Pixel.swift,
   the accent from the default calico cat's fur. */

@font-face {
  font-family: "Pixelify Sans";
  src: url("fonts/PixelifySans.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("fonts/Silkscreen-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #08080b;
  --card: #141419;
  --raised: #212129;
  --slot: #131318;
  --slot-dark: #050508;
  --slot-light: rgba(43, 43, 54, 0.6);
  --edge: #33333f;
  --ink: #f2e8e3;
  --dim: #8c8a99;
  --faint: #5c5969;
  --accent: #f59a66;
  --accent-deep: #b25d2b;
  --accent-ink: #2b1c13;
  --u: 3px; /* one "pixel" of chrome */
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pixelify Sans", ui-monospace, monospace;
  font-variant-ligatures: none; /* Pixelify draws "fi" as one glyph that reads like an "A" */
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: none;
  overflow-x: hidden;
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.label {
  font-family: "Silkscreen", monospace;
  font-size: 16px;
  line-height: 1.2;
  text-transform: lowercase;
  -webkit-font-smoothing: none;
}
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.accent-text { color: var(--accent); }

h1, h2, h3 { font-weight: 500; margin: 0; line-height: 1.12; }
h1 { font-size: clamp(40px, 6.4vw, 72px); letter-spacing: -0.5px; }
h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 32px; }
h3 { font-size: 24px; margin: 18px 0 8px; }
p { margin: 0; }

/* --- Pixel chrome ------------------------------------------------------------- */

/* PixelBox: a 1-unit outline with the corner pixels left out. */
.px, .key, .slot, .card, .toggle {
  --b: var(--edge);
  box-shadow:
    0 calc(-1 * var(--u)) 0 0 var(--b),
    0 var(--u) 0 0 var(--b),
    calc(-1 * var(--u)) 0 0 0 var(--b),
    var(--u) 0 0 0 var(--b);
}

/* A raised key: light top edge, dark bottom lip. */
.key {
  --b: var(--slot-dark);
  --fill: var(--raised);
  --lip: var(--slot-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px calc(var(--u)) 14px;
  background: var(--fill);
  color: var(--ink);
  font-family: "Silkscreen", monospace;
  font-size: 16px;
  text-decoration: none;
  text-transform: lowercase;
  cursor: pointer;
  border: 0;
  box-shadow:
    inset 0 var(--u) 0 rgba(255, 255, 255, 0.12),
    inset 0 calc(-1 * var(--u)) 0 var(--lip),
    0 calc(-1 * var(--u)) 0 0 var(--b),
    0 var(--u) 0 0 var(--b),
    calc(-1 * var(--u)) 0 0 0 var(--b),
    var(--u) 0 0 0 var(--b);
  transition: transform 60ms;
}
.key:hover { --fill: var(--edge); }
.key:active { transform: translateY(var(--u)); padding-bottom: 0; --lip: var(--fill); }
.key.accent { --fill: var(--accent); --lip: var(--accent-deep); color: var(--accent-ink); }
.key.accent:hover { --fill: #ffad7d; }
.key.big { min-height: 52px; padding: 0 24px var(--u); font-size: 16px; }
kbd.key { min-height: 26px; padding: 0 8px var(--u); font-size: 13px; font-family: "Pixelify Sans", monospace; cursor: default; }
kbd.key:active { transform: none; padding-bottom: var(--u); }
kbd.key.small { min-height: 22px; font-size: 14px; vertical-align: 2px; }

/* An inventory slot: sunk, dark along the top and left, light along the bottom and right. */
.slot {
  background: var(--slot);
  box-shadow:
    inset 0 var(--u) 0 var(--slot-dark),
    inset var(--u) 0 0 var(--slot-dark),
    inset 0 calc(-1 * var(--u)) 0 var(--slot-light),
    inset calc(-1 * var(--u)) 0 0 var(--slot-light),
    0 calc(-1 * var(--u)) 0 0 var(--b),
    0 var(--u) 0 0 var(--b),
    calc(-1 * var(--u)) 0 0 0 var(--b),
    var(--u) 0 0 0 var(--b);
}
.slot.selected { --b: var(--accent); }

.card { background: var(--card); padding: 24px; }

/* On/off switch. */
.toggle {
  position: relative;
  width: 46px;
  height: 24px;
  padding: 0;
  border: 0;
  background: var(--slot-dark);
  cursor: pointer;
}
.toggle i {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  background: var(--faint);
  transition: left 120ms ease-out;
}
.toggle[aria-checked="true"] { background: var(--accent); --b: var(--accent-deep); }
.toggle[aria-checked="true"] i { left: 26px; background: var(--accent-ink); }
.toggle:focus-visible, .key:focus-visible { outline: 2px dashed var(--accent); outline-offset: 6px; }

/* Icons drawn from pixel maps by cat.js. */
i[data-icon] { display: inline-block; line-height: 0; color: var(--accent); }
i[data-icon] svg { display: block; }

/* --- Layout -------------------------------------------------------------------- */

.notch {
  position: absolute;
  top: 0;
  left: 50%;
  width: 200px;
  height: 32px;
  transform: translateX(-50%);
  background: #000;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 48px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Silkscreen", monospace;
  font-size: 16px;
  color: var(--accent);
}
.brand img { image-rendering: auto; }
.nav-right { display: flex; align-items: center; gap: 24px; }
.cat-switch { display: flex; align-items: center; gap: 10px; color: var(--dim); cursor: pointer; }

.hero { padding-top: 112px; padding-bottom: 72px; }
.kicker { color: var(--accent); margin-bottom: 20px; }
.hero h1 { max-width: 15em; }
.lede { max-width: 34em; margin-top: 24px; font-size: 21px; color: var(--dim); }
.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 24px; margin-top: 40px; }
.fine { margin-top: 18px; font-size: 13px; }
.cta s, .price s { color: var(--faint); text-decoration-thickness: 3px; text-decoration-color: var(--accent-deep); }
.key.accent s { color: var(--accent-ink); opacity: 0.55; }
.cta.center { justify-content: center; }
.hint { margin-top: 56px; color: var(--faint); font-size: 13px; }

main > section.wrap { margin-bottom: 128px; }
main > section.wrap.hero { margin-bottom: 0; }

/* The stash, as it looks hanging out of the notch: a copy of DrawerView.swift at its real
   size in points (640 x 442), zoomed to fit by cat.js. */
.demo { display: flex; justify-content: center; }
/* Pixel wallpaper (drawn by cat.js) inside stepped, pixel-style rounded corners. */
.pixel-bg {
  --s: 8px; /* corner step */
  position: relative;
  /* Shown until the wallpaper is drawn. */
  background: #2c2038 linear-gradient(#422e52, #181420);
  background-size: 100% 100%;
  image-rendering: pixelated;
  overflow: hidden;
  /* Stepped, pixel-style rounded corners. */
  clip-path: polygon(
    0 calc(2 * var(--s)), var(--s) calc(2 * var(--s)), var(--s) var(--s), calc(2 * var(--s)) var(--s), calc(2 * var(--s)) 0,
    calc(100% - 2 * var(--s)) 0, calc(100% - 2 * var(--s)) var(--s), calc(100% - var(--s)) var(--s), calc(100% - var(--s)) calc(2 * var(--s)), 100% calc(2 * var(--s)),
    100% calc(100% - 2 * var(--s)), calc(100% - var(--s)) calc(100% - 2 * var(--s)), calc(100% - var(--s)) calc(100% - var(--s)), calc(100% - 2 * var(--s)) calc(100% - var(--s)), calc(100% - 2 * var(--s)) 100%,
    calc(2 * var(--s)) 100%, calc(2 * var(--s)) calc(100% - var(--s)), var(--s) calc(100% - var(--s)), var(--s) calc(100% - 2 * var(--s)), 0 calc(100% - 2 * var(--s))
  );
}
.screen {
  width: 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
  padding-bottom: 56px;
}
.stash {
  --u: 2px;
  --pink: var(--accent);
  width: 640px;
  height: 442px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: #000;
  border-radius: 0 0 20px 20px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  zoom: var(--fit, 1.5);
}
.stash .lbl { font-family: "Silkscreen", monospace; font-size: 8px; line-height: 1; }
.stash .accent-text { color: var(--accent); }
.stash i[data-icon] { color: inherit; }
.stash .faint { color: var(--faint); }

/* pixelKey and pixelSlot at the app's 2 point size. */
.stash .pkey {
  --fill: var(--raised);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-bottom: var(--u);
  background: var(--fill);
  box-shadow:
    inset 0 var(--u) 0 rgba(255, 255, 255, 0.12),
    inset 0 calc(-1 * var(--u)) 0 var(--slot-dark),
    0 calc(-1 * var(--u)) 0 0 var(--slot-dark), 0 var(--u) 0 0 var(--slot-dark),
    calc(-1 * var(--u)) 0 0 0 var(--slot-dark), var(--u) 0 0 0 var(--slot-dark);
}
.stash .pslot {
  --b: var(--edge);
  background: var(--slot);
  box-shadow:
    inset 0 var(--u) 0 var(--slot-dark), inset var(--u) 0 0 var(--slot-dark),
    inset 0 calc(-1 * var(--u)) 0 var(--slot-light), inset calc(-1 * var(--u)) 0 0 var(--slot-light),
    0 calc(-1 * var(--u)) 0 0 var(--b), 0 var(--u) 0 0 var(--b),
    calc(-1 * var(--u)) 0 0 0 var(--b), var(--u) 0 0 0 var(--b);
}

.face {
  display: inline-block;
  width: 20px;
  height: 15px;
  background: url("assets/faces/11.png") no-repeat;
  background-size: 24px 24px;
  background-position: -3px -4.5px;
  image-rendering: pixelated;
}
.face.small { width: 15px; height: 11px; background-size: 18px 18px; background-position: -2.25px -3.4px; }

.st-strip { display: flex; align-items: center; justify-content: space-between; height: 22px; flex: none; }
.st-brand, .st-right { display: flex; align-items: center; gap: 6px; }
.st-right { gap: 8px; }
.stash .btn { font-family: "Silkscreen", monospace; font-size: 8px; height: 22px; padding: 0 10px var(--u); }

.st-header { display: flex; gap: 8px; height: 32px; flex: none; }
.st-search { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 15px; }
.st-search .accent-text { font-weight: 500; }
.stash .caret { height: 16px; margin-left: -8px; }
.st-date { width: 132px; height: 30px; gap: 7px; justify-content: flex-start; padding: 0 9px var(--u); }
.st-date .lbl { flex: 1; }

.st-body { flex: 1; min-height: 0; display: flex; gap: 10px; }
.st-side { width: 112px; flex: none; display: flex; flex-direction: column; gap: 4px; }
.st-side .row {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 8px;
  font-family: "Silkscreen", monospace;
  font-size: 8px;
  text-transform: capitalize;
  color: var(--ink);
}
.st-side .row > i:first-child { width: 15px; display: flex; justify-content: center; color: var(--dim); }
.st-side .row span { flex: 1; }
.st-side .row b { font-weight: 400; color: var(--faint); }
.st-side .row.on {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow:
    inset 0 var(--u) 0 rgba(255, 255, 255, 0.12), inset 0 calc(-1 * var(--u)) 0 var(--slot-dark),
    0 calc(-1 * var(--u)) 0 0 var(--slot-dark), 0 var(--u) 0 0 var(--slot-dark),
    calc(-1 * var(--u)) 0 0 0 var(--slot-dark), var(--u) 0 0 0 var(--slot-dark);
}
.st-side .row.on > i:first-child, .st-side .row.on b { color: var(--accent-ink); }
.st-side .grow { flex: 1; }
.st-side .rule { height: 2px; margin: 0 4px 2px; background: var(--edge); }

.st-grid {
  flex: 1;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 4px 2px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 108px;
  gap: 10px 8px;
  overflow: hidden;
}
.card-item { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px; }
.card-item > :first-child { flex: 1; min-height: 0; margin-bottom: 4px; }
.card-item .name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-item .lbl { white-space: nowrap; overflow: hidden; }
/* The selected slot lifts a little off an accent shadow. */
.card-item.selected {
  --b: var(--accent);
  transform: translateY(-2px);
  box-shadow:
    inset 0 var(--u) 0 var(--slot-dark), inset var(--u) 0 0 var(--slot-dark),
    inset 0 calc(-1 * var(--u)) 0 var(--slot-light), inset calc(-1 * var(--u)) 0 0 var(--slot-light),
    0 calc(-1 * var(--u)) 0 0 var(--b), 0 var(--u) 0 0 var(--b),
    calc(-1 * var(--u)) 0 0 0 var(--b), var(--u) 0 0 0 var(--b),
    0 calc(var(--u) + 3px) 0 0 var(--accent-deep);
}
.stash .badge {
  --fill: var(--ink);
  flex: none !important;
  align-self: flex-start;
  height: 20px;
  padding: 0 7px var(--u);
  font-family: "Silkscreen", monospace;
  font-size: 8px;
  color: var(--slot);
}
.card-item > .badge { margin-bottom: auto; }
.thumb { display: block; image-rendering: pixelated; box-shadow: 0 0 0 2px var(--slot-dark); }
.thumb-icon { background: url("assets/icon.png") center 30% / cover; }
.thumb-sunset {
  background:
    radial-gradient(circle at 50% 78%, #ffd48a 0 12%, transparent 13%),
    linear-gradient(#3d2d63 0%, #b4507a 45%, #f59a66 70%, #2a1d36 71%, #18121f 100%);
}
.link { display: flex; flex-direction: column; gap: 6px; color: #80d1ff; }
.link .path { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote {
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.stash .pin { position: absolute; top: 6px; right: 6px; width: 22px; height: 18px; }
.stash .pin.on { --fill: var(--accent); color: var(--accent-ink); }

.st-foot { display: flex; justify-content: center; align-items: center; gap: 14px; height: 20px; flex: none; }
.st-foot > span { display: inline-flex; align-items: center; gap: 5px; }
.st-foot kbd {
  min-width: 18px;
  height: 16px;
  padding: 0 5px var(--u);
  font-family: "Pixelify Sans", monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.card p { color: var(--dim); font-size: 17px; }
.grid .card > i[data-icon] { height: 35px; display: flex; align-items: flex-end; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.steps li { padding: 24px; }
.steps .label { font-size: 16px; }
.steps p { margin-top: 10px; color: var(--dim); font-size: 17px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 32px; }
.plan.best { --b: var(--accent); }
.plan h3 { margin: 0; font-size: 22px; }
.price-block { margin: 18px 0 26px; padding-bottom: 24px; border-bottom: var(--u) solid var(--edge); }
.plan .price { font-size: 56px; line-height: 1; }
.plan .price s { font-size: 30px; vertical-align: 12px; margin-right: 8px; }
.price-note { margin-top: 10px; font-size: 12px; color: var(--faint); }
.plan .price-note.accent-text { color: var(--accent); }
.plan ul {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--dim);
  font-size: 17px;
}
.plan li { position: relative; padding-left: 22px; }
.plan li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-family: "Silkscreen", monospace; }
.key.block { display: flex; width: 100%; }
.tag { position: absolute; top: -12px; right: 24px; padding: 4px 8px; font-size: 12px; background: var(--accent); color: var(--accent-ink); }

/* Last section: the wallpaper again, her face and floating hearts. */
.finale {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 24px 80px;
}
.finale h2 { margin: 28px 0 0; }
.finale h1 { margin: 28px 0 0; font-size: clamp(36px, 5vw, 56px); }

/* Privacy policy and terms. */
.legal { max-width: 760px; padding-top: 88px; padding-bottom: 96px; }
.legal h1 { font-size: clamp(36px, 5vw, 56px); margin: 16px 0 0; }
.legal .lede { margin-bottom: 16px; }
.legal h2 { font-size: 26px; margin: 48px 0 14px; }
.legal p, .legal li { color: var(--dim); font-size: 18px; }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.legal li { position: relative; padding-left: 22px; }
.legal li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-family: "Silkscreen", monospace; }
.legal b { color: var(--ink); font-weight: 500; }
.legal a { color: var(--accent); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal code { font-family: "Pixelify Sans", monospace; color: var(--ink); background: var(--card); padding: 1px 6px; }

/* The thank-you page after checkout. */
.thanks-page main > section.wrap { margin-bottom: 56px; }
.thanks-page main > section.wrap.thanks { margin-top: 64px; }
.steps h3 { margin: 12px 0 0; font-size: 22px; }
.steps a { text-decoration: none; }
.steps a:hover { text-decoration: underline; }
.thanks-cta { margin-top: 48px; }
.center-text { text-align: center; }
.center-text a { text-decoration: none; }
.finale .lede { margin: 14px auto 0; color: var(--ink); opacity: 0.75; }
.finale .cta { margin-top: 36px; }
.hug { position: relative; width: 156px; height: 120px; }
.big-face {
  position: absolute;
  inset: 0;
  background: url("assets/faces/11.png") no-repeat;
  /* The face fills 13 x 10 of its 16 x 16 icon: crop to it at 12x. */
  background-size: 192px 192px;
  background-position: -24px -36px;
  image-rendering: pixelated;
  animation: bob 2.4s steps(2) infinite;
}
@keyframes bob { 50% { transform: translateY(-6px); } }
.heart {
  position: absolute;
  bottom: 70%;
  width: 30px;
  height: 24px;
  background: #ff5c8a;
  /* The app's pixel heart: .#.#. / ##### / .###. / ..#.. */
  clip-path: polygon(20% 0, 40% 0, 40% 25%, 60% 25%, 60% 0, 80% 0, 80% 25%, 100% 25%, 100% 50%, 80% 50%,
    80% 75%, 60% 75%, 60% 100%, 40% 100%, 40% 75%, 20% 75%, 20% 50%, 0 50%, 0 25%, 20% 25%);
  opacity: 0;
  animation: float 3s steps(12) infinite;
}
.heart.h1 { left: -42px; animation-delay: 0s; }
.heart.h2 { left: 168px; animation-delay: 0.6s; }
.heart.h3 { left: 6px; animation-delay: 1.2s; }
.heart.h4 { left: 128px; animation-delay: 1.8s; }
.heart.h5 { left: 63px; animation-delay: 2.4s; }
@keyframes float {
  0% { opacity: 0; translate: 0 0; }
  15% { opacity: 1; }
  100% { opacity: 0; translate: 0 -84px; }
}



.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px 48px;
  padding-top: 48px;
  padding-bottom: 56px;
  border-top: var(--u) solid var(--card);
}
.foot-about { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.foot-about .brand span { font-size: 16px; }
.foot-links { display: flex; gap: 56px; }
.foot-links div { display: flex; flex-direction: column; gap: 10px; }
.foot-links .label { font-size: 12px; margin-bottom: 4px; }
.foot-links a { color: var(--dim); text-decoration: none; font-size: 16px; }
.foot-links a:hover { color: var(--accent); }
.footer .label { font-size: 12px; line-height: 1.5; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* --- The cat ------------------------------------------------------------------- */

.cat-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 50; pointer-events: none; }
.cat-layer[hidden] { display: none; }
.cat {
  position: absolute;
  width: 96px;
  height: 96px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  will-change: transform;
}
.cat-mark { position: absolute; image-rendering: pixelated; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav { padding-top: 44px; }
  .nav .key { display: none; }
  .hero { padding-top: 64px; }
  .notch { width: 140px; height: 26px; }
  .plan { padding: 24px; }
  .finale { padding: 56px 16px 64px; }
  .finale .cta { flex-direction: column; align-items: stretch; width: 100%; }
  .foot-links { gap: 40px; }
  .legal { padding-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret, .big-face { animation: none; }
  .heart { animation: none; opacity: 1; }
}

.hint { transition: opacity 400ms; }
.hint.seen { opacity: 0; }
