/* Collection pages («Продать <коллекция>»): the «exhibit» direction chosen by the owner on 29.09.2026.
   Flat night background, the gift shown like a museum piece on a matte plinth with a paper label.
   No glows or neon; the paper label is the one material accent and repeats on the collection shelf.
   Shape rule: gift tiles 13% radius, buttons 8px, paper labels 3px. */
:root {
  --c-bg: #04070e;
  --c-text: #f2f5f8;
  --c-muted: #9aa3ae;
  --c-line: rgba(242, 245, 248, 0.09);
  --c-accent: #0098ea;
  --c-accent-hover: #007bc0;
  --c-paper: #ecebe6;
  --c-ink: #14161b;
  --c-plinth-top: #1b1f26;
  --c-plinth-top-edge: #15181e;
  --c-plinth-front: #0f1217;
  --c-plinth-foot: #0a0c10;
  --c-font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --c-gutter: 20px;
  --c-max: 1240px;
  --c-section: clamp(72px, 4rem + 4vw, 128px);
  --c-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  :root {
    --c-gutter: 40px;
  }
}

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

html {
  background: var(--c-bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--c-text);
  font-family: var(--c-font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--c-max) + 2 * var(--c-gutter));
  margin-inline: auto;
  padding-inline: var(--c-gutter);
}

/* Night sky behind the page, the same as on the home page (css/base.css): blue-black base and three soft pools
   of TON light. The owner found flat black sad (28.09.2026). The pools drift slowly on desktop only. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 40%, rgba(47, 84, 235, 0.07)), var(--c-bg);
}

.backdrop__blob {
  position: absolute;
  width: 72vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--blob), transparent);
}

.backdrop__blob--a {
  --blob: rgba(0, 152, 234, 0.2);
  top: -32vmax;
  right: -26vmax;
}

.backdrop__blob--b {
  --blob: rgba(47, 84, 235, 0.2);
  top: 22%;
  left: -38vmax;
}

.backdrop__blob--c {
  --blob: rgba(51, 177, 255, 0.12);
  bottom: -42vmax;
  right: -8vmax;
}

@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .backdrop__blob--a { animation: drift-a 28s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }
  .backdrop__blob--b { animation: drift-b 34s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }
  .backdrop__blob--c { animation: drift-c 40s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }
}

@keyframes drift-a {
  to { translate: -10vmax 8vmax; scale: 1.15; }
}

@keyframes drift-b {
  to { translate: 12vmax -6vmax; scale: 0.9; }
}

@keyframes drift-c {
  to { translate: -14vmax -10vmax; scale: 1.2; }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 8px;
  background: var(--c-accent);
  color: #fff;
  font-weight: 600;
  font-size: 1.125rem;
  white-space: nowrap;
  transition: background-color 0.2s var(--c-ease), translate 0.2s var(--c-ease);
}

.button:hover {
  background: var(--c-accent-hover);
}

.button:active {
  translate: 0 1px;
}

.button--outline {
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid rgba(242, 245, 248, 0.85);
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 500;
}

.button--outline:hover {
  background: rgba(242, 245, 248, 0.08);
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

/* Small phones: logo and header button have to share 280px. */
@media (max-width: 379px) {
  .brand {
    gap: 8px;
    font-size: 1.125rem;
  }

  .brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .top .button--outline {
    padding: 0 12px;
    font-size: 0.875rem;
  }

  .howto__visual {
    padding: 20px;
  }
}

/* Hero: exhibit left, quote right */
.hero {
  display: grid;
  gap: 40px;
  padding-block: 24px var(--c-section);
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    gap: 72px;
    min-height: min(calc(100dvh - 80px), 760px);
    padding-top: 8px;
  }
}

.exhibit {
  position: relative;
  aspect-ratio: 1 / 0.86;
  max-width: 640px;
  width: 100%;
}

.exhibit__plinth {
  position: absolute;
  inset: auto 0 0 0;
  height: 28%;
}

.exhibit__plinth::before,
.exhibit__plinth::after {
  content: '';
  position: absolute;
  inset-inline: 0;
}

/* The top face of the plinth, seen slightly from above. */
.exhibit__plinth::before {
  top: 0;
  height: 30%;
  background: linear-gradient(180deg, var(--c-plinth-top), var(--c-plinth-top-edge));
  clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%);
}

/* The front face fades into the page, as if the plinth continues below the frame. */
.exhibit__plinth::after {
  top: 30%;
  bottom: -12%;
  background: linear-gradient(180deg, var(--c-plinth-front), rgba(10, 12, 16, 0.7) 55%, transparent);
}

.exhibit__tile {
  position: absolute;
  left: 12%;
  bottom: 18%;
  width: 66%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 13%;
  box-shadow: 0 28px 30px -22px rgba(0, 0, 0, 0.75);
}

/* The real Telegram animation (js/collection.js) fades in over the static image once it is ready. */
.exhibit__tile img,
.exhibit__anim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.exhibit__anim {
  opacity: 0;
  transition: opacity 0.5s var(--c-ease);
}

