:root {
    --bg: #EEF2EE;
    --surface: #FFFFFF;
    --surface-alt: #F5F8F5;
    --ink: #16221A;
    --ink-soft: #3F4D44;
    --muted: #6F7E73;
    --line: #DCE5DE;
    --accent: #3F8A5C;
    --accent-soft: #DDEDE3;
    --accent-ink: #FFFFFF;
    --warm: #C77A2A;
    --cool: #5A6FB8;
    --shadow-sm: 0 1px 3px rgba(20,40,28,0.04);
    --shadow: 0 1px 2px rgba(20,40,28,0.04), 0 8px 24px rgba(20,40,28,0.06);
    --shadow-lg: 0 4px 16px rgba(20,40,28,0.08);
  }
  [data-theme="dark"] {
    --bg: #0F1411;
    --surface: #19211C;
    --surface-alt: #141A16;
    --ink: #E5EFE7;
    --ink-soft: #B8C8BC;
    --muted: #8FA192;
    --line: #23302A;
    --accent: #54A578;
    --accent-soft: #1F2E25;
    --accent-ink: #0F1411;
    --warm: #D89259;
    --cool: #8AA0DC;
    --shadow-sm: none;
    --shadow: none;
    --shadow-lg: none;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

  /* ─── Nav ─── */
  .nav {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(14px);
    background: color-mix(in oklab, var(--bg) 80%, transparent);
    border-bottom: 1px solid var(--line);
  }
  .nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
  .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.3px; }
  
  .logo-text { display: inline-flex; align-items: baseline; gap: 0; }
  .logo-text-lexy { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 500; letter-spacing: -0.4px; }
  .logo-text b { font-weight: 700; letter-spacing: -0.3px; }
