@font-face {
  font-family: "Montserrat";
  src: url("/assets/montserrat.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* 1u = масштаб макета 1536×1024. Подстраивается под экран, но не больше, чем влезает по высоте/ширине. */
  --u: min(calc(100vw / 1536), calc(100vh / 1024));
  --bg: #0b0910;
  --card: rgba(255, 255, 255, .035);
  --line: rgba(165, 135, 255, .16);
  --text: #f4f1ff;
  --muted: #b9b3cf;
  --accent: #a78bfa;
  --accent-2: #7d5cf2;
  --bad: #ff5c7a;
}
@supports (height: 100dvh) {
  :root { --u: min(calc(100vw / 1536), calc(100dvh / 1024)); }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: calc(var(--u) * 16);
  background: var(--bg);
  height: 100%;
}

body {
  height: 100%;
  overflow: hidden;
  font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- фон ---------- */
.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 22%, rgba(110, 76, 230, .30), transparent 70%),
    radial-gradient(45% 40% at 50% 92%, rgba(110, 76, 230, .20), transparent 70%),
    radial-gradient(40% 40% at 5% 40%, rgba(80, 50, 180, .12), transparent 70%),
    var(--bg);
}
.sp { position: absolute; opacity: .9; }
.s1 { width: 2.6rem; height: 2.6rem; right: 4.4%; top: 17%; }
.s2 { width: .8rem; height: .8rem; right: 41%; top: 9%; opacity: .6; }
.s3 { width: .6rem; height: .6rem; right: 30%; top: 33%; opacity: .5; }
.s4 { width: .7rem; height: .7rem; left: 53%; bottom: 22%; opacity: .5; }

/* ---------- каркас ---------- */
.page {
  position: relative; z-index: 1;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  padding: 0 4rem;
  gap: 1.25rem;
}

/* ---------- шапка / футер ---------- */
.top { height: 5rem; display: flex; align-items: center; }
.logo { display: inline-flex; align-items: center; gap: .85rem; font-weight: 700; font-size: 1.85rem; letter-spacing: -.01em; }
.logo b { color: var(--accent); font-weight: 700; }
.logo-mark { width: 3.3rem; height: 3.3rem; }
.logo.small { font-size: 1.5rem; }
.logo.small .logo-mark { width: 2.7rem; height: 2.7rem; }

.foot {
  height: 4.6rem; display: flex; align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .06);
  margin-inline: -4rem; padding-inline: 4rem;
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 0; display: flex; align-items: center; }
.hero-text { position: relative; z-index: 2; max-width: 50%; }

.pill {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .75rem 1.3rem; border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(255, 255, 255, .03);
  color: var(--muted); font-size: .92rem; font-weight: 500;
}
.pill svg { width: 1.3rem; height: 1.3rem; }

