/* Shared by the public site's pages (static/landing/index.html, guide.html, film.html): the header's
   section links, the menu drawer that holds them when the header has no room (1180px and narrower),
   and the official App Store and Google Play badges. Colours come from each page's own variables, so
   it follows light and dark. i18n.css loads after this file and keeps the last word on the header. */

/* header: section links (hidden below 900px here, and 900 to 1050px by i18n.css; with the menu running, up to 1180px,
   where the longest translations still fit next to the buttons) */
.nav { display: none; gap: 4px; margin-left: 20px; }
.nav a { text-decoration: none; color: var(--soft); font-size: 14.5px; padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
@media (min-width: 900px) { .nav { display: flex; } }
@media (max-width: 1279px) { .top .nav a[data-cta="pricing_nav"] { display: none; } }
.top-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* the menu button: shown only once site.js is running, and only while the section links are hidden */
.menu-btn { display: none; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s; }
.menu-btn:hover { border-color: var(--accent); }
.menu-btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 999px; }
@media (max-width: 1180px) { .menu-ready .menu-btn { display: inline-flex; } .menu-ready .top .nav { display: none; } }
/* with the menu button in the header, i18n.css's compact phone header starts at 420px instead of 380px,
   and below 346px the header keeps the logo, the language and the menu (Sign in is in the menu) */
@media (max-width: 420px) {
  .menu-ready .top .brand .logo { width: 26px; height: 26px; }
  .menu-ready .top .language-picker summary { padding-inline: 8px; }
  .menu-ready .top .language-picker summary > svg:last-child { display: none; }
  .menu-ready .top .top-cta .btn-sm { padding-inline: 10px; font-size: 13px; }
}
@media (max-width: 345px) { .menu-ready .top .top-cta > a.btn { display: none; } }

/* the drawer: from the inline-end side (the right, the left in Arabic), over a scrim */
html.menu-open body { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer:not(.open) { pointer-events: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(9, 9, 11, .55); opacity: 0; transition: opacity .25s ease; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer-panel { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(88vw, 380px); display: flex; flex-direction: column; gap: 22px;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: max(8px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(24px, calc(env(safe-area-inset-bottom, 0px) + 12px)) 20px;
  background: var(--surface); color: var(--ink); border-inline-start: 1px solid var(--line-2); box-shadow: -30px 0 80px -30px rgba(0, 0, 0, .55);
  transform: translateX(100%); visibility: hidden; transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s .32s; }
.drawer.open .drawer-panel { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s 0s; }
[dir=rtl] .drawer-panel { transform: translateX(-100%); box-shadow: 30px 0 80px -30px rgba(0, 0, 0, .55);
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: 20px; }
[dir=rtl] .drawer.open .drawer-panel { transform: none; }
.drawer-panel:focus { outline: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.drawer-head .brand { pointer-events: none; }
.drawer-close { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink); cursor: pointer; }
.drawer-close:hover { background: var(--surface-2); }
.drawer-close:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 999px; }
.drawer-nav { display: grid; margin-top: -8px; }
.drawer-nav a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 0 2px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.drawer-nav a .ico { color: var(--faint); }
.drawer-nav a:hover .ico, .drawer-nav a[aria-current="page"] { color: var(--accent-ink); }
.drawer-nav a:focus-visible { outline-offset: -3px; }
.drawer-cta { display: grid; gap: 10px; }
.drawer-cta .btn { width: 100%; }
.drawer-label { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--faint); letter-spacing: .02em; }
/* the languages: one row that opens to the list (the header keeps its own picker too) */
.drawer-lang summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-2);
  border-radius: 14px; color: var(--ink); font-size: 15.5px; font-weight: 600; cursor: pointer; }
.drawer-lang summary::-webkit-details-marker { display: none; }
.drawer-lang summary .ico { color: var(--faint); transition: transform .2s; }
.drawer-lang summary:hover { background: var(--surface-2); }
.drawer-lang[open] summary { border-color: var(--accent); }
.drawer-lang[open] .drawer-chev { transform: rotate(180deg); }
.drawer-lang-now { margin-inline-start: auto; color: var(--soft); font-weight: 500; white-space: nowrap; }
.drawer-langs { display: grid; gap: 2px; margin-top: 8px; }
.drawer-langs a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: 12px;
  color: var(--soft); text-decoration: none; font-size: 15.5px; }
.drawer-langs a:hover { color: var(--ink); background: var(--surface-2); }
.drawer-langs a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.drawer-langs a[aria-current="page"] > span:last-child { color: var(--accent-ink); }
.drawer-sec.drawer-apps { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }

/* the official store badges: shown as published (black, grey edge), the same height side by side,
   a quarter of their height as clear space, App Store first */
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.store { display: inline-flex; flex: none; line-height: 0; border-radius: 9px; text-decoration: none; transition: transform .15s; }
.store:active { transform: scale(.98); }
.store img { display: block; width: auto; height: 40px; max-width: none; }
.store.lg img { height: 48px; }
.store:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  .drawer-scrim, .drawer-panel, .drawer.open .drawer-panel, .store, .drawer-lang summary .ico { transition: none; }
}
