/* Главная lorrr.app: слева слово с аурой вместо «o», фраза, пара строк и кнопки скачивания, справа — настоящий экран
   приложения. На телефоне всё идёт одним столбцом, экран — под кнопками. История про огонёк живёт на /new (new.css). */
@font-face {
  font-family: Geist;
  src: url("/static/geist-cyr.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Geologica;
  src: url("/static/geologica.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Тон «o» в OKLCH: 75 — янтарь иконки. Он медленно обходит круг цветов состояния и подсвечивает соседние буквы. */
@property --h {
  syntax: "<number>";
  inherits: true;
  initial-value: 75;
}

:root {
  --bg: #09090a;
  --ink: #f3eee4;
  --ink2: rgba(243, 238, 228, 0.62);
  --ink3: rgba(243, 238, 228, 0.38);
  --glow: oklch(0.86 0.14 75);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: calc(clamp(36px, 4.5vw, 56px) + env(safe-area-inset-top)) clamp(20px, 5vw, 48px)
    calc(14px + env(safe-area-inset-bottom));
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 8vw, 110px);
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.about {
  flex: 1 1 0;
  min-width: 0;
  max-width: 580px;
}

/* Слово lorrr: буквы — вектор, «o» — градиент с тем же профилем, что у иконки приложения. */
.mark {
  position: relative;
  width: min(48vw, 210px);
  margin: 0;
  --h: 75;
  --glow: oklch(0.86 0.14 var(--h));
  animation: drift 72s linear 3s infinite;
}

.mark svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.mark path {
  animation: appear 1.1s var(--ease) both;
}
.mark .r1 {
  animation-delay: 0.35s;
}
.mark .l {
  animation-delay: 0.5s;
}
.mark .r2 {
  animation-delay: 0.7s;
}
.mark .r3 {
  animation-delay: 0.9s;
}

.s0,
.s1 {
  stop-color: color-mix(in oklab, var(--glow) 38%, var(--ink));
}
.s2 {
  stop-color: color-mix(in oklab, var(--glow) 24%, var(--ink));
}
.s3 {
  stop-color: color-mix(in oklab, var(--glow) 12%, var(--ink));
}
.s4 {
  stop-color: color-mix(in oklab, var(--glow) 4%, var(--ink));
}
.s5 {
  stop-color: color-mix(in oklab, var(--ink) 90%, var(--bg));
}

.o {
  position: absolute;
  left: 28.85%;
  top: 60.96%;
  width: 62.55%;
  aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.o::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    oklch(0.969 0.051 calc(var(--h) + 23)) 0%,
    oklch(0.96 0.057 calc(var(--h) + 20)) 7.7%,
    oklch(0.935 0.074 calc(var(--h) + 14)) 13.5%,
    oklch(0.892 0.104 calc(var(--h) + 8) / 0.999) 19.2%,
    oklch(0.857 0.128 calc(var(--h) + 4) / 0.991) 23.8%,
    oklch(0.836 0.141 calc(var(--h) + 2) / 0.967) 27.7%,
    oklch(0.824 0.147 calc(var(--h) + 1) / 0.916) 31.5%,
    oklch(0.814 0.149 calc(var(--h) - 1) / 0.824) 35.4%,
    oklch(0.8 0.149 calc(var(--h) - 3) / 0.689) 39.2%,
    oklch(0.778 0.148 calc(var(--h) - 6) / 0.526) 43.1%,
    oklch(0.739 0.148 calc(var(--h) - 11) / 0.341) 48.1%,
    oklch(0.708 0.15 calc(var(--h) - 16) / 0.218) 53.8%,
    oklch(0.7 0.15 calc(var(--h) - 17) / 0.128) 61.5%,
    oklch(0.7 0.15 calc(var(--h) - 17) / 0.076) 71.2%,
    oklch(0.7 0.15 calc(var(--h) - 17) / 0.042) 82.7%,
    oklch(0.7 0.15 calc(var(--h) - 17) / 0) 100%
  );
  animation:
    ignite 1.6s var(--ease) both,
    breathe 7s ease-in-out 1.6s infinite alternate;
}

/* Текст */
.say {
  margin: clamp(30px, 4vw, 48px) 0 0;
  font-family: Geologica, Geist, sans-serif;
  font-size: clamp(32px, 4.3vw, 54px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  animation: rise 0.9s 1s var(--ease) both;
}

.sub {
  margin: clamp(14px, 1.8vw, 20px) 0 0;
  max-width: 34ch;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink2);
  text-wrap: pretty;
  animation: rise 0.9s 1.1s var(--ease) both;
}

/* Кнопки скачивания: кнопка своей платформы залита и стоит первой (home.js ставит класс на html). */
.get {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(24px, 3vw, 34px);
  animation: rise 0.9s 1.2s var(--ease) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    transform 0.15s var(--ease),
    border-color 0.2s,
    background 0.2s;
}

.btn span {
  font-weight: 400;
  color: var(--ink3);
}

.btn svg {
  width: 17px;
  height: 17px;
  margin-left: -3px;
}

.btn[href]:where(:hover) {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.07);
}

.btn[href]:active {
  transform: scale(0.97);
}

.btn[aria-disabled="true"] {
  color: var(--ink2);
  cursor: default;
}

.btn:focus-visible,
.legal a:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
}

