/* Elements toggled with the hidden attribute (form after success, error box) must really hide. */
[hidden] { display: none !important; }

/* =========================================================
   Viber landing — „Пътят на тревожността“
   Mobile-first. Viber brand palette (viber.com/en/brand-center): Main Purple, Easy/White Violet, Text Violet, one accent (Friendly Green).
   ========================================================= */

:root {
  --white: #ffffff;
  --light-blue: #e5e1ff; /* Viber White Violet */
  --light-blue-2: #f6f4ff;
  --border: #e3dffa;
  --primary: #7360f2; /* Viber Main Purple */
  --primary-dark: #5b48d6;
  --dark-blue: #4e4879; /* Viber Text Violet */
  --ink: #2f2a4f;
  --muted: #6b6690;
  --accent: #4aa994; /* Viber Friendly Green — the single accent */
  --accent-soft: #e4f4f0;
  --viber: #7360f2;
  --viber-dark: #5b48d6;
  --success: #4aa994;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(78, 72, 121, 0.06);
  --shadow: 0 12px 40px rgba(78, 72, 121, 0.10);
  --shadow-lg: 0 20px 60px rgba(78, 72, 121, 0.14);
  --maxw: 1080px;

  --font-head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow { max-width: 720px; }
.center { text-align: center; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--dark-blue);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 800;
}
h1 { font-size: clamp(1.9rem, 6.5vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 5vw, 2.25rem); margin-bottom: 0.6em; }
h3 { font-size: 1.18rem; font-weight: 700; }

p { color: var(--ink); }
.lead { font-size: clamp(1.05rem, 3.4vw, 1.28rem); color: var(--muted); margin-top: 0.9rem; }
.section-text { color: var(--muted); margin-bottom: 1rem; font-size: 1.05rem; }
.section-sub { color: var(--muted); margin-top: 0.5rem; font-size: 1.05rem; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--light-blue);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 15px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-lg { padding: 17px 32px; font-size: 1.08rem; }
.btn-sm { padding: 10px 18px; font-size: 0.9rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 22px rgba(115, 96, 242, 0.30);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 10px 28px rgba(115, 96, 242, 0.40); }

.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--light-blue); }

.btn-viber {
  background: var(--viber);
  color: #fff;
  box-shadow: 0 8px 24px rgba(115, 96, 242, 0.35);
}
.btn-viber:hover { background: var(--viber-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
}
.brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--dark-blue);
  font-size: 0.98rem;
}
.header-inner .btn-sm { display: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 100% 0%, var(--light-blue) 0%, transparent 55%),
    linear-gradient(180deg, var(--light-blue-2) 0%, #fff 100%);
  padding: 40px 0 44px;
}
.hero-grid { display: grid; gap: 34px; align-items: center; }
.hero-copy { text-align: center; }
.trust-line {
  color: var(--dark-blue);
  font-weight: 500;
  margin: 1.1rem auto 1.6rem;
  max-width: 520px;
  font-size: 1rem;
}
.micro-note { color: var(--muted); font-size: 0.92rem; margin-top: 0.85rem; }
.micro-note.center { text-align: center; }

.hero-visual { display: flex; justify-content: center; order: -1; }
.hero-photo-wrap { position: relative; width: min(78vw, 340px); }
.hero-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  border: 6px solid #fff;
}
.hero-badge {
  position: absolute;
  bottom: -14px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff;
  color: var(--viber);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-tint { background: var(--light-blue-2); }
.section-head { margin-bottom: 26px; }
.section-head.center { max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- Cards / cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}
.feature-card { padding: 24px; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon {
  font-size: 1.7rem;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--light-blue);
  border-radius: 14px;
  margin-bottom: 14px;
}
.feature-card h3 { margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 0.98rem; }

.grid-tight { gap: 12px; }
.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--dark-blue);
}
.mini-icon {
  font-size: 1.25rem;
  width: 38px; height: 38px; flex: 0 0 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  border-radius: 10px;
}

