@font-face { font-family: "Familjen Grotesk"; src: url("fonts/fg-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("fonts/fg-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("fonts/fg-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #1e1a2e;
  --muted: #6b6680;
  --haze: #f3f2f8;
  --grid: #d9d7e5;
  --curve: #1f8a8a;
  --curve-fill: rgba(31, 138, 138, 0.09);
  --marker: #e0a100;
  --white: #ffffff;
  --measure: 38rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--haze);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--curve); }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }

/* шапка */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.375rem; letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 1.75rem; height: 1.75rem; }
.top nav { display: flex; align-items: center; gap: 1.5rem; font-size: 0.9375rem; }
.top nav a:not(.button) { text-decoration: none; color: var(--muted); }
.top nav a:not(.button):hover { color: var(--ink); }

.button {
  display: inline-block; padding: 0.6rem 1.1rem; border-radius: 999px;
  background: var(--ink); color: var(--white); text-decoration: none; font-weight: 600;
}
.button:hover { background: var(--curve); color: var(--white); }

/* первый экран */
.hero { padding-top: clamp(2.5rem, 7vw, 5.5rem); }
.hero h1 {
  margin: 0; max-width: 16ch; text-wrap: balance;
  font-weight: 700; font-size: clamp(2.6rem, 7.2vw, 5.4rem); line-height: 0.98; letter-spacing: -0.035em;
}
.hero p { margin: 1.5rem 0 0; max-width: var(--measure); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--muted); }

/* кривая удержания: главный образ страницы */
.chart { position: relative; margin: clamp(2.5rem, 6vw, 4rem) 0 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 400 15px "Familjen Grotesk", system-ui, sans-serif; }
.chart .area { fill: var(--curve-fill); }
.chart .line { fill: none; stroke: var(--curve); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.chart .skip { fill: var(--marker); opacity: 0.14; }
.chart .dot { fill: var(--marker); stroke: var(--haze); stroke-width: 4; }
.chart figcaption { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted); }

.notes { list-style: none; margin: 0; padding: 0; }
.notes li { font-size: 0.9375rem; line-height: 1.35; }
.notes b { font-weight: 600; }
.notes time { color: var(--muted); }

@media (min-width: 52rem) {
  .notes li { position: absolute; left: var(--x); top: var(--y); max-width: 13rem; transform: translate(-50%, 0); }
  .notes li.end { left: auto; right: 0; transform: none; text-align: right; }
}
@media (max-width: 51.99rem) {
  .chart .axis { font-size: 38px; }
  .chart .axis.minor { display: none; }
  .chart .line { stroke-width: 8; }
  .chart .dot { r: 15px; stroke-width: 6; }
  .notes { display: grid; gap: 0.6rem; margin-top: 1.25rem; }
  .notes li { padding-left: 1.1rem; position: relative; }
  .notes li::before { content: ""; position: absolute; left: 0; top: 0.4em; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--marker); }
}

/* одна анимация на странице: кривая прорисовывается при загрузке */
@media (prefers-reduced-motion: no-preference) {
  .chart .line { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 1.8s cubic-bezier(.4, 0, .2, 1) 0.2s forwards; }
  .chart .area, .chart .dot, .chart .skip, .notes { opacity: 0; animation: show 0.6s ease 1.6s forwards; }
  .chart .skip { animation-name: show-skip; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes show { to { opacity: 1; } }
  @keyframes show-skip { to { opacity: 0.14; } }
}

/* разделы */
section { padding-block: clamp(3.5rem, 8vw, 6rem); }
section h2 { margin: 0 0 2rem; font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; max-width: 20ch; }

.questions { border-top: 1px solid var(--grid); margin-top: clamp(3rem, 7vw, 5rem); }
.questions .cols { display: grid; gap: 2rem 3rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.questions h3 { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.5rem; font-size: 1.25rem; font-weight: 600; }
.questions h3 svg { flex: none; width: 2.5rem; height: 1.25rem; }
.questions p { margin: 0; color: var(--muted); max-width: 30ch; }

.how { background: var(--white); }
.how ol { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1.75rem; max-width: var(--measure); }
.how li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; }
.how li::before {
  content: counter(step); font-weight: 700; font-size: 1.5rem; line-height: 1.1; color: var(--curve);
}
.how h3 { margin: 0 0 0.25rem; font-size: 1.125rem; font-weight: 600; }
.how p { margin: 0; color: var(--muted); }

.access { text-align: left; }
.access p { max-width: var(--measure); color: var(--muted); margin: 0 0 1.75rem; font-size: 1.125rem; }

footer { border-top: 1px solid var(--grid); padding-block: 1.5rem 2.5rem; font-size: 0.875rem; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* простые страницы: privacy, 404 */
.page { padding-block: clamp(2.5rem, 7vw, 5rem); }
.page h1 { margin: 0 0 1.5rem; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -0.03em; }
.page h2 { margin: 2.25rem 0 0.5rem; font-size: 1.25rem; font-weight: 600; letter-spacing: 0; max-width: none; }
.page p, .page li { max-width: var(--measure); }
.page .lede { font-size: 1.1875rem; color: var(--muted); }

@media (max-width: 30rem) {
  .top nav a.hide-sm { display: none; }
}
