/* Сайт pikko.space. Цвета, шрифты и формы — те же, что в приложении (mobile/src/lib/theme.tsx).
   Скриптов и встроенных стилей на сайте нет: сервер их запрещает (deploy/Caddyfile). */

@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/unbounded-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/unbounded-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0e0f14;
  --surface: #1a1b24;
  --surface2: #22232e;
  --surface3: #2d2e3b;
  --fg: #f4f2ff;
  --muted: #a0a3b8;
  --subtle: #858698;
  --accent: #c395ff;
  --ink: #17131f;
  --ink-soft: rgba(23, 19, 31, 0.74);
  --ink-faint: rgba(23, 19, 31, 0.6);
  --lime: #d9ff78;
  /* Шкала оценок приложения: коралловый → серый → мятный. */
  --r1: #ff6d83;
  --r2: #ea798f;
  --r3: #d5859b;
  --r4: #c091a6;
  --r5: #ab9db2;
  --r6: #a1abbb;
  --r7: #a2bac2;
  --r8: #a3c9c9;
  --r9: #a5d9d0;
  --r10: #a6e8d7;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gap-section: clamp(72px, 10vw, 136px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 500 18px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ul,
fieldset {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

fieldset {
  min-width: 0;
  border: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

b {
  font-weight: 700;
}

i {
  font-style: normal;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

/* Только для чтения с экрана. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

main > section + section {
  margin-top: var(--gap-section);
}

h2 {
  font: 700 clamp(28px, 3.6vw, 46px) / 1.1 var(--display);
  letter-spacing: -0.025em;
}

/* ---------- Шапка ---------- */

.top {
  padding-block: 24px;
}

.top__logo {
  display: inline-block;
  border-radius: 12px;
}

.top__logo:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 6px;
}

/* ---------- Главный блок: цвета иконки приложения, тёмный текст ---------- */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 24px;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 44px;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(90% 80% at 88% 58%, #bfe6ff 0%, rgba(191, 230, 255, 0) 60%),
    linear-gradient(140deg, #b98cff 0%, #c9a6ff 48%, #dccffb 100%);
}

h1 {
  font: 800 clamp(36px, 5.6vw, 72px) / 1.05 var(--display);
  letter-spacing: -0.035em;
}

.stage__lead {
  max-width: 28em;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.5;
}

.store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  margin-top: 32px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--fg);
  font: 700 19px/1 var(--text);
  text-decoration: none;
}

a.store:hover {
  background: #000;
}

a.store:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.stage__note {
  margin-top: 14px;
  color: var(--ink-faint);
  font-size: 16px;
}

/* ---------- Телефон с главным экраном приложения ---------- */

.phone {
  justify-self: center;
  align-self: end;
  width: 300px;
  /* Низ телефона уходит за край блока. */
  margin-bottom: calc(-1 * clamp(28px, 5vw, 64px) - 56px);
  padding: 10px;
  border-radius: 48px;
  background: #08090d;
  box-shadow: 0 30px 60px -24px rgba(23, 19, 31, 0.6);
  transform: rotate(4deg);
}

.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 600px;
  padding: 22px 14px 0;
  border-radius: 38px;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-size: 13px;
  line-height: 1.2;
}

.ph-hello {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ph-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface3);
  color: var(--muted);
  font: 800 16px/1 var(--display);
}

.ph-hello__text {
  display: flex;
  flex-direction: column;
}

.ph-hi {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ph-name {
  font: 700 20px/1.2 var(--display);
  letter-spacing: -0.02em;
}

.ph-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
  background: var(--accent);
  color: var(--ink);
}

.ph-cap {
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 700;
}

.ph-num {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ph-num b {
  font: 800 40px/1 var(--display);
  letter-spacing: -0.04em;
}

.ph-num span {
  color: var(--ink-faint);
  font-size: 13px;
  font-weight: 700;
}

.ph-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ph-tiles > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 8px;
  border-radius: 11px;
  background: rgba(23, 19, 31, 0.1);
}

.ph-tiles b {
  font: 800 15px/1.2 var(--display);
}

