/* Лендинг /gemini-view — статическая страница для поиска (без приложения).
   Раскладка «Холста» (web/src/index.css): белые листы на фоне, Golos Text. Цвета — в духе Gemini: светлый
   голубовато-серый фон, насыщенный синий акцент, кнопки и поле ввода — «таблетки»; красный — только отказы,
   зелёный — только «пустили». Движение — в общих для лендингов /lp-motion.css и /lp-motion.js; этот файл
   подключён после общих стилей и поправляет их под страницу.
   Сайт отдельный: без логотипа и названия основного сервиса, кнопки ведут на его домен. Шаг отступов — 4 px.
   Тема — по настройке устройства; data-theme на <html> тоже поддержан.
   Content-Security-Policy (deploy/Caddyfile) запрещает встроенные стили — всё оформление только здесь. */

@font-face {
  font-family: 'Golos Text Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url('/fonts/golos-text-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Golos Text Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url('/fonts/golos-text-latin-wght-normal.woff2') format('woff2-variations');
  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;
}

:root {
  --bg: #f0f4f9;
  --surface: #ffffff;
  --surface-2: #e9eef6;
  --hover: #e1e7ef;
  --line: rgba(31, 31, 31, 0.08);
  --line-strong: rgba(31, 31, 31, 0.16);
  --text: #1f1f1f;
  --text-2: #444746;
  --text-3: #5f6368;
  --icon: #747775;
  --accent: #0b57d0;
  --accent-hover: #0842a0;
  --accent-ink: #0b57d0;
  --accent-soft: #d3e3fd;
  --accent-soft-ink: #041e49;
  --on-accent: #ffffff;
  --answer: #1f1f1f;
  --press: rgba(31, 31, 31, 0.06);
  --shadow: 0 1px 2px rgba(31, 31, 31, 0.04), 0 8px 24px rgba(31, 31, 31, 0.06);
  --sheet: 0 1px 2px rgba(31, 31, 31, 0.06), 0 1px 1px rgba(31, 31, 31, 0.03);
  --paper: #fbfaf6;
  --paper-rule: #c9d7e8;
  --paper-ink: #2c3a52;
  --error: #b3261e;
  --ok: #146c2e;
  --photo: #c4c9d1;
  color-scheme: light;

  --ui: 'Golos Text Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
}

