/* Benchwell site chrome shared by the marketing pages: tokens on top of /static/scan.css, fonts, header,
   footer, the audit dialog, section rules and the FAQ list. Page layouts live in the page folders. */

:root {
  --hd: 72px;
  --io: cubic-bezier(.45, 0, .15, 1);
  --read: 760px;   /* one reading column */
}
/* Russian (owner's choice, 27.10): the stack is the same on every language, set in scan.css --font:
   Host Grotesk first, so Latin, domains and digits stay Host Grotesk; Onest only fills the Cyrillic it lacks */
.h-brand span { font-family: "Host Grotesk", ui-sans-serif, system-ui, sans-serif; }

body.h { font-size: 17px; }
.h-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
/* with JavaScript nothing flashes before the copy is applied; without it the page shows what the server rendered */
.js body:not(.is-ready) [data-site-header], .js body:not(.is-ready) main, .js body:not(.is-ready) [data-site-footer] { visibility: hidden; }

/* ---------- header (sticky on content pages; home places it over its first screen) ---------- */
.h-hd { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .2s; }
.h-hd.is-scrolled { border-bottom-color: var(--line); }
.h-hd-in { height: var(--hd); max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); display: flex; align-items: center; gap: 32px; }
.h-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.h-brand svg { width: 25px; height: 25px; flex: none; }
.h-nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; transition: color .2s; }
.h-nav a:hover, .h-nav a[aria-current="page"] { color: var(--ink); }
.h-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--line-strong); }
.h-hd-r { margin-left: auto; display: flex; align-items: center; gap: 14px; }
/* the language switch is a quiet text button; the only framed control in the header is the audit button */
.h-lang .lang-btn, .h-mlang .lang-btn, .h-foot .lang-btn { border-color: transparent; padding: 0 8px 0 10px; letter-spacing: .04em; color: var(--ink-2); }
.h-lang .lang-btn:hover, .h-foot .lang-btn:hover { border-color: transparent; color: var(--ink); }
.h-btn2 { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--field-line); color: inherit; text-decoration: none; font: 400 14.5px/1 var(--font); white-space: nowrap; transition: border-color .2s, background .2s; }
.h-btn2:hover { border-color: var(--ink); }
.h-menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: inherit; place-items: center; cursor: pointer; }
.h-menu-btn svg { width: 20px; height: 20px; }
.h-mnav { display: none; }

/* ---------- shared text blocks ---------- */
/* the site's type scale (tokens in scan.css): display for the page title, h2 for page sections, h3 for sub-sections */
.h-h2 { font-weight: 400; font-size: var(--t-h2); line-height: 1.15; letter-spacing: -0.025em; max-width: 22ch; text-wrap: balance; }
.h-h3 { font-weight: var(--w-title); font-size: var(--t-h3); line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; }
/* the request dialog: its form title is the dialog's only heading */
.h-dlg .fu-h { font-weight: 400; font-size: var(--t-h2); line-height: 1.15; letter-spacing: -0.025em; }
.h-rule { border-top: 1px solid var(--ink); padding-top: 26px; }
/* the underline under the words only, never under the arrow */
.h-more-l { display: inline-flex; gap: 8px; font-size: 16px; color: var(--ink); text-decoration: none; } /* the words carry the marker (.mk, scan.css) */
.h-more-l:hover { color: var(--ink); }
.h-more-l span[aria-hidden] { text-decoration: none; }
/* FAQ: one reading column; each answer right under its question */
.h-qs { margin-top: 26px; }
.h-qs > div { padding: 18px 0 20px; border-top: 1px solid var(--line); }
.h-qs dt { font-size: 17.5px; font-weight: 400; line-height: 1.35; letter-spacing: -0.01em; }
.h-qs dd { margin: 6px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 64ch; }

/* ---------- footer ---------- */
.h-foot { border-top: 1px solid var(--line-strong); padding: 36px 0 40px; }
.h-foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.h-foot .h-brand { font-size: 18px; }
.h-foot .h-brand svg { width: 22px; height: 22px; }
.h-foot-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; }
.h-foot-nav a { color: var(--ink-2); text-decoration: none; }
.h-foot-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.h-foot-nav a[aria-current="page"] { color: var(--ink); }
.h-foot-lang { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-3); }
.lang.up .lang-menu { top: auto; bottom: calc(100% + 8px); }
.h-copy { flex-basis: 100%; font: 400 12.5px/1 var(--mono); color: var(--ink-3); }

