/* =========================================================
   VISA × hromadske — «Три секунди — і оплата успішна»
   Стилі проєкту. Сітка — bootstrap-grid.min.css (5.3).
   Усе скоуплено під .visa, щоб не зачіпати хедер hromadske.
   ========================================================= */

:root {
  --paper:    #F2DCAB;   /* основний пісочний фон */
  --paper-lt: #FAEED2;   /* світлий папір (стрічки, картки) */
  --ink:      #1D1D1B;   /* лінія / текст */
  --terminal: #E39A48;   /* помаранч термінала */
  --terminal-lt: #F6C48C;
  --kraft:    #B5A27C;   /* крафт-фон калькулятора */
  --sage:     #B9C97E;
  --teal:     #62A89C;
  --violet:   #9A8BE8;
  --card:     #6E8FC9;
  --ok:       #3DAE5C;   /* «оплата успішна» */
  --white:    #fff;

  --f-main: Montserrat, sans-serif;
  --f-hand: Caveat, cursive;

  --fs-body: clamp(18px, 1.45vw, 21px);
  --fs-h2:   clamp(28px, 3vw, 44px);
  --fs-hand: 26px;

  --shadow-sm: 0 8px 18px rgba(29,29,27,.22);
  --shadow-md: 0 12px 22px rgba(29,29,27,.22);

  /* рвані краї */
  --torn-card: polygon(1% 3%, 30% 0, 62% 2%, 99% 0, 100% 35%, 98% 70%, 100% 99%, 64% 100%, 33% 98%, 0 100%, 2% 66%, 0 32%);
  --torn-photo: polygon(1% 3%, 8% 0, 15% 2.5%, 23% .5%, 31% 3%, 40% 1%, 48% 3.5%, 57% .5%, 66% 2.5%, 74% 0, 83% 3%, 91% 1%, 99% 2.5%, 100% 20%, 98.5% 40%, 100% 62%, 98.5% 80%, 100% 98%, 90% 100%, 81% 97.5%, 72% 99.5%, 62% 97%, 52% 99.5%, 43% 97.5%, 33% 100%, 24% 97%, 14% 99.5%, 6% 97.5%, 0 99%, 1.5% 78%, 0 58%, 1.5% 37%, 0 18%);
  --torn-band-a: polygon(0 18px, 5% 6px, 11% 16px, 17% 4px, 24% 14px, 30% 2px, 37% 12px, 44% 5px, 51% 17px, 58% 3px, 65% 13px, 72% 6px, 79% 16px, 86% 2px, 93% 12px, 100% 5px, 100% calc(100% - 14px), 94% calc(100% - 3px), 87% calc(100% - 15px), 80% calc(100% - 4px), 73% calc(100% - 13px), 66% calc(100% - 2px), 59% calc(100% - 16px), 52% calc(100% - 5px), 45% calc(100% - 12px), 38% calc(100% - 1px), 31% calc(100% - 14px), 24% calc(100% - 4px), 17% calc(100% - 16px), 10% calc(100% - 3px), 4% calc(100% - 12px), 0 calc(100% - 4px));
  --torn-band-b: polygon(0 12px, 6% 2px, 12% 14px, 19% 4px, 26% 16px, 33% 3px, 40% 13px, 47% 1px, 54% 15px, 61% 5px, 68% 14px, 75% 2px, 82% 12px, 89% 4px, 95% 15px, 100% 6px, 100% calc(100% - 10px), 93% calc(100% - 1px), 86% calc(100% - 14px), 79% calc(100% - 3px), 72% calc(100% - 15px), 65% calc(100% - 5px), 58% calc(100% - 13px), 51% calc(100% - 2px), 44% calc(100% - 14px), 37% calc(100% - 4px), 30% calc(100% - 16px), 23% calc(100% - 3px), 16% calc(100% - 12px), 9% calc(100% - 2px), 3% calc(100% - 14px), 0 calc(100% - 5px));
}

/* ---------- база ---------- */
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--f-main);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  height:auto;
}

.c-header {
    position: sticky;
    z-index: 10;
    top: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.visa { overflow: hidden; }
.visa *, .visa *::before, .visa *::after { box-sizing: border-box; }
.visa p { margin: 0; }
.visa img { max-width: 100%; }
.visa a { color: var(--ink); text-decoration-color: var(--terminal); text-underline-offset: 3px; }
.visa a:hover { color: var(--terminal); }

.section { position: relative; }

/* текстова колонка (≈760px) */
.text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: var(--fs-body);
  line-height: 1.6;
  text-wrap: pretty;
}
.text--strong, .text .is-strong { font-weight: 600; }

.h2 {
  margin: 0 0 8px;
  font-weight: 800;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -.01em;
  text-wrap: balance;
}

