/* poco's website. Same tokens, fonts and chunky pixel buttons as the app (src/renderer/src/styles.css). */

@font-face {
  font-family: 'Pixelify Sans';
  src: url('/fonts/pixelify-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Pixelify Sans';
  src: url('/fonts/pixelify-sans-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Pixelify Sans';
  src: url('/fonts/pixelify-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Silkscreen';
  src: url('/fonts/silkscreen-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #fffdf7;
  --ink: #2d2a32;
  --muted: #8a8596;
  --faint: #f1ede4;
  --line: #e7e2d6;
  --surface: #ffffff;

  --on-block: #2d2a32;
  --go: #9fe0c0;
  --stop: #ffadc2;
  --mark: #ffdc84;
  --logged: #c5b5ff;
  --other: #ffc2a8;
  --moon: #b8a9ff;

  --px: 3px;

  color-scheme: light;
  font-family: 'Pixelify Sans', system-ui, sans-serif;
  -webkit-font-smoothing: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18161d;
    --ink: #f1ede4;
    --muted: #8f8a9b;
    --faint: #25222c;
    --line: #2f2b37;
    --surface: #211e27;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
}

img {
  display: block;
  image-rendering: pixelated;
}

a {
  color: inherit;
}

.label {
  font-family: 'Silkscreen', monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 20px;
}

main,
.top,
.foot {
  width: min(1040px, 100% - 32px);
  margin-inline: auto;
}

/* ---------- chunky pixel buttons (as in the app) ---------- */

.block {
  --depth: calc(var(--px) * 2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'Silkscreen', monospace;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  color: var(--on-block);
  background: var(--surface);
  margin: var(--px) var(--px) calc(var(--px) + var(--depth));
  padding: 10px 18px;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--ink),
    calc(var(--px) * -1) 0 0 0 var(--ink),
    var(--px) 0 0 0 var(--ink),
    0 var(--depth) 0 0 var(--ink);
  transition:
    transform 60ms steps(1),
    filter 80ms;
}
.block:hover {
  filter: brightness(1.05);
}
.block:active {
  --depth: var(--px);
  transform: translateY(var(--px));
}
.block:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 8px;
}
.block-plain {
  color: var(--ink);
}
.block-go {
  background: var(--go);
}
.block-lg {
  font-size: 18px;
  padding: 14px 28px;
}
.block-sm {
  font-size: 12px;
  padding: 6px 12px;
}
.block img {
  width: 14px;
  height: 14px;
}

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Silkscreen', monospace;
  font-size: 16px;
  letter-spacing: 0.08em;
}
.brand img {
  width: 24px;
  height: 24px;
}

/* ---------- the fairy (two frames, flapping like in the app) ---------- */

.fairy {
  position: relative;
  display: block;
  width: 180px; /* 30 x 23 pixels at 6x */
  height: 138px;
  animation: bob 2.4s steps(4) infinite;
}
.fairy img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.fairy-down {
  animation: flap 0.9s steps(1) infinite;
}
.fairy-sm {
  width: 120px;
  height: 92px;
}
@keyframes flap {
  50% {
    opacity: 0;
  }
}
@keyframes bob {
  50% {
    transform: translateY(-6px);
  }
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 48px;
  padding: 48px 0 88px;
}
.hero-copy .fairy {
  margin: 0 0 20px -18px;
}
h1 {
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 13ch;
  text-wrap: balance;
}
.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 34ch;
  margin: 0 0 32px;
}
.cta-note {
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0 0;
}

.shot {
  margin: 0;
  width: 100%;
  padding: var(--px);
  background: var(--ink);
  box-shadow: 10px 10px 0 0 var(--logged);
}
.shot img {
  width: 100%;
  height: auto;
  image-rendering: auto;
  /* End below today's grid, before the next row gets cut in half by the window's edge. */
  aspect-ratio: 1055 / 1745;
  object-fit: cover;
  object-position: top;
}

/* ---------- how it works ---------- */

.steps,
.features,
.faq {
  padding: 56px 0;
  border-top: 3px dotted var(--line);
}
.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.steps p {
  margin: 18px 0 0;
  color: var(--muted);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Silkscreen', monospace;
  font-size: 14px;
  color: var(--on-block);
  padding: 8px 14px;
  margin: var(--px) var(--px) calc(var(--px) * 3);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--ink),
    calc(var(--px) * -1) 0 0 0 var(--ink),
    var(--px) 0 0 0 var(--ink),
    0 calc(var(--px) * 2) 0 0 var(--ink);
}
.chip img {
  width: 14px;
  height: 14px;
}
.chip-go {
  background: var(--go);
}
.chip-mark {
  background: var(--mark);
}
.chip-stop {
  background: var(--stop);
}

