/* Дафтар - лендинг.
   Светлые карточки со скруглением и объёмные 3D-иллюстрации (img/, Gemini), как у современных
   финтех-сайтов, но в тёплой «бумажной» гамме: дафтар - это тетрадь. Зелёный - цвет приложения,
   коралловый - только для долгов. Onest - основной шрифт, Literata (курсив) - акценты в заголовках.
   Оба шрифта содержат таджикские буквы (ӣ ӯ ҳ қ ҷ ғ). */

:root {
  --bg: #fbf8f2;
  --cream: #f4eee2;
  --sand: #f1e8d8;
  --mint: #e8f3ec;
  --ink: #16140f;
  --ink-2: #4b463d;
  --ink-3: #8b8477;
  --rule: rgba(22, 20, 15, 0.09);
  --green: #1d8a56;
  --green-2: #18a35f;
  --green-deep: #0f4f33;
  --coral: #e05a43;
  --white: #ffffff;

  --sans: "Onest", system-ui, sans-serif;
  --serif: "Literata", Georgia, serif;

  --wrap: 1200px;
  --r-lg: 32px;
  --r: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font: italic 500 1em/1 var(--serif); color: var(--green); letter-spacing: -0.01em; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

/* ---------- типографика ---------- */

.display {
  font: 700 clamp(42px, 5.4vw, 74px) / 1.04 var(--sans);
  letter-spacing: -0.035em;
  margin: 0 0 22px;
}
.display em { font-size: 1.04em; }
.h2 {
  font: 700 clamp(30px, 3.6vw, 48px) / 1.1 var(--sans);
  letter-spacing: -0.03em;
  margin: 0 0 40px;
}
.h3 { font: 700 23px/1.25 var(--sans); letter-spacing: -0.015em; margin: 0 0 10px; }
.h3--big { font-size: 32px; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 34ch; margin: 0 0 32px; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 54px; padding: 0 26px; border-radius: 16px;
  font: 600 16px/1 var(--sans); text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn--green { background: var(--green); color: var(--white); }
.btn--green:hover { background: var(--green-deep); }
.btn--paper { background: var(--white); color: var(--ink); }

.store {
  display: inline-flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 22px 0 18px; border-radius: 16px;
  background: var(--ink); color: var(--white); text-decoration: none;
  transition: transform 0.15s ease;
}
.store:hover { transform: translateY(-1px); }
.store svg { width: 24px; height: 24px; fill: currentColor; }
.store span { display: flex; flex-direction: column; font: 600 18px/1.1 var(--sans); }
.store small { font: 500 11px/1.25 var(--sans); opacity: 0.7; }
.store--light { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.25); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- шапка ---------- */

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 248, 242, 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--rule); }
.topbar__inner { display: flex; align-items: center; gap: 32px; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(160deg, var(--green-2), var(--green));
  color: var(--white); display: grid; place-items: center;
  font: 700 20px/1 var(--sans);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.brand__name { font: 700 21px/1 var(--sans); letter-spacing: -0.02em; }
.nav { display: flex; gap: 30px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  margin-top: 16px;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  min-height: 600px;
  padding: 56px 0 56px 64px;
  border-radius: var(--r-lg);
  background: radial-gradient(90% 120% at 85% 40%, #e3f1e8 0%, rgba(227, 241, 232, 0) 60%), var(--cream);
  overflow: hidden;
  position: relative;
}
.hero__note { margin: 20px 0 0; font-size: 15px; color: var(--ink-3); }
.hero__note a { color: var(--ink); text-underline-offset: 3px; }
.hero__art { position: relative; height: 560px; }
.hero__halo { position: absolute; width: 500px; height: 500px; left: 50%; margin-left: -250px; top: 30px; border-radius: 50%; background: radial-gradient(circle, rgba(29, 138, 86, 0.18), transparent 68%); }
.hero__ledger { position: absolute; width: 520px; left: 50%; top: 20px; margin-left: -260px; filter: drop-shadow(0 30px 40px rgba(15, 79, 51, 0.2)); }

/* ---------- карточки ---------- */

.section { padding: 110px 0 0; }
.section--tight { padding-top: 100px; }

/* карусель карточек: на ПК все 5 в одну строку, видно три, листается кнопками или свайпом */
.carousel { position: relative; }
.cards {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 3); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.cards::-webkit-scrollbar { display: none; }
.cards > .card { scroll-snap-align: start; }
.carousel__nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.carousel__btn {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--rule); background: var(--white);
  font: 500 20px/1 var(--sans); color: var(--ink); cursor: pointer; transition: background 0.15s ease, opacity 0.15s ease;
}
.carousel__btn:hover { background: var(--mint); }
.carousel__btn:disabled { opacity: 0.35; cursor: default; background: var(--white); }
.card {
  position: relative; overflow: hidden;
  border-radius: var(--r);
  padding: 32px 32px 0;
  display: flex; flex-direction: column;
  min-height: 430px;
}
.card p { color: var(--ink-2); font-size: 16px; margin: 0; max-width: 34ch; }
.card > img { width: 76%; margin: auto auto -6px; padding-top: 24px; transition: transform 0.5s cubic-bezier(.2,.7,.2,1); }
.card:hover > img { transform: translateY(-8px) rotate(-1.5deg); }
.card--cream { background: var(--cream); }
.card--mint { background: var(--mint); }
.card--sand { background: var(--sand); }
.card--pay {
  margin-top: 20px; min-height: 0;
  flex-direction: row; align-items: center; gap: 40px;
  padding: 48px 48px 48px 56px;
  background: radial-gradient(70% 120% at 85% 50%, rgba(29, 138, 86, 0.16), transparent 65%), var(--mint);
}
.card--pay__text { flex: 1.2; }
.card--pay__text > p { max-width: 46ch; }
.card--pay > img { width: 34%; margin: 0; padding: 0; }
.pay-steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pay-steps li { background: var(--white); border-radius: 18px; padding: 16px 18px; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.pay-steps b { display: block; color: var(--green); font-size: 16px; margin-bottom: 4px; }
.card--green { background: linear-gradient(160deg, #1d8a56, #0f4f33); color: var(--white); }

/* ---------- цены ---------- */

.prices { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 20px; }
.price { flex-direction: row; min-height: 0; padding: 36px 0 0 36px; }
.price > div { flex: 1; padding-bottom: 36px; }
.price h3 { font: 600 13px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 14px; opacity: 0.8; }
.card .price__sum { color: var(--white); max-width: none; font: 700 96px/1 var(--sans); letter-spacing: -0.04em; margin: 0 0 14px; }
.card .price__sum small { font: 500 20px/1 var(--sans); letter-spacing: 0; opacity: 0.8; }
.price p:last-child { color: rgba(255, 255, 255, 0.82); }
.price > img { width: 38%; align-self: flex-end; margin: 0; padding: 0; }
.packs { background: var(--white); border-radius: var(--r); padding: 12px 34px 18px; box-shadow: 0 1px 0 var(--rule); }
.packs__head, .packs__row { display: grid; grid-template-columns: 1fr 1fr; padding: 18px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.packs__head { font: 600 12px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.packs__row:last-child { border-bottom: 0; }
.packs__row span:first-child { font-weight: 700; font-size: 18px; }
.packs__row span:last-child, .packs__head span:last-child { text-align: right; }
.packs__row span:last-child { color: var(--ink-2); }
.packs__row b { font: 700 26px/1 var(--sans); color: var(--ink); letter-spacing: -0.02em; }

/* ---------- FAQ ---------- */

.faq { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 20px; align-items: start; }
.faq__intro { min-height: 460px; }
.faq__intro > img { width: 70%; }
.faq__list { background: var(--white); border-radius: var(--r); padding: 6px 34px; box-shadow: 0 1px 0 var(--rule); }
.faq__list details { border-bottom: 1px solid var(--rule); }
.faq__list details:last-child { border-bottom: 0; }
.faq__list summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-weight: 600; font-size: 18px; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "+"; position: absolute; right: 0; top: 16px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--green);
  display: grid; place-items: center; font: 500 22px/1 var(--sans); transition: transform 0.2s ease;
}
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list p { margin: 0 0 22px; color: var(--ink-2); max-width: 62ch; }

/* ---------- финал ---------- */

.final {
  margin: 110px 0 40px;
  display: grid; grid-template-columns: 1.2fr 0.8fr; align-items: center;
  border-radius: var(--r-lg);
  padding: 64px 0 0 64px;
  background: radial-gradient(80% 120% at 85% 60%, rgba(24, 163, 95, 0.35), transparent 60%), var(--ink);
  color: var(--white); overflow: hidden;
}
.final__copy { padding-bottom: 64px; }
.final .display { color: var(--white); }
.display--light em { color: #7ee0a8; }
.final > img { width: 88%; align-self: end; justify-self: center; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35)); }

.footer { padding: 26px 0 40px; color: var(--ink-3); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer__links a { color: inherit; text-decoration: none; }
.footer__links a:hover { color: var(--ink); }
.footer .brand__mark { width: 28px; height: 28px; font-size: 16px; border-radius: 8px; }
.footer .brand__name { font-size: 17px; color: var(--ink); }

/* ---------- движение ---------- */

.float { animation: float 6s ease-in-out infinite; }
.float--slow { animation-duration: 8s; }
@keyframes float { 50% { transform: translateY(-14px); } }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .float { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

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

@media (max-width: 1000px) {
  .nav { display: none; }
  .topbar__inner { justify-content: space-between; }
  .hero { grid-template-columns: 1fr; padding: 44px 28px 0; }
  .hero__art { height: 460px; max-width: 520px; width: 100%; margin: 20px auto 0; }
  .hero__ledger { width: 420px; margin-left: -210px; top: 10px; }
  .hero__halo { width: 380px; height: 380px; margin-left: -190px; }
  .cards { grid-auto-columns: 78%; }
  .carousel__nav { display: none; }
  .prices, .faq, .final { grid-template-columns: 1fr; }
  .card { min-height: 380px; }
  .card > img { width: 62%; }
  .final { padding: 48px 28px 0; }
  .final > img { width: 70%; }
  .section { padding-top: 84px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 28px); }
  .display { font-size: 40px; }
  .hero { padding: 34px 22px 0; }
  .hero__art { height: 380px; }
  .hero__ledger { width: 320px; margin-left: -160px; }
  .hero__halo { width: 290px; height: 290px; margin-left: -145px; }
  .cards { grid-auto-columns: 86%; gap: 14px; }
  .store { height: 54px; }
  .card { padding: 26px 24px 0; }
    .card--pay { flex-direction: column; align-items: stretch; padding: 30px 24px; gap: 20px; }
  .card--pay > img { width: 60%; margin: 0 auto; }
  .pay-steps { grid-template-columns: 1fr; }
    .price { flex-direction: column; padding: 30px 24px 0; }
  .price > img { width: 46%; align-self: flex-end; }
  .packs { padding: 6px 18px 10px; }
  .packs__row span:first-child { font-size: 15px; }
  .packs__row b { font-size: 20px; }
  .faq__list { padding: 4px 20px; }
  .faq__list summary { font-size: 16px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