/* рукописні підписи */
.hand { font-family: var(--f-hand); font-size: var(--fs-hand); line-height: 1.05; }
.hand--lg { font-size: 30px; line-height: 1; }

.dash-arrow path { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.dash-arrow path:first-child { stroke-dasharray: 5 5; }

/* наклеєна картка з рваним краєм */
.torn {
  clip-path: var(--torn-card);
  box-shadow: var(--shadow-md);
}

/* BG White*/
.bg-white {
	background: var(--white);
}


/* =========================================================
   01 HERO
   ========================================================= */
.section-hero { padding: clamp(40px,6vw,96px) 0 clamp(48px,6vw,88px); }

.hero__intro { display: flex; flex-direction: column; gap: 28px; }

.kicker {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.kicker__tag { background: var(--ink); color: var(--paper); padding: 6px 10px; }

.hero__title {
  margin: 0;
  font-weight: 900;
  font-size: clamp(44px, 5.8vw, 88px);
  line-height: .98;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.hero__subtitle {
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.25;
  font-weight: 600;
  max-width: 560px;
  text-wrap: pretty;
}
.hero__scroll { display: flex; align-items: center; gap: 14px; }
.hero__scroll svg { flex: none; }

.hero__art { position: relative; padding: 4% 4% 10% 8%; margin-top: 48px; }
@media (min-width: 992px) { .hero__art { margin-top: 0; } }

.hero__photo {
  width: 100%; display: block;
  transform: rotate(-2.5deg);
  clip-path: var(--torn-photo);
}
.hero__card {
  position: absolute; left: 0; bottom: 0; width: 44%;
  transform: rotate(8deg);
  filter: drop-shadow(0 8px 10px rgba(29,29,27,.28));
}
.hero__note {
  position: absolute; left: 46%; bottom: -2%;
  max-width: 200px; transform: rotate(-3deg);
  font-size: 24px;
}

/* таймер 0,0 → 3,0 сек */
.timer {
  position: absolute; top: -2%; right: -1%;
  width: clamp(136px, 13vw, 184px); aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper-lt);
  box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
  transform: rotate(6deg);
  transition: background .3s;
}
.timer__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.timer__ring circle { fill: none; }
.timer__track { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 4; }
.timer__progress { stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 0 276.5; }

.timer__count, .timer__ok { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.timer__count {
    color: #000 !important;
}
.timer__sec { font-weight: 900; font-size: clamp(40px, 4vw, 56px); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.timer__ok { display: none; gap: 4px; color: var(--white); text-align: center; }
.timer__ok span { font-weight: 800; font-size: 14px; line-height: 1.15; text-transform: uppercase; letter-spacing: .04em; }

.timer.is-done { background: var(--ok); }
.timer.is-done .timer__progress { stroke: var(--white); }
.timer.is-done .timer__count { display: none; }
.timer.is-done .timer__ok { display: flex; }

.check path { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

.hero__lead { margin-top: clamp(56px, 6vw, 96px); }

/* =========================================================
   02 ШЛЯХ ПЛАТЕЖУ
   ========================================================= */
.section-path { padding: clamp(24px,4vw,48px) 0 clamp(48px,6vw,96px); }

.band {
  margin: 36px auto 0;
  max-width: 1380px;
  padding: 0 8px;
}
.band__inner {
  background: var(--paper-lt);
  padding: clamp(48px,5vw,72px) clamp(20px,3vw,48px);
  clip-path: var(--torn-band-a);
  color: #1d1d1d;
}

.path {
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; gap: 8px;
  list-style: none; margin: 0; padding: 0;
}
.path__step {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
}
.path__pic { height: 120px; display: flex; align-items: center; }
.path__pic--card img { height: 76px; transform: rotate(-7deg); }
.path__pic--terminal img { height: 112px; }
.path__pic--acq img { height: 96px; }
.path__pic--ps img { height: 86px; }
.path__pic--iss img { height: 90px; }

.path__label { display: flex; align-items: center; gap: 8px; }
.path__num {
  width: 28px; height: 28px; flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink);
  font-weight: 800; font-size: 13px;
  display: grid; place-items: center;
  transition: all .2s;
}
.path__name { font-weight: 700; font-size: 17px; line-height: 1.2; text-align: left; }

.path__step.is-passed .path__num { background: var(--ink); color: var(--white); }
.path__step.is-active .path__num { background: var(--ok); color: var(--white); }

.path__arrow { flex: none; transform: rotate(90deg); }
.path__arrow path { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.path__arrow path:first-child { stroke-dasharray: 4 4; }

.path__ok {
  width: 92px; height: 92px;
  border-radius: 50%;
  background: var(--paper-lt);
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  color: var(--ink);
  transform: rotate(-4deg);
  transition: background .2s;
}
.path__step.is-active .path__ok { background: var(--ok); color: var(--white); }

@media (min-width: 768px) {
  .path { flex-direction: row; }
  .path__arrow { transform: none; }
}

.path__back {
  margin-top: 28px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  text-align: center; line-height: 1.1;
}
.path__back svg { flex: none; }

.coins-note { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.coins-note img { width: 92px; transform: rotate(-8deg); }
.coins-note .hand { font-size: 28px; max-width: 420px; }

/* =========================================================
   03 ІНТЕРЧЕЙНДЖ + КАЛЬКУЛЯТОР
   ========================================================= */
.section-calc { padding: clamp(40px,5vw,72px) 0; }

.calc-band { margin: 48px auto; max-width: 1380px; padding: 0 8px; color: #1d1d1d;}
.calc-band__inner {
  background-color: var(--kraft);
  background-image: url(../img/craft.jpg);
  background-size: cover;
  background-position: 0 0;
  padding: clamp(56px,6vw,96px) clamp(16px,4vw,64px);
  clip-path: var(--torn-band-b);
}

/* «термінал»-калькулятор */
.calc {
  background: var(--terminal);
  border: 2px solid var(--ink);
  border-radius: 40px 40px 56px 56px;
  padding: clamp(18px,2vw,28px);
  box-shadow: 0 18px 30px rgba(29,29,27,.28);
  transform: rotate(-1.2deg);
  display: flex; flex-direction: column; gap: 22px;
}
.calc__screen {
  background: var(--sage);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.calc__meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
.calc__amount {
  font-weight: 900; font-size: clamp(40px,4.4vw,60px); line-height: 1;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.calc__amount small { font-size: .5em; font-weight: 700; }
.calc__result {
  border-top: 1.5px dashed var(--ink);
  padding-top: 14px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap;
}
.calc__result-label { font-size: 15px; font-weight: 600; line-height: 1.3; max-width: 220px; }
.calc__fee { font-weight: 900; font-size: clamp(30px,3vw,40px); line-height: 1; font-variant-numeric: tabular-nums; }

/* повзунок */
.range { position: relative; height: 36px; margin: 0 6px; --pct: 6.06%; }
.range__track, .range__fill {
  position: absolute; left: 0; top: 16px; height: 4px;
  background: var(--ink); border-radius: 2px;
}
.range__track { right: 0; opacity: .25; }
.range__fill { width: var(--pct); }
.range__thumb {
  position: absolute; top: 4px; left: var(--pct);
  width: 28px; height: 28px; margin-left: -14px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  pointer-events: none;
}
.range input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.range input:focus-visible ~ .range__thumb { outline: 3px solid var(--ink); outline-offset: 2px; }

/* кнопки ставок */
.rates { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.rate-btn {
  font-family: var(--f-main);
  cursor: pointer;
  padding: 14px 4px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--terminal-lt);
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(16px,1.6vw,20px);
  box-shadow: 0 3px 0 var(--ink);
}
.rate-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.rates__labels { margin-top: -8px; font-family: var(--f-hand); font-size: 20px; line-height: 1; text-align: center; }
@media (max-width: 575.98px) { .rates { gap: 6px; } .rates__labels { font-size: 16px; } }

/* стікери праворуч від калькулятора */
.stickers { display: flex; flex-direction: column; gap: 24px; margin-top: 40px; }
@media (min-width: 992px) { .stickers { margin-top: 0; } }
.sticker {
  padding: 28px 30px;
  box-shadow: 0 10px 20px rgba(29,29,27,.2);
  clip-path: var(--torn-card);
}
.sticker--paper { background: var(--paper); transform: rotate(1.5deg); display: flex; flex-direction: column; gap: 10px; }
.sticker--white { background: var(--white); transform: rotate(-1deg); padding: 24px 30px; display: flex; align-items: center; gap: 18px; }
.sticker__kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.sticker__title { font-weight: 800; font-size: clamp(22px,2vw,28px); line-height: 1.2; }
.sticker__ok {
  width: 56px; height: 56px; flex: none; border-radius: 50%;
  background: var(--ok); color: var(--white);
  display: grid; place-items: center;
}
.sticker__ok .check path { stroke-width: 6; }
.sticker__big { font-weight: 800; font-size: 22px; display: block; }
.sticker .hand { font-size: 22px; }

/* список «на що йде інтерчейндж» */
.funds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: clamp(17px,1.35vw,19px); line-height: 1.45; 
color: #1d1d1d;
}
.funds li {
  background: var(--paper-lt);
  padding: 16px 20px;
  border: 1.5px solid var(--ink);
  display: flex; gap: 14px;
}
.funds li:nth-child(odd)  { transform: rotate(-.5deg); }
.funds li:nth-child(even) { transform: rotate(.6deg); }
.funds__dot {
  flex: none; width: 12px; height: 12px; margin-top: 6px;
  border-radius: 50%; border: 1.5px solid var(--ink);
  background: var(--teal);
}
.funds li:nth-child(2) .funds__dot { background: var(--violet); }
.funds li:nth-child(3) .funds__dot { background: var(--terminal); }
.funds li:nth-child(4) .funds__dot { background: var(--card); }
.funds li:nth-child(5) .funds__dot { background: var(--sage); }
.funds__img { width: 100%; max-width: 480px; display: block; margin: 32px auto 0; }
@media (min-width: 992px) { .funds__img { margin-top: 0; } }

/* =========================================================
   04 ДОСВІД ЄВРОПИ
   ========================================================= */
.section-europe { padding: clamp(48px,6vw,96px) 0 clamp(32px,4vw,48px); }

.facts { margin: clamp(48px,5vw,80px) 0 clamp(48px,7vw,100px); }
.fact {
  height: 100%;
  padding: 36px 32px 40px;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--violet);
  transform: rotate(-2deg);
}
.facts > :nth-child(2) .fact { background: var(--card); transform: rotate(1.5deg); }
.facts > :nth-child(3) .fact { background: var(--sage); transform: rotate(-1deg); }
.fact__num {
  font-weight: 900;
  font-size: clamp(44px, 5vw, 72px);
  line-height: .9;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.fact .hand { font-size: 27px; }
@media (min-width: 768px) { .fact--down { margin-top: clamp(0px, 4vw, 56px); } }

.bullets { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 20px; }
.bullets li { display: flex; gap: 16px; }
.bullets__mark {
  flex: none; width: 14px; height: 14px; margin-top: 9px;
  border: 1.5px solid var(--ink);
  background: var(--violet);
  transform: rotate(12deg);
}
.bullets li:nth-child(2) .bullets__mark { background: var(--paper); transform: rotate(-8deg); }
.bullets li:nth-child(3) .bullets__mark { background: var(--card); transform: rotate(20deg); }

/* =========================================================
   05 УКРАЇНА
   ========================================================= */
.section-ukraine { padding: clamp(32px,4vw,48px) 0 clamp(64px,8vw,128px); }

.ua-map { position: relative; margin: 40px 0; }
.ua-map img { width: 100%; display: block; filter: drop-shadow(0 10px 14px rgba(29,29,27,.2)); max-width: 430px;}
.ua-map__note {
    position: absolute;
    right: 24%;
    bottom: 4%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--f-hand);
    font-size: clamp(20px, 2.4vw, 30px);
    line-height: 1;
    transform: rotate(-3deg);
    background: var(--paper);
    padding: 8px 14px;
    border: 1.5px dashed var(--ink);
    border-radius: 18px;
    color: #1d1d1d;
    flex-direction: column;
	text-align: center;
    /* width: 110px; */
}
.ua-map__note span {
    transform: rotate(90deg);
}
@media(max-width:576px){
	.ua-map__note {
		right: 2%;
	}
}
.divider-top { padding-top: 28px; border-top: 1.5px dashed var(--ink); }

/* =========================================================
   CREDITS
   ========================================================= */
.section-credits { padding: 40px 0 64px; border-top: 1.5px dashed var(--ink); font-size: 15px; line-height: 1.5; }
.section-credits p + p { margin-top: 8px; }

/* =========================================================
   Темна тема — TODO: вирішити (поки фон лишається «паперовим»)
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .timer, .path__num, .path__ok { transition: none; }
}

.bg-sage {
	background: var(--sage);
}

[data-theme="dark"] .bg-white {
		background:#1d1d1d;
	}

[data-theme="dark"] body {
    background: #5e553f !important;
}

/* ---------- шлях платежу: зворотний рух ---------- */

/* стрілки розвертаються (на мобільному — дивляться вгору) */
.path__arrow svg { transition: transform .35s ease; }
.path.is-back .path__arrow svg { transform: scaleX(-1); }

/* «відповідь» лишається зеленою, поки вона йде назад ланцюжком */
.path.is-back .path__ok { background: var(--ok); color: var(--white); }

/* підпис «відповідь — назад тим самим ланцюжком» оживає під час зворотного руху */
.path__back { opacity: .45; transition: opacity .3s, color .3s; }
.path__back.is-active { opacity: 1; color: var(--ok); }
.path__back.is-active path { stroke: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  .path__arrow svg, .path__back { transition: none; }
}