.logo-mark {
    width: 30px; height: 30px; border-radius: 9px;
    background: url("brand/logo.svg") center/contain no-repeat;
    flex-shrink: 0;
  }
  .nav-links { display: flex; gap: 28px; align-items: center; }
  .nav-links a { color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 500; }
  .nav-links a:hover { color: var(--accent); }
  .nav-actions { display: flex; gap: 8px; align-items: center; }
  .theme-toggle {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer;
    color: var(--ink-soft); font-family: inherit;
  }
  .btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 999px;
    font-size: 14px; font-weight: 600; text-decoration: none;
    border: none; cursor: pointer; font-family: inherit;
  }
  .btn-primary { background: var(--accent); color: var(--accent-ink); }
  .btn-primary:hover { filter: brightness(0.96); }
  .btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
  .btn-lg { padding: 14px 24px; font-size: 15px; border-radius: 16px; }

  @media (max-width: 820px) {
    .nav-links { display: none; }
  }

  /* ─── Language switcher ─── */
  .lang-switcher { position: relative; }
  .lang-current {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 999px; padding: 6px 10px 6px 8px;
    display: inline-flex; align-items: center; gap: 6px;
    font-family: inherit; font-size: 12px; font-weight: 600;
    color: var(--ink-soft); cursor: pointer;
  }
  .lang-current:hover { color: var(--ink); border-color: color-mix(in oklab, var(--accent) 30%, var(--line)); }
  .lang-current .lang-flag { font-size: 14px; line-height: 1; }
  .lang-current .lang-code { letter-spacing: 0.4px; }
  .lang-current::after {
    content: ""; width: 0; height: 0;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 4px solid currentColor; opacity: 0.5; margin-left: 2px;
  }
  .lang-menu {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
    list-style: none; margin: 0; padding: 6px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; box-shadow: var(--shadow-lg);
    min-width: 200px; max-height: 360px; overflow-y: auto;
    display: none;
  }
  .lang-menu.open { display: block; }
  .lang-menu li {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 9px; cursor: pointer;
    font-size: 13px; color: var(--ink);
  }
  .lang-menu li:hover { background: var(--surface-alt); }
  .lang-menu .lang-flag { font-size: 16px; line-height: 1; }
  .lang-menu .lang-name { flex: 1; font-weight: 500; }
  .lang-menu .lang-code { font-size: 11px; color: var(--muted); letter-spacing: 0.5px; font-family: 'JetBrains Mono', monospace; }
  /* RTL tweaks */
  html[dir="rtl"] .lang-menu { right: auto; left: 0; }
  html[dir="rtl"] .hero-grid { direction: rtl; }
  html[dir="rtl"] .hero-actions { flex-direction: row-reverse; justify-content: flex-end; }

  /* ─── Hero ─── */
  .hero { padding: 64px 0 32px; }
  .hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
  .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent-soft); color: var(--accent);
    padding: 6px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
    margin-bottom: 20px;
  }
  .eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
  h1.display {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: clamp(40px, 6vw, 72px);
    letter-spacing: -2px;
    line-height: 1.0;
    margin: 0 0 24px;
  }
  h1.display .italic { font-style: italic; color: var(--accent); }
  .lede {
    font-size: 18px; color: var(--ink-soft); max-width: 520px;
    margin: 0 0 32px;
  }
  .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
  .hero-meta { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
  .meta-item .num { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 600; letter-spacing: -1px; }
  .meta-item .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }

  /* Phone mockup */
  .phone-stage { display: grid; place-items: center; padding: 20px; }
  .phone {
    width: 320px; height: 640px;
    background: var(--surface); border-radius: 44px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    position: relative;
    transform: rotate(-2deg);
  }
  .phone-screen {
    width: 100%; height: 100%;
    background: var(--bg); border-radius: 32px;
    overflow: hidden;
    position: relative;
  }
  .phone .notch {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    width: 86px; height: 24px; border-radius: 12px;
    background: var(--ink); opacity: 0.85;
    z-index: 2;
  }
  .phone-content { padding: 50px 18px 18px; }
  .phone-greet { font-size: 11px; color: var(--muted); }
  .phone-name { font-size: 14px; font-weight: 600; margin-top: 2px; margin-bottom: 14px; }
  .phone-card {
    background: var(--surface); border-radius: 18px; padding: 16px;
    box-shadow: var(--shadow-sm); margin-bottom: 10px;
  }
  .phone-goal-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
  .phone-goal-num { font-family: 'Inter', sans-serif; font-size: 30px; font-weight: 700; letter-spacing: -1px; }
  .phone-goal-num small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 4px; }
  .phone-segs { display: flex; gap: 3px; margin-top: 10px; margin-bottom: 12px; }
  .phone-seg { flex: 1; height: 6px; border-radius: 3px; background: var(--accent-soft); }
  .phone-seg.on { background: var(--accent); }
  .phone-cta {
    background: var(--accent); color: var(--accent-ink);
    padding: 12px; border-radius: 12px;
    display: flex; justify-content: space-between;
    font-size: 13px; font-weight: 600;
  }
  .phone-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .phone-stat { background: var(--surface); border-radius: 12px; padding: 10px; text-align: center; box-shadow: var(--shadow-sm); }
  .phone-stat .v { font-size: 18px; font-weight: 700; }
  .phone-stat .l { font-size: 10px; color: var(--muted); margin-top: 2px; }
  .phone-stat .d { width: 5px; height: 5px; border-radius: 50%; margin: 0 auto 4px; }

  @media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .phone-stage { order: -1; }
    .phone { transform: none; }
  }

  /* ─── Logos strip ─── */
  .strip { padding: 24px 0 48px; }
  .strip-text { text-align: center; font-size: 12px; color: var(--muted); letter-spacing: 1.5px; font-family: 'JetBrains Mono', monospace; margin-bottom: 20px; }
  .strip-row { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; align-items: center; }
  .strip-row .lang { font-size: 22px; font-weight: 600; color: var(--muted); letter-spacing: -0.5px; }
  .strip-row .lang .flag { margin-right: 8px; font-size: 20px; }

  /* ─── Section header ─── */
  .section { padding: 72px 0; }
  .section-head { max-width: 720px; margin-bottom: 48px; }
  .kicker { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 12px; }
  h2 {
    font-family: 'Fraunces', serif; font-weight: 500;
    font-size: clamp(32px, 4vw, 48px); letter-spacing: -1.2px; line-height: 1.05;
    margin: 0 0 16px;
  }
  h2 .italic { font-style: italic; color: var(--accent); }
  .section-sub { font-size: 17px; color: var(--ink-soft); max-width: 560px; }

  /* ─── How it works (3 steps) ─── */
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .step {
    background: var(--surface); border-radius: 24px; padding: 28px;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; gap: 14px;
  }
  .step-num {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--accent-soft); color: var(--accent);
    display: grid; place-items: center;
    font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600;
  }
  .step h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
  .step p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }

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

  /* ─── Features bento ─── */
  .bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 220px;
    gap: 16px;
  }
  .bento-card {
    background: var(--surface); border-radius: 24px; padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden;
    position: relative;
  }
  .bento-card h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; letter-spacing: -0.3px; }
  .bento-card p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
  .bento-tag { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 1.5px; color: var(--muted); }
  .bento-a { grid-column: span 3; grid-row: span 2; background: var(--accent); color: var(--accent-ink); }
  .bento-a h3, .bento-a p { color: var(--accent-ink); }
  .bento-a .bento-tag { color: color-mix(in oklab, var(--accent-ink) 70%, transparent); }
  .bento-b { grid-column: span 3; }
  .bento-c { grid-column: span 3; }
  .bento-d { grid-column: span 2; }
  .bento-e { grid-column: span 2; }
  .bento-f { grid-column: span 2; }

  /* Demo tiles inside bento */
  .demo-streak { display: flex; gap: 6px; }
  .demo-streak .day {
    width: 26px; height: 26px; border-radius: 8px;
    background: var(--accent-soft); display: grid; place-items: center;
    font-size: 11px; color: var(--muted); font-weight: 600;
  }
  .demo-streak .day.on { background: var(--accent); color: var(--accent-ink); }
  .demo-bars { display: flex; align-items: flex-end; gap: 6px; height: 80px; }
  .demo-bars .bar { flex: 1; background: var(--accent-soft); border-radius: 4px 4px 0 0; }
  .demo-bars .bar.on { background: var(--accent); }
  .demo-pair {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    background: color-mix(in oklab, var(--accent-ink) 15%, transparent);
    border-radius: 14px;
  }
  .demo-pair .word { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 500; }
  .demo-pair .arr { color: color-mix(in oklab, var(--accent-ink) 70%, transparent); }

  @media (max-width: 900px) {
    .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
    .bento-a, .bento-b, .bento-c, .bento-d, .bento-e, .bento-f { grid-column: span 2; grid-row: auto; min-height: 200px; }
  }

  /* ─── Testimonials ─── */
  .quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .quote {
    background: var(--surface); border-radius: 22px; padding: 24px;
    box-shadow: var(--shadow-sm);
  }
  .quote p {
    font-family: 'Fraunces', serif; font-size: 17px; line-height: 1.45;
    margin: 0 0 16px; color: var(--ink); font-style: italic;
    text-wrap: pretty;
  }
  .quote .person { display: flex; align-items: center; gap: 10px; }
  .quote .av {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent);
    display: grid; place-items: center; font-weight: 700; font-size: 13px;
  }
  .quote .who { font-size: 13px; font-weight: 600; }
  .quote .role { font-size: 12px; color: var(--muted); }
  @media (max-width: 820px) { .quotes { grid-template-columns: 1fr; } }

  /* ─── Pricing ─── */
  .pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1080px; margin: 0 auto; align-items: stretch; }
  .pricing > .price-card { display: flex; flex-direction: column; }
  .pricing > .price-card > .btn { margin-top: auto; }
  .price-card {
    background: var(--surface); border-radius: 24px; padding: 32px;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; gap: 16px;
  }
  .price-card.featured { background: var(--ink); color: var(--bg); position: relative; }
  .price-card.featured h3, .price-card.featured .price, .price-card.featured li { color: var(--bg); }
  .price-card .tier { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; }
  .price-card.featured .tier { color: color-mix(in oklab, var(--bg) 70%, transparent); }
  .price-card .price { font-family: 'Fraunces', serif; font-size: 44px; font-weight: 500; letter-spacing: -1.5px; line-height: 1; }
  .price-card .price small { font-family: 'Inter', sans-serif; font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 6px; }
  .price-card.featured .price small { color: color-mix(in oklab, var(--bg) 70%, transparent); }
  /* Зачёркнута цена СРАВНЕНИЯ (12 месячных подписок), а не годовая: 69.99 это
     ровно то, что спишется, и перечёркивать её значило бы обещать скидку,
     которой нет. */
  .price-card .price .was {
    font-size: 22px; font-weight: 400; margin-right: 10px;
    color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px;
  }
  .price-card.featured .price .was { color: color-mix(in oklab, var(--bg) 55%, transparent); }
  .price-card .permo { font-size: 13px; color: var(--muted); margin-top: -8px; }
  .price-card.featured .permo { color: color-mix(in oklab, var(--bg) 70%, transparent); }
  .price-card .trial-note { font-size: 15px; font-weight: 600; color: var(--accent); margin-top: -4px; }
  .price-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
  .price-card li { font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
  .price-card li::before { content: '✓'; color: var(--accent); flex-shrink: 0; font-weight: 700; }
  .price-card.featured li::before { color: var(--accent); }
  .ribbon {
    position: absolute; top: 18px; right: 18px;
    background: var(--accent); color: var(--accent-ink);
    padding: 4px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  }
  @media (max-width: 980px) { .pricing { grid-template-columns: 1fr; max-width: 480px; } }

  /* ─── FAQ ─── */
  .faq { max-width: 760px; margin: 0 auto; }
  .faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
  .faq-q { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; display: flex; justify-content: space-between; cursor: pointer; }
  .faq-a { color: var(--ink-soft); font-size: 15px; line-height: 1.6; margin-top: 10px; }

  /* ─── CTA strip ─── */
  .cta-strip {
    background: var(--ink); color: var(--bg);
    border-radius: 32px; padding: 56px 48px;
    display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: center;
    margin: 32px 0;
  }
  .cta-strip h2 { color: var(--bg); margin: 0 0 12px; }
  .cta-strip p { color: color-mix(in oklab, var(--bg) 75%, transparent); margin: 0; font-size: 16px; }
  .cta-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
  @media (max-width: 760px) {
    .cta-strip { grid-template-columns: 1fr; padding: 36px 28px; }
    .cta-actions { justify-content: flex-start; }
  }

  /* ─── Footer ─── */
  footer { padding: 48px 0 32px; border-top: 1px solid var(--line); margin-top: 32px; color: var(--muted); font-size: 13px; }
  .foot { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
  .foot h4 { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--ink); margin: 0 0 12px; text-transform: uppercase; }
  .foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
  .foot a { color: var(--muted); text-decoration: none; }
  .foot a:hover { color: var(--accent); }
  .foot-bottom { display: flex; justify-content: space-between; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; gap: 12px; }
  @media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } }