/* ============================================================
   Сбер — система бренда
   Редакционный стиль: плоские цветовые панели, гигантский
   гротеск, бенто-мозаика, стек-панели со скролл-хореографией
   ============================================================ */

:root {
  --green:    #21A038;
  --green-dk: #17812C;
  --yellow:   #F2E913;
  --lime:     #A3CD39;
  --sky:      #0FA8E0;
  --blue:     #0291EB;
  --graphite: #333F48;
  --paper:    #F5F4F0;
  --black:    #101314;

  --grad: linear-gradient(115deg, var(--yellow) 0%, var(--lime) 24%, var(--green) 50%, var(--sky) 76%, var(--blue) 100%);

  --font: "SB Sans Text", "Onest", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- База ---------- */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--black);
  background: var(--paper);
  overflow-x: clip;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

::selection { background: var(--green); color: #fff; }

section[id], .panel[id] { scroll-margin-top: 0; }

/* ---------- Кастомный курсор ---------- */

.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 300;
  transform: translate(-100px, -100px);
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease);
}
.cursor.is-hover { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
@media (hover: none), (prefers-reduced-motion: reduce) { .cursor { display: none; } }

/* ---------- Панельные фоны ---------- */

.panel-green    { background: var(--green);    color: #fff; }
.panel-graphite { background: var(--graphite); color: #fff; }
.panel-yellow   { background: var(--yellow);   color: var(--black); }
.panel-blue     { background: var(--blue);     color: #fff; }
.panel-paper    { background: var(--paper);    color: var(--black); }
.panel-black    { background: var(--black);    color: #fff; }
.panel-gradient {
  background: var(--grad);
  background-size: 240% 100%;
  color: #fff;
}

/* ---------- HERO ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8vh var(--gutter) 5vh;
  position: relative;
  overflow: clip;
}

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  opacity: .85;
}

.hero__word {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.5vw, 36px);
  font-size: clamp(96px, 24vw, 360px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.045em;
  color: #fff;
  user-select: none;
}

.hero__ring { flex: 0 0 auto; width: .72em; }
.hero__ring svg { width: 100%; animation: ring-float 7s ease-in-out infinite; }
.hero__ring-c {
  stroke-dasharray: 688 116;
  stroke-dashoffset: 804;
  animation: draw 1.4s var(--ease) .2s forwards;
}
.hero__ring-v {
  stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: draw .9s var(--ease) 1.2s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ring-float { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(8deg); } }

.hero__letters { display: inline-flex; }
.hero__letters i {
  font-style: normal;
  display: inline-block;
  transform: translateY(110%) rotate(6deg);
  animation: letter-in .9s var(--ease) forwards;
}
.hero__letters i:nth-child(1) { animation-delay: .35s; }
.hero__letters i:nth-child(2) { animation-delay: .43s; }
.hero__letters i:nth-child(3) { animation-delay: .51s; }
.hero__letters i:nth-child(4) { animation-delay: .59s; }
@keyframes letter-in { to { transform: none; } }
.hero__word { clip-path: inset(-20% -5% 0 -5%); }

.hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.hero__note { font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; line-height: 1.4; }

.hero__cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 800; font-size: 17px;
  padding: 18px 30px;
  border-radius: 999px;
  background: #fff; color: var(--green-dk);
  transition: transform .3s var(--ease-spring), box-shadow .3s;
  will-change: transform;
}
.hero__cta:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 34px -12px rgba(0,0,0,.35); }
.hero__cta:active { transform: scale(.97); }
.hero__cta svg { width: 20px; height: 20px; animation: cta-bounce 2s ease-in-out infinite; }
@keyframes cta-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---------- Бегущая строка ---------- */

.marquee {
  background: var(--black);
  color: var(--paper);
  overflow: clip;
  padding: 18px 0;
  border-block: 1px solid var(--black);
}
.marquee__track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  will-change: transform;
}
.marquee__track span {
  font-size: clamp(22px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -.02em;
  padding-right: .5em;
}

/* ---------- Мозаика ---------- */

.mosaic { padding: clamp(56px, 9vh, 120px) var(--gutter); background: var(--paper); }

.mosaic__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(200px, 24vh);
  gap: 14px;
  max-width: 1400px;
  margin-inline: auto;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
  border-radius: 24px;
  overflow: clip;
  transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease);
  will-change: transform;
}
.tile:hover { transform: scale(.975); }
.tile:active { transform: scale(.95); }

.tile--tall { grid-row: span 2; }
.tile--wide { grid-column: span 2; }

.tile--graphite { background: var(--graphite); color: #fff; }
.tile--green    { background: var(--green);    color: #fff; }
.tile--yellow   { background: var(--yellow);   color: var(--black); }
.tile--blue     { background: var(--blue);     color: #fff; }
.tile--paper    { background: #fff; color: var(--black); box-shadow: inset 0 0 0 1.5px rgba(16,19,20,.12); }
.tile--gradient { background: var(--grad); background-size: 300% 100%; color: #fff; transition: transform .45s var(--ease-spring), background-position 1.2s var(--ease); }
.tile--gradient:hover { background-position: 100% 0; }

.tile__num {
  position: absolute; top: 22px; left: 26px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .12em;
  opacity: .7;
}
.tile__name {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 10px;
}
.tile__name::after {
  content: "→";
  font-weight: 700;
  transform: translateX(-6px);
  opacity: 0;
  transition: transform .3s var(--ease), opacity .3s;
}
.tile:hover .tile__name::after { transform: none; opacity: 1; }

.tile__visual { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }

.tile__visual--ring svg { width: 56%; transition: transform .6s var(--ease-spring); }
.tile:hover .tile__visual--ring svg { transform: rotate(-14deg) scale(1.06); }

.tile__visual--dots { display: flex; gap: 10px; align-items: center; justify-content: center; }
.tile__visual--dots i {
  width: clamp(28px, 3vw, 44px); aspect-ratio: 1; border-radius: 50%;
  background: var(--c);
  transition: transform .5s var(--ease-spring);
}
.tile:hover .tile__visual--dots i { transform: translateY(-10px); }
.tile:hover .tile__visual--dots i:nth-child(2) { transition-delay: .05s; }
.tile:hover .tile__visual--dots i:nth-child(3) { transition-delay: .1s; }
.tile:hover .tile__visual--dots i:nth-child(4) { transition-delay: .15s; }

.tile__visual--aa {
  font-size: clamp(64px, 7vw, 110px); font-weight: 900; letter-spacing: -.04em;
  transition: transform .5s var(--ease-spring);
}
.tile:hover .tile__visual--aa { transform: scale(1.12) rotate(-4deg); }

.tile__visual--quote {
  font-size: clamp(56px, 6vw, 96px); font-weight: 900;
  transition: letter-spacing .5s var(--ease);
}
.tile:hover .tile__visual--quote { letter-spacing: .3em; }

.tile__visual--arrow svg {
  width: clamp(40px, 4vw, 64px);
  transition: transform .4s var(--ease-spring);
}
.tile:hover .tile__visual--arrow svg { transform: translate(8px, -8px); }

/* ---------- Стек панелей ---------- */

.stack { position: relative; }

.panel {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: clip;
  will-change: transform;
  transform-origin: 50% 0;
}

.panel__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 7vh var(--gutter) 6vh;
  max-width: 1500px;
  width: 100%;
  margin-inline: auto;
}

.panel__head { display: flex; align-items: baseline; gap: 20px; }
.panel__num {
  font-family: var(--mono);
  font-size: clamp(14px, 1.4vw, 18px);
  opacity: .7;
}
.panel__title {
  font-size: clamp(56px, 11vw, 160px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.04em;
}

.panel__body { flex: 1; display: flex; align-items: center; margin-top: 4vh; }
.panel__body--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 90px);
  align-items: center;
}

.panel__lead { font-size: clamp(18px, 1.8vw, 24px); font-weight: 600; line-height: 1.45; max-width: 46ch; }
.panel__hint { font-size: 15px; font-weight: 600; opacity: .65; margin-left: auto; text-align: right; line-height: 1.4; }

/* 01 Логотип */

.logo-figure { display: grid; place-items: center; }
.logo-figure svg { width: min(420px, 78%); }
.logo-figure__ring { stroke-dasharray: 516 88; }
.logo-figure__check { stroke-dasharray: 140; }

.rules { display: grid; gap: 0; margin-top: 28px; }
.rules li {
  padding: 20px 0;
  border-top: 1.5px solid rgba(255,255,255,.22);
  font-size: 16px;
  line-height: 1.5;
  opacity: .85;
}
.rules li b {
  display: block;
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 4px;
  opacity: 1;
}

/* 02 Цвета: аккордеон полос */

.panel--flush { padding: 0; }
.panel__head--overlay {
  position: absolute;
  z-index: 5;
  top: 7vh;
  left: var(--gutter);
  right: var(--gutter);
  pointer-events: none;
  mix-blend-mode: difference;
  color: #fff;
}

.stripes {
  flex: 1;
  display: flex;
  min-height: 100svh;
}
.stripe {
  position: relative;
  flex: 1;
  background: var(--c);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 6px;
  padding: 5vh 26px;
  overflow: clip;
  transition: flex .7s var(--ease);
  min-width: 0;
}
.stripe:hover, .stripe.is-open, .stripe:focus-visible { flex: 3.2; }

.stripe__name {
  font-size: clamp(20px, 2.4vw, 34px);
  font-weight: 900;
  letter-spacing: -.02em;
  white-space: nowrap;
  writing-mode: vertical-rl;
  rotate: 180deg;
  transition: writing-mode 0s .0s;
}
.stripe:hover .stripe__name, .stripe.is-open .stripe__name, .stripe:focus-visible .stripe__name {
  writing-mode: horizontal-tb;
  rotate: none;
}
.stripe__hex {
  font-family: var(--mono);
  font-size: clamp(14px, 1.6vw, 22px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .4s .15s, transform .4s .15s var(--ease);
}
.stripe__role {
  font-size: 14px; font-weight: 600; opacity: 0;
  transform: translateY(10px);
  transition: opacity .4s .22s, transform .4s .22s var(--ease);
}
.stripe:hover .stripe__hex, .stripe.is-open .stripe__hex, .stripe:focus-visible .stripe__hex,
.stripe:hover .stripe__role, .stripe.is-open .stripe__role, .stripe:focus-visible .stripe__role {
  opacity: .92; transform: none;
}
.stripe::after {
  content: "клик — копировать";
  position: absolute;
  top: 22vh;
  left: 26px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .4s .3s;
}
.stripe:hover::after { opacity: .6; }
.stripe.is-copied::after { content: "скопировано ✓"; opacity: 1; }

/* 03 Градиент */

.gradient-statement {
  font-size: clamp(34px, 5.4vw, 76px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.03em;
  max-width: 18em;
  text-wrap: balance;
}
.gradient-statement .ln { display: block; overflow: clip; }
.gradient-statement .ln span {
  display: block;
  transform: translateY(110%);
  transition: transform .9s var(--ease);
}
.gradient-statement.is-in .ln span { transform: none; }
.gradient-statement .ln:nth-child(2) span { transition-delay: .08s; }
.gradient-statement .ln:nth-child(3) span { transition-delay: .16s; }
.gradient-statement .ln:nth-child(4) span { transition-delay: .24s; }
.gradient-statement .ln:nth-child(5) span { transition-delay: .32s; }
.gradient-statement .ln:nth-child(6) span { transition-delay: .4s; }

/* 04 Типографика */

.type-aa {
  font-size: clamp(160px, 26vw, 420px);
  font-weight: 900;
  line-height: .85;
  letter-spacing: -.05em;
  transition: font-weight .25s ease;
  font-variation-settings: normal;
  user-select: none;
}

.weights { margin-top: 24px; border-top: 2px solid rgba(16,19,20,.25); }
.weights button {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 2px solid rgba(16,19,20,.25);
  text-align: left;
  transition: padding .3s var(--ease);
}
.weights button:hover { padding-left: 14px; }
.weights span {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .65;
  flex: 0 0 auto;
}
.weights em {
  font-style: normal;
  font-size: clamp(20px, 2.4vw, 32px);
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.weights [data-weight="400"] em { font-weight: 400; }
.weights [data-weight="600"] em { font-weight: 600; }
.weights [data-weight="800"] em { font-weight: 800; }
.weights [data-weight="900"] em { font-weight: 900; }

/* 05 Голос */

.voice-lines { display: grid; gap: clamp(10px, 2vh, 22px); }
.voice-lines li {
  font-size: clamp(28px, 4.6vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: rgba(255,255,255,.28);
  transition: color .5s ease, transform .5s var(--ease);
  transform: translateX(0);
}
.voice-lines li.is-lit { color: #fff; transform: translateX(clamp(8px, 1.5vw, 24px)); }

/* ---------- Финал ---------- */

.outro {
  position: relative;
  padding: clamp(90px, 14vh, 160px) var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: clip;
}
.outro__kicker {
  font-family: var(--mono);
  font-size: 14px; letter-spacing: .2em; text-transform: uppercase;
  opacity: .7;
}
.outro__cta {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 26px;
  padding: 20px 40px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 800;
  transition: transform .25s var(--ease-spring), background .25s;
  will-change: transform;
}
.outro__cta:hover { background: var(--green-dk); }
.outro__cta svg { width: 20px; height: 20px; }

.outro__word {
  margin-top: clamp(40px, 8vh, 90px);
  font-size: clamp(120px, 30vw, 460px);
  font-weight: 900;
  line-height: .72;
  letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,.25);
  transform: translateY(18%);
  user-select: none;
}

.outro__footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px 0 30px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: 13.5px;
  color: rgba(255,255,255,.55);
  text-align: left;
  position: relative;
  background: var(--black);
}
.outro__footer p { max-width: 60ch; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%; bottom: 30px;
  transform: translate(-50%, 16px);
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  font-size: 15px; font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  z-index: 200;
  box-shadow: 0 14px 40px -10px rgba(0,0,0,.5);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Появления ---------- */

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--rd, 0) * 90ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* split-заголовки панелей */
[data-split] .ch {
  display: inline-block;
  transform: translateY(110%);
  transition: transform .7s var(--ease);
  transition-delay: calc(var(--ci) * 35ms);
}
[data-split] { clip-path: inset(0 0 -10% 0); }
[data-split].is-in .ch { transform: none; }

/* отрисовка контуров SVG */
[data-draw] {
  stroke-dashoffset: var(--len, 600);
  transition: stroke-dashoffset 1.3s var(--ease) .15s;
}
.is-in [data-draw], [data-draw].is-in { stroke-dashoffset: 0; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, .hero__letters i, [data-split] .ch, .gradient-statement .ln span { opacity: 1; transform: none; }
  .hero__ring-c, .hero__ring-v, [data-draw] { stroke-dashoffset: 0 !important; }
  .voice-lines li { color: #fff; transform: none; }
  .marquee__track { transform: none !important; }
  .panel { position: relative; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1024px) {
  .mosaic__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(180px, 22vh); }
  .tile--tall { grid-row: span 1; }
  .panel__body--split { grid-template-columns: 1fr; gap: 24px; }
  .logo-figure svg { width: min(300px, 60%); }
  .type-aa { font-size: clamp(120px, 20vw, 220px); }
}

@media (max-width: 720px) {
  .hero { padding-top: 7vh; }
  .hero__word { font-size: clamp(72px, 23vw, 130px); }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 20px; }

  .mosaic__grid { grid-template-columns: 1fr; grid-auto-rows: minmax(170px, 24vh); }
  .tile--wide { grid-column: span 1; }

  .panel { position: relative; }
  .panel__title { font-size: clamp(48px, 15vw, 80px); }

  .stripes { flex-direction: column; min-height: 100svh; }
  .stripe { padding: 20px; flex: 1; }
  .stripe:hover, .stripe.is-open, .stripe:focus-visible { flex: 2.6; }
  .stripe__name { writing-mode: horizontal-tb; rotate: none; }
  .stripe::after { display: none; }
  .panel__hint { display: none; }

  .weights em { font-size: 19px; }
  .outro__cta { padding: 16px 28px; }
}
