/* ============================================================
   ohwat — открытая разработка сервиса для блогеров
   Светлая воздушная тема (единственная) · shader-градиент ·
   генеративные мини-арты · один электрик-акцент
   ============================================================ */

/* ---------- Шрифты (variable, subsets) ---------- */
@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/geologica-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/geologica-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2192, U+2212;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/onest-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2192, U+2212;
}
@font-face {
  font-family: 'JBMono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/static/fonts/jbmono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JBMono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/static/fonts/jbmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2192, U+2212;
}

/* ---------- Токены (светлая тема — единственная) ---------- */
:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f2f2ed;
  --ink: #17181d;
  --ink-60: rgba(23, 24, 29, 0.6);
  --ink-40: rgba(23, 24, 29, 0.38);
  --line: rgba(23, 24, 29, 0.09);
  --accent: #3d53f5;
  --accent-ink: #2438d6;
  --accent-soft: rgba(61, 83, 245, 0.07);
  --accent-line: rgba(61, 83, 245, 0.24);
  --ok: #0da750;
  --peach: #ffd9bd;
  --lilac: #dfe3ff;

  --font-display: 'Geologica', -apple-system, sans-serif;
  --font-body: 'Onest', -apple-system, sans-serif;
  --font-mono: 'JBMono', 'SF Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(20px, 5vw, 72px);
  --radius: 20px;
  --shadow: 0 1px 2px rgba(23, 24, 29, 0.04), 0 14px 44px -14px rgba(23, 24, 29, 0.12);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.55vw, 18px);
  line-height: 1.65;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
b, strong { font-weight: 700; }
.accent { color: var(--accent); }
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: clamp(1.9rem, 5.4vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.h2--big { font-size: clamp(2.1rem, 6.4vw, 4.4rem); }
.js [data-animate] { opacity: 0; }

/* единый контейнер — один левый край на всей странице */
.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Шапка ---------- */
.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: calc(12px + env(safe-area-inset-top)) 0 12px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.bar__in { display: flex; align-items: center; gap: 16px; }
.bar__brand {
  font-family: var(--font-display);
  font-weight: 720;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.bar__dot { color: var(--accent); }
.bar__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-60);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2.2s var(--ease-out) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(13, 167, 80, 0.35); }
  70% { box-shadow: 0 0 0 9px rgba(13, 167, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(13, 167, 80, 0); }
}
.bar__cta {
  margin-left: auto;
  border: 1px solid var(--accent-line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.bar__cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 560px) { .bar__status { display: none; } }

/* ---------- HERO + shader ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(56px + env(safe-area-inset-top) + clamp(24px, 5vh, 56px)) 0 clamp(28px, 5vh, 60px);
  overflow: hidden;
}
.hero__top { position: relative; z-index: 1; }
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 56px);
  align-items: start;
  margin-top: clamp(20px, 3.5vh, 36px);
}
@media (min-width: 1060px) {
  .hero__grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
}
.hero__shader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
/* мягкое растворение шейдера к низу — переход в фон страницы */
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 0;
}
.hero__content { position: relative; z-index: 1; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.35rem, 8.6vw, 4.9rem);
  line-height: 1.03;
  letter-spacing: -0.033em;
}
.hero__lead {
  max-width: 32em;
  margin-top: clamp(20px, 3.5vh, 36px);
  font-size: clamp(16.5px, 2vw, 20px);
  color: var(--ink-60);
  text-wrap: pretty;
}
.hero__actions {
  margin-top: clamp(24px, 4vh, 42px);
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.hero__free {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-60);
  max-width: 30em;
}
.hero__free b { color: var(--ink); }

/* карточка «первая волна» — композиция правой колонки на десктопе */
.hero__card {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 2.2vw, 26px);
}
@media (min-width: 1060px) {
  .hero__card { transform: rotate(1.6deg); }
}
.hero__card-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero__card-list { list-style: none; display: grid; gap: 12px; }
.hero__card-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 15px;
  line-height: 1.45;
}
.hero__card-list i {
  font-style: normal;
  font-weight: 800;
  color: var(--ok);
  flex: none;
}
.hero__card-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--ink-40);
}

/* лента фактов под hero */
.hero__ticker {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px 18px;
  flex-wrap: wrap;
  margin-top: clamp(32px, 6vh, 70px);
  padding-top: 20px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  font-size: 13.5px;
  color: var(--ink-60);
}
.hero__ticker::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: var(--line);
}
.tick b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tick--sep { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-40); }
@media (max-width: 640px) {
  .tick--sep { display: none; }
  .hero__ticker { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- CTA ---------- */
.cta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 16px 26px;
  border-radius: 100px;
  cursor: pointer;
  font-family: var(--font-body);
  box-shadow: 0 12px 32px -12px rgba(23, 24, 29, 0.45);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.25s;
}
.cta:hover { transform: translateY(-2px); background: var(--accent); box-shadow: 0 16px 40px -10px rgba(61, 83, 245, 0.55); }
.cta:active { transform: translateY(0) scale(0.98); }
.cta__label { font-size: clamp(1rem, 2.4vw, 1.15rem); font-weight: 700; letter-spacing: -0.01em; }
.cta__sub { font-size: 12.5px; opacity: 0.7; }
.cta--big { padding: 20px 34px; }
.cta--big .cta__label { font-size: clamp(1.1rem, 3vw, 1.4rem); }

/* ---------- Секции ---------- */
.facts, .hypos, .cocreate {
  padding: clamp(70px, 12vh, 140px) 0;
}

/* факты */
.facts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.8vw, 20px);
  margin-top: clamp(30px, 5vh, 54px);
}
@media (max-width: 980px) { .facts__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .facts__grid { grid-template-columns: 1fr; } }
.fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fact__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fact__num b { color: var(--accent); font-weight: 700; }
.fact__label { font-size: 14px; color: var(--ink-60); line-height: 1.5; }
.facts__src {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-40);
}

