/* Лендинг rukeeper.ru.
 *
 * Своих шрифтов нет: системный стек выглядит родным на любом устройстве и
 * ничего не весит. Цвета — из значка приложения: тёплый жёлто-оранжевый щит
 * на сливочном фоне.
 */

:root {
  --bg: #fffaf3;
  --bg-alt: #fff2df;
  --surface: #ffffff;
  --text: #1d1b18;
  --muted: #5e5850;
  --line: #efe2cf;
  --accent-from: #ffc21a;
  --accent-to: #ff8a00;
  --accent-ink: #a85300;
  --on-accent: #2a1600;
  --store-bg: #1d1b18;
  --store-text: #ffffff;
  --shadow: 0 24px 60px -24px rgba(120, 66, 0, 0.35);
  --shadow-soft: 0 10px 30px -18px rgba(120, 66, 0, 0.3);
  --radius: 20px;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15130f;
    --bg-alt: #1c1914;
    --surface: #221f19;
    --text: #f4efe7;
    --muted: #b9b1a5;
    --line: #353027;
    --accent-ink: #ffb547;
    --store-bg: #f4efe7;
    --store-text: #15130f;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    --shadow-soft: 0 10px 30px -18px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent-to);
  outline-offset: 3px;
  border-radius: 8px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.wrap--narrow {
  max-width: 820px;
}

/* --- Шапка --------------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.top__row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.top__nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.top__nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.top__nav a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .top__nav {
    display: none;
  }
  .top__row > .btn {
    margin-left: auto;
  }
}

/* --- Кнопки -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn--small {
  padding: 10px 16px;
  font-size: 15px;
}

.btn--accent {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  box-shadow: 0 8px 20px -10px rgba(255, 138, 0, 0.8);
}

.btn--accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -10px rgba(255, 138, 0, 0.9);
}

.btn__icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stores--center {
  justify-content: center;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 11px 20px 11px 16px;
  border-radius: 14px;
  background: var(--store-bg);
  color: var(--store-text);
  text-decoration: none;
  font-weight: 650;
  font-size: 18px;
  line-height: 1.15;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.store small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.01em;
}

.store__icon {
  flex: none;
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.store__icon--line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store--ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

@media (max-width: 480px) {
  .store {
    flex: 1 1 100%;
  }
}

/* --- Первый экран -------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 12px;
  /* Не «таблетка»: на узком экране строка переносится, и полукруглые края
     двухстрочной плашки выглядят случайными. */
  border-radius: 12px;
  background: var(--bg-alt);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hl {
  background: linear-gradient(120deg, var(--accent-from) 10%, var(--accent-to) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin-top: 22px;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 19px);
}

.hero .stores {
  margin-top: 32px;
}

.hero__web {
  margin-top: 20px;
  color: var(--muted);
  font-size: 16px;
}

.hero__web a {
  font-weight: 600;
}

.hero__note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.hero__art {
  position: relative;
  min-height: 560px;
}

.glow {
  position: absolute;
  inset: 8% 0 0 12%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 186, 40, 0.55), rgba(255, 138, 0, 0.12) 60%, transparent);
  filter: blur(10px);
}

.phone {
  position: absolute;
  margin: 0;
  width: min(270px, 58%);
  border-radius: 34px;
  padding: 9px;
  background: #1d1b18;
  box-shadow: var(--shadow);
}

.phone img {
  border-radius: 26px;
}

.phone--front {
  left: 8%;
  top: 0;
  z-index: 2;
}

.phone--back {
  right: 2%;
  top: 70px;
  transform: rotate(5deg);
  opacity: 0.96;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 36px;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero__art {
    min-height: 0;
    aspect-ratio: 1 / 1.05;
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
  }
}

/* --- Разделы ------------------------------------------------------------- */

.section {
  padding: 88px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__title {
  max-width: 18em;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
}

.section__lead {
  margin-top: 16px;
  max-width: 40em;
  color: var(--muted);
  font-size: 18px;
}

@media (max-width: 720px) {
  .section {
    padding: 64px 0;
  }
}

/* Возможности */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 44px;
}

.feature {
  padding: 26px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.feature__icon,
.mode__icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  color: var(--on-accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  margin-top: 18px;
  font-size: 19px;
  font-weight: 700;
}

.feature p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15.5px;
}

/* Режимы заметок */

.modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 40px;
}

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

.mode {
  padding: 28px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.mode--e2ee {
  border-color: color-mix(in srgb, var(--accent-to) 55%, var(--line));
  box-shadow: var(--shadow-soft);
}

.mode__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mode h3 {
  font-size: 21px;
  font-weight: 700;
}

.mode p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15.5px;
}

/* Планшет и веб-версия */

.tablet {
  margin: 44px 0 0;
  padding: 10px;
  border-radius: 28px;
  background: #1d1b18;
  box-shadow: var(--shadow);
}

.tablet img {
  width: 100%;
  border-radius: 20px;
}

.web {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 36px;
  padding: 30px 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.web h3 {
  font-size: 22px;
  font-weight: 700;
}

.web p {
  margin-top: 8px;
  max-width: 40em;
  color: var(--muted);
}

@media (max-width: 720px) {
  .web {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 22px;
  }
  .web .btn {
    white-space: normal;
  }
}

/* Вопросы */

.faq {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 20px 44px 20px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  font-size: 18px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}

.faq details p {
  padding: 0 44px 22px 0;
  color: var(--muted);
}

/* Последний призыв */

.cta__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.cta__box img {
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.cta__box h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
}

/* --- Подвал -------------------------------------------------------------- */

.foot {
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.foot__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

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

.foot__links a:hover {
  color: var(--text);
}

.foot__dev {
  margin-left: auto;
}

@media (max-width: 720px) {
  .foot__dev {
    margin-left: 0;
  }
}