/* ---------- the audit dialog ---------- */
.h-dlg { width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px -30px rgba(18,20,19,.45); overflow: auto; }
.h-dlg::backdrop { background: rgba(18,20,19,.3); }
.h-dlg-top { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; padding: 12px 14px 0; background: var(--bg); }
.h-dlg-x { height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; font-size: 14.5px; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.h-dlg-x:hover { color: var(--ink); }
.h-dlg-body { padding: 4px clamp(20px, 4vw, 40px) 36px; }

/* ---------- narrow ---------- */
@media (max-width: 760px) {
  :root { --hd: 60px; }
  .h-hd-in { gap: 12px; }
  .h-nav, .h-hd .h-btn2, .h-lang { display: none; }
  .h-menu-btn { display: inline-grid; margin-right: -10px; }
  .h-mnav { position: absolute; top: var(--hd); left: 0; right: 0; z-index: 5; flex-direction: column; align-items: stretch; padding: 0 var(--gut) 18px; background: var(--bg); border-bottom: 1px solid var(--line-strong); }
  .h-hd.open .h-mnav { display: flex; }
  .h-mnav > a:not(.btn-ink) { padding: 15px 0; color: inherit; text-decoration: none; font-size: 18px; border-top: 1px solid var(--line); }
  .h-mlang { padding: 8px 0; border-top: 1px solid var(--line); }
  .h-mlang .lang-btn { height: 44px; padding: 0; font-size: 15px; }
  .h-mlang .lang-menu { left: 0; right: auto; }
  .h-mcta { margin-top: 10px; }
  .h-foot-lang { margin-left: 0; }
  /* phones: the request takes the whole screen, no floating card with its own scroll */
  .h-dlg { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; border-radius: 0; }

  /* the open menu: the page under it dims and stays put, a tap on the veil closes it (site.js) */
  .h-hd.open::after { content: ""; position: fixed; left: 0; right: 0; top: var(--hd); bottom: 0; z-index: 4; background: rgba(18,20,19,.3); animation: bw-veil-in .24s ease-out both; }
  html:has(.h-hd.open) { overflow: hidden; }
  /* the languages open in the menu's own flow, two columns, not as a card over the button */
  .h-mlang .lang-menu { position: static; display: none; grid-template-columns: 1fr 1fr; gap: 0 12px; min-width: 0; padding: 0 0 6px; margin: 0; background: transparent; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  .h-mlang.open .lang-menu { display: grid; }
  .h-mlang .lang-menu a { min-height: 44px; align-items: center; padding: 0; font-size: 15px; }
  .h-mlang .lang-menu a:hover, .h-mlang .lang-menu a:focus-visible { background: transparent; color: var(--ink); }
  .h-mlang .lang-menu a[aria-current="true"]::after { margin-left: 0; order: 0; }
  .h-mlang .lang-menu a[aria-current="true"] { justify-content: flex-start; gap: 10px; }

  /* finger-sized targets (44 px) where the text alone is smaller; negative margins keep every line in place */
  .h-brand { padding: 8px 0; margin: -8px 0; }
  .h-more-l { padding: 9px 0; margin: -9px 0; }
  .h-foot-nav { gap: 0 28px; }
  .h-foot-nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .h-foot .lang-btn, .h-dlg-x { height: 44px; }
  .h-foot-in { row-gap: 14px; }
  .legal a { padding: 11px 0; } /* inline: the padding widens the target, the lines stay where they are */
}

/* blocks come in as the page scrolls (owner, 27.10; the home page only, the audit and the questions): the left
   part, then, a little further down, the right part (data-reveal = 0 or 1; site.js sets where each is triggered). Only when the page says .rv (an inline script in the head, removed
   again if site.js never starts); with reduced motion everything is simply there. */
.rv [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--rv-i, 0) * 150ms); }
.rv [data-reveal].is-in { opacity: 1; transform: none; }
/* the question mark draws itself instead of rising; its dot comes last */
.rv .h-faq-mark[data-reveal] { opacity: .32; transform: none; transition: none; }
.rv .h-faq-mark path.ln { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
/* a class, not [pathLength]: Chromium does not restyle SVG children selected by that attribute when the svg's class changes */
.rv .h-faq-mark.is-in path.ln { animation: rv-draw 2.4s var(--ease) forwards; }
@keyframes rv-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.rv .h-faq-mark path.dot { opacity: 0; transition: opacity .8s ease-out 2s; }
.rv .h-faq-mark.is-in path.dot { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .rv [data-reveal], .rv .h-faq-mark path { opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; transition: none !important; animation: none !important; }
  .rv .h-faq-mark[data-reveal] { opacity: .32 !important; }
}