h1 {
  margin: 1.1rem 0 1.3rem;
  font-size: 4.3rem; line-height: 1.02; font-weight: 800; letter-spacing: -.025em;
  background: linear-gradient(180deg, #fff 20%, #cfc2ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h1 span {
  background: linear-gradient(180deg, #b9a3ff, #7d5cf2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.3rem; line-height: 1.5; color: #cdc8df; font-weight: 500; }

.cat {
  position: absolute; z-index: 1;
  right: -1rem; bottom: -1rem;
  height: 128%; width: auto; max-width: 64%;
  object-fit: cover; object-position: right center;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 26%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 16%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 26%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 16%, #000 80%, transparent 100%);
  mask-composite: intersect;
}

/* ---------- карточки ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr 1.08fr 1.5fr;
  gap: 1.25rem;
  align-items: stretch;
}
.card {
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  padding: 1.6rem 1.7rem;
  background:
    radial-gradient(80% 70% at 100% 0%, rgba(125, 92, 242, .09), transparent 70%),
    var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  display: flex; flex-direction: column;
  min-width: 0;
}
.card h2 {
  display: flex; align-items: center; gap: .9rem;
  font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em;
  margin-bottom: 1.1rem;
}
.ico-h { width: 2.1rem; height: 2.1rem; flex: none; }

.muted { color: #cfc9e3; font-size: 1rem; line-height: 1.55; font-weight: 500; }

.xlist { list-style: none; margin: 1rem 0 1.1rem; display: grid; gap: .72rem; }
.xlist li { display: flex; align-items: center; gap: .85rem; font-size: 1.02rem; font-weight: 500; }
.xlist svg { width: 1.2rem; height: 1.2rem; flex: none; }

.hint {
  margin-top: auto;
  display: flex; align-items: center; gap: .8rem;
  padding: .85rem 1rem; border-radius: 1rem;
  background: rgba(255, 255, 255, .045);
  font-size: .98rem; color: #d3cde6; font-weight: 500;
}
.hint svg { width: 1.5rem; height: 1.5rem; flex: none; }
.hint b { color: var(--accent); font-weight: 700; }

/* как надо */
.how { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: .9rem; align-items: center; margin-top: .4rem; flex: 1; }
.how-bad, .how-good { display: grid; gap: .75rem; align-content: center; }
.tag {
  justify-self: center; display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.7rem; border-radius: 99px; font-weight: 600; font-size: 1.02rem;
}
.tag i { font-style: normal; font-weight: 800; }
.tag-bad { background: rgba(255, 255, 255, .07); }
.tag-bad i { color: var(--bad); }
.tag-good { background: linear-gradient(180deg, #b9a3ff, #7d5cf2); color: #120c24; }

.bubble {
  display: flex; align-items: baseline; justify-content: space-between; gap: .9rem;
  padding: .85rem 1.1rem; border-radius: 1rem;
  background: rgba(255, 255, 255, .08);
  font-size: 1rem; font-weight: 500; white-space: nowrap;
}
.bubble time { font-size: .72rem; color: #9d96b8; white-space: nowrap; }
.bubble.good { display: block; white-space: normal; background: rgba(255, 255, 255, .09); line-height: 1.4; }
.bubble.good time { display: block; text-align: right; margin-top: .35rem; }
.bubble.good em { font-style: normal; color: var(--accent); letter-spacing: -.15em; }
.arrow { width: 2.6rem; height: 1rem; margin-top: 1.4rem; }

/* почему важно */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.why-item {
  border: 1px solid rgba(255, 255, 255, .07); border-radius: 1.1rem;
  background: rgba(255, 255, 255, .03);
  padding: 1rem .8rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
}
.why-item svg { width: 2.2rem; height: 2.2rem; }
.why-item h3 { font-size: 1.02rem; font-weight: 700; line-height: 1.25; }
.why-item p { font-size: .76rem; line-height: 1.45; color: #a69fbf; font-weight: 500; }

.order {
  margin-top: .9rem; flex: 1;
  display: flex; align-items: center; gap: 1.2rem;
  padding: .8rem 1.4rem; border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .03);
}
.order svg { width: 2.4rem; height: 2.4rem; flex: none; }
.order h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: .2rem; }
.order p { font-size: .8rem; color: #a69fbf; font-weight: 500; }

/* ---------- баннер ---------- */
.banner {
  display: flex; align-items: center; gap: 1.8rem;
  padding: 1.4rem 2.2rem; border-radius: 1.6rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 85% 120%, rgba(125, 92, 242, .35), transparent 70%),
    radial-gradient(50% 100% at 60% -20%, rgba(125, 92, 242, .18), transparent 70%),
    rgba(255, 255, 255, .03);
}
.banner-ico { width: 3.6rem; height: 3.6rem; flex: none; }
.banner h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.banner p { margin-top: .35rem; font-size: 1.15rem; color: #cdc8df; font-weight: 500; }

/* ---------- узкие/портретные экраны: одна колонка, прокрутка как запасной вариант ---------- */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  html { font-size: max(13px, 3.9vw); height: auto; }
  body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  .page { height: auto; min-height: 100vh; grid-template-rows: none; padding: 0 1.2rem; gap: 1rem; }
  .foot { margin-inline: -1.2rem; padding-inline: 1.2rem; }
  .top { height: 4.2rem; }
  .hero { flex-direction: column; align-items: stretch; padding-bottom: 0; }
  .hero-text { max-width: 100%; }
  h1 { font-size: 2.7rem; }
  .lead { font-size: 1.05rem; }
  .cat {
    position: relative; right: auto; bottom: auto; height: auto; width: 100%; max-width: 100%;
    margin-top: 1rem; aspect-ratio: 585 / 375;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 80%, transparent 100%);
  }
  .cards { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .arrow { transform: rotate(90deg); justify-self: center; margin: 0; }
  .banner { padding: 1.2rem; }
  .banner h2 { font-size: 1.15rem; }
  .banner p { font-size: .95rem; }
  .s1 { top: 8%; }
}

@media (prefers-reduced-motion: no-preference) {
  .sp { animation: tw 4.5s ease-in-out infinite; }
  .s2 { animation-delay: -1.2s; } .s3 { animation-delay: -2.4s; } .s4 { animation-delay: -3.4s; }
  @keyframes tw { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.08); } }
}
