/* Shared across brightroot.ai pages: the header menus and the product row.
   Both are drawn from the one product list in site.js. */

/* Header dropdowns (Products, Sign in). Open on hover and on keyboard focus. */
.nav-dd { position: relative; }
.nav-dd > .nav-a { display: inline-flex; align-items: center; gap: 5px; }
.nav-caret { font-size: 10px; opacity: .75; transition: transform .15s; }
.nav-dd:hover .nav-caret, .nav-dd:focus-within .nav-caret { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 14px); left: -18px; z-index: 60;
  min-width: 340px; padding: 8px;
  background: #ffffff; border: 1px solid rgba(30,36,34,.14); border-radius: 16px;
  box-shadow: 0 22px 50px rgba(18,53,42,.18);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-menu--right { left: auto; right: -12px; min-width: 290px; }
.nav-dd:hover .nav-menu, .nav-dd:focus-within .nav-menu { opacity: 1; visibility: visible; transform: none; }
.nav-item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 11px; color: #1b2421; text-decoration: none; }
.nav-item:hover, .nav-item:focus-visible { background: #f4f2ed; color: #1b2421; }
.nav-item b { display: block; font-size: 14.5px; font-weight: 600; color: #1b2421; }
.nav-item small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; font-weight: 400; color: #5b625f; }
.nav-ico { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; }
@media (max-width: 1000px) { .nav-sec { display: none !important; } }
@media (max-width: 640px) { .nav-dd { display: none; } }

/* Product row (homepage). Always one line. When every product fits, the items
   share the width; when they don't (more products, or a narrower screen) the
   same row becomes a carousel: swipe or trackpad with snap, arrow buttons, and
   a fade on whichever side has more. Names are never cut off. */
.prow-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.prow-nav { display: flex; gap: 8px; flex: none; }
.prow-nav[hidden] { display: none; }
.prow-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid rgba(30,36,34,.16); background: #ffffff; color: #1b2421; cursor: pointer; transition: border-color .15s, opacity .15s; }
.prow-btn:hover:not(:disabled) { border-color: #1b2421; }
.prow-btn:disabled { opacity: .35; cursor: default; }
.prow-btn:focus-visible { outline: 2px solid #167c59; outline-offset: 2px; }
.prow-viewport { position: relative; }
.prow {
  display: flex; flex-wrap: nowrap; gap: 12px; margin: -6px -6px -22px; padding: 6px 6px 22px; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 6px; overscroll-behavior-x: contain; scrollbar-width: none;
}
.prow::-webkit-scrollbar { display: none; }
.prow > li { display: flex; flex: 1 0 auto; min-width: 280px; scroll-snap-align: start; }
.prow-viewport.more-right .prow { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent); }
.prow-viewport.more-left .prow { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 72px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 72px), transparent); }
.prow-viewport.more-left.more-right .prow { -webkit-mask-image: linear-gradient(to right, transparent, #000 72px, #000 calc(100% - 72px), transparent); mask-image: linear-gradient(to right, transparent, #000 72px, #000 calc(100% - 72px), transparent); }
.prow-all { border-style: dashed; background: rgba(255,255,255,.6); }
.prow-item {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 80px; padding: 14px 16px 14px 14px;
  border: 1px solid rgba(30,36,34,.12); border-radius: 18px; color: #1b2421;
  background: linear-gradient(135deg, #ffffff 30%, var(--wash, #eef4ee) 100%);
  box-shadow: 0 10px 26px rgba(39,75,59,.06); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.prow-item:hover { border-color: var(--accent, #167c59); box-shadow: 0 18px 38px rgba(39,75,59,.11); transform: translateY(-3px); color: #1b2421; }
.prow-item .nav-ico { width: 46px; height: 46px; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(30,36,34,.06); }
.prow-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.prow-name { font-size: 16.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.prow-desc { font-size: 13.5px; line-height: 1.3; color: #5b625f; white-space: nowrap; }
.prow-go {
  margin-left: auto; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(30,36,34,.14); background: rgba(255,255,255,.9); color: var(--accent, #167c59); font-weight: 700;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.prow-item:hover .prow-go { background: var(--accent, #167c59); border-color: var(--accent, #167c59); color: #ffffff; transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) { .prow-item, .prow-item:hover, .prow-item:hover .prow-go { transition: none; transform: none; } }

/* Scroll-in motion (site.js adds these only to content below the fold). */
html .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
html .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html .reveal { opacity: 1; transform: none; transition: none; } }

/* Explainer videos (YouTube, privacy-enhanced mode). On product pages the
   hero plays the video silently on a loop over its own still image; anywhere
   else a Watch button opens it with sound in a pop-up dialog. */
.hero-vid { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #0c241b; box-shadow: 0 30px 70px rgba(0,0,0,.30); cursor: pointer; }
.hero-vid > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.hero-vid > img { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease; }
.hero-vid.is-playing > img { opacity: 0; }
/* Top corner, so the captions along the bottom stay readable. */
.hero-vid > .vid-badge { position: absolute; z-index: 2; top: 14px; right: 14px; gap: 8px; padding: 6px 13px 6px 6px; font-size: 13px; background: rgba(18,24,22,.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero-vid > .vid-badge i { width: 24px; height: 24px; }
/* Phones: the speaker icon and the length are enough on a small picture. */
@media (max-width: 560px) { .hero-vid > .vid-badge { top: 10px; right: 10px; gap: 6px; padding: 5px 10px 5px 5px; font-size: 0; } .hero-vid > .vid-badge i { width: 22px; height: 22px; } .hero-vid > .vid-badge span { font-size: 12px; color: #fff; } }
button.pill-ghost { background: transparent; font-family: inherit; cursor: pointer; }
.vid-badge:focus-visible { outline: 3px solid #2fbc85; outline-offset: 3px; }
.vid-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 30px 70px rgba(18,53,42,.22); }
.vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Homepage: a small badge on the product image opens the video in a dialog. */
.shot > .vid-badge { position: absolute; z-index: 3; left: 50%; top: calc(50% + 20px); translate: -50% -50%; white-space: nowrap; }
/* On the homepage the buttons take their product's own colour (--accent on each block). */
.shot > .vid-badge { padding: 10px 18px 10px 10px; font-size: 15px; background: var(--accent, #167c59); box-shadow: 0 0 0 5px rgba(255,255,255,.55), 0 16px 34px rgba(0,0,0,.24); }
.shot > .vid-badge:hover { background: var(--accent, #167c59); filter: brightness(1.12); }
.shot > .vid-badge i { width: 28px; height: 28px; }
.shot > .vid-badge i path { fill: var(--accent, #167c59); }
.vid-badge { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px 9px 10px; border: 0; border-radius: 999px; background: rgba(18,24,22,.86); color: #fff; font: 600 14px "Instrument Sans", sans-serif; cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,.22); transition: background .2s, transform .2s; }
.vid-badge:hover { background: #167c59; transform: translateY(-1px); }
.vid-badge i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; }
.vid-badge span { color: #b9d8c8; font-weight: 500; }
.vid-modal { width: min(calc(100% - 32px), 1100px, calc((100vh - 150px) * 16 / 9)); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; background: transparent; overflow: visible; }
.vid-modal::backdrop { background: rgba(10,14,13,.82); }
.vid-close { position: absolute; right: 0; top: -52px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: transparent; color: #fff; font: 600 14px "Instrument Sans", sans-serif; cursor: pointer; }
.vid-close:hover { background: rgba(255,255,255,.12); }
@media (prefers-reduced-motion: reduce) { .hero-vid > img, .vid-badge { transition: none; } }
