/* =========================================================
   Vartovy — Website Design System
   Offline-first vault product. Dark, calm, security-first.
   ========================================================= */

:root {
  /* Palette */
  --bg: #0b0e14;
  --bg-elev: #11151d;
  --bg-elev-2: #161b25;
  --border: #222a38;
  --border-strong: #2e394d;
  --text: #e6ecf5;
  --text-muted: #98a3b6;
  --text-dim: #6b7589;
  --brand: #4ad3a3;          /* vault green */
  --brand-strong: #2fb98a;
  --brand-soft: rgba(74, 211, 163, 0.12);
  --accent: #7aa2ff;
  --danger: #ff6a6a;
  --warning: #ffb454;

  /* Layout */
  --container: 1140px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 18px 60px rgba(0,0,0,0.45);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="light"] {
  --bg: #f6f8fb;
  --bg-elev: #ffffff;
  --bg-elev-2: #eef2f7;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --brand: #0f9d6b;
  --brand-strong: #0c8159;
  --brand-soft: rgba(15, 157, 107, 0.10);
  --accent: #2c5cff;
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 60px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--brand-strong); }

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

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 .6em;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; color: var(--text-muted); }

code, kbd {
  font-family: var(--font-mono);
  font-size: .92em;
  background: var(--bg-elev-2);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--brand);
  margin-bottom: 14px;
  font-weight: 600;
}

.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 640px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .site-header { background: rgba(255,255,255,0.85); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: 1.05rem;
}
.brand img { width: 28px; height: 28px; }
.brand:hover { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-size: .95rem;
  font-weight: 500;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: .85rem;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }

/* Language switcher */
.lang-select {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
  max-width: 180px;
}
.lang-select:hover { color: var(--text); border-color: var(--border-strong); }
.lang-select:focus { outline: none; border-color: var(--brand); }
.lang-select option { background: var(--bg-elev); color: var(--text); }
[data-theme="light"] .lang-select option { background: #fff; color: #111; }

/* Subtle progress strip while translating */
body[data-translating="1"]::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: vtv-i18n-bar 1.1s linear infinite;
  z-index: 9999;
  pointer-events: none;
}
@keyframes vtv-i18n-bar {
  0%   { background-position: -50% 0; }
  100% { background-position: 150% 0; }
}

/* Hide Google Translate widget chrome — we use our own selector */
#google_translate_element { display: none !important; }
.goog-te-banner-frame.skiptranslate,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
body { top: 0 !important; }
font[style*="background-color"] { background: transparent !important; box-shadow: none !important; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .05s ease, background .15s ease, border-color .15s ease, color .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--brand);
  color: #06231a;
}
.btn--primary:hover { background: var(--brand-strong); color: #06231a; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--lg { padding: 14px 22px; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 110px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% 30% auto auto;
  width: 600px;
  height: 600px;
  background: radial-gradient(closest-side, var(--brand-soft), transparent 70%);
  filter: blur(20px);
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 span.accent { color: var(--brand); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-trust {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--text-dim);
  font-size: .9rem;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* Hero visual: stylized vault card */
.vault-card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.vault-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(74,211,163,0.06), transparent 40%);
}
.vault-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.vault-card-head .title { font-weight: 700; }
.vault-card-head .badge {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  background: var(--brand-soft); color: var(--brand);
  padding: 4px 8px; border-radius: 999px; font-weight: 700;
}
.stage-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.stage {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .95rem;
}
.stage .num {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 700; font-size: .8rem;
}
.stage .check {
  margin-left: auto; color: var(--brand); font-weight: 700;
}

/* ---------- Feature grid ---------- */
.grid {
  display: grid;
  gap: 22px;
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--border-strong); }
.card .icon {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
  border-radius: 10px; margin-bottom: 14px;
  font-size: 1.2rem;
}
.card h3 { margin-bottom: .35em; }
.card p  { font-size: .95rem; margin: 0; }

/* ---------- Section header ---------- */
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { margin: 0 auto; max-width: 640px; }

