/* Vangogio landing — shared across all locales.
 *
 * Dark navy base + warm yellow accent (matches favicon.svg on the app
 * side). No framework — a single stylesheet keeps the landing ~25 KB
 * compressed and avoids a build step. Variables live at :root so each
 * locale's index.html can override `html[lang]` if needed later.
 */
:root {
  --bg: #0b0b14;
  --bg-elev: #11111c;
  --bg-card: #161626;
  --border: #2a2a40;
  --ink: #e6e6f0;
  --ink-dim: #a0a0b4;
  --ink-faint: #666680;
  --accent: #eabe64;
  --accent-dim: #b8924a;
  --brand: #4a7dff;
  --brand-soft: rgba(74, 125, 255, 0.18);
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

/* Dark color-scheme: tells the browser to render native UI (scrollbars,
 * form controls, autofill bg) using the dark palette, and stops Mobile
 * Chrome / Safari from briefly flashing white before our paint. Mirrors
 * `<meta name="color-scheme" content="dark">` in each locale html. */
html { color-scheme: dark; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #f3d48c; }

img, svg { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Top nav --- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 11, 20, 0.85);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; gap: 20px;
  height: 56px; padding: 0 24px;
  max-width: 1100px; margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--ink);
}
.brand svg { width: 24px; height: 24px; }
.nav-links {
  display: flex; gap: 20px; margin-left: auto;
  font-size: 14px; color: var(--ink-dim);
}
.nav-links a { color: var(--ink-dim); }
.nav-links a:hover { color: var(--ink); }
.lang-links {
  display: flex; gap: 8px; font-size: 12px; color: var(--ink-faint);
}
.lang-links a {
  color: var(--ink-faint); padding: 4px 8px; border-radius: 4px;
}
.lang-links a[aria-current="true"] {
  background: var(--brand-soft); color: var(--ink);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: transform 0.1s, background 0.1s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent); color: #1a1a2a; border: 1px solid var(--accent);
}
.btn-primary:hover { background: #f3d48c; color: #1a1a2a; }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-elev); }

/* --- Hero --- */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 800px 400px at 50% -10%, rgba(74, 125, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 600px 300px at 80% 30%, rgba(234, 190, 100, 0.12), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; }
.hero h1 {
  font-size: clamp(32px, 5.5vw, 56px); line-height: 1.1;
  margin: 0 0 20px; letter-spacing: -0.02em; font-weight: 700;
}
.hero h1 .accent { color: var(--accent); }
.hero .tagline {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--ink-dim); max-width: 640px;
  margin: 0 auto 32px;
}
.hero .cta-row {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero .trust {
  display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-faint);
}
.trust-item { display: inline-flex; gap: 6px; align-items: center; }
.trust-item .check { color: #6ecc8a; font-weight: 700; }

/* --- Hero pitch rotator --- */
/* Rotating value-prop carousel. Holds a min-height tall enough for
 * the longest pitch so the CTA row underneath doesn't reflow when
 * slides change. The fade between slides is a 180ms opacity dip on
 * `.hero-pitch` — slow enough to be readable mid-transition. */
.hero-rotator {
  position: relative;
  margin: 0 auto 32px;
  max-width: 760px;
  min-height: clamp(360px, 48vh, 460px);
  user-select: none;
  /* padding pushes the pitch content INSIDE the rotator's row so the
   * absolutely-positioned arrows can sit ALONGSIDE the text on
   * narrow viewports instead of overlapping it. */
  padding: 0 16px;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px; /* explicit half-height vertical centre — translate-Y
                       gets reset by some old buttons-reset CSS in landing */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 22, 38, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  z-index: 2;
  padding: 0;
}
.hero-arrow:hover {
  background: rgba(34, 34, 56, 0.95);
  color: var(--ink);
  border-color: var(--accent-dim);
}
.hero-arrow-prev { left: 0; }
.hero-arrow-next { right: 0; }
/* On md+ viewports float the arrows OUTSIDE the rotator gutter so
 * the slide gets the full ~760px reading width. */
@media (min-width: 760px) {
  .hero-rotator { padding: 0; }
  .hero-arrow-prev { left: -56px; }
  .hero-arrow-next { right: -56px; }
}
/* On tiny screens the arrows would crowd the slide; the carousel
 * is still navigable by tap+swipe. */
@media (max-width: 480px) {
  .hero-arrow { display: none; }
}

/* Two-layer stack: placeholder pre-fills with the longest pitch +
 * stays invisible, visible pitch overlays in the same grid cell.
 * Grid auto-sizes to the larger child so the cell never shrinks
 * when the visible pitch switches to a shorter slide. The CTA row
 * below the rotator stops jumping. */
.hero-pitch-stack {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}
.hero-pitch-placeholder,
.hero-pitch-visible {
  grid-column: 1;
  grid-row: 1;
}
.hero-pitch-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.hero-pitch {
  text-align: center;
  transition: opacity 180ms ease-out;
}
.hero-pitch.fading { opacity: 0; }
.hero-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-headline {
  display: block;
  margin: 0 auto 24px;
  font-size: clamp(32px, 5.5vw, 56px);
  /* 1.08 was too tight: Cyrillic glyphs sit lower than Latin, so the line
     box clipped the bottoms of «Ближе/чем» (Latin "Notion/Comfy UI" were
     fine). 1.18 gives the descenders room. */
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 720px;
}
/* Gradient-clipped sub-line. The `-webkit-text-fill-color: transparent`
 * fallback is required on Safari + older Chrome for the
 * `background-clip: text` trick to actually show the gradient. Without
 * it the text rendered solid white on the user's first preview.
 * The gradient sweeps yellow→soft-yellow→brand-orange (warm-only —
 * the previous version ended in `--brand` which is blue and looked
 * jarring against the warm accent start). */
.hero-sub {
  display: block;
  margin-top: 4px;
  /* `background-clip: text` clips the gradient to the glyph box, which cuts
     Cyrillic descenders at the bottom. padding-bottom enlarges the clip
     region so they render fully. */
  padding-bottom: 0.12em;
  background: linear-gradient(90deg, #eabe64 0%, #f3d48c 45%, #d28a35 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-text {
  margin: 0 auto;
  max-width: 600px;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.55;
  color: var(--ink-dim);
}

/* Dot indicators below the slide. Active dot is a wide pill; others
 * are 7px circles. `appearance: none` strips the native button
 * rendering — Chrome on dark `color-scheme: dark` was drawing a
 * native button frame around each dot, which made them look like
 * "stretched pills" stuck together (user screenshot 2026-05-20). */
.hero-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 28px;
  padding: 6px 0;
  flex-wrap: wrap;
}
.hero-dot {
  -webkit-appearance: none;
  appearance: none;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: width 0.18s ease-out, background 0.12s;
}
.hero-dot.active {
  width: 26px;
  background: var(--accent);
}
.hero-dot:hover:not(.active) { background: var(--ink-faint); }

/* --- Sections --- */
section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}
section h2 {
  font-size: clamp(24px, 3.5vw, 36px);
  margin: 0 0 12px; letter-spacing: -0.01em; font-weight: 700;
}
section .section-lead {
  color: var(--ink-dim); max-width: 680px;
  margin: 0 0 48px; font-size: 17px;
}

