/* ============================================================
   Маяк VPN — лендинг (первый черновик)
   Бренд: navy #14213D / #1A2E5A, голубой #4FC3F7, красный #E63946,
   крем #FFFDF7. Мобайл-фёрст, без внешних зависимостей.
   ============================================================ */

:root {
  --navy: #14213D;
  --navy-2: #1A2E5A;
  --blue: #4FC3F7;
  --blue-deep: #176d96;       /* затемнённый голубой: текст/ссылки ≥4.5:1 (WCAG AA) */
  --red: #E63946;
  --cream: #FFFDF7;
  --ink: #14213D;
  --ink-soft: #41506e;
  --line: #e4e2da;
  --white: #ffffff;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(20, 33, 61, .10);
  --shadow-sm: 0 4px 14px rgba(20, 33, 61, .08);

  --maxw: 1120px;
  --space: clamp(3rem, 8vw, 6rem);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "PT Sans", "Noto Sans", sans-serif;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: clamp(1rem, .96rem + .3vw, 1.08rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { line-height: 1.15; color: var(--navy); margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 3.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); }
h3 { font-size: 1.18rem; }
p  { margin: 0 0 1rem; }

a { color: var(--blue-deep); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}
.container-narrow { max-width: 760px; }

/* ---------- skip link / a11y ---------- */
.skip-link {
  position: absolute;
  left: 8px; top: -60px;
  background: var(--navy);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 2px;
  border-radius: 4px;
}
/* у круглых кнопок убираем «срез» углов фокус-рамкой */
.btn:focus-visible { border-radius: 999px; }
/* на тёмных секциях фокус-рамку делаем светлой для контраста ≥3:1 */
.section-cta a:focus-visible,
.attribution-card a:focus-visible,
.site-footer a:focus-visible { outline-color: var(--blue); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  --btn-bg: var(--navy);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: .7rem 1.4rem;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(230, 57, 70, .28);
}
.btn-primary:hover { background: #cf2f3c; }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: rgba(20, 33, 61, .25);
}
.btn-ghost:hover { border-color: var(--navy); background: rgba(20,33,61,.04); }

.btn-lg { padding: .95rem 1.9rem; font-size: 1.06rem; }
.btn-sm { padding: .5rem 1.05rem; font-size: .94rem; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 247, .9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 800;
}
.brand-logo { width: 40px; height: 40px; }
.brand-name { font-size: 1.2rem; letter-spacing: -.01em; }

.site-nav { display: flex; align-items: center; }

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: .98rem;
}
.nav-menu a:not(.btn):hover { color: var(--blue-deep); }
.nav-cta .btn { color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(79,195,247,.18), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--cream) 100%);
  padding-block: clamp(2.5rem, 6vw, 5rem) var(--space);
}
.hero-inner {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-deep);
  background: rgba(79,195,247,.14);
  padding: .35rem .8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 1rem + .5vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 56ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin: 1.6rem 0 1rem;
}
.hero-note {
  font-size: .92rem;
  color: var(--ink-soft);
  margin: 0;
}
.hero-note-login { margin-top: .5rem; }

/* hero trust strip — снимает сомнения рядом с CTA */
.hero-trust {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.3rem;
}
.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .94rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.hero-trust-ico {
  display: inline-grid;
  place-items: center;
  width: 1.25rem; height: 1.25rem;
  flex: none;
  color: #fff;
  background: var(--blue-deep);
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 800;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
}
.hero-logo {
  width: clamp(200px, 40vw, 320px);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(20,33,61,.22));
  position: relative;
  z-index: 1;
}
.hero-glow {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(79,195,247,.35), transparent 65%);
  border-radius: 50%;
  filter: blur(10px);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding-block: var(--space); }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }

.section-head { max-width: 60ch; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.section-lead { color: var(--ink-soft); font-size: 1.1rem; margin: 0; }

/* ---------- value prop cards ---------- */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(79,195,247,.55);
}
.card-icon {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  font-size: 1.6rem;
  background: rgba(79,195,247,.14);
  border-radius: 14px;
  margin-bottom: .9rem;
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-soft); margin: 0; }

/* ---------- how it works ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.4rem;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  background: var(--navy);
  border-radius: 50%;
  margin-bottom: .9rem;
}
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--ink-soft); margin: 0; }

/* ---------- security / trust ---------- */
.security-grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
}
.trust-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 1rem; }
.trust-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--ink-soft);
}
.trust-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  color: #fff;
  background: var(--blue-deep);
  width: 1.4rem; height: 1.4rem;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: .85rem;
  font-weight: 700;
}
.trust-list strong { color: var(--navy); }