/* ---------- How it works ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step .step-num {
  width: 44px; height: 44px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}

/* ---------- Pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 22px;
  max-width: 980px;
  margin: 0 auto;
}
.plan {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex; flex-direction: column;
  position: relative;
}
.plan--featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand-soft), var(--shadow-md);
}
.plan .badge {
  position: absolute; top: -10px; right: 18px;
  background: var(--brand); color: #06231a;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.plan h3 { margin-bottom: 4px; }
.plan .label { color: var(--text-dim); font-size: .9rem; min-height: 2.5em; margin-bottom: 16px; }
.plan .price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); display:flex; align-items:baseline; gap:.6rem; flex-wrap:wrap; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--text-dim); }
.plan .price .price-old { font-size: 1.25rem; color: var(--text-dim); text-decoration: line-through; font-weight: 600; }
.plan .price .price-now { color: var(--brand); }
.plan .early-bird {
  margin-top: .35rem;
  padding: .55rem .8rem;
  border: 1px dashed var(--brand);
  border-radius: 10px;
  background: rgba(74,211,163,.08);
  color: var(--text);
  font-size: .9rem;
  line-height: 1.4;
}
.plan .early-bird strong { color: var(--brand); letter-spacing: .03em; text-transform: uppercase; font-size: .8rem; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 8px; }
.plan ul li {
  font-size: .92rem; color: var(--text-muted);
  padding-left: 22px; position: relative;
}
.plan ul li::before {
  content: "✓"; color: var(--brand); position: absolute; left: 0; top: 0; font-weight: 700;
}
.plan ul li.no::before { content: "—"; color: var(--text-dim); }
.plan .btn { margin-top: auto; }

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border);
  font-size: .94rem;
}
.compare-table th { color: var(--text); font-weight: 600; background: var(--bg-elev-2); }
.compare-table td:not(:first-child) { text-align: center; color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-dim); font-size: 1.2rem; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 12px 0 0; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 44px;
  text-align: center;
}
.cta-banner h2 { margin-bottom: 10px; }
.cta-banner .btns { display: inline-flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 56px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-muted); font-size: .92rem; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: .85rem; flex-wrap: wrap; gap: 12px;
}

/* ---------- Long-form pages (privacy/terms/security) ---------- */
.doc {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 24px;
}
.doc h1 { font-size: 2.2rem; }
.doc h2 { margin-top: 2em; padding-top: .4em; }
.doc h3 { margin-top: 1.6em; color: var(--text); }
.doc ul, .doc ol { color: var(--text-muted); padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc table { width:100%; border-collapse: collapse; margin: 1em 0; font-size: .92rem; }
.doc th, .doc td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; color: var(--text-muted); }
.doc th { background: var(--bg-elev); color: var(--text); }
.doc .meta { color: var(--text-dim); font-size: .9rem; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

/* ---------- Contact form ---------- */
.contact-form {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  gap: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field { display: grid; gap: 6px; }
.form-field > span {
  font-size: .88rem;
  color: var(--text-muted);
  font-weight: 500;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 14px;
  font: inherit;
  font-size: .95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field textarea { resize: vertical; min-height: 120px; font-family: var(--font-sans); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-field input:invalid:not(:placeholder-shown),
.form-field textarea:invalid:not(:placeholder-shown) {
  border-color: var(--danger);
}
.form-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .9rem; color: var(--text-muted);
}
.form-check input { margin-top: 3px; accent-color: var(--brand); }
.form-actions {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 4px;
}
.form-status { font-size: .9rem; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--brand); }
.form-note { font-size: .82rem; margin: 4px 0 0; }
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important; height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 20px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid--3, .grid--4, .plans { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero { padding: 70px 0 50px; }
  .grid--2, .grid--3, .grid--4, .plans { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start;
    padding: 16px 24px; gap: 14px;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .nav-actions .btn { display: none; }
  .step { grid-template-columns: 1fr; }
  .cta-banner { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