/* --- Features --- */
.features-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.feature {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature .icon {
  font-size: 28px; margin-bottom: 12px;
  display: inline-flex; width: 48px; height: 48px;
  align-items: center; justify-content: center;
  border-radius: 10px; background: var(--brand-soft);
}
.feature h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.feature p { margin: 0; color: var(--ink-dim); font-size: 14px; line-height: 1.6; }

/* --- Screenshots carousel --- */
.carousel { position: relative; max-width: 920px; margin: 0 auto; }
.carousel-track { position: relative; }
.cslide {
  display: none; margin: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.cslide.is-active { display: block; animation: cfade 0.4s ease; }
@keyframes cfade { from { opacity: 0.25; } to { opacity: 1; } }
.cslide img {
  width: 100%; aspect-ratio: 16/10; object-fit: contain; display: block;
  background: linear-gradient(135deg, #1a1a2e, #252540);
  cursor: zoom-in;
}
.cslide .caption {
  padding: 12px 16px; font-size: 13px; color: var(--ink-dim);
  border-top: 1px solid var(--border);
}
.cslide .caption strong { color: var(--ink); display: block; margin-bottom: 2px; }
.carousel-nav {
  position: absolute; top: 38%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(20, 20, 30, 0.7);
  color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: border-color 0.15s, background 0.15s;
}
.carousel-nav:hover { border-color: var(--brand); background: rgba(20, 20, 30, 0.92); }
.carousel-nav.prev { left: 10px; }
.carousel-nav.next { right: 10px; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.carousel-dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 50%; cursor: pointer;
  border: none; background: var(--border); transition: background 0.15s, transform 0.15s;
}
.carousel-dots button.is-active { background: var(--brand); transform: scale(1.3); }

/* --- Examples (tutorial videos) --- */
.examples {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.example {
  margin: 0; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.example video { width: 100%; aspect-ratio: 16/9; display: block; background: #000; }
/* The inline .qual is a data carrier (base + per-quality buttons) read by
   lightbox.js; the real quality toggle is rendered inside the modal. */
.example .qual { display: none; }
.lightbox-stage { position: relative; }
.lightbox-qual {
  position: absolute; top: 10px; left: 10px; z-index: 5;
  display: flex; gap: 2px; padding: 2px;
  background: rgba(0, 0, 0, 0.6); border-radius: 6px;
}
.lightbox-qual button {
  background: transparent; border: 0; color: #cbd5e1;
  font: 600 12px/1 system-ui, sans-serif; padding: 5px 9px;
  border-radius: 4px; cursor: pointer;
}
.lightbox-qual button.on { background: #eabe64; color: #1a1a2a; }
/* Inline demo players are click-to-open thumbnails (controls stripped by
   lightbox.js); the real playback happens in the modal. */
.video-thumb { position: relative; cursor: pointer; display: block; }
.video-thumb video { pointer-events: none; }
.play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(12, 12, 18, 0.62); border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff; font-size: 22px; padding-left: 4px; pointer-events: none;
  transition: background 0.15s, transform 0.15s;
}
.video-thumb:hover .play-badge { background: var(--brand); transform: translate(-50%, -50%) scale(1.08); }
.example .caption {
  padding: 12px 16px; font-size: 13px; color: var(--ink-dim);
  border-top: 1px solid var(--border);
}
.example .caption strong { color: var(--ink); display: block; margin-bottom: 2px; }

/* --- Lightbox / modal (click a screenshot or demo video to enlarge) --- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: none; place-items: center;
  background: rgba(8, 8, 12, 0.92);
  padding: 32px; cursor: zoom-out;
  opacity: 0; transition: opacity 0.18s ease;
}
.lightbox.is-open { display: grid; opacity: 1; }
.lightbox-stage {
  display: grid; place-items: center;
  max-width: min(1280px, 100%); max-height: 100%; cursor: auto;
}
.lightbox-stage img,
.lightbox-stage video {
  max-width: 100%; max-height: 86vh; width: auto; height: auto;
  border-radius: var(--radius); box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  background: #000;
}
.lightbox-close {
  position: absolute; top: 18px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(20, 20, 30, 0.8);
  color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.lightbox-close:hover { border-color: var(--brand); }

/* --- Pricing --- */
.pricing-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.plan {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.plan.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
  position: relative;
}
.plan.featured::before {
  content: attr(data-badge);
  position: absolute; top: -12px; left: 24px;
  padding: 4px 10px; border-radius: 12px;
  background: var(--accent); color: #1a1a2a;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.plan h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.plan .plan-price {
  font-size: 32px; font-weight: 700; margin: 12px 0 4px;
}
.plan .plan-price small {
  font-size: 14px; color: var(--ink-faint); font-weight: 400;
}
.plan .plan-sub { color: var(--ink-dim); font-size: 13px; margin-bottom: 20px; }
.plan ul {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: grid; gap: 8px;
}
.plan li {
  font-size: 14px; color: var(--ink); padding-left: 22px; position: relative;
}
.plan li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: #6ecc8a; font-weight: 700;
}
.plan .btn { width: 100%; }

/* --- FAQ --- */
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0; margin-bottom: 12px; background: var(--bg-card);
  overflow: hidden;
}
.faq summary {
  padding: 16px 20px; cursor: pointer;
  font-weight: 500; font-size: 15px;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 22px; color: var(--ink-dim);
  transition: transform 0.15s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .answer {
  padding: 16px 20px; color: var(--ink-dim); font-size: 14px;
  line-height: 1.65;
}

/* --- CTA banner --- */
.cta {
  text-align: center;
  padding: 88px 0;
  background:
    radial-gradient(ellipse 800px 300px at 50% 50%, rgba(74, 125, 255, 0.2), transparent 70%);
}
.cta h2 { margin-bottom: 8px; }
.cta p { color: var(--ink-dim); margin: 0 0 28px; }

/* --- Footer --- */
footer {
  padding: 40px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--ink-faint); font-size: 13px;
}
.footer-inner {
  display: flex; gap: 32px; flex-wrap: wrap; justify-content: space-between;
}
.footer-col h4 {
  color: var(--ink); font-size: 13px; margin: 0 0 12px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.footer-col a { display: block; color: var(--ink-faint); padding: 3px 0; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between;
  align-items: center;
}

/* --- Utility --- */
.muted { color: var(--ink-faint); }
.mono { font-family: var(--font-mono); font-size: 0.9em; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  section { padding: 48px 0; }
  .hero { padding: 56px 0 48px; }
}

/* --- Brand wordmark ---
 * Same Kindentosca cursive used in the SPA's auth-form Wordmark
 * (app/src/lib/Wordmark.svelte). Landing has no build step + no
 * Svelte runtime, so we ship a static SVG inlined in the markup
 * + the @font-face declarations below. White fill on the dark
 * brand bg per the user's "можно белым" call.
 *
 * Sacramento sits as a Latin-only fallback under name VgLatin for
 * any glyph Kindentosca lacks — same setup as the SPA so the two
 * surfaces render identically. */
@font-face {
  font-family: 'VgLatin';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/sacramento.ttf') format('truetype');
  unicode-range: U+0000-024F, U+1E00-1EFF, U+2000-206F, U+2070-209F;
}
@font-face {
  font-family: 'VgKindentosca';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/kindentosca.otf') format('opentype');
}
.brand-wordmark {
  display: inline-block;
  vertical-align: middle;
  font-family: 'VgKindentosca', 'VgLatin', cursive;
  color: #ffffff;
  font-weight: 400;
  letter-spacing: 0;
  /* line-height 0.62 visually tightens the box so the cursive's
   * massive empty ascender headroom doesn't make the brand row
   * taller than the SVG mark next to it. User feedback: уменьшить
   * по высоте. */
  line-height: 0.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
  user-select: none;
}
/* Nav (top-left) — paired with the circular brush-stroke mark.
 * Font-size 26 + line-height 0.62 = ~16px effective box, which
 * lines up with the 24px brush-stroke circle for a balanced row. */
.brand .brand-wordmark { font-size: 26px; }
/* Footer (large brand block) — slightly bigger, owns its own row. */
.footer-col .brand .brand-wordmark { font-size: 30px; }

/* --- Cookie consent banner ---
 * Rendered by /assets/cookie-banner.js when localStorage has no
 * vg_cookie_consent decision yet. Fixed at the bottom of the
 * viewport, above the (still-not-existing) sticky footer; once the
 * user clicks Accept / Only-necessary, JS removes the node entirely.
 * Styling mirrors the rest of the landing (dark card, warm-amber
 * primary, ghost neutral) so it reads as part of the brand and not
 * a third-party widget. */
#vg-cookie-banner {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 1000;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-family: var(--font);
}
.vg-cb-inner {
  display: flex; gap: 20px; align-items: center;
  padding: 16px 20px;
  max-width: 1200px; margin: 0 auto;
}
.vg-cb-text strong {
  display: block; font-size: 14px; color: var(--ink);
  margin-bottom: 4px;
}
.vg-cb-text p {
  margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-dim);
}
.vg-cb-link {
  color: var(--accent); text-decoration: underline;
  text-decoration-color: var(--accent-dim);
}
.vg-cb-link:hover { color: #f3d48c; }
.vg-cb-actions {
  display: flex; gap: 8px; flex-shrink: 0;
}
.vg-cb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: var(--font);
  border: 1px solid transparent;
  transition: background 0.1s, transform 0.1s;
}
.vg-cb-btn:hover { transform: translateY(-1px); }
.vg-cb-btn-primary {
  background: var(--accent); color: #1a1a2a; border-color: var(--accent);
}
.vg-cb-btn-primary:hover { background: #f3d48c; }
.vg-cb-btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--border);
}
.vg-cb-btn-ghost:hover { background: var(--bg-elev); }

@media (max-width: 640px) {
  #vg-cookie-banner { left: 8px; right: 8px; bottom: 8px; }
  .vg-cb-inner {
    flex-direction: column; align-items: stretch;
    padding: 14px 16px; gap: 12px;
  }
  .vg-cb-actions { justify-content: stretch; }
  .vg-cb-btn { flex: 1; padding: 10px 12px; }
}