.ph-tiles span span {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.ph-title {
  margin-top: 4px;
  font: 700 18px/1.2 var(--display);
}

.ph-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

/* ---------- Плитка коллекции — как в приложении: знак крупно в углу, средняя капсулой ---------- */

.folder {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 132px;
  padding: 11px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  color: var(--fg);
}

.folder__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 24px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.folder b {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.25;
}

.folder__art {
  position: absolute;
  right: -8px;
  bottom: -14px;
  font-size: 68px;
  line-height: 1.2;
  transform: rotate(-12deg);
}

.stamp {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font: 800 11px/1 var(--display);
}

.stamp--7 {
  background: rgba(162, 186, 194, 0.16);
  color: var(--r7);
}

.stamp--8 {
  background: rgba(163, 201, 201, 0.16);
  color: var(--r8);
}

.stamp--9 {
  background: rgba(165, 217, 208, 0.16);
  color: var(--r9);
}

.folder--big {
  height: 172px;
  padding: 14px;
  border-radius: 24px;
  background: var(--surface2);
}

.folder--big .folder__top {
  height: 30px;
  font-size: 13px;
}

.folder--big b {
  margin-top: 8px;
  font-size: 18px;
}

.folder--big .folder__art {
  right: -10px;
  bottom: -18px;
  font-size: 88px;
}

.folder--big .stamp {
  min-width: 44px;
  height: 28px;
  font-size: 13px;
}

/* ---------- Оценка от 1 до 10: работает без скриптов, на переключателях ---------- */

.rating {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}

.rating__text p {
  max-width: 24em;
  margin-top: 18px;
  color: var(--muted);
  font-size: 19px;
}

.rating__text .rating__hint {
  margin-top: 10px;
  color: var(--subtle);
}

.rate {
  position: relative;
}

.rate__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rate__verdict {
  display: flex;
  align-items: flex-end;
  height: clamp(84px, 13vw, 140px);
}

.verdict {
  display: none;
  align-items: baseline;
  gap: 0.22em;
}

.verdict b {
  font: 800 clamp(72px, 12vw, 136px) / 0.9 var(--display);
  letter-spacing: -0.05em;
}

.verdict span {
  font: 700 clamp(20px, 3vw, 34px) / 1 var(--display);
  letter-spacing: -0.02em;
}

.rate__row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: clamp(4px, 0.8vw, 8px);
  margin-top: 28px;
}

.cell {
  display: grid;
  place-items: center;
  height: clamp(54px, 7vw, 76px);
  border-radius: 16px;
  background: var(--surface2);
  color: var(--muted);
  font: 700 clamp(14px, 1.8vw, 20px) / 1 var(--display);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.cell:hover {
  background: var(--surface3);
  color: var(--fg);
}

.verdict--1 b { color: var(--r1); }
.verdict--2 b { color: var(--r2); }
.verdict--3 b { color: var(--r3); }
.verdict--4 b { color: var(--r4); }
.verdict--5 b { color: var(--r5); }
.verdict--6 b { color: var(--r6); }
.verdict--7 b { color: var(--r7); }
.verdict--8 b { color: var(--r8); }
.verdict--9 b { color: var(--r9); }
.verdict--10 b { color: var(--r10); }

#r1:checked ~ .rate__verdict .verdict--1,
#r2:checked ~ .rate__verdict .verdict--2,
#r3:checked ~ .rate__verdict .verdict--3,
#r4:checked ~ .rate__verdict .verdict--4,
#r5:checked ~ .rate__verdict .verdict--5,
#r6:checked ~ .rate__verdict .verdict--6,
#r7:checked ~ .rate__verdict .verdict--7,
#r8:checked ~ .rate__verdict .verdict--8,
#r9:checked ~ .rate__verdict .verdict--9,
#r10:checked ~ .rate__verdict .verdict--10 {
  display: flex;
}

#r1:checked ~ .rate__row .cell--1 { background: var(--r1); }
#r2:checked ~ .rate__row .cell--2 { background: var(--r2); }
#r3:checked ~ .rate__row .cell--3 { background: var(--r3); }
#r4:checked ~ .rate__row .cell--4 { background: var(--r4); }
#r5:checked ~ .rate__row .cell--5 { background: var(--r5); }
#r6:checked ~ .rate__row .cell--6 { background: var(--r6); }
#r7:checked ~ .rate__row .cell--7 { background: var(--r7); }
#r8:checked ~ .rate__row .cell--8 { background: var(--r8); }
#r9:checked ~ .rate__row .cell--9 { background: var(--r9); }
#r10:checked ~ .rate__row .cell--10 { background: var(--r10); }

#r1:checked ~ .rate__row .cell--1,
#r2:checked ~ .rate__row .cell--2,
#r3:checked ~ .rate__row .cell--3,
#r4:checked ~ .rate__row .cell--4,
#r5:checked ~ .rate__row .cell--5,
#r6:checked ~ .rate__row .cell--6,
#r7:checked ~ .rate__row .cell--7,
#r8:checked ~ .rate__row .cell--8,
#r9:checked ~ .rate__row .cell--9,
#r10:checked ~ .rate__row .cell--10 {
  color: var(--ink);
  transform: translateY(-6px);
}