.exhibit__tile.is-animated .exhibit__anim {
  opacity: 1;
}

.label {
  padding: 12px 18px;
  border-radius: 3px;
  background: var(--c-paper);
  color: var(--c-ink);
  box-shadow: 0 10px 18px -12px rgba(0, 0, 0, 0.7);
}

.label__name {
  padding-block: 6px;
  border-block: 1px solid rgba(20, 22, 27, 0.35);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}

.exhibit .label {
  position: absolute;
  right: 12%;
  bottom: 9%;
  z-index: 1;
  min-width: 150px;
  rotate: -2deg;
}

.quote {
  max-width: 520px;
}

.crumbs {
  color: var(--c-muted);
  font-size: 1rem;
}

.crumbs a:hover {
  color: var(--c-text);
}

.quote h1 {
  margin-top: 20px;
  font-weight: 600;
  font-size: clamp(2.125rem, 1.4rem + 2.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.quote__label {
  margin-top: 28px;
  color: var(--c-muted);
  font-size: 1.125rem;
}

.quote__price {
  margin-top: 4px;
  font-weight: 700;
  font-size: clamp(3.25rem, 2.2rem + 3.6vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.quote__sub {
  margin-top: 12px;
  color: var(--c-muted);
  font-size: 1.125rem;
}

.quote .button {
  margin-top: 32px;
}

.quote__note {
  margin-top: 20px;
  max-width: 42ch;
  color: var(--c-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.quote__price--ask {
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);
  letter-spacing: -0.02em;
}

/* The /prodat/ index: one heading over the full shelf */
.section.section--first {
  border-top: 0;
  padding-top: 24px;
}

.page-title {
  margin-top: 20px;
  font-weight: 600;
  font-size: clamp(2.125rem, 1.4rem + 2.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

/* Section headings */
.section {
  padding-block: var(--c-section);
  border-top: 1px solid var(--c-line);
}

.section h2 {
  font-weight: 600;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Price factors: statement left, definitions right */
.factors {
  display: grid;
  gap: 32px;
}

@media (min-width: 960px) {
  .factors {
    grid-template-columns: 5fr 7fr;
    gap: 80px;
  }
}

.factors__lead {
  margin-top: 16px;
  max-width: 40ch;
  color: var(--c-muted);
}

.factors dl {
  display: grid;
}

.factors dl > div {
  display: grid;
  gap: 4px;
  padding-block: 22px;
}

.factors dl > div + div {
  border-top: 1px solid var(--c-line);
}

@media (min-width: 640px) {
  .factors dl > div {
    grid-template-columns: 160px 1fr;
    gap: 24px;
  }
}

.factors dt {
  font-weight: 600;
  font-size: 1.25rem;
}

.factors dd {
  color: var(--c-muted);
}

/* Selling steps: one line of three moves joined by a rule */
.steps {
  display: grid;
  gap: 28px;
  margin-top: 40px;
  counter-reset: step;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
}

.steps li {
  position: relative;
  padding-top: 28px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 1px solid rgba(242, 245, 248, 0.5);
  font-size: 0.875rem;
  font-weight: 600;
}

.steps {
  border-top: 1px solid rgba(242, 245, 248, 0.25);
  padding-top: 14px;
}

@media (max-width: 767px) {
  .steps {
    border-top: 0;
    padding-top: 0;
  }

  .steps li {
    padding-top: 0;
    padding-left: 44px;
  }

  .steps li::before {
    top: 0;
  }
}

.steps h3 {
  font-weight: 600;
  font-size: 1.25rem;
}

.steps p {
  margin-top: 8px;
  color: var(--c-muted);
}

/* Real variants of the collection with paper labels: shows why the price says «от». */
.lead {
  margin-top: 14px;
  max-width: 56ch;
  color: var(--c-muted);
  font-size: 1.125rem;
  text-wrap: pretty;
}

.variants {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62%, 240px);
  gap: 20px;
  margin-top: 40px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-block: 10px 24px;
}

@media (min-width: 960px) {
  .variants {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, 1fr);
    overflow: visible;
  }
}

.variants figure {
  display: grid;
  justify-items: center;
  scroll-snap-align: start;
}

.variants img {
  width: 100%;
  border-radius: 13%;
}

.variants figure:nth-child(odd) {
  rotate: -1.5deg;
}

.variants figure:nth-child(even) {
  rotate: 1.5deg;
  translate: 0 14px;
}

.variants .label {
  margin-top: -14px;
  position: relative;
  min-width: min(90%, 190px);
  padding: 8px 12px;
}

.variants .label__name {
  font-size: 0.9375rem;
}

.label__meta {
  margin-top: 4px;
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: center;
  color: rgba(20, 22, 27, 0.75);
}

/* Three properties with Phosphor icons, one row without card boxes */
.traits {
  display: grid;
  gap: 24px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--c-line);
}

@media (min-width: 768px) {
  .traits {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
}

.traits li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
}

.traits h3 {
  font-weight: 600;
  font-size: 1.125rem;
}

.traits p {
  margin-top: 4px;
  color: var(--c-muted);
  font-size: 0.9375rem;
}

.glyph {
  display: inline-block;
  flex: none;
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask: var(--glyph) center / contain no-repeat;
  mask: var(--glyph) center / contain no-repeat;
}

/* Icon on a soft accent square: the square is the element, the glyph is masked into ::after. */
.traits .glyph {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 152, 234, 0.12);
  -webkit-mask: none;
  mask: none;
}

.traits .glyph::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c-accent);
  -webkit-mask: var(--glyph) center / 24px no-repeat;
  mask: var(--glyph) center / 24px no-repeat;
}

.glyph--cube { --glyph: url('../assets/icons/ph/cube.svg'); }
.glyph--palette { --glyph: url('../assets/icons/ph/palette.svg'); }
.glyph--sparkle { --glyph: url('../assets/icons/ph/sparkle.svg'); }
.glyph--link { --glyph: url('../assets/icons/ph/link-simple.svg'); }
.glyph--send { --glyph: url('../assets/icons/ph/paper-plane-tilt.svg'); }

/* Selling steps with a small real visual on top of each */
/* A lighter veil rather than a solid stripe, so the light behind the page still shows through. */
.section--band {
  background: rgba(14, 21, 34, 0.55);
}

.howto {
  display: grid;
  gap: 32px;
  margin-top: 40px;
  counter-reset: step;
}

@media (min-width: 900px) {
  .howto {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

/* min-width: 0 lets a long gift link shrink and end with an ellipsis instead of widening the column. */
.howto li {
  min-width: 0;
  counter-increment: step;
}

.howto__visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  gap: 10px;
  min-height: 210px;
  padding: 28px;
  border-radius: 16px;
  background: #0e1522;
  border: 1px solid var(--c-line);
}

.howto h3 {
  margin-top: 20px;
  font-weight: 600;
  font-size: 1.25rem;
}

.howto h3::before {
  content: counter(step) '. ';
  color: var(--c-muted);
}

.howto p {
  margin-top: 8px;
  color: var(--c-muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 10px 18px 10px 10px;
  border-radius: 14px;
  background: #16202f;
  color: #33b1ff;
  font-size: 1.0625rem;
  font-weight: 500;
}

.chip img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
}

.chip span:not(.glyph) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handoff {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 3vw, 18px);
}

.handoff img {
  width: clamp(56px, 20vw, 84px);
  height: clamp(56px, 20vw, 84px);
  border-radius: 13%;
}

.handoff .handoff__avatar {
  border-radius: 50%;
}

.handoff .glyph {
  width: 28px;
  height: 28px;
  color: var(--c-muted);
}

.handoff__name {
  color: var(--c-muted);
  font-size: 0.9375rem;
}

.payout {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.payout__sum {
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.payout__methods {
  display: flex;
  gap: 14px;
  color: var(--c-accent);
}

.icon {
  display: inline-block;
  width: 30px;
  height: 30px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.icon--ton { --icon: url('../assets/icons/ton.svg'); }
.icon--stars { --icon: url('../assets/icons/stars.svg'); }
.icon--cryptobot { --icon: url('../assets/icons/cryptobot.svg'); }
.icon--lolz { --icon: url('../assets/icons/lolz.svg'); }
.icon--card { --icon: url('../assets/icons/card.svg'); }

/* Collection shelf: tiles with paper labels */
.shelf {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 20px;
  margin-top: 40px;
}

@media (min-width: 640px) {
  .shelf {
    grid-template-columns: repeat(3, 1fr);
    gap: 44px 28px;
  }
}

/* One shelf row of six on wide screens. */
@media (min-width: 1100px) {
  .shelf {
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
  }
}

.shelf a {
  display: grid;
  justify-items: center;
}

.shelf img {
  width: 100%;
  border-radius: 13%;
  transition: translate 0.4s var(--c-ease);
}

.shelf .label {
  margin-top: -14px;
  position: relative;
  min-width: min(88%, 170px);
  padding: 8px 12px;
  transition: translate 0.4s var(--c-ease);
}

.shelf .label__name {
  font-size: 0.9375rem;
}

.shelf .label__price {
  margin-top: 4px;
  font-size: 0.8125rem;
  text-align: center;
}

.shelf a:hover img {
  translate: 0 -6px;
}

.shelf a:hover .label {
  translate: 0 -3px;
}

/* Closing call */
.closing {
  display: grid;
  gap: 24px;
  align-items: end;
}

@media (min-width: 960px) {
  .closing {
    grid-template-columns: 1fr auto;
    gap: 48px;
  }
}

.closing p {
  margin-top: 12px;
  color: var(--c-muted);
  max-width: 48ch;
}

.footer {
  padding-block: 40px;
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: 0.9375rem;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer a:hover {
  color: var(--c-text);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
