/* The top bar, its menus and the page transitions: shared by every page.
   The bar carries its own colours and sizes, so it looks the same on the home page
   as on the product pages. */

.topbar, .sheet {
  --lime: #DCFF2E; --lime-2: #E8FF6E; --lime-rgb: 220, 255, 46;
  --bg: #1A1917; --panel: #201F1C; --ghost: #F3F1EC; --silver: #D6D2CA;
  --muted: #A6A197; --subtle: #949087; --rule: #2F2D29; --rule-2: #3D3A35; --edge: #75716A;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --t-xs: 12px; --t-sm: 14px; --t-md: 16px; --t-lg: 19px;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
  --wrap: 1140px; --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
  font-family: var(--sans); font-weight: 300; line-height: 1.65; letter-spacing: normal; text-align: left;
  color: var(--silver); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
@media (max-width: 600px) { .topbar, .sheet { --t-lg: 17px; } }
.topbar svg, .sheet svg { display: block; max-width: 100%; }
.topbar a, .sheet a { color: inherit; }
.topbar button, .sheet button { font: inherit; color: inherit; }
.topbar :focus-visible, .sheet :focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.skip { position: fixed; left: 16px; top: -80px; z-index: 300; padding: 10px 18px; border-radius: 999px; background: #DCFF2E; color: #1A1917; font: 500 14px/1.65 "Inter", system-ui, sans-serif; text-decoration: none; }
.skip:focus { top: 16px; }

/* ── TOP BAR ── */
.topbar {
  position: fixed; z-index: 60; top: 14px; left: 0; right: 0; margin-inline: auto;
  width: min(calc(100% - 28px), calc(var(--wrap) + 40px)); height: 60px;
  display: flex; align-items: center; gap: 24px; padding: 0 10px 0 22px;
}
/* named only while a page transition runs: at rest the name would stop the frost seeing the page */
.vt .topbar { view-transition-name: topbar; }
/* the frost sits on its own layer, so the menu inside can frost too */
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--r-pill);
  border: 1px solid var(--rule); background: rgba(32, 31, 28, 0.5);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  transition: background-color 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.topbar.scrolled::before { background: rgba(31, 30, 27, 0.88); border-color: var(--rule-2); box-shadow: 0 22px 44px -28px rgba(0, 0, 0, 0.95); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; flex: none; }
.brand svg { width: 32px; height: 13px; overflow: visible; }
.brand svg path { fill: none; stroke: var(--silver); stroke-width: 7; stroke-linecap: round; transition: stroke 0.3s; }
.brand svg circle { fill: var(--lime); }
.brand:hover svg path { stroke: var(--ghost); }
.brand-word { font-size: 16px; font-weight: 200; line-height: 1; letter-spacing: 0.3em; color: var(--ghost); white-space: nowrap; }
.brand-word span { margin-left: -0.14em; font-size: 14px; font-weight: 300; letter-spacing: 0; color: var(--lime); }
.nav { margin-left: auto; }
.nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px;
  border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: 400; color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: color 0.25s, background-color 0.25s;
}
.topbar .nav-link { color: var(--muted); }
.nav-link svg { width: 9px; height: 6px; transition: transform 0.35s var(--ease); }
.topbar .nav-link:hover, .topbar .nav-link[aria-current], .topbar .has-menu:hover > .nav-link, .topbar .has-menu:focus-within > .nav-link { color: var(--ghost); background: rgba(255, 255, 255, 0.055); }
.has-menu { position: relative; }
.has-menu:hover > .nav-link svg, .has-menu:focus-within > .nav-link svg { transform: rotate(180deg); }
.menu {
  position: absolute; top: calc(100% + 14px); left: 50%; width: 340px; padding: 8px;
  border: 1px solid var(--rule-2); border-radius: var(--r-md); background: rgba(32, 31, 28, 0.97);
  box-shadow: 0 34px 70px -30px rgba(0, 0, 0, 0.95);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity 0.25s, transform 0.4s var(--ease), visibility 0.25s;
}
.menu::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.has-menu.dismissed .menu { opacity: 0; visibility: hidden; }
.menu a { display: block; padding: 11px 14px; border-radius: var(--r-sm); text-decoration: none; transition: background-color 0.2s; }
.menu a:hover, .menu a[aria-current] { background: rgba(255, 255, 255, 0.055); }
/* product names also head the rows of the products page */
.product-name { display: block; font-size: var(--t-md); font-weight: 200; line-height: 1.3; letter-spacing: 0.16em; color: var(--ghost); }
.product-name span { font-weight: 300; letter-spacing: 0; color: var(--lime); }
.product-tag { display: block; margin-top: 2px; font-family: var(--mono); font-size: var(--t-xs); font-weight: 300; line-height: 1.5; color: var(--muted); }
.menu a.menu-all { margin-top: 6px; padding-top: 13px; border-top: 1px solid var(--rule); border-radius: 0 0 var(--r-sm) var(--r-sm); font-size: var(--t-sm); font-weight: 500; color: var(--ghost); }
.nav-contact {
  display: inline-flex; align-items: center; height: 40px; padding: 0 20px; flex: none;
  border: 1px solid rgba(var(--lime-rgb), 0.55); border-radius: var(--r-pill);
  font-size: var(--t-sm); font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.topbar .nav-contact { color: var(--lime); }
.topbar .nav-contact:hover { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.nav-contact .short { display: none; }
.burger { display: none; width: 40px; height: 40px; flex: none; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.055); cursor: pointer; }
.topbar .burger { color: var(--silver); }
.burger svg { width: 16px; height: 10px; }
.progress {
  position: absolute; left: 30px; right: 30px; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--lime-rgb), 0), var(--lime));
  transform-origin: 0 50%; transform: scaleX(var(--p, 0)); opacity: 0; transition: opacity 0.35s;
}
.topbar.scrolled .progress { opacity: 1; }
@media (max-width: 760px) {
  .topbar { top: 10px; width: calc(100% - 20px); height: 56px; gap: 10px; padding: 0 8px 0 18px; }
  .js .nav { display: none; }
  .js .burger { display: grid; }
  .js .nav-contact { margin-left: auto; padding: 0 16px; }
  /* without script the links simply wrap under the brand */
  html:not(.js) .topbar { position: absolute; height: auto; flex-wrap: wrap; padding: 8px 14px; }
  html:not(.js) .topbar::before { border-radius: var(--r-lg); }
  html:not(.js) .nav { order: 3; width: 100%; margin: 0; }
  html:not(.js) .nav > ul { flex-wrap: wrap; }
  html:not(.js) .nav-link { padding: 0 10px; }
  html:not(.js) .menu { display: none; }
  html:not(.js) .nav-contact { margin-left: auto; }
}
@media (max-width: 380px) {
  .brand-word { letter-spacing: 0.22em; }
  .nav-contact .long { display: none; }
  .nav-contact .short { display: inline; }
}