:root[data-theme='dark'] {
  --bg: #131314;
  --surface: #1e1f20;
  --surface-2: #282a2c;
  --hover: #333537;
  --line: rgba(227, 227, 227, 0.08);
  --line-strong: rgba(227, 227, 227, 0.16);
  --text: #e3e3e3;
  --text-2: #c4c7c5;
  --text-3: #9aa0a6;
  --icon: #8e918f;
  --accent: #a8c7fa;
  --accent-hover: #c2d7fb;
  --accent-ink: #a8c7fa;
  --accent-soft: #1f3760;
  --accent-soft-ink: #d3e3fd;
  --on-accent: #062e6f;
  --answer: #e3e3e3;
  --press: rgba(227, 227, 227, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --sheet: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --paper: #e9e6dc;
  --paper-rule: #a9bcd3;
  --paper-ink: #24324a;
  --error: #f2b8b5;
  --ok: #6dd58c;
  --photo: #3c4043;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #131314;
    --surface: #1e1f20;
    --surface-2: #282a2c;
    --hover: #333537;
    --line: rgba(227, 227, 227, 0.08);
    --line-strong: rgba(227, 227, 227, 0.16);
    --text: #e3e3e3;
    --text-2: #c4c7c5;
    --text-3: #9aa0a6;
    --icon: #8e918f;
    --accent: #a8c7fa;
    --accent-hover: #c2d7fb;
    --accent-ink: #a8c7fa;
    --accent-soft: #1f3760;
    --accent-soft-ink: #d3e3fd;
    --on-accent: #062e6f;
    --answer: #e3e3e3;
    --press: rgba(227, 227, 227, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --sheet: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    --paper: #e9e6dc;
    --paper-rule: #a9bcd3;
    --paper-ink: #24324a;
    --error: #f2b8b5;
    --ok: #6dd58c;
    --photo: #3c4043;
    color-scheme: dark;
  }
}

/* --- основа --- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 16px;
  line-height: 26px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* бегущие строки шире страницы — без горизонтальной прокрутки */
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

a {
  color: var(--accent-ink);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

.muted {
  color: var(--text-3);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Знак сайта: облачко чата на акценте и название — лендинг отдельный, без логотипа основного сервиса. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: -8px;
  padding: 4px 8px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: background-color 150ms var(--ease);
}

.brand:hover {
  background: var(--press);
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
}

.brand-mark .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.brand-name {
  font-size: 17px;
  line-height: 24px;
  font-weight: 500;
  white-space: nowrap;
}

/* --- кнопки --- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 24px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 150ms var(--ease),
    transform 150ms var(--ease);
}

.button:hover {
  background: var(--accent-hover);
}

.button:active {
  transform: scale(0.98);
}

.button-small {
  height: 40px;
  padding: 0 20px;
  border-radius: 20px;
  font-size: 15px;
}

.button-quiet {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.button-quiet:hover {
  background: var(--press);
}

.link-quiet {
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
  padding: 8px 4px;
  border-radius: 8px;
  transition: color 150ms var(--ease);
}

.link-quiet:hover {
  color: var(--text);
}

/* --- шапка --- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.top-row {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
  transition:
    background-color 150ms var(--ease),
    color 150ms var(--ease);
}

.nav a:hover {
  background: var(--press);
  color: var(--text);
}

/* --- первый экран --- */

.hero {
  padding: 64px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
}

/* Знак сервиса: точка «на связи» — работает прямо сейчас, без VPN. */
.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
}

h1 {
  font-size: 48px;
  line-height: 56px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.h1-line {
  display: block;
}

/* Единственное появление при загрузке: первый экран поднимается по очереди. */
.hero-text > *,
.demo {
  animation: rise 480ms var(--ease) both;
}

.hero-text > :nth-child(2) {
  animation-delay: 50ms;
}

.hero-text > :nth-child(3) {
  animation-delay: 100ms;
}

.hero-text > :nth-child(4) {
  animation-delay: 150ms;
}

.demo {
  animation-delay: 150ms;
}

.lead {
  margin-top: 20px;
  max-width: 520px;
  color: var(--text-2);
  font-size: 18px;
  line-height: 28px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.file-chip {
  height: 40px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
}

.file-chip .icon {
  width: 16px;
  height: 16px;
}

.icon.accent {
  color: var(--accent);
}

.file-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.file-chip .muted {
  flex: none;
}

/* Окно чата из общих стилей — с формами Gemini: крупные скругления, поле-таблетка на светлом,
   у сообщения посетителя острый верхний правый угол. */
.demo-win {
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.demo-tab {
  border-radius: 16px;
}

.msg-user {
  padding: 10px 16px;
  border-radius: 20px 4px 20px 20px;
}

.demo-input {
  margin: 4px 16px 16px;
  padding: 8px 8px 8px 20px;
  border-color: transparent;
  border-radius: 28px;
  background: var(--surface-2);
}

.demo-ghost {
  inset: 0 56px 0 20px;
}

.demo-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.demo-send .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* «Фото» тетрадного листа: линейки через 24 px и красное поле. Бумага светлая в обеих темах — это снимок. */
.textbook {
  min-width: 168px;
  padding: 24px 16px 4px 32px;
  border-radius: 2px;
  color: #2c3a52;
  font: 500 18px/24px var(--ui);
  font-variant-numeric: tabular-nums;
  background-color: #fbfaf6;
  background-image:
    linear-gradient(90deg, transparent 23px, rgba(214, 92, 92, 0.45) 23px, rgba(214, 92, 92, 0.45) 24px, transparent 24px),
    repeating-linear-gradient(180deg, transparent 0, transparent 23px, #c9d7e8 23px, #c9d7e8 24px);
  transform: rotate(-1.5deg);
}

.textbook span:first-child {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.7;
}

.textbook span:last-child {
  font-size: 18px;
  line-height: 24px;
  text-align: left;
}

.ticker {
  padding-bottom: 48px;
}

.ticker-track a {
  border-radius: 28px;
}

.gate {
  border-radius: 20px;
}

.gate-field,
.gate-code b {
  border-radius: 12px;
}

.story {
  margin-top: 24px;
}

.lane {
  border-radius: 20px;
}

.lane-cta {
  height: 48px;
}

.race-again {
  border-radius: 18px;
}

/* --- разделы --- */

.section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

h2 {
  font-size: 32px;
  line-height: 40px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.section-lead {
  margin-top: 12px;
  max-width: 640px;
  color: var(--text-2);
  font-size: 17px;
  line-height: 28px;
}

h3 {
  font-size: 17px;
  line-height: 24px;
  font-weight: 500;
}

/* Возможности: сетка в три колонки, документы — широкой карточкой с примерами файлов. */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense; /* в две колонки карточка после широкой поднимается в пустую клетку */
  gap: 16px;
  margin-top: 40px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--sheet);
}

.card > .icon,
.card-body > .icon {
  margin-bottom: 8px;
  color: var(--icon);
}

.card p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 24px;
}

.card-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 32px;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
}

.chips {
  list-style: none;
  padding: 16px;
  flex: none;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 12px;
  background: var(--surface-2);
}

.chips .file-chip {
  display: flex;
}

.chips .file-name {
  flex: 1;
}

.race {
  margin-top: 40px;
}

/* Тарифы */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 800px;
  margin-top: 40px;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--sheet);
}