/* ---------- Check list ---------- */
.check-list { list-style: none; margin-top: 18px; display: grid; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 38px;
  color: var(--ink);
  font-size: 1.05rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--light-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232b74c4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- Callout ---------- */
.callout {
  margin-top: 26px;
  background: var(--dark-blue);
  color: #f1efff;
  padding: 22px 24px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.08rem;
  text-align: center;
  line-height: 1.5;
}

/* ---------- About ---------- */
.about { display: grid; gap: 18px; }
.about-photo {
  width: 110px; height: 110px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: var(--shadow);
}

/* ---------- Notice ---------- */
.notice {
  background: var(--light-blue);
  border: 1px solid #d9d2ff;
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.notice h2 { color: var(--dark-blue); font-size: 1.3rem; margin-bottom: 0.4em; }
.notice p { color: var(--ink); }

/* ---------- Form ---------- */
.form-section { padding: 34px 0 52px; background: linear-gradient(180deg, #fff 0%, var(--light-blue-2) 100%); }
.form-card { padding: 28px 22px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.form-card h2 { font-size: 1.5rem; }
.signup-form { margin-top: 22px; display: grid; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--dark-blue);
}
.field input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(115, 96, 242, 0.12);
}
.field input.invalid { border-color: #e0555b; box-shadow: 0 0 0 4px rgba(224, 85, 91, 0.10); }
.field-error { display: block; color: #c33b41; font-size: 0.85rem; font-weight: 600; margin-top: 6px; }
.checkbox .field-error { grid-column: 1 / -1; margin-top: 0; }
.checkbox a { color: var(--primary); text-decoration: underline; }

/* Honeypot — visually hidden but present for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}
.checkbox input {
  width: 22px; height: 22px;
  margin-top: 1px;
  accent-color: var(--primary);
  flex: 0 0 22px;
  cursor: pointer;
}

.form-error {
  color: #c33b41;
  background: #fdecec;
  border: 1px solid #f6cfd0;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.95rem;
  text-align: center;
}

/* Success state */
.form-success { text-align: center; padding: 10px 4px 6px; position: relative; }

/* Confetti (JS-generated, no library) */
.confetti-layer {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}
.confetti-piece {
  position: absolute;
  top: 6px;
  width: 8px; height: 13px;
  opacity: 0;
  will-change: transform, opacity;
  animation: confetti-fall 1.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes confetti-fall {
  0%   { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate3d(var(--x, 0), 260px, 0) rotate(var(--r, 540deg)); }
}
.success-check {
  width: 66px; height: 66px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  animation: pop 0.4s ease;
}
.form-success h3 { color: var(--dark-blue); font-size: 1.4rem; margin-bottom: 8px; }
.form-success p { color: var(--muted); margin-bottom: 22px; }
@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- CTA blocks ---------- */
.section-cta { background: var(--light-blue); }
.section-cta h2 { color: var(--dark-blue); }
.section-final {
  background:
    radial-gradient(120% 120% at 0% 0%, var(--light-blue) 0%, transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--light-blue-2) 100%);
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; margin-top: 8px; }
.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq summary {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--dark-blue);
  cursor: pointer;
  list-style: none;
  padding: 14px 30px 14px 0;
  position: relative;
  font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 2px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 16px; font-size: 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark-blue);
  color: #d9d4f5;
  padding: 40px 0;
}
.footer-brand { font-family: var(--font-head); font-weight: 800; color: #fff; font-size: 1.15rem; }
.footer-note { color: #c3bbf3; margin-top: 4px; }
.footer-disclaimer { color: #aea6dc; font-size: 0.85rem; margin-top: 16px; max-width: 560px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(78, 72, 121, 0.08);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.sticky-cta.hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }

/* Keep content clear of the sticky bar on mobile */
@media (max-width: 860px) {
  body { padding-bottom: 78px; }
}

/* =========================================================
   DESKTOP / TABLET
   ========================================================= */
@media (min-width: 861px) {
  body { font-size: 18px; }
  .section { padding: 72px 0; }
  .form-section { padding: 54px 0 72px; }
  .hero { padding: 70px 0 76px; }

  .header-inner .btn-sm { display: inline-flex; }

  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
  .hero-copy { text-align: left; }
  .hero-visual { order: 0; }
  .hero-photo-wrap { width: min(100%, 400px); }
  .trust-line { margin-left: 0; margin-right: 0; }
  .micro-note.center, .hero-copy .micro-note { text-align: left; }

  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-tight { grid-template-columns: repeat(2, 1fr); }

  .form-card { padding: 40px 44px; }
  .form-card h2 { font-size: 1.75rem; }

  .about { grid-template-columns: 140px 1fr; align-items: center; gap: 30px; }
  .about-photo { width: 140px; height: 140px; }

  /* sticky CTA is a mobile pattern only */
  .sticky-cta { display: none; }
}

@media (min-width: 861px) and (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
.consent-note a { color: var(--primary); text-decoration: underline; }