/* ── PHONE MENU ── */
.sheet {
  position: fixed; inset: 10px 10px auto 10px; width: auto; max-width: none; max-height: calc(100dvh - 20px);
  margin: 0; padding: 8px 14px 22px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #45423C transparent;
  border: 1px solid var(--rule-2); border-radius: var(--r-lg); background: var(--panel); color: var(--silver);
}
.sheet[open] { animation: sheet-in 0.45s var(--ease); }
.sheet::backdrop { background: rgba(10, 10, 9, 0.66); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; height: 48px; padding-left: 6px; }
.sheet .close { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 1px solid var(--rule-2); border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.sheet .close svg { width: 12px; height: 12px; }
.sheet ul { list-style: none; }
.sheet li a { display: block; padding: 11px 10px; border-radius: var(--r-sm); text-decoration: none; }
.sheet li a[aria-current] { background: rgba(255, 255, 255, 0.055); }
.sheet .label { display: block; padding: 12px 10px 4px; font-family: var(--mono); font-size: var(--t-xs); font-weight: 400; line-height: 1.5; letter-spacing: 0.16em; text-transform: uppercase; color: var(--subtle); }
.sheet .sheet-main { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
.sheet .sheet-main a { font-size: var(--t-lg); font-weight: 300; color: var(--ghost); }
.sheet .btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin-top: 14px; padding: 0 24px; border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: 500; line-height: 1; text-decoration: none; background: var(--lime); color: var(--bg); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-14px); } }

/* ── PAGE TRANSITIONS ── */
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root) { animation: 0.28s ease both fade-out; }
::view-transition-new(root) { animation: 0.45s ease 0.08s both fade; }

@media (prefers-reduced-motion: reduce) {
  .topbar, .topbar *, .topbar::before, .sheet, .sheet::backdrop { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
@media print { .topbar { display: none; } }
