/* Лендинг LetterRay. Палитра, шрифт и радиусы — из приложения
   (apps/client/anvmail/src/assets/styles/style.css): нейтральная шкала и один акцент. */
:root {
  color-scheme: light dark;
  --bg: #fdfcfb; --fg: #37352f; --card: #ffffff;
  --muted: #f5f3ef; --muted-fg: #76736b; --secondary: #f0eeea; --sidebar: #f7f6f3;
  --border: #e9e6e0; --input: #dfdcd5; --selected: #eeebe5;
  --accent: #f28a2c; --ink: #b94e00; --action: #fff1e5; --action-hover: #ffe6d1;
  --teal: #13a0a0; --purple: #8e2c8e;
  --night: #1c1c1b; --night-fg: #e5e4e0; --night-muted: #a29f98; --night-border: #343432;
  --shadow: 0 1px 2px rgba(55, 53, 47, .05), 0 24px 60px -24px rgba(55, 53, 47, .28);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: 24px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #20201f; --fg: #e5e4e0; --card: #262625;
    --muted: #292927; --muted-fg: #a29f98; --secondary: #30302e; --sidebar: #1c1c1b;
    --border: #343432; --input: #44433f; --selected: #33322f;
    --accent: #f2a464; --ink: #f4ac70; --action: #422c20; --action-hover: #513420;
    --teal: #3cc2c2; --purple: #c46ac4;
    --night: #111110; --night-border: #2c2c2a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 30px 70px -24px rgba(0, 0, 0, .7);
  }
}
@media (max-width: 640px) { :root { --gutter: 16px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }
::selection { background: color-mix(in oklab, var(--accent) 32%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--card); padding: 8px 12px; border-radius: 8px; }

/* Кнопки — как в приложении: основная абрикосовая, вторичная нейтральная. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: 500 15px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
svg:has(> use) { fill: currentColor; }
.btn-primary { background: var(--action); color: var(--ink); border-color: color-mix(in oklab, var(--accent) 40%, transparent); font-weight: 600; }
.btn-primary:hover { background: var(--action-hover); }
.btn-plain { background: var(--card); color: var(--fg); border-color: var(--border); }
.btn-plain:hover { background: var(--secondary); }
.btn-lg { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn-lg svg { width: 20px; height: 20px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.link-arrow { color: var(--ink); text-decoration: none; font-weight: 500; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }
.badge-store { display: inline-block; line-height: 0; border-radius: 9px; }
.badge-store img { height: 44px; width: auto; }
.badge-store .on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .badge-store .on-light { display: none; }
  .badge-store .on-dark { display: block; }
}

/* Навигация */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in oklab, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(170%) blur(16px); backdrop-filter: saturate(170%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-in { height: 60px; display: flex; align-items: center; gap: 8px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.01em; text-decoration: none; margin-right: 16px; }
.logo img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { padding: 7px 11px; border-radius: 8px; font-size: 14px; color: var(--muted-fg); text-decoration: none; }
.nav-links a:hover { color: var(--fg); background: var(--secondary); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-end .lang { font-size: 13px; color: var(--muted-fg); text-decoration: none; padding: 7px 9px; border-radius: 8px; }
.nav-end .lang:hover { color: var(--fg); background: var(--secondary); }
@media (max-width: 820px) { .nav-links, .nav-end .signin { display: none; } }

/* Первый экран */
.hero { padding: clamp(56px, 9vw, 104px) 0 0; }
.hero h1 { font-size: clamp(40px, 7.4vw, 76px); line-height: 1.02; letter-spacing: -.035em; word-spacing: .06em; max-width: 12ch; }
.hero .lede { margin-top: 24px; max-width: 34em; font-size: clamp(18px, 2.1vw, 21px); line-height: 1.5; color: var(--muted-fg); letter-spacing: -.01em; }
.hero .lede strong { color: var(--fg); font-weight: 500; }
.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.hero-cta .link-arrow { margin-left: 6px; font-size: 15px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted-fg); }

.stage { position: relative; margin-top: clamp(48px, 7vw, 80px); padding-bottom: 40px; }
.window {
  border-radius: 14px; overflow: hidden; background: var(--card);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.window img { width: 100%; }
.stage .window { width: calc(100% - 120px); }
.stage .phone { position: absolute; right: 0; bottom: 0; width: clamp(200px, 23%, 262px); --bezel: 8px; }
@media (max-width: 820px) {
  .stage .window { width: 100%; }
  .stage .phone { width: 36%; right: -6px; bottom: -12px; --bezel: 6px; }
}
@media (max-width: 560px) {
  .stage .window { display: none; }
  .stage .phone { position: relative; width: 70%; margin: 0 auto; right: auto; bottom: auto; --bezel: 8px; }
  .stage { padding-bottom: 8px; }
}

/* Телефон: рамка, «остров» и строка состояния поверх снимка. */
.phone {
  position: relative; border-radius: calc(var(--bezel) * 4.6); padding: var(--bezel); --bezel: 10px;
  background: #1d1d1c; box-shadow: var(--shadow), inset 0 0 0 1.5px #3a3a38;
}
.phone .screen { position: relative; border-radius: calc(var(--bezel) * 3.6); overflow: hidden; background: var(--bg); }
.phone .screen.dark { background: #20201f; }
.phone .status { display: flex; align-items: center; justify-content: space-between; padding: 5.4% 8% 1.8% 10%; font: 600 clamp(9px, 1vw, 12px)/1 var(--font); color: var(--fg); }
.phone .screen.light .status { color: #37352f; background: #fdfcfb; }
.phone .screen.auto .status { color: var(--fg); background: var(--bg); }
.phone .screen.dark .status { color: #e5e4e0; background: #20201f; }
.phone .status svg { height: .82em; width: auto; }
.phone .island { position: absolute; top: 2%; left: 50%; width: 25%; height: 3%; transform: translateX(-50%); background: #000; border-radius: 99px; }

/* Строка с провайдерами */
.works { padding: 28px 0; border-block: 1px solid var(--border); margin-top: 40px; }
.works .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; }
.works span:first-child { font-size: 14px; color: var(--muted-fg); margin-right: 4px; }
@media (max-width: 640px) { .works .wrap { gap: 6px 18px; } .works span { width: 100%; } .works b { font-size: 16px; } }
.works b { font-weight: 600; font-size: 17px; letter-spacing: -.01em; color: color-mix(in oklab, var(--fg) 78%, var(--bg)); }

/* Разделы */
.sec { padding: clamp(48px, 6vw, 72px) 0; }
#features { padding-top: clamp(72px, 9vw, 112px); }
.sec h2, .night h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; letter-spacing: -.028em; word-spacing: .05em; max-width: 17ch; }
.sec .text > p { margin-top: 18px; font-size: 18px; color: var(--muted-fg); max-width: 32em; }
.sec .text > p strong { color: var(--fg); font-weight: 500; }
.head { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 64px; align-items: start; margin-bottom: clamp(32px, 5vw, 56px); }
.head p { padding-top: .45em; font-size: 18px; color: var(--muted-fg); max-width: 30em; }
@media (max-width: 900px) { .head { grid-template-columns: 1fr; } }
.split h2 { max-width: none; }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.rev { grid-template-columns: 7fr 5fr; }
.split.rev .text { order: 2; }
@media (max-width: 900px) { .split, .split.rev { grid-template-columns: 1fr; } .split.rev .text { order: 0; } }

.points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; max-width: 30em; }
.points li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.5; }
.points li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.points li span { color: var(--muted-fg); }

.legend { margin-top: 26px; display: flex; gap: 18px; font-size: 14px; color: var(--muted-fg); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }

/* Крупный план: сайдбар и лента в увеличенном масштабе, снизу мягкий обрез. */
.zoom { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--sidebar); box-shadow: var(--shadow); height: clamp(320px, 52vw, 620px); }
.zoom img { width: 100%; height: 100%; object-fit: cover; object-position: left top; -webkit-mask-image: linear-gradient(#000 84%, transparent); mask-image: linear-gradient(#000 84%, transparent); }

/* Кадр, обрезанный снизу мягко — как длинный список, который продолжается. */
.crop { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow); }
.crop.fade img { -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
.panel { display: grid; place-items: center; }
.panel img { width: min(100%, 440px); border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* Телефоны в ряд */
.phones { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.phones figure { margin: 0; }
.phones figcaption { margin-top: 18px; font-size: 15px; line-height: 1.45; color: var(--muted-fg); max-width: 22em; }
.phones figcaption b { display: block; color: var(--fg); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 820px) {
  .phones { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--gutter) 24px; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phones figure { scroll-snap-align: center; }
}

/* Уведомления: баннеры собраны из тех же демо-писем */
.notes { display: grid; gap: 12px; max-width: 420px; justify-self: end; width: 100%; }
.note {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 4px 12px; align-items: start;
  padding: 14px 16px; border-radius: 18px; background: color-mix(in oklab, var(--card) 86%, transparent);
  border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(55, 53, 47, .05), 0 12px 32px -16px rgba(55, 53, 47, .25);
  font-size: 14px; line-height: 1.35;
}
.note img { width: 38px; height: 38px; border-radius: 9px; grid-row: span 3; }
.note b { font-weight: 600; }
.note time { color: var(--muted-fg); font-size: 13px; }
.note p { grid-column: 2 / 4; }
.note .sub { color: var(--muted-fg); grid-column: 2 / 4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note.muted { opacity: .55; }
.note time svg { width: 15px; height: 15px; vertical-align: -3px; }
@media (max-width: 900px) { .notes { justify-self: start; } }

/* Тёмная тема — отдельная полоса во всю ширину */
.night { background: var(--night); color: var(--night-fg); padding: clamp(80px, 11vw, 136px) 0; border-block: 1px solid var(--night-border); margin-block: clamp(24px, 4vw, 48px); }
.night .text > p { color: var(--night-muted); }
.night .head p { color: var(--night-muted); }
.night .window { border-color: var(--night-border); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .85); }
.duo { position: relative; padding-bottom: 16%; }
.duo .window { width: 76%; }
.duo .day { border-color: rgba(255, 255, 255, .12); opacity: .92; }
.duo .dark { position: absolute; right: 0; bottom: 0; background: #20201f; }
@media (max-width: 640px) { .duo { padding-bottom: 30%; } .duo .window { width: 88%; } }

/* «И ещё» — плотный список без карточек */
.more { margin-top: 36px; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 48px; border-top: 1px solid var(--border); }
.more div { padding: 24px 28px 26px 0; border-bottom: 1px solid var(--border); }
.more h3 { font-size: 17px; letter-spacing: -.01em; margin-bottom: 6px; }
.more p { font-size: 15px; color: var(--muted-fg); line-height: 1.5; }
@media (max-width: 900px) { .more { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .more { grid-template-columns: 1fr; } .more div { padding-right: 0; } }

/* Загрузки — список как в настройках приложения */
.dl { margin-top: 48px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); overflow: hidden; }
.dl-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 18px; align-items: center; padding: 20px 24px; border-top: 1px solid var(--border); }
.dl-row:first-child { border-top: 0; }
.dl-row.here { background: color-mix(in oklab, var(--accent) 5%, var(--card)); }
.dl-row .ico { width: 44px; height: 44px; border-radius: 11px; background: var(--muted); display: grid; place-items: center; grid-row: span 2; }
.dl-row .ico svg { width: 24px; height: 24px; fill: currentColor; }
.dl-row h3 { font-size: 18px; letter-spacing: -.015em; }
.dl-row .req { font-size: 14px; color: var(--muted-fg); grid-column: 2; }
.dl-row .act { grid-row: 1 / 3; grid-column: 3; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: center; }
.dl-foot { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted-fg); }
.dl-foot p { max-width: 46em; }
@media (max-width: 640px) {
  .dl-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 16px; }
  .dl-row .ico { display: none; }
  .dl-row .req { grid-column: 1; font-size: 13px; }
  .dl-row .act { grid-row: 1 / 3; grid-column: 2; flex-wrap: nowrap; }
  .dl-row .act .badge-store img { height: 36px; }
}

/* Вопросы */
.faq { margin-top: 40px; border-top: 1px solid var(--border); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 1.5px solid var(--muted-fg); border-bottom: 1.5px solid var(--muted-fg); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq details > div { padding: 0 0 22px; color: var(--muted-fg); font-size: 16px; max-width: 42em; }
.faq details > div p + p { margin-top: 10px; }
.faq a { color: var(--ink); }

/* Финал */
.final { text-align: center; padding: clamp(80px, 12vw, 144px) 0; border-top: 1px solid var(--border); }
.final img.icon { width: 96px; height: 96px; margin: 0 auto 16px; }
.final h2 { font-size: clamp(40px, 7vw, 72px); letter-spacing: -.035em; word-spacing: .08em; line-height: 1; max-width: none; }
.final p { margin: 18px auto 0; max-width: 30em; color: var(--muted-fg); font-size: 18px; }
.final .hero-cta { justify-content: center; }

footer { border-top: 1px solid var(--border); padding: 28px 0 40px; font-size: 14px; color: var(--muted-fg); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-left: auto; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }
@media (max-width: 640px) { footer nav { margin-left: 0; } }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .sec .text > p, .head p, .final p { font-size: 17px; }
  .hero .lede { font-size: 18px; }
}
.dl-row .soon { font-size: 14px; color: var(--muted-fg); padding: 0 4px; }