html.android [data-store="android"][href],
html.ios [data-store="ios"][href],
html.mac [data-store="mac"][href],
html.windows [data-store="windows"][href] {
  border-color: transparent;
  background: var(--ink);
  color: var(--bg);
}

html.android [data-store="android"][href] span,
html.ios [data-store="ios"][href] span,
html.mac [data-store="mac"][href] span,
html.windows [data-store="windows"][href] span {
  color: rgba(9, 9, 10, 0.5);
}

html.ios [data-store="ios"],
html.mac [data-store="mac"],
html.windows [data-store="windows"] {
  order: -1;
}

/* Версии для компьютеров на телефоне ни к чему, а на компьютере видна только своя. */
html.android [data-store="mac"],
html.ios [data-store="mac"],
html.android [data-store="windows"],
html.ios [data-store="windows"],
html.windows [data-store="mac"],
html.mac [data-store="windows"] {
  display: none;
}

/* Экран приложения в рамке телефона. Ширина следует за высотой окна: на невысоком экране рамка не уходит под сгиб. */
.phone {
  flex: none;
  width: clamp(190px, (100svh - 190px) * 0.46, 286px);
  margin: 0;
  padding: 7px;
  border: 1px solid #2a2a2e;
  border-radius: 44px;
  background: #151517;
  animation: rise 1s 1.25s var(--ease) both;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 1565;
  border-radius: 37px;
}

.legal {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding-top: 24px;
  font-size: 12px;
  animation: rise 0.9s 1.4s var(--ease) both;
}

.legal a {
  color: var(--ink3);
  text-decoration: none;
}

.legal a:hover {
  color: var(--ink2);
}

.grain {
  position: fixed;
  z-index: 1;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.3;
  mix-blend-mode: multiply;
  pointer-events: none;
}

@keyframes appear {
  from {
    opacity: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes drift {
  to {
    --h: -285;
  }
}

@keyframes ignite {
  from {
    opacity: 0;
    scale: 0.35;
  }
}

@keyframes breathe {
  to {
    scale: 1.07;
    opacity: 0.9;
  }
}

/* Планшет стоя и телефон: один столбец, экран приложения — под кнопками. */
@media (max-width: 760px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 44px;
  }
  .about {
    flex: none;
    width: 100%;
    max-width: none;
  }
  .phone {
    align-self: center;
    width: min(286px, 78vw);
  }
}

/* Телефон: слово, фраза, пара строк и кнопки по центру; кнопки одной ширины друг под другом. */
@media (max-width: 480px) {
  .about {
    text-align: center;
  }
  .mark,
  .sub {
    margin-inline: auto;
  }
  .get {
    flex-direction: column;
    width: min(100%, 272px);
    margin-inline: auto;
  }
  .btn {
    height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mark,
  .mark path,
  .o::before,
  .say,
  .sub,
  .get,
  .phone,
  .legal {
    animation: none;
  }
}