.attribution-card {
  background: var(--navy);
  color: #d9e2f2;
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow);
}
.attribution-card h3 { color: var(--blue); margin-bottom: .6rem; }
.attribution-card p { color: #d9e2f2; }
.attribution-card strong { color: #fff; }
.fineprint { font-size: .85rem; color: #9fb0cc; margin: 0; }

/* ---------- download / CTA ---------- */
.section-cta {
  background:
    radial-gradient(900px 400px at 50% 120%, rgba(79,195,247,.20), transparent 60%),
    var(--navy);
  color: #eaf1fb;
  text-align: center;
}
.section-cta h2 { color: #fff; }
.section-cta .section-lead { color: #c5d2ea; }
.download-inner { max-width: 720px; margin-inline: auto; }
.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .8rem;
  margin: 1.6rem 0 1rem;
}
.store-soon {
  display: inline-flex;
  align-items: center;
  padding: .8rem 1.3rem;
  border-radius: 999px;
  border: 1px dashed rgba(255,255,255,.4);
  color: #b9c7e2;
  font-weight: 600;
  font-size: .95rem;
}
.download-hint { color: #c5d2ea; font-size: .95rem; margin: 0; }
.download-register { color: #c5d2ea; font-size: .98rem; margin: 1rem 0 0; }
.download-register a { color: var(--blue); font-weight: 700; }

/* placeholder marker */
.placeholder-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(230,57,70,.1);
  border: 1px dashed rgba(230,57,70,.5);
  border-radius: 6px;
  padding: .05rem .45rem;
  margin-left: .25rem;
  vertical-align: middle;
}
.section-cta .placeholder-tag { color: #ffd2d6; background: rgba(230,57,70,.25); border-color: rgba(255,255,255,.35); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .8rem; }
.faq-item {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 1.2rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--blue-deep);
  transition: transform .2s ease;
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 1.2rem 1.1rem; }
.faq-body p { color: var(--ink-soft); margin: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0f1830;
  color: #b9c7e2;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.footer-inner {
  display: grid;
  gap: 2rem;
}
.footer-brand { display: flex; align-items: center; gap: .8rem; }
.footer-name { color: #fff; font-weight: 800; margin: 0; font-size: 1.1rem; }
.footer-tag { margin: 0; font-size: .9rem; color: #8d9cbb; }

.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-nav a { color: #c5d2ea; text-decoration: none; font-weight: 600; }
.footer-nav a:hover { color: var(--blue); text-decoration: underline; }

.footer-meta p { margin: 0 0 .35rem; font-size: .88rem; }
.footer-lang { color: #8d9cbb; }
.footer-attr { color: #7a8aac; font-size: .8rem; max-width: 40ch; }

/* ============================================================
   SCROLL REVEAL (progressive enhancement)
   Скрываем только если JS активен И движение разрешено
   (класс .js-reveal ставит main.js). Без JS / при reduced-motion
   контент виден сразу — деградация безопасная.
   ============================================================ */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
  will-change: opacity, transform;
}
.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { grid-template-columns: 1.1fr .9fr; }
  .security-grid { grid-template-columns: 1.3fr .7fr; }
  .footer-inner {
    grid-template-columns: 1.2fr 1fr 1.3fr;
    align-items: start;
  }
}

/* ---------- mobile nav ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: .5rem 1.1rem 1.1rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .18s ease, opacity .18s ease;
  }
  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-menu li { padding: .25rem 0; border-bottom: 1px solid var(--line); }
  .nav-menu li:last-child { border-bottom: 0; padding-top: .8rem; }
  .nav-menu a:not(.btn) { display: block; padding: .6rem .2rem; }
  .nav-cta .btn { width: 100%; }
}

/* dark theme polish (optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #0e1626;
    --white: #131f36;
    --ink: #e7edf7;
    --ink-soft: #a9b6d0;
    --line: #243352;
    --navy: #cfe6fb;       /* headings become light on dark */
    --blue-deep: #7ad1fb; /* ссылки/фокус светлеют на тёмном фоне (AA) */
  }
  body { background: #0e1626; }
  .site-header { background: rgba(14,22,38,.88); }
  .brand, .brand-name, .nav-menu a:not(.btn) { color: #e7edf7; }
  .nav-toggle-bar { background: #e7edf7; }
  .hero {
    background:
      radial-gradient(1200px 600px at 80% -10%, rgba(79,195,247,.16), transparent 60%),
      linear-gradient(180deg, #121d33 0%, #0e1626 100%);
  }
  .btn-ghost { color: #e7edf7; border-color: rgba(231,237,247,.3); }
  .step { background: #0f1830; }
  .faq-item, .step, .card { background: var(--white); }
  .attribution-card { background: #0b1428; }
  .skip-link { background: var(--blue-deep); }
}
