/* MIREA Пересдачи — landing
   Apple-style minimal. Single stylesheet, no framework. */

/* ───────── Tokens ───────── */
:root {
  --bg:           #ffffff;
  --bg-alt:       #f5f5f7;
  --bg-card:      #ffffff;
  --ink:          #1d1d1f;
  --ink-soft:     #6e6e73;
  --ink-faint:    #86868b;
  --accent:       #0071e3;
  --accent-hover: #0077ed;
  --hairline:     rgba(0, 0, 0, 0.08);
  --shadow-card:  0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-frame: 0 24px 60px rgba(0, 0, 0, 0.18), 0 8px 16px rgba(0, 0, 0, 0.06);

  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --content-max: 1120px;
  --gutter:      24px;
  --section-gap: 120px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #000000;
    --bg-alt:    #0a0a0a;
    --bg-card:   #161617;
    --ink:       #f5f5f7;
    --ink-soft:  #a1a1a6;
    --ink-faint: #86868b;
    --hairline:  rgba(255, 255, 255, 0.1);
    --shadow-card:  0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-frame: 0 24px 60px rgba(0, 0, 0, 0.55), 0 8px 16px rgba(0, 0, 0, 0.35);
  }
}

/* ───────── Reset ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
}

/* ───────── Type scale ───────── */
.t-display {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.t-h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.t-h2 {
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.t-h3 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  font-weight: 600;
}
.t-body {
  font-size: 17px;
  line-height: 1.55;
}
.t-lead {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
  color: var(--ink-soft);
}
.t-caption {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* ───────── Layout ───────── */
.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: clamp(64px, 10vw, var(--section-gap));
}
.section--alt { background: var(--bg-alt); }

/* ───────── Nav ───────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.nav__brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  color: var(--ink-soft);
}
.nav__links a:hover { color: var(--ink); }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px;
}
.lang-toggle button {
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

@media (max-width: 720px) {
  .nav__links { gap: 16px; font-size: 12px; }
  .nav__links a:not(.lang-toggle) { display: none; }
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 12px 22px;
  border-radius: 999px;
  transition: background 0.18s var(--ease-out), transform 0.18s var(--ease-out);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost {
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.btn--ghost:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.btn:active { transform: translateY(1px); }

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: background 0.18s var(--ease-out);
}
.app-store-badge:hover { background: color-mix(in srgb, var(--ink) 88%, var(--bg)); }
.app-store-badge svg { width: 24px; height: 24px; }
.app-store-badge__small { font-size: 10px; line-height: 1; opacity: 0.65; letter-spacing: 0.04em; }
.app-store-badge__big { font-size: 17px; line-height: 1.1; font-weight: 600; }

/* ───────── Hero ───────── */
.hero {
  padding-block: clamp(64px, 9vw, 120px) clamp(48px, 8vw, 96px);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 56px; text-align: center; }
}
.hero__copy h1 { margin-bottom: 20px; }
.hero__copy p { color: var(--ink-soft); margin-bottom: 32px; max-width: 30ch; }
@media (max-width: 880px) {
  .hero__copy p { margin-inline: auto; }
}
.hero__cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
@media (max-width: 880px) {
  .hero__cta { justify-content: center; }
}
.hero__rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--ink-faint);
  font-size: 13px;
}
.hero__rating svg { width: 14px; height: 14px; fill: currentColor; }

/* iPhone frame */
.device {
  position: relative;
  margin-inline: auto;
  width: clamp(200px, 26vw, 280px);
  aspect-ratio: 1242 / 2688;
  border-radius: 12.5%;
  background: linear-gradient(155deg, #1a1a1d 0%, #0c0c0e 60%);
  padding: 14px;
  box-shadow: var(--shadow-frame);
}
@media (max-width: 880px) {
  /* Hero device a bit smaller when stacked */
  .hero__visual .device { width: clamp(220px, 56vw, 280px); }
}
.device::before, .device::after {
  content: "";
  position: absolute;
  background: #050506;
}
.device::before {
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 26px;
  border-radius: 999px;
}
.device__screen {
  width: 100%;
  height: 100%;
  border-radius: 9.6%;
  overflow: hidden;
  background: #fff;
}
.device__screen img { width: 100%; height: 100%; object-fit: cover; }

/* ───────── Features ───────── */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; gap: 16px; }
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-card__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}
.feature-card__icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.feature-card h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.005em; }
.feature-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.5; }

/* ───────── Section heading ───────── */
.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vw, 72px);
}
.section__eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section__head p {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.6vw, 18px);
}

