/* Главная rivoai-app.com — в одном ключе с экраном входа в приложении:
   тёмный фон, фото во весь кадр, белый заголовок с голубой второй строкой. */

:root {
  --bg: #050A12;
  --ink: #EAF3FF;
  --subtle: #9AACC2;
  --faint: #5E7088;
  --line: #16233A;
  --accent: #38B2FF;
  --max: 1120px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

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

/* Шапка поверх первого экрана */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  padding: max(18px, env(safe-area-inset-top)) 0 18px;
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
.brand:hover { text-decoration: none; }
.top-nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.top-nav > a { color: rgba(255, 255, 255, 0.8); }

.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lang button {
  font-family: inherit; font-weight: 600; font-size: 13px; line-height: 1; color: rgba(255, 255, 255, 0.75);
  background: none; border: 0; padding: 7px 11px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: #fff; color: #050A12; }

/* Первый экран: фото во всю высоту, текст внизу на затемнении */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 20%, rgba(0,0,0,0) 42%, rgba(5,10,18,0.7) 66%, var(--bg) 100%);
}
.hero-text { position: relative; z-index: 1; width: 100%; padding-bottom: 96px; }
.hero h1 {
  margin: 0 0 18px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.02;
  font-size: clamp(46px, 8vw, 92px);
}
.hero h1 span { display: block; }
.hero p { margin: 0 0 30px; max-width: 34ch; font-size: clamp(18px, 2.2vw, 21px); color: rgba(255, 255, 255, 0.85); }

.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: #EEF5FF; color: #050A12; padding: 15px 26px; border-radius: 16px;
  font-weight: 600; font-size: 17px; cursor: default;
}
.store svg { width: 20px; height: 20px; fill: currentColor; }

.scroll-hint {
  position: absolute; z-index: 1; left: 50%; bottom: 22px; transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6); animation: nudge 2.4s ease-in-out infinite;
}
.scroll-hint svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes nudge { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* Разделы: фото в формате экрана телефона и текст рядом */
.feature { padding: 72px 0; }
.feature-row { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: center; gap: 72px; }
.feature.flip .shot { order: 2; }
.shot {
  width: 100%; aspect-ratio: 9 / 19; object-fit: cover; border-radius: 36px;
  border: 1px solid rgba(56, 178, 255, 0.18);
  box-shadow: 0 30px 80px -20px rgba(31, 143, 255, 0.35);
}
.num { display: block; color: var(--accent); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; margin-bottom: 14px; }
.feature h2 {
  margin: 0 0 18px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
  font-size: clamp(36px, 5vw, 60px);
}
.feature h2 span { display: block; }
.feature p { margin: 0; max-width: 32ch; font-size: clamp(18px, 2vw, 21px); color: var(--subtle); }

/* Финальный призыв */
.final { padding: 96px 0 104px; text-align: center; border-top: 1px solid var(--line); }
.final h2 { margin: 0 auto 32px; max-width: 18ch; font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; font-size: clamp(34px, 5vw, 56px); }
.final h2 span { display: block; }
.note { margin: 28px auto 0; max-width: 46ch; font-size: 14px; color: var(--faint); }

/* Подвал */
.foot { border-top: 1px solid var(--line); padding: 28px 0 max(40px, env(safe-area-inset-bottom)); font-size: 15px; color: var(--faint); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { color: var(--subtle); }

/* Компьютер: фото вертикальное, и растянутое на широкий экран оно теряло
   лицо и плечи. Ставим его справа во всю высоту целиком, левый край
   растворяется в фоне, текст — слева на тёмном. */
@media (min-width: 801px) {
  .hero-photo {
    left: auto; right: 0;
    width: min(62vw, calc(100svh * 0.5628 + 12vw));
    object-fit: cover; object-position: center top;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.6) 22%, #000 42%);
            mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.6) 22%, #000 42%);
  }
  .hero::before {
    content: ""; position: absolute; right: 8%; top: 20%; width: 50vw; height: 60%;
    background: radial-gradient(closest-side, rgba(255, 150, 60, 0.18), transparent);
    filter: blur(40px);
  }
  .hero::after {
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 70%, var(--bg) 100%);
  }
  .hero { align-items: center; }
  .hero-text { padding-bottom: 0; padding-top: 40px; }
  .hero-text > * { max-width: 560px; }
}

/* Телефон: фото во всю ширину, текст под ним */
@media (max-width: 800px) {
  .top-nav > a { display: none; }
  .hero-text { padding-bottom: 80px; }
  .feature { padding: 48px 0; }
  .feature-row { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .shot { order: 0; }
  .shot { aspect-ratio: 4 / 5; object-position: center 35%; border-radius: 28px; }
}

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