/* —— Design layer: motion, a11y, depth (applies site-wide) —— */
:root {
  --site-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --site-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --site-header-bg: rgba(246, 245, 243, 0.82);
  --site-shadow-sm: 0 1px 2px rgba(45, 43, 40, 0.05);
  --site-shadow-md: 0 12px 40px -14px rgba(45, 43, 40, 0.14);
  --duration: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: 4.5rem;
  color-scheme: light;
}

body {
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

@media (max-width: 767.98px) {
  body.mobile-nav-open {
    overflow: hidden;
    overscroll-behavior: none;
  }
}

/* Skip to content: hidden until keyboard focus (a11y without breaking header layout) */
.skip-link:not(:focus):not(:focus-visible) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  z-index: 100;
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 1rem;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border-radius: 0.375rem;
  border: 1px solid #e8e6e3;
  background-color: #fff;
  color: #2d2b28;
  box-shadow: 0 4px 20px rgba(45, 43, 40, 0.12);
  text-decoration: none;
}

/* Language dropdown: keep list inside panel (no overflow past menu box) */
.lang-switcher {
  isolation: isolate;
}

/*
 * Tailwind CDN applies `.hidden` after it loads; until then FOUC can show the
 * language list and mobile menu in-flow. Mirror critical display rules here
 * (main.css loads before Tailwind) so nothing “gathers” on first paint.
 */
#lang-switcher-panel.hidden {
  display: none !important;
}
#mobile-nav.hidden {
  display: none !important;
}
@media (max-width: 767.98px) {
  #lang-switcher {
    display: none !important;
  }
}
@media (min-width: 768px) {
  #lang-switcher {
    display: block;
  }
}

#lang-switcher-panel {
  max-height: min(70vh, 20rem);
  max-width: min(100vw - 1.5rem, 18rem);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

#lang-switcher-panel a[role="menuitem"] {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background-color: rgba(5, 144, 206, 0.22);
  color: #1a1918;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Links & FAQ summaries: most in-page controls use Tailwind focus rings instead */
a:focus-visible {
  outline: 2px solid #0590ce;
  outline-offset: 2px;
  border-radius: 2px;
}

details.faq-item summary:focus-visible {
  outline: 2px solid #0590ce;
  outline-offset: 2px;
  border-radius: 0.375rem;
}

.site-header {
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background-color: var(--site-header-bg) !important;
  transition: box-shadow var(--duration) var(--site-ease-out), border-color var(--duration) ease;
}

.site-header.is-scrolled {
  box-shadow: var(--site-shadow-sm), 0 10px 32px -16px rgba(45, 43, 40, 0.11);
  border-bottom-color: rgba(232, 230, 227, 0.88);
}

header nav a {
  transition: color var(--duration) var(--site-ease), opacity var(--duration) ease;
}

main a.text-brand {
  text-underline-offset: 0.15em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(5, 144, 206, 0.38);
  transition: color var(--duration) var(--site-ease), text-decoration-color var(--duration) ease;
}

main a.text-brand:hover {
  text-decoration-color: rgba(5, 144, 206, 0.78);
}

@media print {
  .site-header,
  #mobile-nav,
  .fixed-download-btn,
  #fixed-download-btn,
  #back-to-top {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }
}
#back-to-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  bottom: max(2rem, calc(0.5rem + env(safe-area-inset-bottom, 0px))) !important;
  right: max(1.25rem, calc(0.5rem + env(safe-area-inset-right, 0px))) !important;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }
details.faq-item > summary { list-style: none; }
details.faq-item > summary::-webkit-details-marker { display: none; }
.fixed-download-btn {
  transform: translateY(-50%);
}

#fixed-download-btn {
  padding-right: max(0.625rem, env(safe-area-inset-right, 0px)) !important;
}

@media (max-width: 767.98px) {
  #mobile-nav:not(.hidden) {
    animation: mobile-nav-reveal 0.22s var(--site-ease-out) both;
  }
}

@media (prefers-reduced-motion: reduce) {
  #mobile-nav:not(.hidden) {
    animation: none;
  }
}