/* ───────── Screenshot strip ───────── */
/* Horizontal scroll on every breakpoint. Card width is clamped so a
   couple are visible at once. On mobile the strip extends edge-to-edge
   via the negative margin. Inside .wrap on desktop. */
.screen-strip {
  --gap: 24px;
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  padding: 32px var(--gutter);
  margin: 0 calc(var(--gutter) * -1);
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.screen-strip::-webkit-scrollbar { display: none; }
.screen-strip > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.screen-strip .device {
  width: clamp(180px, 42vw, 240px);
  margin-inline: 0;
}
@media (min-width: 720px) {
  .screen-strip { --gap: 28px; }
  .screen-strip .device { width: clamp(200px, 24vw, 240px); }
}
@media (min-width: 1024px) {
  .screen-strip { padding-block: 40px; }
  .screen-strip .device { width: 200px; }
}

/* ───────── Trust band ───────── */
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 720px) {
  .trust { grid-template-columns: 1fr; }
}
.trust__cell {
  padding: 20px;
}
.trust__cell strong {
  display: block;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 6px;
}

/* ───────── FAQ ───────── */
.faq {
  max-width: 760px;
  margin-inline: auto;
}
.faq details {
  border-bottom: 1px solid var(--hairline);
  padding: 22px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--hairline); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  font-weight: 500;
  font-size: clamp(16px, 2vw, 18px);
  letter-spacing: -0.005em;
}
@media (min-width: 720px) {
  .faq summary { gap: 24px; }
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 6px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3 5.5L7 9.5L11 5.5' stroke='black' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3 5.5L7 9.5L11 5.5' stroke='black' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
  transition: transform 0.2s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details > p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  max-width: 64ch;
}

/* ───────── CTA bar ───────── */
.cta-bar {
  background: var(--bg-alt);
  border-radius: var(--radius-xl);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
}
.cta-bar h2 { margin-bottom: 16px; }
.cta-bar p { color: var(--ink-soft); margin-bottom: 32px; }
.cta-bar__row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ───────── Footer ───────── */
.footer {
  border-top: 1px solid var(--hairline);
  padding-block: 48px;
  font-size: 13px;
  color: var(--ink-soft);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 32px;
}
.footer__links {
  display: flex;
  gap: 24px;
}
.footer__links a:hover { color: var(--ink); }

/* ───────── Article (legal pages) ───────── */
.article-shell {
  padding-block: clamp(64px, 8vw, 96px);
}
.article-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  max-width: 1040px;
  margin-inline: auto;
}
@media (max-width: 880px) {
  .article-grid { grid-template-columns: 1fr; gap: 32px; }
}
.toc {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: 14px;
  border-left: 1px solid var(--hairline);
  padding-left: 18px;
}
.toc__title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
.toc ol li {
  padding: 5px 0;
  counter-increment: toc;
}
.toc ol li::before {
  content: counter(toc) ". ";
  color: var(--ink-faint);
}
.toc ol { counter-reset: toc; }
.toc a {
  color: var(--ink-soft);
  transition: color 0.15s var(--ease-out);
}
.toc a:hover { color: var(--ink); }
@media (max-width: 880px) {
  .toc { display: none; }
}

.article {
  font-size: 16.5px;
  line-height: 1.65;
}
.article header { margin-bottom: 48px; }
.article header .effective {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.article h1 {
  font-size: clamp(36px, 4.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 8px;
}
.article h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-top: 56px;
  margin-bottom: 12px;
  scroll-margin-top: 80px;
}
.article p, .article li { color: var(--ink); }
.article p + p { margin-top: 16px; }
.article ul, .article ol {
  margin-top: 14px;
  padding-left: 1.4em;
}
.article ul li { list-style: disc; margin-bottom: 6px; }
.article ol li { list-style: decimal; margin-bottom: 6px; }
.article a { color: var(--accent); }
.article a:hover { text-decoration: underline; }
.article code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
  background: var(--bg-alt);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

/* ───────── Bilingual visibility ───────── */
/* Default: show EN, hide RU */
html:not([lang="ru"]) [data-lang="ru"] { display: none !important; }
html[lang="ru"] [data-lang="en"] { display: none !important; }

/* ───────── Fade-in on load ───────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(8px);
    animation: reveal 0.7s var(--ease-out) 0.1s forwards;
  }
  .reveal--late { animation-delay: 0.25s; }
  @keyframes reveal {
    to { opacity: 1; transform: none; }
  }
}

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