/* =========================================================
   Brymble — тёмный лендинг с полноэкранным видеофоном.
   Композиция, размеры, тени и кривые перенесены из присланной
   спецификации без изменений; заменены только тексты и акцент.
   ========================================================= */

:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #8e8e8e;
  --nav-text: #2e2e2e;
  --pill-dark: #28282a;
  --sign-in-text: #c8c8c8;
  --nav-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  --trust-bg: #28282a;
  --trust-border: rgba(255, 255, 255, 0.4);
  --trust-text: #c4c2c3;

  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  /* Handjet — точечный с кириллицей, им набран заголовок.
     BubbledotICG-FinePos — только латиница, поэтому отдельной переменной
     и только на символах. */
  --font-display: "Handjet", "BubbledotICG-FinePos", monospace;
  --font-dots: "BubbledotICG-FinePos", "Handjet", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Для блоков ниже первого экрана */
  --accent: #7fbba8;
  --accent-soft: rgba(127, 187, 168, 0.13);
  --surface: #101012;
  --line: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }

h1, h2, h3 { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

.dot-glyph { font-family: var(--font-dots); font-weight: 400; line-height: 1; }

/* ---------- Видеофон ---------- */
.bg {
  position: absolute;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  background: #000;
  overflow: hidden;
  z-index: 0;
}
/* Затемнение поверх видео: без него белый заголовок ложится на светлую
   верхнюю часть кадра и проваливается по контрасту. */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.34) 0%,
    rgba(0, 0, 0, 0.2) 16%,
    rgba(0, 0, 0, 0.46) 42%,
    rgba(0, 0, 0, 0.5) 68%,
    rgba(0, 0, 0, 0.34) 100%
  );
}

.bg-video,
.bg-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
/* Переключаемся прозрачностью, а не display: скрытому display:none видео
   браузер может не дать проиграться, и автоплей не стартует. */
.bg-video { opacity: 0; transition: opacity 0.6s ease; }
.has-video .bg-video { opacity: 1; }
.has-video .bg-poster { opacity: 0; }

/* ---------- Первый экран ---------- */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: clamp(16px, 2.4vh, 28px) clamp(14px, 3vw, 32px);
  overflow: hidden;
}

/* ---------- 1. Шапка ---------- */
.header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.8vw, 28px);
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  animation: slideDown 0.7s var(--ease) both;
}

.logo {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--nav-shadow);
  transition: transform 0.25s var(--ease);
}
.logo:hover { transform: scale(1.04); }
.logo img { width: 72%; height: 72%; object-fit: contain; display: block; }

.nav {
  flex: 1;
  max-width: 430px;
  height: clamp(44px, 5.2vw, 48px);
  display: flex;
  align-items: center;
  /* Не space-between: подписи разной длины («Суть» против «Приватность»),
     и края пилюли получались прижатыми, а просветы — рваными.
     Равный gap плюс симметричные поля читаются ровно. */
  justify-content: center;
  gap: clamp(10px, 1.8vw, 24px);
  padding: 4px 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--nav-shadow);
}
.nav-link {
  position: relative;
  padding: 6px 8px 9px;
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--nav-text);
  opacity: 0.5;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
.nav-link:hover { opacity: 0.75; }
.nav-link.is-active { opacity: 1; }
/* Три точки 3×3 под активным пунктом — центральная плюс две тенью. */
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: #000;
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

.sign-in {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  height: clamp(44px, 5.2vw, 48px);
  padding: 0 clamp(16px, 2vw, 22px);
  border-radius: 999px;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--nav-shadow);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}
.sign-in:hover { background: #323234; color: #fff; transform: translateY(-1px); }

.burger { display: none; }

/* ---------- 2. Герой ---------- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Строка «Знакомо?» — геометрия trust-строки из спецификации */
.trust {
  --trust-size: clamp(36px, 4.5vw, 42px);
  display: inline-flex;
  align-items: center;
  margin-bottom: clamp(16px, 2.5vh, 26px);
}
.trust-ava {
  display: grid;
  place-items: center;
  width: var(--trust-size);
  height: var(--trust-size);
  padding: 5px;
  border-radius: 50%;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  transition: transform 0.35s var(--ease);
}
.trust-ava .dot-glyph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: calc(var(--trust-size) * 0.44);
  font-style: normal;
}
.trust .a1 { z-index: 1; }
.trust .a2 { z-index: 2; margin-left: calc(var(--trust-size) * -0.42); }
.trust .a3 { z-index: 4; margin-left: calc(var(--trust-size) * -0.42); }
.trust:hover .a1 { transform: translateY(-2px); }
.trust:hover .a2 { transform: translateY(-4px); }
.trust:hover .a3 { transform: translateY(-2px); }

