/* N13 — хаб приложений. Текст — системный SF-стек, дисплей — Golos Text (кириллический гротеск). */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --ink: #1c1c1e;
  --muted: rgba(28, 28, 30, 0.6);
  --surface: #f5f5f7;
  --hairline: rgba(0, 0, 0, 0.1);
  --accent: #0a84ff;

  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Golos Text", -apple-system, BlinkMacSystemFont,
    "SF Pro Display", "Helvetica Neue", sans-serif;

  --container: 1080px;
  --pad-x: clamp(1.25rem, 4vw, 2.5rem);
  --device-w: 340px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --ink: #f5f5f7;
    --muted: rgba(235, 235, 240, 0.62);
    --surface: #1c1c1e;
    --hairline: rgba(255, 255, 255, 0.12);
  }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

[id] {
  scroll-margin-top: 80px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* Навигация */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.nav__links {
  display: flex;
  gap: 1.75rem;
}

.nav__links a {
  color: var(--ink);
  opacity: 0.8;
  font-size: 0.95rem;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.nav__links a:hover {
  color: var(--accent);
  opacity: 1;
}

/* Герой */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  padding-top: clamp(1.25rem, 3vw, 2.5rem);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.hero__title {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero__sub {
  margin: 1.4rem 0 0;
  max-width: 44ch;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  line-height: 1.45;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.link-arrow {
  display: inline-block;
  margin-top: 1.8rem;
  font-size: 1.05rem;
  color: var(--accent);
}

.link-arrow:hover {
  text-decoration: underline;
}

/* Устройство-мокап */
.hero__media {
  width: min(100%, var(--device-w));
  margin: 0 auto;
}

.hero__media--lg {
  --device-w: 380px;
}

.device-link {
  display: block;
  transition: transform 0.3s ease;
}

.device-link:hover {
  transform: translateY(-6px);
}

.device {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1350 / 2760;
  filter: drop-shadow(0 22px 45px rgba(0, 0, 0, 0.28));
}

.device__screen {
  position: absolute;
  top: 2%;
  left: 4.7%;
  width: 90.6%;
  height: 96%;
  object-fit: cover;
  object-position: top center;
  z-index: 1;
}

.device__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.device-cap {
  margin: 1.6rem 0 0;
  text-align: center;
}

.device-cap__name {
  display: block;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.device-cap__meta {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: clamp(2rem, 6vw, 3rem);
  }

  .hero__title {
    max-width: 18ch;
  }

  .hero__media {
    --device-w: 280px;
  }

  .hero__media--lg {
    --device-w: 300px;
  }
}

/* Секции */
.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

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

.section__title {
  margin: 0 0 2.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  letter-spacing: -0.01em;
}

/* Фичи */
.features__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3.25rem);
}

@media (max-width: 640px) {
  .features__grid {
    grid-template-columns: 1fr;
  }
}

.feature__icon {
  width: 30px;
  height: 30px;
  margin-bottom: 1rem;
  color: var(--ink);
}

.feature__name {
  margin: 0;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.feature__text {
  margin: 0.5rem 0 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

/* Текст / CTA */
.prose {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.cta__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
}

.cta__text {
  margin: 1rem 0 0;
  max-width: 40ch;
  color: var(--muted);
  font-size: 1.15rem;
}

/* Футер */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-block: 2rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--muted);
}

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