/* гипотезы */
.hypos__sub { margin-top: 16px; max-width: 36em; color: var(--ink-60); }
.hypos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.8vw, 20px);
  margin-top: clamp(30px, 5vh, 54px);
}
@media (max-width: 980px) { .hypos__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hypos__grid { grid-template-columns: 1fr; } }
.hypo {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 2.2vw, 24px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.hypo:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(23,24,29,0.05), 0 26px 64px -20px rgba(23,24,29,0.18); }
.hypo__art {
  width: 100%;
  height: 110px;
  border-radius: 12px;
  background: var(--surface-2);
  display: block;
}
.hypo__tag {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 100px;
  padding: 4px 10px;
}
.hypo__title {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-top: 10px;
}
.hypo__text { margin-top: 8px; font-size: 14.5px; color: var(--ink-60); }
.hypo--open {
  border-style: dashed;
  border-color: var(--accent-line);
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hypo--open .hypo__tag { background: transparent; padding-left: 0; }

/* ---------- Со-творчество ---------- */
.cocreate__body { margin-top: clamp(20px, 3.5vh, 32px); display: grid; gap: 14px; max-width: 38em; }
.cocreate__body p { color: var(--ink-60); }
.cocreate .cta--big { margin-top: clamp(26px, 4.5vh, 44px); }

/* ---------- Футер ---------- */
.footer {
  padding: clamp(40px, 7vh, 70px) 0 calc(34px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.footer .wrap { display: grid; gap: 10px; }
.footer__brand {
  font-family: var(--font-display);
  font-weight: 720;
  font-size: clamp(2.2rem, 7vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1;
}
.footer__brand-dot { color: var(--accent); }
.footer__note { font-size: 14px; color: var(--ink-60); }
.footer__legal { font-size: 12.5px; color: var(--ink-40); max-width: 62em; }

/* ============================================================
   КВИЗ
   ============================================================ */
.quiz {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.quiz[hidden] { display: none; }
.quiz__bar {
  padding: calc(12px + env(safe-area-inset-top)) 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.quiz__bar-in {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 16px;
}
.quiz__close {
  grid-row: 1 / 3;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-60);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.25s, border-color 0.25s;
}
.quiz__close:hover { color: var(--accent); border-color: var(--accent); }
.quiz__progress {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.quiz__track { height: 3px; background: var(--surface-2); grid-column: 2; border-radius: 2px; overflow: hidden; }
.quiz__fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s var(--ease-out);
}
.quiz__stage {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding: 3vh var(--pad) calc(24px + env(safe-area-inset-bottom));
}
.qcard { margin: auto; width: 100%; max-width: 560px; }
.qcard__sec {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-40);
  display: block;
  margin-bottom: 6px;
}
.qcard input.opt-custom {
  margin-top: 10px;
}
.qcard__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}
.qcard__title {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: clamp(1.3rem, 4.4vw, 2rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.qcard__hint { color: var(--ink-40); font-size: 0.9em; margin-bottom: 4px; }
.qcard__opts { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.opt {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 15px 18px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: clamp(15px, 1.8vw, 16.5px);
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), background 0.2s;
  display: flex;
  align-items: baseline;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(23,24,29,0.03);
}
.opt:hover { border-color: var(--accent-line); }
.opt:active { transform: scale(0.985); }
.opt.is-on { border-color: var(--accent); background: var(--accent-soft); }
.opt__key { font-family: var(--font-mono); font-size: 0.68em; color: var(--ink-40); text-transform: uppercase; }
.opt.is-on .opt__key { color: var(--accent-ink); }
.qcard textarea, .qcard input[type="text"] {
  width: 100%;
  margin-top: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px; /* не меньше 16 — иначе iOS зумит */
  padding: 14px 16px;
  border-radius: 14px;
  resize: vertical;
  min-height: 52px;
}
.qcard textarea { min-height: 110px; }
.qcard textarea:focus, .qcard input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.qcard__actions { display: flex; gap: 12px; margin-top: 22px; align-items: center; flex-wrap: wrap; }
.qbtn {
  border: none;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15.5px;
  padding: 13px 26px;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, transform 0.25s var(--ease-out);
}
.qbtn:hover { background: var(--accent); }
.qbtn:active { transform: scale(0.97); }
.qbtn[disabled] { opacity: 0.35; pointer-events: none; }
.qbtn--ghost {
  background: transparent;
  color: var(--ink-60);
  border: 1px solid var(--line);
  font-weight: 500;
}
.qbtn--ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent-line); }

/* интермедия */
.inter__title {
  font-family: var(--font-display);
  font-weight: 660;
  font-size: clamp(1.7rem, 6.4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
}
.inter__sub { color: var(--ink-60); margin-top: 14px; max-width: 30em; }

/* тост */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  padding: 10px 20px;
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  box-shadow: var(--shadow);
}

/* результат */
.result__stamp {
  margin-bottom: 18px;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--accent-line);
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 100px;
  padding: 6px 14px;
}
.result__name {
  font-family: var(--font-display);
  font-weight: 720;
  font-size: clamp(1.9rem, 8vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 10px 0 22px;
}
.result__sym {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 8px 0;
  color: var(--ink-60);
}
.result__cure { margin-top: 22px; }
.result__contact { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.result__priv { color: var(--ink-40); font-size: 0.92em; }

.noscript {
  padding: 40px var(--pad);
  color: var(--accent-ink);
  font-weight: 600;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .pulse-dot { animation: none !important; }
  .js [data-animate] { opacity: 1; }
  * { transition-duration: 0.01ms !important; }
}
