/* ============================================================
   Xron — лендинг
   Палитра из lib/core/colors.dart (AppColors), шрифт Onest из
   assets/fonts, логотип из assets/icon.png — чтобы сайт и
   приложение выглядели как одно целое.
   Файл общий для лендинга и страницы отзывов.
   ============================================================ */

/* ---------- Шрифты ---------- */
@font-face {
  font-family: 'Onest';
  src: url('/fonts/Onest-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('/fonts/Onest-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('/fonts/Onest-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('/fonts/Onest-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Токены ---------- */
:root {
  --bg:          #0A0A0C;
  --surface:     #141418;
  --surface-2:   #1C1C20;
  --surface-3:   #242428;

  --line:        rgba(255, 255, 255, .08);
  --line-2:      rgba(255, 255, 255, .14);

  --text:        #FFFFFF;
  --text-2:      #9CA3AF;
  --text-3:      #6B7280;

  --indigo:      #6366F1;
  --indigo-l:    #818CF8;
  --violet:      #8B5CF6;
  --teal:        #14B8A6;
  --teal-l:      #5EEAD4;
  --coral:       #FF4D5F;
  --coral-d:     #E63E4F;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;

  --wrap: 1180px;
  --nav-h: 68px;

  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .75);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code {
  font-family: var(--mono);
  font-size: .88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
  white-space: nowrap;
}
b, strong { font-weight: 600; }
::selection { background: rgba(99, 102, 241, .35); }

:focus-visible {
  outline: 2px solid var(--indigo-l);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Сетка ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Типографика ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line-2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--indigo-l);
  margin-bottom: 24px;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 12px var(--coral);
}

h1 { font-size: clamp(2.1rem, 5.4vw, 4.1rem); letter-spacing: -.035em; line-height: 1.04; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -.03em; }

/* Главный лозунг: короткий, поэтому набирается крупнее обычного h1 */
.hero-slogan {
  /* Размер подобран так, чтобы «Всё до CapCut» умещалось в колонку
     одной строкой: при большем кегле ломается на «Всё до / CapCut». */
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  letter-spacing: -.045em;
  line-height: 1.02;
}

.grad {
  background: linear-gradient(100deg, #A5B4FC 0%, #C9B8FD 42%, #FF9AA5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin-top: 24px;
  max-width: 620px;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--text-2);
  line-height: 1.65;
}
.lede-sm {
  margin-top: 16px;
  max-width: 520px;
  color: var(--text-2);
  line-height: 1.65;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease);
}
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(255, 77, 95, .7);
}
.btn-primary:hover {
  background: #FF6274;
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -12px rgba(255, 77, 95, .85);
}

.btn-ghost {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-2);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .26);
  transform: translateY(-2px);
}

/* ---------- Навигация ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck, .nav.is-open {
  background: rgba(10, 10, 12, .72);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom-color: var(--line);
}
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 28px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
/* Настоящая иконка приложения: внутри файла много полей, поэтому
   кадрируем её в квадрат и подтягиваем знак — иначе на 30px он теряется. */
.brand-mark {
  width: 30px; height: 30px;
  box-sizing: border-box;
  display: block;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .10);
  overflow: hidden;
  background: #1F1C22;
  box-shadow: 0 4px 14px -5px rgba(255, 77, 95, .95);
}
.brand-mark img { width: 100%; height: 100%; display: block; transform: scale(1.32); }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--text-2);
  font-weight: 500;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.burger span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 24px;
  background: rgba(10, 10, 12, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a {
  padding: 13px 4px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: 0; margin-top: 12px; }
.mobile-menu a.btn { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(48px, 9vw, 104px)) 0 clamp(56px, 8vw, 96px);
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; }

/* Текст слева, телефоны справа — как в референсе */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
}
.glow-a {
  width: 620px; height: 620px;
  top: -220px; left: -140px;
  background: radial-gradient(circle, rgba(99, 102, 241, .40), transparent 68%);
}
.glow-b {
  width: 520px; height: 520px;
  top: -120px; right: -160px;
  background: radial-gradient(circle, rgba(255, 77, 95, .22), transparent 68%);
}
.glow-c {
  width: 820px; height: 520px;
  left: 50%; top: -170px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle, rgba(255, 77, 95, .30), transparent 62%),
    radial-gradient(circle at 30% 60%, rgba(99, 102, 241, .28), transparent 60%);
}
.grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero-meta { margin-top: 20px; font-size: 14px; color: var(--text-3); }

/* ---------- Скриншоты приложения в макете iPhone ---------- */
.hero-visual { width: 100%; max-width: 540px; margin-inline: auto; }

/* Композиция: центральный телефон крупнее и впереди, боковые — позади и ниже */
.phones { position: relative; }

.phone { position: relative; margin: 0; }
.phone--main { width: 50%; margin-inline: auto; z-index: 3; }
.phone--left,
.phone--right { position: absolute; bottom: 0; width: 41%; z-index: 1; }
.phone--left  { left: 0;  --tilt: -3deg; }
.phone--right { right: 0; --tilt:  3deg; }

/* Появление при скролле и «парение». Появление идёт через transform,
   парение — через отдельное свойство translate, поэтому они не перебивают
   друг друга: transform анимации отменил бы transition. */
