/* ------------------------------------------------------------------
   save-flow — design tokens (light theme, per brand reference)
   Logo gradient: bright blue -> violet -> magenta. Used for the
   accent text, the primary button and subtle hero background tint.
------------------------------------------------------------------ */
:root {
  --blue: #2f7dfb;
  --violet: #7c3aed;
  --magenta: #a726d1;
  --grad-accent: linear-gradient(100deg, var(--blue) 0%, var(--violet) 60%, var(--magenta) 100%);

  --ink: #0d0f1a;
  --ink-soft: #5b5d70;
  --ink-faint: #9a9cb0;
  --bg: #ffffff;
  --bg-hero-start: #ffffff;
  --bg-hero-end: #eeecfb;
  --surface: #ffffff;
  --surface-muted: #f7f6fc;
  --border: #e7e5f2;
  --border-strong: #d6d3ea;
  --danger: #d64545;
  --danger-bg: #fdecec;

  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: "Manrope", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --shadow-card: 0 1px 2px rgba(13, 15, 26, 0.04), 0 10px 30px -14px rgba(13, 15, 26, 0.14);
  --shadow-search: 0 24px 50px -20px rgba(90, 50, 200, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.brand-mark { flex-shrink: 0; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-dash { color: var(--violet); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.header-nav > a {
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
  margin-right: 22px;
}

.header-nav > a:hover { color: var(--ink); }

/* ---------------- language switch ---------------- */

.lang-switch { position: relative; }

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

.lang-switch-btn:hover { background: var(--surface-muted); }

.lang-switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.lang-switch-menu.open { display: flex; }

.lang-switch-item {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}

.lang-switch-item:hover { background: var(--surface-muted); color: var(--ink); }
.lang-switch-item.active { color: var(--violet); font-weight: 700; }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg-hero-start) 0%, var(--bg-hero-end) 100%);
  padding: 56px 24px 48px;
  text-align: center;
}

.hero-deco {
  position: absolute;
  top: -60px;
  right: -120px;
  width: 620px;
  height: 620px;
  opacity: 0.07;
  transform: rotate(12deg);
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 5.4vw, 48px);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.hero-title-accent {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 16.5px;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.55;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 8px 6px 20px;
  box-shadow: var(--shadow-search);
  max-width: 660px;
  margin: 0 auto;
}

.search-bar-icon {
  flex-shrink: 0;
  color: var(--ink-faint);
}

#url-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15.5px;
  color: var(--ink);
  padding: 12px 6px;
}

#url-input::placeholder { color: #a6a4bd; }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  white-space: nowrap;
  padding: 12px 22px;
  background: var(--grad-accent);
  color: #fff;
}

.btn-download:hover { filter: brightness(1.06); }
.btn-download:active { transform: scale(0.98); }
.btn-download[disabled] { cursor: default; opacity: 0.85; }

.btn-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

#submit-btn.loading .btn-label,
#submit-btn.loading .btn-download-icon { opacity: 0.75; }
#submit-btn.loading .btn-spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

.lang-switch-btn:focus-visible,
#url-input:focus-visible,
.btn-download:focus-visible,
.quality-chip select:focus-visible,
.download-link:focus-visible,
.header-nav > a:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.quality-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.quality-chip select {
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
}

.hero-hint {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ---------------- status / result (inside hero) ---------------- */

.status {
  margin-top: 24px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(214, 69, 69, 0.18);
  text-align: left;
}

.result {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.result-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 4px;
  line-height: 1.35;
}

.result-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.result-meta a { color: var(--violet); text-decoration: none; }
.result-meta a:hover { text-decoration: underline; }

.media-block {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0e1014;
  margin-bottom: 12px;
}

.media-block video { display: block; width: 100%; max-height: 70vh; background: #000; }
.media-block img { display: block; width: 100%; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.photo-grid figure {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0e1014;
}

.photo-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.download-row { display: flex; flex-wrap: wrap; gap: 8px; }

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--grad-accent);
  color: #fff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
}
.download-link:hover { filter: brightness(1.06); }

.download-link.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
.download-link.secondary:hover { background: var(--surface-muted); }

.description-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--ink-soft);
  white-space: pre-wrap;
  line-height: 1.5;
}

/* ---------------- bot links ---------------- */

.bot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.bot-links-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
  margin-right: 2px;
}

.bot-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bot-link:hover {
  background: var(--surface-muted);
}

.bot-link--telegram {
  color: #229ed9;
  border-color: rgba(34, 158, 217, 0.35);
}
.bot-link--telegram:hover {
  background: rgba(34, 158, 217, 0.08);
}

.bot-link--max {
  color: var(--violet);
  border-color: rgba(124, 58, 237, 0.3);
}
.bot-link--max:hover {
  background: rgba(124, 58, 237, 0.08);
}

/* ---------------- services row ---------------- */

.services-label {
  margin: 40px 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
}

.services-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.service-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
}

.service-icon--instagram { background: linear-gradient(135deg, #f5a623, #e1306c 45%, #7742d6 100%); }
.service-icon--tiktok { background: #0d0f1a; }
.service-icon--youtube { background: #ff2d2d; }
.service-icon--facebook { background: #1877f2; }
.service-icon--snapchat { background: #fffc00; }
.service-icon--vk { background: #4a76a8; }
.service-icon--pinterest { background: #e60023; }

/* ---------------- features panel ---------------- */

.features-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1 1 210px;
  min-width: 210px;
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feature-icon--bolt { background: #f1eaff; color: var(--violet); }
.feature-icon--shield { background: #e6f4ff; color: var(--blue); }
.feature-icon--device { background: #e8fbf0; color: #1fa971; }
.feature-icon--quality { background: #fdeefb; color: var(--magenta); }

.feature-title {
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 2px;
}

.feature-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ---------------- content sections (how it works / faq) ---------------- */

.content {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 24px 24px;
}

.how-it-works { margin-bottom: 56px; }

.how-it-works h2,
.faq h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 28px;
  text-align: center;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.step {
  background: var(--surface-muted);
  border-radius: var(--radius);
  padding: 22px;
  flex: 1 1 240px;
  min-width: 240px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad-accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.step-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.faq { max-width: 700px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 4px 18px;
  margin-bottom: 10px;
}

.faq-item summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  font-size: 14.5px;
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--ink-faint);
  font-weight: 400;
  font-size: 18px;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item p {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------------- footer ---------------- */

.foot {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 44px;
  font-size: 12.5px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.foot .dot { color: var(--border-strong); }

/* ---------------- responsive ---------------- */

@media (max-width: 860px) {
  .feature-item { flex-basis: 45%; }
}

@media (max-width: 640px) {
  .header-nav { gap: 14px; }
  .header-nav > a { display: none; }
  .search-bar {
    flex-wrap: wrap;
    border-radius: var(--radius-lg);
    padding: 12px;
  }
  .search-bar-icon { display: none; }
  #url-input { flex-basis: 100%; padding: 8px 4px; }
  .btn-download { flex: 1; justify-content: center; }
  .hero { padding: 40px 16px 36px; }
  .hero-deco { width: 380px; height: 380px; top: -40px; right: -140px; }
  .services-row { gap: 18px; }
  .service-icon { width: 46px; height: 46px; }
  .features-panel { padding: 20px; }
  .feature-item { flex-basis: 100%; }
}