@keyframes mobile-nav-reveal {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.content-shot {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 56rem;
  box-sizing: border-box;
  border: 1px solid #e8e6e3;
  border-radius: 0.625rem;
  background: linear-gradient(165deg, #faf9f7 0%, #f0eeeb 100%);
  padding: 0.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-shadow: var(--site-shadow-sm), 0 16px 48px -24px rgba(45, 43, 40, 0.1);
}
.content-shot img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(52vh, 28rem);
  object-fit: contain;
  object-position: top center;
}
.content-shot--gif img { object-position: center center; }
.content-shot--hero img { max-height: min(62vh, 34rem); }
.content-shot--grid {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  min-height: 11rem;
}
.content-shot--grid img {
  max-height: min(40vh, 22rem);
  object-position: center center;
}
.content-shot--promo img {
  object-position: center center;
  max-height: min(44vh, 24rem);
}

.video-shot {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: min(100%, 56rem);
  aspect-ratio: 16 / 9;
  border-radius: 0.625rem;
  border: 1px solid #e8e6e3;
  overflow: hidden;
  background: #141414;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--site-shadow-sm), 0 20px 50px -28px rgba(45, 43, 40, 0.18);
}
.video-shot video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.caption-under {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #5c5a57;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}
.hero-panel .caption-under {
  margin-top: 0.5rem;
}

.nav-link-active { color: #2d2b28; font-weight: 500; }
.nav-pill-icon { display: inline-flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.nav-pill-icon i { font-size: 1.05rem; color: #0478ad; opacity: 0.9; transition: color 0.15s ease, opacity 0.15s ease; }
.nav-pill-icon:hover i { color: #0590ce; opacity: 1; }

/* Home hero: centered copy + screenshot */
.hero-panel {
  background:
    radial-gradient(100% 70% at 50% -8%, rgba(232, 244, 250, 0.75) 0%, transparent 52%),
    linear-gradient(165deg, #ffffff 0%, #f2f8fb 24%, #f6f5f3 52%, #f4f3f0 100%);
  border-bottom: 1px solid #e8e6e3;
}

.hero-panel h1 {
  letter-spacing: -0.028em;
  text-wrap: balance;
}

@media (hover: hover) and (pointer: fine) {
  .hero-panel a.inline-flex.rounded-full {
    transition:
      transform var(--duration) var(--site-ease),
      box-shadow var(--duration) var(--site-ease),
      background-color var(--duration) ease,
      border-color var(--duration) ease,
      color var(--duration) ease;
  }
  .hero-panel a.inline-flex.rounded-full:hover {
    transform: translateY(-1px);
  }
  .hero-panel a.bg-brand:hover {
    box-shadow: 0 6px 20px -6px rgba(4, 120, 173, 0.42);
  }
  .hero-panel a.border-muted-border:hover {
    box-shadow: 0 6px 20px -8px rgba(45, 43, 40, 0.08);
  }
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0478ad;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  height: 1px;
  width: 1.75rem;
  background: linear-gradient(90deg, transparent, rgba(5, 144, 206, 0.55), transparent);
}
.hero-eyebrow::before {
  background: linear-gradient(90deg, transparent, rgba(5, 144, 206, 0.6));
}
.hero-eyebrow::after {
  background: linear-gradient(90deg, rgba(5, 144, 206, 0.6), transparent);
}
/* Hero screenshot: no frame, no outer shadow — sits flush in the column */
.hero-media-frame {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.hero-window-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  object-position: top center;
  max-height: min(40vh, 320px);
  max-width: 100%;
}

@media (min-width: 640px) {
  .hero-window-img {
    max-height: min(44vh, 380px);
  }
}
@media (min-width: 1024px) {
  .hero-window-img {
    max-height: min(46vh, 420px);
  }
}

/* —— RTL (Hebrew /Il pages): logical positioning for fixed controls —— */
[dir="rtl"] #back-to-top {
  right: auto !important;
  left: max(1.25rem, calc(0.5rem + env(safe-area-inset-left, 0px))) !important;
}
[dir="rtl"] #fixed-download-btn {
  right: auto !important;
  left: 0 !important;
  border-radius: 0 0.5rem 0.5rem 0 !important;
  padding-right: 0.625rem !important;
  padding-left: max(0.625rem, env(safe-area-inset-left, 0px)) !important;
}
[dir="rtl"] .hero-eyebrow::before,
[dir="rtl"] .hero-eyebrow::after {
  transform: scaleX(-1);
}
[dir="rtl"] blockquote.border-l-2 {
  border-left-width: 0;
  border-right-width: 2px;
  padding-left: 0;
  padding-right: 1.25rem;
}
