:root {
  --fg: #1a2744;
  --fg-soft: #2c3d5c;
  --muted: #5a6b86;
  --border: rgba(255, 255, 255, 0.55);
  --glass: rgba(255, 255, 255, 0.42);
  --glass-strong: rgba(255, 255, 255, 0.62);
  --ring: #2f6fed;
  --ring-soft: rgba(47, 111, 237, 0.18);
  --danger: #c62828;
  --pay: #ff6a00;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --radius: 24px;
  --radius-sm: 16px;
  --pad: clamp(20px, 4vw, 40px);
  --max: 1080px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --nav-h: 64px;
  --nav-gap: 12px;
  --nav-clearance: calc(var(--safe-top) + var(--nav-gap) + var(--nav-h) + 16px);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-clearance);
}

body {
  font-family: var(--font-body);
  color: var(--fg);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  padding-bottom: max(32px, var(--safe-bottom));
  background:
    linear-gradient(180deg, rgba(232, 242, 255, 0.55) 0%, rgba(210, 228, 248, 0.35) 40%, rgba(186, 210, 240, 0.55) 100%),
    url("../assets/hero-bg.jpg") center top / cover fixed no-repeat,
    #c5d8ef;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; }

.shell { width: min(100% - 32px, var(--max)); margin-inline: auto; }

.glass {
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border-radius: var(--radius);
  box-shadow:
    0 18px 50px rgba(26, 55, 100, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* —— Nav —— */
.nav {
  position: sticky;
  top: max(var(--nav-gap), var(--safe-top));
  z-index: 30;
  margin: max(var(--nav-gap), var(--safe-top)) auto 0;
  width: min(100% - 32px, var(--max));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 10px 12px;
  transform: translateZ(0);
  isolation: isolate;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  min-width: 0;
}
.brand img { width: 36px; height: 36px; flex-shrink: 0; }
.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.nav-links a:not(.btn) {
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 999px;
}
.nav-links a:not(.btn):hover,
.nav-links a:not(.btn):focus-visible {
  color: var(--fg);
  outline: none;
}

@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid #8fb0f7; outline-offset: 3px; }
.btn-primary {
  background: var(--ring);
  color: #f8fafc;
  box-shadow: 0 10px 28px rgba(47, 111, 237, 0.35);
}
.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.35);
  color: var(--fg);
}
.btn-pay {
  background: var(--pay);
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 106, 0, 0.35);
}
.btn-sm {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 12px;
}
.btn[aria-disabled="true"] {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

/* —— Hero —— */
.hero {
  padding: clamp(28px, 5vw, 56px) 0 clamp(36px, 6vw, 64px);
}
.hero-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
}
.hero-copy { display: grid; gap: 16px; align-content: start; min-width: 0; }
.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--fg);
}
.hero .lede {
  color: var(--fg-soft);
  font-size: clamp(16px, 2vw, 18px);
  max-width: 38ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--fg-soft);
}
.chip-live {
  background: var(--ring-soft);
  border-color: rgba(47, 111, 237, 0.28);
  color: #1e4fbf;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
}

