/* FinTool — лендинг. Одна страница-презентация: слайды во весь экран, блоки проявляются и поднимаются,
   когда до них докрутили (класс .in ставит app.js; без скрипта и при «уменьшить движение» всё видно сразу). */

@font-face {
  font-family: 'Unbounded';
  src: url('fonts/unbounded-cyrillic-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  src: url('fonts/unbounded-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215;
}
@font-face {
  font-family: 'Onest';
  src: url('fonts/onest-cyrillic-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  src: url('fonts/onest-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215;
}

:root {
  --paper: #F6F6F2;
  --mist: #ECEEE8;
  --moss: #DCEBE2;
  --sky: #E6EEF2;
  --ink: #15191B;
  --slate: #5A6067;
  --forest: #2D6A4F;
  --forest-deep: #173F2E;
  --line: #D9DDD5;
  --amber: #96580A;
  --red: #A8323C;
  --white: #FFFFFF;

  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --shadow: 0 24px 70px rgba(30, 50, 40, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; border-radius: 6px; }

/* ---------- шапка ---------- */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  /* без своей заливки: шапка лежит поверх слайдов разного тона, цветная полоса резала бы их */
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
}
.bar-mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.btn {
  display: inline-block;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  background: var(--forest);
  color: var(--white);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s;
}
.btn:hover { background: var(--forest-deep); }
.btn-small { padding: 0.6em 1.1em; font-size: 0.95rem; }
.btn-big { padding: 1em 2em; font-size: 1.25rem; }

/* ---------- рейка разделов справа ---------- */
.rail {
  position: fixed;
  right: 14px;
  top: 50%;
  z-index: 15;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail a {
  position: relative;
  display: block;
  width: 22px;
  height: 18px;
}
.rail a::before {
  content: '';
  position: absolute;
  right: 4px;
  top: 8px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  opacity: 0.22;
  transition: width 0.2s, opacity 0.2s, background 0.2s;
}
.rail a:hover::before { opacity: 0.6; }
.rail a[aria-current='true']::before { width: 16px; opacity: 1; background: var(--forest); }
.rail a span {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.rail a:hover span, .rail a:focus-visible span { opacity: 1; }

/* ---------- слайд ---------- */
.slide {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(88px, 12vh, 140px) var(--gutter) clamp(56px, 9vh, 110px);
}
.slide > .inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

/* Появление блоков: из прозрачного и чуть снизу, по очереди внутри слайда (--i — номер блока) */
.js .reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.js .reveal.in { opacity: 1; transform: none; }
.slide-flip > .inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.slide-wide > .inner { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.slide-flip > .inner > .text { order: 2; }
.slide-stack > .inner, .slide-center > .inner, .slide-cover > .inner { grid-template-columns: minmax(0, 1fr); }
.slide-center > .inner, .slide-cover > .inner { justify-items: center; text-align: center; }

.slide-moss { background: radial-gradient(ellipse at 50% 120%, #C6E0D0 0%, var(--moss) 65%); }
.slide-sky { background: radial-gradient(ellipse at 78% 50%, var(--sky) 0%, var(--paper) 62%); }
.slide-mist { background: var(--mist); }
.slide-close { background: radial-gradient(ellipse at 50% 55%, #D3E6DA 0%, var(--paper) 62%); }

/* ---------- типографика ---------- */
h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.4vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.h-big { font-size: clamp(2rem, 5.2vw, 4.6rem); font-weight: 700; line-height: 1.06; color: var(--forest-deep); }
.slide-stack h2 { max-width: 20ch; }
.slide-stack .h-big { max-width: none; }
h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.text { display: grid; gap: 1.25rem; }
.text p, .lead, .facts p { color: var(--slate); max-width: 34rem; }
.text p { font-size: clamp(1.05rem, 1.35vw, 1.3rem); }
.text .strong { color: var(--ink); }
.lead { font-size: clamp(1.15rem, 1.8vw, 1.6rem); line-height: 1.4; max-width: 46rem; }
.slide-moss .lead { color: #34503F; }
.note { font-size: 1rem !important; color: var(--slate); }
.note-wide { max-width: 46rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.fine { font-size: 0.95rem; color: var(--slate); }

/* ---------- обложка ---------- */
.slide-cover {
  padding-bottom: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 100%, #D3E6DA 0%, var(--paper) 62%);
}
.slide-cover > .inner { gap: clamp(16px, 2.4vh, 28px); align-self: end; }
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 13vw, 11rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, var(--ink) 10%, #3C5A4B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.cover-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; }
.platforms { color: var(--slate); font-size: 1rem; }
.cover-shot {
  width: min(100%, 1080px);
  margin-top: clamp(12px, 3vh, 36px);
  aspect-ratio: 3200 / 1300;
  object-fit: cover;
  object-position: 50% 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -20px 120px rgba(45, 106, 79, 0.18);
}

/* ---------- скриншоты ---------- */
.shot {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  background: var(--white);
}
.shot-tall { max-height: 76vh; width: auto; justify-self: center; }
.shot-wide { margin-top: clamp(20px, 4vh, 44px); max-width: 1100px; }
.slide-stack > .inner { gap: clamp(18px, 3vh, 32px); }

.phones { display: flex; justify-content: space-between; gap: clamp(8px, 2vw, 28px); }
.phones img { width: 31%; max-height: 72vh; object-fit: contain; }

.gauges { display: grid; gap: clamp(14px, 2.2vh, 24px); }
.gauges li { position: relative; }
.gauges img { width: 100%; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.gauge-note {
  position: absolute;
  right: 16px;
  top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.9rem;
  font-weight: 600;
}
.good { color: var(--forest); }
.warn { color: var(--amber); }
.bad { color: var(--red); }

/* ---------- факты: колонки с волосяной линией сверху ---------- */
.facts { display: grid; gap: clamp(24px, 3vw, 48px); margin-top: clamp(20px, 5vh, 56px); }
.facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts li { display: grid; gap: 0.7rem; align-content: start; padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.slide-moss .facts li { border-top-color: var(--forest-deep); }
.slide-moss .facts p { color: #34503F; }
.facts p { font-size: clamp(1.05rem, 1.25vw, 1.2rem); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); margin-top: 0.5rem; }
.pair dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--forest);
}
.pair dt.bad { color: var(--red); }
.pair dd { margin-top: 0.4rem; color: var(--slate); font-size: 1rem; }

/* ---------- голосовые команды ---------- */
.says { display: grid; }
.says li {
  padding: clamp(14px, 2.2vh, 24px) 0;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1rem, 1.7vw, 1.45rem);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.says li:last-child { border-bottom: 1px solid var(--line); }

/* ---------- узкие экраны ---------- */
@media (max-width: 900px) {
  .rail { display: none; }
  .slide { align-items: start; padding-top: 96px; }
  .slide > .inner, .slide-flip > .inner, .slide-wide > .inner { grid-template-columns: minmax(0, 1fr); }
  .slide-flip > .inner > .text { order: 0; }
  .slide-center, .slide-cover { align-items: center; }
  .facts-3, .facts-4 { grid-template-columns: minmax(0, 1fr); }
  .shot-tall { max-height: none; width: 100%; max-width: 420px; }
  .cover-shot { aspect-ratio: 3200 / 1700; }
  .pair { grid-template-columns: 1fr; }
  .btn-small { padding: 0.55em 0.95em; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .facts-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
