/* One site navigation, in the home page's design: a fixed 64px bar whose glass surface has a
   curved lower edge (nav-edge.svg), the primary links centred, and "Sign in" plus a pill call to
   action on the right. The glass only shows once the page scrolls or the menu opens, so a hero
   can run up behind it. landing.js drives --menu-expansion so the glass grows with the menu.
   Colours follow the theme through light-dark(); the home page pins color-scheme: light. */
@property --menu-expansion { syntax: "<length>"; inherits: true; initial-value: 0px; }

.landing-shell:not(.landing-shell--home), body.product-page { padding-top: var(--header-height); }
/* The glass shows once this point, just under the bar, has scrolled away (landing.js). */
.landing-header-threshold { position: absolute; top: 30px; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.landing-header {
  --header-ink: var(--color-ink);
  --header-glass: linear-gradient(115deg, light-dark(rgb(255 253 247 / .52), rgb(48 34 24 / .82)), light-dark(rgb(251 247 239 / .38), rgb(33 20 14 / .78)));
  --header-glass-solid: var(--color-paper);
  --header-edge: light-dark(rgb(255 255 255 / .7), rgb(255 255 255 / .16));
  --header-gutter: clamp(24px, 6.5vw, 100px);
  --menu-expansion: 0px;
  position: fixed; z-index: var(--landing-z-menu); inset: 0 0 auto; height: var(--header-height);
  border: 0; background: transparent; color: var(--header-ink); line-height: 1.5;
}
.landing-header::before {
  content: ""; position: absolute; inset: 0 0 auto; height: calc(80px + var(--menu-expansion)); pointer-events: none;
  -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 79px) no-repeat, url("/images/listening/nav-edge.svg") bottom / 100% 80px no-repeat;
  mask: linear-gradient(#000, #000) top / 100% calc(100% - 79px) no-repeat, url("/images/listening/nav-edge.svg") bottom / 100% 80px no-repeat;
  background: var(--header-glass);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .55);
  transition: opacity 200ms ease;
}
.listening-header__edge { position: absolute; inset: 0 0 auto; width: 100%; height: 80px; pointer-events: none; overflow: visible; fill: none; stroke: var(--header-edge); stroke-width: 1; transform: translateY(var(--menu-expansion)); transition: opacity 200ms ease; }
.landing-header:not([data-scrolled]):not([data-menu-open])::before,
.landing-header:not([data-scrolled]):not([data-menu-open]) .listening-header__edge { opacity: 0; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .landing-header::before { background: var(--header-glass-solid); } }
@media (prefers-reduced-transparency: reduce) { .landing-header::before { background: var(--header-glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; } }

.landing-header__inner { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; width: min(calc(100% - 2 * var(--header-gutter)), 1320px); height: var(--header-height); margin-inline: auto; padding: 0; }
.landing-header__inner:has(> .processing-tasks) { grid-template-columns: 1fr auto auto auto; }
.landing-wordmark { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; color: var(--header-ink); text-decoration: none; white-space: nowrap; }
.landing-header .ragafied-brand-logo { display: block; width: 140px; }
.landing-header__nav, .landing-header__account { display: flex; align-items: center; }
.landing-header__nav { gap: clamp(24px, 3.4vw, 55px); }
.landing-header__account { justify-self: end; gap: 24px; }
.landing-header__nav a, .listening-header__sign-in, .landing-sign-out { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--header-ink); font: 400 12px/1.25 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer; }
.landing-header__nav a[aria-current="page"] { color: var(--color-accent); }
.landing-header .theme-toggle { color: var(--header-ink); }
.landing-header .button_to { margin: 0; }
.landing-header .listening-button { min-height: 42px; padding: 10px 22px; font-size: 12px; }
.landing-mobile-actions { display: none; }
.landing-header :is(a, summary, button):focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .landing-header__nav a:hover, .listening-header__sign-in:hover, .landing-sign-out:hover { text-decoration: underline; text-underline-offset: 4px; }
}

/* Medium widths keep the links but tighten the spacing; "Sign in" goes because the pill leads
   to the same page. Below 768px the links fold into the menu; the glass expands to hold it. */
@media (max-width: 74.999rem) {
  .landing-header__inner { gap: 16px; }
  .landing-header__nav { gap: clamp(14px, 2vw, 24px); }
  .landing-header__account { gap: 14px; }
  .landing-header .listening-button { gap: 10px; padding: 10px 18px; }
}
@media (min-width: 48rem) and (max-width: 63.999rem) {
  .landing-header .listening-header__sign-in { display: none; }
}
@media (max-width: 47.999rem) {
  html[data-landing-menu-open] { overflow: hidden; }
  .landing-header__inner { grid-template-columns: 1fr auto; }
  .landing-header__inner:has(> .processing-tasks) { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
  .landing-header__nav, .landing-header__account { display: none; }
  .landing-mobile-actions { display: flex; align-items: center; gap: 6px; }
}
.landing-mobile-nav summary { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--header-ink); cursor: pointer; list-style: none; }
.landing-mobile-nav summary::-webkit-details-marker { display: none; }
.landing-mobile-nav__icon { position: relative; display: block; width: 1rem; height: 1rem; }
.landing-mobile-nav__icon i { position: absolute; inset: .34rem 0 auto; height: 1.5px; border-radius: 99px; background: currentColor; transition: transform var(--dur-short) var(--ease-out); }
.landing-mobile-nav__icon i:last-child { transform: translateY(.32rem); }
.landing-mobile-nav[open] .landing-mobile-nav__icon i:first-child { transform: translateY(.16rem) rotate(45deg); }
.landing-mobile-nav[open] .landing-mobile-nav__icon i:last-child { transform: translateY(.16rem) rotate(-45deg); }
.landing-mobile-nav nav {
  position: fixed; inset: var(--header-height) 0 auto; display: grid; gap: 20px; width: 100%;
  max-height: calc(100dvh - 96px); padding: 12px var(--header-gutter) 32px; overflow-y: auto; overscroll-behavior: contain;
  background: transparent;
  transform: translateY(calc(var(--menu-expansion) - var(--menu-height, 0px)));
  clip-path: inset(max(0px, calc(var(--menu-height, 0px) - var(--menu-expansion))) 0 0);
}
.landing-mobile-nav:not([open]) nav { display: none; }
.landing-mobile-nav__primary-links, .landing-mobile-nav__utility-links { display: grid; gap: 8px; }
.landing-mobile-nav nav :is(a, .landing-sign-out) { display: flex; align-items: center; min-height: 44px; color: var(--color-ink); font: 400 18px/1.5 var(--font-body); text-decoration: none; }
.landing-mobile-nav nav a[aria-current="page"] { color: var(--color-accent); }
.landing-mobile-nav__utility-links { padding-top: 16px; border-top: 1px solid var(--color-rule); }
@media (prefers-reduced-motion: reduce) {
  .landing-header::before, .listening-header__edge, .landing-mobile-nav__icon i { transition: none; }
}