.js .phone {
  opacity: 0;
  transform: translateY(30px) rotate(var(--tilt, 0deg)) scale(.97);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .phones.is-in .phone {
  opacity: 1;
  transform: rotate(var(--tilt, 0deg));
}
.js .phones.is-in .phone--left  { transition-delay: 0ms; }
.js .phones.is-in .phone--main  { transition-delay: 120ms; }
.js .phones.is-in .phone--right { transition-delay: 240ms; }

@keyframes phone-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -12px; }
}
.js .phones.is-in .phone--main  { animation: phone-float 7s   ease-in-out infinite; }
.js .phones.is-in .phone--left  { animation: phone-float 8s   ease-in-out infinite .9s; }
.js .phones.is-in .phone--right { animation: phone-float 7.5s ease-in-out infinite 1.7s; }

/* Корпус: металлическая рамка вокруг экрана. Вырез и статус-бар уже есть
   на самих скриншотах, поэтому второй «остров» не рисуем. */
.phone-frame {
  position: relative;
  padding: 9px;
  border-radius: 36px;
  background: linear-gradient(150deg, #4C4C57 0%, #1B1B20 34%, #2F2F38 66%, #47474F 100%);
  box-shadow:
    0 40px 80px -32px rgba(0, 0, 0, .95),
    0 0 0 1px rgba(255, 255, 255, .07),
    0 0 80px -34px rgba(99, 102, 241, .6);
}

/* кнопки громкости слева */
.phone-frame::before,
.phone-frame::after {
  content: '';
  position: absolute;
  left: -2px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #55555F, #202027);
}
.phone-frame::before { top: 19%; height: 4%; }
.phone-frame::after  { top: 26%; height: 8%; }

.phone-screen {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
}

/* блик по стеклу */
.phone-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 30%);
  pointer-events: none;
}

.phone-screen img { display: block; width: 100%; height: auto; }

/* ---------- Коротко о возможностях ---------- */
.brief {
  padding: clamp(56px, 7vw, 88px) 0;
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent);
}
.brief-list { display: flex; flex-direction: column; }
.brief-list li {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.brief-list li:first-child { border-top: 0; padding-top: 0; }
.brief-list b { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.brief-list span { color: var(--text-2); font-size: 15px; line-height: 1.6; }

/* ---------- Кнопки магазинов ---------- */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px 11px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-2);
  text-align: left;
  transition: transform .2s var(--ease), background-color .2s var(--ease),
              border-color .2s var(--ease);
}
.store:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .26);
}
.store-ic { display: grid; place-items: center; width: 26px; height: 26px; color: var(--text); }
.store-ic svg { width: 24px; height: 24px; }
.store-txt { display: flex; flex-direction: column; line-height: 1.25; }
.store-txt small { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; }
.store-txt b { font-size: 16px; }

/* ---------- Финальный блок ---------- */
.cta {
  position: relative;
  padding: clamp(72px, 9vw, 116px) 0;
  overflow: hidden;
  text-align: center;
}
.cta-inner { position: relative; z-index: 2; }
.cta h2 { max-width: 620px; margin-inline: auto; }
.cta .lede-sm { margin-inline: auto; }
.cta .store-row { justify-content: center; }
.cta-note { margin-top: 24px; font-size: 13.5px; color: var(--text-3); }

/* ---------- Подвал ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .015), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  padding-block: 52px;
}
.footer-brand p { margin-top: 16px; font-size: 14px; color: var(--text-3); line-height: 1.6; }
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 3px;
}
.footer-col a { font-size: 14.5px; color: var(--text-2); transition: color .2s var(--ease); width: fit-content; }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- Появление при скролле ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .75s var(--ease) var(--d, 0ms),
    transform .75s var(--ease) var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  /* одна колонка: текст, под ним телефоны */
  .hero-grid { grid-template-columns: 1fr; gap: clamp(36px, 6vw, 56px); }
  /* три телефона на узком экране нечитаемы — оставляем главный */
  .phone--left,
  .phone--right { display: none; }
  .phone--main { width: 100%; max-width: 290px; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .burger { display: flex; }
  .mobile-menu:not([hidden]) { display: flex; }
}

@media (max-width: 680px) {
  .wrap { padding: 0 18px; }
  .brief-list li { grid-template-columns: 1fr; gap: 6px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-block: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .store-row { flex-direction: column; align-items: stretch; }
  .store { justify-content: center; }
  .phone--main { max-width: 250px; }
  .phone-frame { padding: 7px; border-radius: 30px; }
  .phone-screen { border-radius: 24px; }
}

/* ?static=1 — полностью статичная страница, чтобы скриншоты были одинаковыми.
   Гасим ВСЕ переходы, а не только у телефонов: иначе снимок ловит текст
   в середине 0,75-секундного появления — с opacity 0. */
.no-anim *,
.no-anim *::before,
.no-anim *::after {
  transition: none !important;
  animation: none !important;
}
.no-anim [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}
.no-anim .phone {
  opacity: 1 !important;
  transform: rotate(var(--tilt, 0deg)) !important;
  translate: none !important;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .phone {
    opacity: 1;
    transform: rotate(var(--tilt, 0deg));
    translate: none;
    animation: none;
  }
}