#r1:focus-visible ~ .rate__row .cell--1,
#r2:focus-visible ~ .rate__row .cell--2,
#r3:focus-visible ~ .rate__row .cell--3,
#r4:focus-visible ~ .rate__row .cell--4,
#r5:focus-visible ~ .rate__row .cell--5,
#r6:focus-visible ~ .rate__row .cell--6,
#r7:focus-visible ~ .rate__row .cell--7,
#r8:focus-visible ~ .rate__row .cell--8,
#r9:focus-visible ~ .rate__row .cell--9,
#r10:focus-visible ~ .rate__row .cell--10 {
  outline: 3px solid var(--fg);
  outline-offset: 3px;
}

/* ---------- Что умеет приложение ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.block {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  grid-column: span 2;
  min-height: 360px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 32px;
  overflow: hidden;
  background: var(--surface);
}

.block--wide {
  grid-column: span 4;
}

.block--half {
  grid-column: span 3;
}

.block__text h2 {
  font-size: clamp(22px, 2.4vw, 30px);
}

.block__text p {
  max-width: 26em;
  margin-top: 12px;
  color: var(--muted);
}

/* Плитки занимают всё место под текстом: блок растёт вместе с соседним. */
.shelf {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shelf .folder--big {
  height: auto;
  min-height: 172px;
}

.wants {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wants li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px 8px 12px;
  border-radius: 18px;
  background: var(--surface2);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

/* Закладка «Хочу» — светлый круг, как на плитке записи в приложении. */
.wants__mark {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fg);
}

.wants__mark::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 11px;
  width: 10px;
  height: 14px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
}

.tiers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tier {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: var(--surface2);
}

.tier__label {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: var(--ink);
  font: 800 18px/1 var(--display);
}

/* Цвета уровней нового тирлиста в приложении. */
.tier__label--s { background: #ff5a5f; }
.tier__label--a { background: #ff9f43; }
.tier__label--b { background: #ffd23f; }

.tier__items {
  display: flex;
  gap: 6px;
}

.tier__items i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface3);
  font-size: 24px;
}

.duel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

.duel__card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  height: 172px;
  padding: 16px;
  border-radius: 24px;
  background: var(--surface2);
}

.duel__card i {
  font-size: 56px;
  line-height: 1;
}

.duel__card b {
  font-size: 18px;
}

/* «VS» — лаймом: в приложении это цвет игровых побед. */
.duel__vs {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 -15px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font: 800 15px/1 var(--display);
}

/* ---------- Где лежат оценки ---------- */

.own h2 {
  max-width: 13em;
  font: 800 clamp(30px, 5vw, 60px) / 1.06 var(--display);
  letter-spacing: -0.035em;
}

.own__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(32px, 5vw, 56px);
}

.own__list li {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.own__list b {
  font: 700 20px/1.2 var(--display);
  letter-spacing: -0.02em;
}

.own__list span {
  max-width: 22em;
  color: var(--muted);
}

/* ---------- Подвал ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  margin-top: var(--gap-section);
  padding-block: 32px 48px;
  color: var(--muted);
  font-size: 16px;
}

.foot a {
  color: var(--fg);
  text-underline-offset: 4px;
}

.foot a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.foot__copy {
  margin-left: auto;
  color: var(--subtle);
}

/* ---------- Страница «не найдено» ---------- */

.lost {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-block: clamp(48px, 12vw, 140px);
}

.lost p {
  max-width: 26em;
  color: var(--muted);
}

.lost .store {
  margin-top: 12px;
  background: var(--accent);
  color: var(--ink);
}

.lost a.store:hover {
  background: #d2b0ff;
}

.lost a.store:focus-visible {
  outline-color: var(--fg);
}

/* ---------- Узкие экраны ---------- */

@media (max-width: 900px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    border-radius: 36px;
  }

  .rating {
    grid-template-columns: minmax(0, 1fr);
  }

  .block,
  .block--wide,
  .block--half {
    grid-column: span 6;
    min-height: 0;
  }

  .own__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(1120px, 100% - 32px);
  }

  .store {
    width: 100%;
  }

  .phone {
    width: 280px;
  }

  .shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shelf .folder:nth-child(3) {
    display: none;
  }

  .cell {
    border-radius: 12px;
  }

  .foot__copy {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cell {
    transition: none;
  }
}