.plan-main {
  box-shadow:
    inset 0 0 0 1px var(--accent),
    var(--sheet);
}

.plan .button {
  margin-top: auto;
  align-self: flex-start;
}

.price {
  font-size: 32px;
  line-height: 40px;
  font-weight: 500;
}

.price-period {
  color: var(--text-3);
  font-size: 16px;
  font-weight: 400;
}

.ticks {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 24px;
}

.ticks li {
  position: relative;
  padding-left: 24px;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 10px;
  height: 6px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* Вопросы: раскрываются без скриптов (details). */
.faq-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 64px;
  align-items: start;
}

.faq {
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--sheet);
  padding: 4px 24px;
}

.faq details + details {
  border-top: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--icon);
  transition: transform 200ms var(--ease);
}

.faq details[open] summary .icon {
  transform: rotate(180deg);
}

.faq details p {
  padding: 0 40px 20px 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 24px;
}

/* Финальный призыв — лист по центру. */
.final-box {
  position: relative;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 48px;
  padding-bottom: 48px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.final-box .section-lead {
  margin-bottom: 28px;
}

/* --- подвал --- */

.footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 20px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 150ms var(--ease);
}

.footer-links a:hover {
  color: var(--text);
}

.disclaimer {
  margin-top: 20px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 20px;
}

/* --- узкие экраны --- */

@media (max-width: 960px) {
  .hero-grid,
  .faq-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero-grid {
    gap: 48px;
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav {
    display: none;
  }

  .top-row .button {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  :root {
    --header-h: 56px;
  }

  .top-row {
    height: 56px;
  }

  .hero {
    padding: 28px 0 32px;
  }

  .hero-grid {
    gap: 28px;
  }

  h1 {
    font-size: 32px;
    line-height: 40px;
  }

  /* Окно чата ближе к первому экрану: вторая кнопка ведёт в соседний раздел, на телефоне он и так рядом. */
  .actions .button-quiet {
    display: none;
  }

  .ticker {
    padding-bottom: 32px;
  }

  .demo-input {
    margin: 4px 12px 12px;
  }

  .lead {
    font-size: 17px;
    line-height: 26px;
  }

  .actions .button {
    flex: 1 1 100%;
  }

  .section {
    padding: 64px 0;
  }

  h2 {
    font-size: 26px;
    line-height: 34px;
  }

  .features,
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-wide {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .chips {
    width: auto;
  }

  .faq {
    padding: 4px 16px;
  }

  .faq details p {
    padding-right: 0;
  }

  .final-box {
    width: calc(100% - 32px);
    padding: 40px 20px;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
