/* Only Wallet: общая основа сайта. Токены, шрифт, кнопки, тона секций, анимации. */

@font-face {
  font-family: "SF Pro Web";
  src: url("/static/fonts/sf-pro-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "SF Pro Web";
  src: url("/static/fonts/sf-pro-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --blue: #347bf6;
  --btn-c: #0099ff;
  --btn-d: rgb(0 71 202);
  --blue-hi: #5b98ff;
  --blue-lo: #2466e6;

  /* светлый тон */
  --l-bg: #ffffff;
  --l-bg-2: #f2f2f7;
  --l-fg: #0b0b0f;
  --l-fg-2: #86868b;
  --l-line: rgba(0, 0, 0, 0.08);
  --l-card: #f2f2f7;

  /* темный тон */
  --d-bg: #000000;
  --d-bg-2: #0e0e11;
  --d-fg: #f5f5f7;
  --d-fg-2: #999999;
  --d-line: rgba(255, 255, 255, 0.1);
  --d-card: #141417;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Web", system-ui, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
  --maxw: 1200px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* Тона секций как у Tangem: у каждой секции свой фон, черный или белый, граница четкая.
   site.js по секции под шапкой ставит html[data-tone], от него зависят только шапка и theme-color. */
[data-tone="dark"] { --s-bg: var(--d-bg); --s-fg: var(--d-fg); --s-fg-2: var(--d-fg-2); --s-line: var(--d-line); --s-card: var(--d-card); }
[data-tone="light"] { --s-bg: var(--l-bg); --s-fg: var(--l-fg); --s-fg-2: var(--l-fg-2); --s-line: var(--l-line); --s-card: var(--l-card); }
section[data-tone], footer[data-tone] { background: var(--s-bg); color: var(--s-fg); }
html[data-tone="dark"] { --bg: var(--d-bg); --fg: var(--d-fg); --fg-2: var(--d-fg-2); --line: var(--d-line); }
html[data-tone="light"], html:not([data-tone]) { --bg: var(--l-bg); --fg: var(--l-fg); --fg-2: var(--l-fg-2); --line: var(--l-line); }
body { background: #000; color: var(--d-fg); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* Типографика в духе Tangem: крупно, плотно, полужирно */
.display {
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.09;
  font-size: clamp(42px, 11.3vw, 72px);
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-size: clamp(36px, 9.2vw, 56px);
  margin: 0;
  text-wrap: balance;
}
.lead {
  font-size: clamp(18px, 5.1vw, 20px);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--s-fg-2, var(--fg-2));
  margin: 0;
  text-wrap: pretty;
}
.lead b, .lead strong { color: var(--s-fg, var(--fg)); font-weight: 600; }
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 14px;
}

/* Главная синяя кнопка: рецепт Tangem один в один.
   Светлая кромка по краям (радиальный градиент), белое свечение сверху и глубокий синий снизу. */
@property --btn-glow { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border: 0;
  border-radius: 28px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: --btn-glow 0.3s, transform 0.35s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  --btn-glow: 50%;
  color: #fff;
  background:
    radial-gradient(237.5% 50.19% at 50% 50%, rgb(255 255 255 / 0) 0, rgb(255 255 255 / var(--btn-glow)) 100%),
    var(--btn-c);
  box-shadow: inset 0 5px 20px #fff, inset 0 -5px 10px var(--btn-d);
}
.btn-primary:hover, .btn-primary:focus-visible { --btn-glow: 100%; }
.btn-sm { padding: 8px 16px; font-size: 14px; letter-spacing: -0.015em; }
.btn-sm.btn-primary { box-shadow: inset 0 3px 12px #fff, inset 0 -3px 6px var(--btn-d); }
.btn-dark { color: #fff; background: #000; border-radius: 99px; }
.btn-light { color: #000; background: #fff; border-radius: 99px; }
.btn-ghost {
  color: var(--s-fg, var(--fg));
  background: color-mix(in srgb, currentColor 9%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 12%, transparent);
}
.btn-tg-icon { width: 22px; height: 22px; flex: none; }

/* Squircle. site.js рисует clip-path по форме суперэллипса (как в iOS).
   До запуска скрипта и без него работает обычный border-radius. */
[data-sq] { border-radius: var(--sq-r, 28px); }
.sq-stroke { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }

/* Плитка строго 1:1 */
.tile-1x1 { aspect-ratio: 1 / 1; }

/* Место под будущий 3D-рендер или фото */
.render-slot {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--s-fg-2, var(--fg-2));
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--blue) 14%, transparent), transparent 60%),
    color-mix(in srgb, currentColor 5%, transparent);
  outline: 1.5px dashed color-mix(in srgb, currentColor 28%, transparent);
  outline-offset: -10px;
  font-size: 14px;
  line-height: 1.4;
}
.render-slot b { display: block; color: var(--s-fg, var(--fg)); font-size: 15px; margin-bottom: 4px; }

/* Появление при прокрутке: только transform и opacity, плавная кривая */
[data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); will-change: transform, opacity; }
[data-reveal].is-in { opacity: 1; transform: none; }
html.no-js [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