/* ---------- big, small, or tiny ---------- */

.sizes {
  padding: 56px 0;
  border-top: 3px dotted var(--line);
}
.sizes .label {
  margin-bottom: 8px;
}
.sizes-lede {
  font-size: 19px;
  margin: 0 0 32px;
  max-width: 40ch;
}
.sizes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.desk {
  margin: 0;
}
/* A little patch of "desktop" for each one to sit on. */
.desk-art {
  display: grid;
  place-items: center;
  height: 340px;
  padding: 24px;
  background-color: var(--faint);
  background-image: radial-gradient(var(--line) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  box-shadow: 0 0 0 var(--px) var(--line);
}
.desk-art img {
  max-width: 100%;
  height: auto;
  image-rendering: auto;
}
.popover-img {
  width: 330px;
}
.widget-img {
  width: 378px;
}
.desk h3 {
  font-size: 19px;
  font-weight: 500;
  margin: 18px 0 4px;
}
.desk p {
  margin: 0;
  color: var(--muted);
}

kbd {
  font-family: 'Silkscreen', monospace;
  font-size: 12px;
  color: var(--ink);
  padding: 1px 6px;
  box-shadow: 0 0 0 2px var(--line);
  white-space: nowrap;
}

/* ---------- features ---------- */

.features ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}
.features h3 {
  font-size: 19px;
  font-weight: 500;
  margin: 14px 0 6px;
}
.features p {
  margin: 0;
  color: var(--muted);
}
.dot {
  display: block;
  width: 18px;
  height: 18px;
  box-shadow:
    0 0 0 var(--px) var(--ink),
    4px 4px 0 var(--px) var(--ink);
}
.dot-logged {
  background: var(--logged);
}
.dot-mark {
  background: var(--mark);
}
.dot-go {
  background: var(--go);
}
.dot-other {
  background: var(--other);
}
.dot-stop {
  background: var(--stop);
}
.dot-moon {
  background: var(--moon);
}

/* ---------- questions ---------- */

.faq details {
  max-width: 640px;
  border-bottom: 2px dotted var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-size: 19px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-family: 'Silkscreen', monospace;
  color: var(--muted);
}
.faq details[open] summary::after {
  content: '–';
}
.faq summary:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 4px;
}
.faq details p {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 56ch;
}
.faq b {
  font-weight: 500;
  color: var(--ink);
}

/* ---------- outro + footer ---------- */

.outro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 0 88px;
  border-top: 3px dotted var(--line);
}
.outro-line {
  font-size: 28px;
  font-weight: 500;
  margin: 18px 0 24px;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 0 40px;
  font-size: 14px;
  color: var(--muted);
  border-top: 3px dotted var(--line);
}

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 24px 0 64px;
    gap: 40px;
  }
  .shot {
    justify-self: center;
    width: min(360px, 100%);
  }
  .steps ol,
  .features ul,
  .sizes-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .desk-art {
    height: auto;
    min-height: 220px;
  }
}
@media (min-width: 561px) and (max-width: 860px) {
  .features ul {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 420px) {
  .block-lg {
    font-size: 15px;
    padding: 12px 18px;
  }
  .fairy {
    width: 150px;
    height: 115px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fairy,
  .fairy-down,
  .block {
    animation: none;
    transition: none;
  }
}

.lost {
  border-top: none;
  min-height: 100vh;
  justify-content: center;
}
