/* yodict — landing + legal pages. Палитра взята из тёмной темы приложения
   (lib/theme/app_theme.dart): фон #101418, карточки #15232D, акцент #17B0EF. */

:root {
  --bg: #101418;
  --bg-alt: #0c1013;
  --surface: #15232d;
  --surface-2: #1a2f3b;
  --border: #25404f;
  --accent: #17b0ef;
  --accent-dark: #0d8ec5;
  --text: #e0f2ff;
  --muted: rgba(224, 242, 255, 0.62);
  --faint: rgba(224, 242, 255, 0.4);
  --success: #2bc4a0;

  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1080px;
  --font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica,
    Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 20, 24, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--text);
}
.brand .logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--accent), var(--accent-dark));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(23, 176, 239, 0.35);
}
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover {
  color: var(--text);
}
@media (max-width: 640px) {
  .nav .nav-link {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
}

/* Store badges */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px 11px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.12s ease, background 0.2s ease;
}
.store-badge:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.store-badge .store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.store-badge .store-top {
  font-size: 11px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.store-badge .store-name {
  font-size: 16px;
  font-weight: 700;
}
.store-badge[aria-disabled='true'] {
  cursor: default;
  opacity: 0.9;
}
.store-badge[aria-disabled='true']:hover {
  transform: none;
  border-color: var(--border);
  background: var(--surface);
}
.badge-soon {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(23, 176, 239, 0.12);
  padding: 3px 8px;
  border-radius: 20px;
  margin-left: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 72px;
}
.hero::before {
  content: '';
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 620px;
  background: radial-gradient(
    ellipse at center,
    rgba(23, 176, 239, 0.22),
    transparent 62%
  );
  pointer-events: none;
  z-index: 0;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(23, 176, 239, 0.1);
  border: 1px solid rgba(23, 176, 239, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.hero h1 .accent {
  color: var(--accent);
}
.hero .lead {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 34px;
  max-width: 30em;
}
.hero .cta-row {
  margin-bottom: 18px;
}
.hero .note {
  font-size: 13px;
  color: var(--faint);
}

/* Phone mockup (pure CSS) */
.phone {
  justify-self: center;
  width: 270px;
  height: 552px;
  border-radius: 42px;
  background: linear-gradient(160deg, #1b2c38, #0e161c);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(20, 32, 42, 0.6);
  padding: 14px;
  position: relative;
}
.phone::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 22px;
  background: #0b1116;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px 18px 18px;
  gap: 14px;
}
.ps-word {
  text-align: center;
  margin-top: 8px;
}
.ps-word .w {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.ps-word .pos {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  background: rgba(23, 176, 239, 0.12);
  padding: 3px 10px;
  border-radius: 20px;
}
.ps-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.ps-opt {
  padding: 13px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.ps-opt.correct {
  border-color: var(--success);
  background: rgba(43, 196, 160, 0.14);
  color: var(--success);
}
.ps-progress {
  margin-top: auto;
  height: 8px;
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}
.ps-progress > span {
  display: block;
  height: 100%;
  width: 62%;
  background: var(--accent);
}

@media (max-width: 860px) {
  .hero {
    padding: 60px 0 48px;
  }
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 44px;
  }
  .hero .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero .stores,
  .hero .cta-row {
    justify-content: center;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: 72px 0;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.section-head h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.section-head p {
  color: var(--muted);
  font-size: 17px;
  margin: 0;
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .features {
    grid-template-columns: 1fr;
  }
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  transition: border-color 0.2s ease, transform 0.14s ease;
}
.feature:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.feature .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(23, 176, 239, 0.12);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.feature .icon svg {
  width: 24px;
  height: 24px;
}
.feature h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}
.feature p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
@media (max-width: 860px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 460px) {
  .steps {
    grid-template-columns: 1fr;
  }
}
.step {
  position: relative;
  padding-top: 8px;
}
.step .num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(23, 176, 239, 0.3);
}
.step h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
.step p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

/* CTA band */
.cta-band {
  text-align: center;
}
.cta-band .stores {
  justify-content: center;
  margin-top: 30px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 48px 0 40px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand {
  max-width: 300px;
}
.footer-brand p {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 0;
}
.footer-links {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 10px;
}
.footer-col a:hover {
  color: var(--text);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 36px;
  padding-top: 24px;
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

/* ---------- Legal / prose pages ---------- */
.legal {
  padding: 56px 0 80px;
}
.legal .container {
  max-width: 820px;
}
.legal h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.legal .updated {
  color: var(--faint);
  font-size: 14px;
  margin-bottom: 40px;
}
.prose {
  color: var(--muted);
  font-size: 16px;
}
.prose strong {
  display: block;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 32px 0 6px;
}
.prose p {
  margin: 0 0 14px;
}
.prose ul {
  margin: 0 0 16px;
  padding-left: 22px;
}
.prose li {
  margin-bottom: 8px;
}
.prose a {
  color: var(--accent);
  word-break: break-word;
}
.prose br {
  display: none;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0 20px;
}

.page-hero-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}
.page-hero-back:hover {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}