.trust-pill {
  display: grid;
  place-items: center;
  height: var(--trust-size);
  margin-left: calc(var(--trust-size) * -0.42);
  padding: 0 18px 0 calc(var(--trust-size) * 0.58);
  border-radius: 999px;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  color: var(--trust-text);
  font-size: clamp(12px, 1.4vw, 13.5px);
  font-weight: 500;
  white-space: nowrap;
}

/* Заголовок. Максимум спецификации (80px) сохранён: Handjet заметно уже
   исходного шрифта, и наши 25 знаков в строке укладываются в те же 900px.
   Нижнюю границу и коэффициент подняли — иначе на телефоне выходило 20px. */
.headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 9.2vw, 80px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: #fff;
  overflow: hidden;
}
.hl-line {
  display: block;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(14px);
  animation: headlineFade 0.85s var(--ease) forwards;
}
.hl-line.l1 { animation-delay: 0.12s; }
.hl-line.l2 { animation-delay: 0.3s; }

.subhead {
  max-width: min(500px, 92%);
  margin: clamp(14px, 2vh, 20px) 0 0;
  font-size: clamp(calc(13.5px + 2pt), calc(1.55vw + 2pt), calc(16.5px + 2pt));
  line-height: 1.55;
  font-weight: 400;
  color: #d0d0d0;
  opacity: 0.8;
}

.cta {
  display: inline-block;
  margin-top: clamp(18px, 2.6vh, 28px);
  padding: clamp(11px, 1.6vh, 13px) clamp(22px, 3vw, 28px);
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  font-weight: 600;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 22px rgba(255, 255, 255, 0.32),
    0 0 44px rgba(255, 255, 255, 0.12);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.25),
    0 0 30px rgba(255, 255, 255, 0.45),
    0 0 60px rgba(255, 255, 255, 0.2);
}

/* ---------- 3. Нижняя лента ---------- */
.stats {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 40px);
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}
.stat { margin: 0; text-align: center; }
.stat-glyph {
  display: block;
  font-size: clamp(22px, 3vw, 33px);
  color: #fff;
  margin-bottom: 6px;
}
.stat blockquote {
  margin: 0;
  color: var(--muted);
  font-size: clamp(12px, 1.25vw, 14px);
  line-height: 1.5;
}

