/* Публичный сайт ФинФин: лендинг, /privacy, /terms, /join/<CODE>. Без внешних шрифтов и
   скриптов: политика конфиденциальности обещает отсутствие сторонних трекеров. */
:root {
  --ink: #ffffff;
  --ink-soft: rgba(226, 244, 234, 0.72);
  --ink-faint: rgba(226, 244, 234, 0.5);
  --mint: #5eeb9a;
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.08);
}

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

html { min-height: 100%; background: #04281a; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background:
    radial-gradient(900px 520px at 50% 28%, rgba(46, 204, 113, 0.22), transparent 70%),
    linear-gradient(180deg, #03231a 0%, #07422b 48%, #0e8a55 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.8; }

.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 24px 40px;
  font-size: 17px;
}
.bar .right { text-align: right; }
.brand { display: flex; align-items: center; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }

main { flex: 1; }

/* Лендинг */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 24px;
  text-align: center;
}
.orb {
  width: 148px;
  height: 148px;
  margin: 0 auto 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 22%, #f4fff8 0%, #cdeedd 100%);
  box-shadow: 0 0 0 16px rgba(94, 235, 154, 0.1), 0 0 0 36px rgba(94, 235, 154, 0.06), 0 24px 70px rgba(0, 0, 0, 0.35);
}
.orb img { width: 104px; height: 104px; }
h1.title {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.lead {
  max-width: 640px;
  margin: 22px auto 0;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--ink-soft);
}
.cta {
  display: inline-block;
  margin-top: 36px;
  padding: 16px 48px;
  border-radius: 999px;
  background: #fff;
  color: #06331f;
  font-size: 18px;
  font-weight: 600;
}
.stores { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.store {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px 11px 18px;
  min-width: 190px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--glass);
  justify-content: center;
  text-align: center;
}
.store small { display: block; font-size: 12px; color: var(--ink-faint); line-height: 1.2; }
.store b { display: block; font-size: 20px; font-weight: 600; line-height: 1.2; }

/* Три колонки по две «ячейки»: четвёртая карточка встаёт в центр нижнего ряда, а не прижимается влево. */
.features {
  max-width: 980px;
  margin: 56px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.feature { grid-column: span 2; }
.feature:nth-child(4):last-child { grid-column: 3 / span 2; }
@media (max-width: 860px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .feature, .feature:nth-child(4):last-child { grid-column: auto; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
}
.feature {
  padding: 22px 22px 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--glass);
  text-align: left;
}
.feature .ico { font-size: 28px; }
.feature h3 { margin-top: 10px; font-size: 18px; font-weight: 600; }
.feature p { margin-top: 6px; font-size: 15px; color: var(--ink-soft); }

/* «Скачать»: окно с QR-кодом без скриптов. Ссылка /#download делает блок :target, «×» и фон ведут на «#». */
.modal { display: none; position: fixed; inset: 0; z-index: 10; place-items: center; padding: 20px; }
.modal:target { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(1, 16, 11, 0.62); backdrop-filter: blur(6px); }
.modal-card {
  position: relative;
  width: min(100%, 460px);
  padding: 34px 28px 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(7, 40, 28, 0.94);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  text-align: center;
}
.modal-close { position: absolute; top: 10px; right: 18px; font-size: 30px; line-height: 1; color: var(--ink-faint); }
.qr { width: 220px; margin: 0 auto; padding: 14px; border-radius: 18px; background: #fff; }
.qr img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.qr-hint { margin-top: 16px; font-size: 15px; color: var(--ink-faint); }
.modal .stores { margin-top: 22px; gap: 10px; }
.modal .store { min-width: 0; flex: 1 1 0; padding: 10px 6px; }
.modal .store b { font-size: 17px; white-space: nowrap; }

/* Приглашение в семью (/join/<CODE>, Kaneo #65): код крупно и кнопка в приложение. */
.join-code {
  margin: 32px auto 0;
  font-size: clamp(38px, 9vw, 64px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--mint);
  overflow-wrap: anywhere;
}
.join-hint { margin-top: 26px; font-size: 16px; }

/* Юридические страницы */
.doc {
  max-width: 780px;
  margin: 8px auto 0;
  padding: 0 24px 56px;
}
.doc .sheet {
  padding: 36px 40px 40px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(3, 35, 26, 0.55);
  backdrop-filter: blur(8px);
}
.doc h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 18px; }
.doc h2 { margin: 34px 0 10px; font-size: 20px; font-weight: 650; letter-spacing: -0.01em; color: var(--mint); }
.doc p, .doc li { font-size: 16px; color: rgba(236, 250, 242, 0.88); margin-bottom: 12px; }
.doc ul { padding-left: 22px; margin-bottom: 12px; }
.doc strong { color: #fff; font-weight: 650; }
.doc a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0 18px; }
.doc .tablewrap { overflow-x: auto; margin: 6px 0 16px; border-radius: 14px; border: 1px solid var(--line); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.doc th, .doc td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: rgba(236, 250, 242, 0.88); }
.doc th { color: #fff; background: rgba(255, 255, 255, 0.06); font-weight: 600; }
.doc tr:last-child td { border-bottom: 0; }

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 26px 40px 30px;
  font-size: 17px;
}
footer .legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 32px; }
footer .mid { font-size: 14px; color: var(--ink-faint); text-align: center; }

@media (max-width: 720px) {
  .bar { padding: 18px 16px; font-size: 14px; gap: 8px; white-space: nowrap; }
  .brand { font-size: 18px; }
  footer { padding: 22px 20px 26px; font-size: 15px; }
  footer .legal { flex-direction: column; align-items: center; }
  .doc .sheet { padding: 24px 20px 28px; border-radius: 18px; }
  .orb { width: 120px; height: 120px; margin-bottom: 34px; }
  .orb img { width: 84px; height: 84px; }
  .store { min-width: 0; flex: 1 1 170px; }
}