/* iPhone frame (как на notflakyapps-web) */
.device {
  --rim: 7px;
  --screen-radius: 30px;
  position: relative;
  width: min(100%, 260px);
  padding: var(--rim);
  border-radius: 38px;
  background: linear-gradient(145deg, #8b9099 0%, #3a3e45 18%, #1b1e23 48%, #2f333a 72%, #7c828b 100%);
  box-shadow:
    0 26px 54px rgba(20, 45, 90, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.device img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 470 / 1024;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--screen-radius);
  background: #0d0f12;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7);
}
.device::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: calc(var(--rim) + 1.1%);
  left: 50%;
  transform: translateX(-50%);
  width: 27%;
  aspect-ratio: 125 / 36.7;
  border-radius: 999px;
  background: #06070a;
}
.device::after {
  content: "";
  position: absolute;
  inset: var(--rim);
  border-radius: var(--screen-radius);
  pointer-events: none;
  background: linear-gradient(202deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 32%);
  mix-blend-mode: screen;
}
.device-buttons { position: absolute; inset: 0; pointer-events: none; }
.device-buttons::before,
.device-buttons::after {
  content: "";
  position: absolute;
  width: 3px;
  border-radius: 3px;
}
.device-buttons::before {
  left: -2px;
  top: 15%;
  height: 26px;
  background: linear-gradient(90deg, #a2a8b0, #545961);
  box-shadow: 0 42px 0 0 #878d95, 0 84px 0 0 #878d95;
}
.device-buttons::after {
  right: -2px;
  top: 24%;
  height: 34px;
  background: linear-gradient(270deg, #a2a8b0, #545961);
  box-shadow: 0 80px 0 0 #878d95;
}

.device-hero {
  animation: float-phone 5.5s ease-in-out infinite;
  filter: drop-shadow(0 28px 40px rgba(20, 45, 90, 0.28));
}
@keyframes float-phone {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 860px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .device-hero { width: min(56%, 220px); }
}

/* —— Sections —— */
section { padding: clamp(28px, 5vw, 52px) 0; }
section[id] { scroll-margin-top: var(--nav-clearance); }

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: clamp(18px, 3vw, 28px);
  max-width: 48ch;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.section-head p { color: var(--muted); font-size: 16px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.step {
  padding: 22px 20px;
  display: grid;
  gap: 10px;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  background: var(--ring-soft);
  color: #1e4fbf;
}
.step h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.step p { color: var(--muted); font-size: 14px; }

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

/* —— Pay —— */
.pay-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  align-items: start;
}
.pay-card, .checklist-card {
  padding: clamp(22px, 3vw, 28px);
  display: grid;
  gap: 16px;
  align-content: start;
}
.price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.price {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 4px;
}
.price-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}
.price-hint {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.pay-note { color: var(--muted); font-size: 14px; }
.pay-card > .btn {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 22px;
  white-space: nowrap;
}
.checklist { display: grid; gap: 12px; }
.checklist li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
  color: var(--fg-soft);
}
.check {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--ring-soft);
  color: #1e4fbf;
  font-size: 14px;
  font-weight: 700;
}

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

/* —— Platforms —— */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.platform {
  padding: 20px 18px;
  display: grid;
  gap: 12px;
  min-height: 160px;
  align-content: space-between;
}
.platform h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}
.platform p { color: var(--muted); font-size: 13px; }
.platform .btn { width: 100%; }

/* —— Install guides —— */
.guides { display: grid; gap: 14px; }
.guide {
  padding: clamp(20px, 3vw, 26px);
  display: grid;
  gap: 14px;
}
.guide-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.guide h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
.guide ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
  color: var(--fg-soft);
  font-size: 14px;
}
.guide ol li::marker { color: var(--ring); font-weight: 700; }

/* —— Shots —— */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 28px);
  align-items: start;
}
.shot {
  display: grid;
  gap: 14px;
  justify-items: center;
  align-content: start;
}
.shot .device {
  width: min(100%, 240px);
}
.shot:hover .device,
.shot:focus-within .device {
  transform: translateY(-6px);
  box-shadow:
    0 34px 66px rgba(20, 45, 90, 0.4),
    0 2px 0 rgba(255, 255, 255, 0.12) inset,
    0 0 0 1px rgba(0, 0, 0, 0.5);
}
.shot figcaption {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 4px;
}

@media (max-width: 760px) {
  .shots { grid-template-columns: 1fr; max-width: 260px; margin-inline: auto; }
}

/* —— Support —— */
.support-card {
  padding: clamp(22px, 3vw, 28px);
  display: grid;
  gap: 16px;
  align-content: start;
  justify-items: start;
}
.support-card p {
  color: var(--fg-soft);
  font-size: 16px;
  margin: 0;
}
.support-card a[data-link="support"]:not(.btn) {
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* —— Footer —— */
.footer {
  margin-top: 12px;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-links a:hover { color: var(--fg); }

/* —— Motion —— */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .device-hero { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