/* ---------- Мобильное меню ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  animation: overlayIn 0.28s ease both;
}
.menu-sheet {
  position: fixed;
  z-index: 41;
  top: 84px;
  left: 14px;
  right: 14px;
  padding: 22px 18px 20px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  animation: menuIn 0.38s var(--ease) both;
}
.menu-link {
  position: relative;
  display: block;
  padding: 13px 6px 15px;
  text-align: center;
  color: var(--nav-text);
  font-size: 17px;
  font-weight: 500;
  opacity: 0.6;
  animation: linkIn 0.4s var(--ease) both;
}
.menu-link.is-active { opacity: 1; }
.menu-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: #000;
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}
.menu-link:nth-child(1) { animation-delay: 0.06s; }
.menu-link:nth-child(2) { animation-delay: 0.12s; }
.menu-link:nth-child(3) { animation-delay: 0.18s; }
.menu-link:nth-child(4) { animation-delay: 0.24s; }
.menu-cta {
  display: block;
  margin-top: 10px;
  padding: 15px;
  border-radius: 999px;
  background: var(--pill-dark);
  color: #fff;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  animation: linkIn 0.4s var(--ease) both 0.3s;
}

/* ---------- Блоки ниже первого экрана ---------- */
.below { position: relative; z-index: 2; background: var(--bg); }
.block { padding: clamp(56px, 9vh, 96px) clamp(20px, 4vw, 48px) 0; }
.inner {
  max-width: 1040px;
  margin: 0 auto;
  padding-top: clamp(40px, 6vh, 64px);
  border-top: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.below h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.sub { margin: 0 0 36px; max-width: 56ch; color: var(--muted); line-height: 1.6; }
.footnote { margin: 18px 0 0; font-size: 12.5px; color: var(--muted); opacity: 0.75; }

.demo { display: grid; gap: 18px; grid-template-columns: 1fr; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.card-title {
  margin: 0 0 16px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.speech { margin: 0; font-size: 16px; line-height: 1.7; color: #e6e6e6; }
.item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.item:first-of-type { border-top: none; padding-top: 0; }
.tag {
  flex: none;
  height: fit-content;
  margin-top: 2px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
}
.tag-note { background: rgba(237, 227, 214, 0.1); color: var(--muted); }
.item b { font-weight: 600; }
.meta { display: block; margin-top: 3px; font-size: 14px; color: var(--muted); }
.steps { margin: 8px 0 0; padding-left: 18px; list-style: disc; font-size: 14.5px; color: var(--muted); }

.grid3 { display: grid; gap: 18px; grid-template-columns: 1fr; }
.why {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.why-glyph {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
}
.why h3 { margin-bottom: 8px; font-size: 18px; font-weight: 600; }
.why p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; }

.privacy { display: grid; gap: 14px; grid-template-columns: 1fr; }
.privacy li {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}
.privacy b { color: #fff; font-weight: 600; }

#wl {
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.choices { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice span {
  display: block;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.choice input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
#email {
  flex: 1 1 240px;
  min-width: 0;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #000;
  color: #fff;
}
#email:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.submit {
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font: 600 16px/1.2 var(--font-sans);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 18px rgba(255, 255, 255, 0.2);
}
.submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 26px rgba(255, 255, 255, 0.38);
}
.submit:disabled { opacity: 0.55; cursor: default; }
.status { margin: 14px 0 0; font-size: 15px; min-height: 22px; color: var(--muted); }
.status.ok { color: var(--accent); font-weight: 600; }
.status.err { color: #e88a80; }

.foot { padding: clamp(56px, 9vh, 96px) clamp(20px, 4vw, 48px) 64px; }
.foot .inner { color: var(--muted); font-size: 14px; }
.foot p { margin: 6px 0; }
.foot b { color: #fff; }
.foot a { color: var(--accent); }

/* ---------- Появление ---------- */
.anim {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
  animation: reveal 0.85s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
.pulse {
  opacity: 0;
  animation: revealPulse 0.9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
.below .anim { animation-play-state: paused; }
.below .anim.in { animation-play-state: running; }

@keyframes reveal {
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes revealPulse {
  0% { opacity: 0; transform: translateY(18px) scale(0.96); }
  70% { opacity: 1; transform: translateY(0) scale(1.03); }
  100% { opacity: 1; transform: none; }
}
@keyframes headlineFade {
  to { opacity: 1; transform: none; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: none; }
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes linkIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Брейкпоинты ---------- */
@media (min-width: 721px) {
  .demo { grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .privacy { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav, .sign-in { display: none; }
  .header { justify-content: space-between; max-width: none; }
  .logo { width: 48px; height: 48px; }
  .burger {
    display: grid;
    place-items: center;
    gap: 4px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--pill-dark);
    cursor: pointer;
    box-shadow: var(--nav-shadow);
    transition: background 0.25s ease;
  }
  .burger span {
    width: 18px;
    height: 1.5px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.3s var(--ease), opacity 0.2s ease, background 0.25s ease;
  }
  .burger[aria-expanded="true"] { background: #fff; }
  .burger[aria-expanded="true"] span { background: #111; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .headline { letter-spacing: -0.08em; line-height: 1.05; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .stat { display: flex; align-items: center; gap: 12px; text-align: left; }
  .stat-glyph { margin-bottom: 0; font-size: 22px; }
}

@media (max-height: 700px) {
  .trust { margin-bottom: 10px; }
  .subhead { margin-top: 10px; }
  .cta { margin-top: 14px; }
}

@media (max-width: 420px) {
  .trust { --trust-size: 34px; }
  .trust-pill { font-size: 12px; padding-right: 14px; }
  .headline { letter-spacing: -0.09em; line-height: 1.04; }
}

/* ---------- Отключение движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .anim, .pulse, .hl-line {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
