/* Accessibility and cookie-consent layer for vilohub.com.
   Loaded after each page's own styles. Targets WCAG 2.1 AA / Israeli Standard 5568. */

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed; z-index: 1000; top: 12px; inset-inline-start: 12px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink, #17171A); color: #fff; font: 600 15px/1.2 var(--sans, system-ui, sans-serif);
  text-decoration: none; transform: translateY(-160%); transition: transform 160ms;
}
.skip-link:focus, .skip-link:focus-visible { transform: none; outline: 3px solid var(--iris, #5B47F5); outline-offset: 2px; }
main:focus { outline: none; }

/* ---------- Visible keyboard focus everywhere ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid var(--iris, #5B47F5) !important;
  outline-offset: 2px !important;
  border-radius: 6px;
}

/* ---------- Closed dialogs leave the tab order (aria-hidden + focusable fix) ---------- */
.planner:not(.on) { visibility: hidden; transition: opacity 240ms, transform 420ms cubic-bezier(.2,.8,.2,1), visibility 0s linear 420ms; }
.planner.on { visibility: visible; transition: opacity 240ms, transform 420ms cubic-bezier(.2,.8,.2,1), visibility 0s; }
.gp:not(.on) { visibility: hidden; transition: opacity 260ms, visibility 0s linear 260ms; }
.gp.on { visibility: visible; transition: opacity 260ms, visibility 0s; }

/* ---------- Text contrast (4.5:1 minimum) ---------- */
.gr-ci, .gk-ci { color: #5E5D5E; }
.v2-ev .m { color: rgba(36, 36, 36, .74); }
.cs-m .nm em, .gk-m b.nm em, .gr-m b.nm em, .ld-msg .nm em { color: #4A494A; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ---------- Paused by the visitor (Pause animations button) ---------- */
html.vc-still *, html.vc-still *::before, html.vc-still *::after {
  animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
  transition-duration: 1ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
}
/* Header button: hidden until reached with the keyboard, then shown like the skip link */
.vc-motion { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.vc-motion:focus, .vc-motion:focus-visible { position: static; width: 36px; height: 36px; margin: 0; margin-inline-end: 6px; clip: auto; overflow: visible;
  display: inline-grid; place-items: center; flex: none; border-radius: 999px; background: rgba(23, 23, 26, .08); color: var(--ink, #17171A); cursor: pointer; }
.vc-motion svg { width: 16px; height: 16px; }

/* ---------- Footer legal buttons ---------- */
.f2 .fc .vc-link { all: unset; cursor: pointer; display: block; color: inherit; font: inherit; }
.f2 .fc .vc-link:hover { text-decoration: underline; }

/* ---------- Form privacy notice ---------- */
.form-notice { margin-top: 10px; font: 400 12.5px/1.5 var(--sans, system-ui, sans-serif); color: var(--ink-2, #4E4D55); }
.form-notice a { color: inherit; text-decoration: underline; }

/* ---------- Cookie banner and preferences ---------- */
.vc { position: fixed; z-index: 900; inset-inline-start: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px));
  background: #fff; color: var(--ink, #17171A); border-radius: 20px; padding: 20px;
  box-shadow: 0 30px 70px -24px rgba(23, 23, 26, .45), 0 0 0 1px rgba(23, 23, 26, .08);
  font: 400 14.5px/1.5 var(--sans, system-ui, sans-serif); }
.vc[hidden] { display: none; }
.vc h2 { margin: 0 0 6px; font: 700 17px/1.25 var(--display, "Gabarito", var(--sans, system-ui)); }
.vc p { margin: 0 0 14px; color: var(--ink-2, #4E4D55); }
.vc a { color: var(--iris-ink, #3B2BC4); text-decoration: underline; }
.vc-row { display: flex; flex-wrap: wrap; gap: 8px; }
.vc-btn { flex: 1 1 auto; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  font: 600 14px/1 var(--sans, system-ui, sans-serif); border: 1.5px solid var(--ink, #17171A); background: #fff; color: var(--ink, #17171A); }
.vc-btn.pri { background: var(--ink, #17171A); color: #fff; }
.vc-btn.ghost { border-color: transparent; text-decoration: underline; flex: 0 1 auto; }
.vc-cats { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.vc-cats li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--paper, #F2F1F7); }
.vc-cats input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--iris, #5B47F5); }
.vc-cats label { display: block; font-weight: 600; }
.vc-cats small { display: block; color: var(--ink-2, #4E4D55); font-size: 13px; }
.vc-none { margin: 0 0 14px; padding: 12px; border-radius: 14px; background: var(--paper, #F2F1F7); font-size: 13.5px; }
@media (max-width: 520px) { .vc { inset-inline: 8px; bottom: 8px; width: auto; } }

/* Secret Santa demo footer links */
.ss-legal { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ss-legal a, .ss-legal .vc-link { all: unset; cursor: pointer; text-decoration: underline; color: inherit; font: inherit; }

/* Policy pages: lists and inline code */
.pv-s ul { margin: 0 0 12px; padding-inline-start: 20px; font-size: 15px; line-height: 1.6; color: var(--ink-2, #4E4D55); }
.pv-s li + li { margin-top: 4px; }
.pv-s b { color: var(--ink, #17171A); }
.pv-s code { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--paper, #F2F1F7); }
.pv-s .vc-btn { flex: none; }

/* Customer logos row: 4.5:1 on paper */
.logos span:not(.m) { color: rgba(23, 23, 26, .7); }

/* Insights demo: the recommended Moment stays readable before its step lights up */
.in-flow2:not(.g3) .in-mo { opacity: .82; }
/* Slack composer placeholder in game demos */
.gr-cp > span:not(.tp) { color: #5E5D5E; }

/* Cookie policy table */
.ck-table { overflow-x: auto; margin: 6px 0 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(23, 23, 26, .09); }
.ck-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; min-width: 520px; }
.ck-table th, .ck-table td { padding: 10px 12px; text-align: start; vertical-align: top; color: var(--ink-2, #4E4D55); }
.ck-table th { font-weight: 700; color: var(--ink, #17171A); background: var(--paper, #F2F1F7); }
.ck-table tr + tr td { border-top: 1px solid rgba(23, 23, 26, .07); }

/* Vilo AI: coming soon */
.ai-soon { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0 0 10px; font: 500 13px/1.2 var(--sans, system-ui, sans-serif); color: var(--ink-2, #4E4D55); }
.ai-soon b { padding: 5px 10px; border-radius: 999px; background: var(--ink, #17171A); color: #fff; font-weight: 600; letter-spacing: .01em; }

/* Sections hidden until real content is ready */
.proof[hidden], section[hidden] { display: none !important; }
.bl-f[hidden], .bl-grid[hidden], .bl-feat[hidden] { display: none !important; }
.bl-nl .form-notice { grid-column: 1 / -1; margin: 0; }
#posts .bl-nl { margin-top: 0; }
.mm-gate .form-notice, .mh-kit .form-notice { margin-top: 8px; }
.mm-gate { gap: 8px; padding: 20px 22px; }
.mm-gate .form-notice { margin-top: 2px; font-size: 12px; }
.mm-lock { min-height: 400px; }

/* "Runs in Slack · or in your app" separator (was a <s> element) */
.gr-run .sep, .gk-run .sep { color: var(--mute); }
