/* Top Nav — plain scoped CSS (shadow DOM), mobile-first; tablet 768px, desktop 1280px. Self-contained. */

.top-nav,
.top-nav *,
.top-nav *::before,
.top-nav *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family, 'IBM Plex Sans'), sans-serif;
}

.top-nav {
  --top-nav-height: 57px;
  --top-nav-top: 14px;
  --top-nav-angle: 25.7deg;
  position: relative;
  z-index: 50;
  width: 100%;
  height: 0;
  padding: 0 16px;
  color: #fff;
}

.top-nav--sticky {
  position: sticky;
  top: 0;
}

.top-nav__bar {
  position: relative;
  top: var(--top-nav-top);
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  height: var(--top-nav-height);
  padding: 0 29px 0 31px;
}

.top-nav__bar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 10.5px;
  bottom: 0;
  left: 10.5px;
  z-index: -1;
  border-radius: 17px 5px 17px 5px;
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(43px);
  backdrop-filter: blur(43px);
  transform: skewX(calc(-1 * var(--top-nav-angle)));
}

/*
 * Once TopNav has drawn the exact outline (slantShape.ts), the bar and CTA are clipped to it instead of skewed:
 * skewX shears their rounded corners into tilted ellipses that don't match the hero notch. The unskewed boxes are
 * widened by half the slant (height × tan(angle) / 2 = height × 0.2406) on each side so the shape covers the same
 * footprint the skewed box did; the CTA's fill moves to its ::before for that, so its layout box doesn't change. Radii are Figma's (nav Vector 2, CTA Vector 3), clockwise from top-left.
 */
.top-nav__bar--shaped::before {
  --top-nav-shape-radii: 17 5 25 5;
  right: calc(10.5px - var(--top-nav-height) * 0.2406);
  left: calc(10.5px - var(--top-nav-height) * 0.2406);
  border-radius: 0;
  transform: none;
  -webkit-clip-path: var(--top-nav-bar-shape);
  clip-path: var(--top-nav-bar-shape);
}

.top-nav__bar--shaped .top-nav__cta {
  isolation: isolate;
  border-radius: 0;
  background: none;
  transform: none;
}

.top-nav__bar--shaped .top-nav__cta::before {
  content: '';
  position: absolute;
  top: 0;
  right: calc((var(--top-nav-height) - 8px) * -0.2406);
  bottom: 0;
  left: calc((var(--top-nav-height) - 8px) * -0.2406);
  z-index: -1;
  background: linear-gradient(100deg, #e6bc6c 0%, #ebcb8f 50%, #f0dab1 100%);
  -webkit-clip-path: var(--top-nav-cta-shape);
  clip-path: var(--top-nav-cta-shape);
}

.top-nav__bar--shaped .top-nav__cta-label {
  transform: none;
}

/* A slow light sweep crosses the gold CTA every 7s. */
@keyframes top_nav_cta_shimmer {
  0%,
  78% {
    background-position:
      160% 0,
      0 0;
  }
  100% {
    background-position:
      -60% 0,
      0 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .top-nav__cta,
  .top-nav__bar--shaped .top-nav__cta::before {
    background-image:
      linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.55) 50%, transparent 62%),
      linear-gradient(100deg, #e6bc6c 0%, #ebcb8f 50%, #f0dab1 100%);
    background-repeat: no-repeat;
    background-size:
      250% 100%,
      100% 100%;
    animation: top_nav_cta_shimmer 7s cubic-bezier(0.45, 0, 0.25, 1) 2.4s infinite;
  }

  .top-nav__bar--shaped .top-nav__cta {
    background: none;
    animation: none;
  }
}

/* Scroll progress: a 2px champagne hairline across the top of the viewport, driven by the page scroll (no JS).
   Browsers without scroll-driven animations simply don't show it. */
.top-nav__progress {
  display: none;
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .top-nav__progress {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 70;
      display: block;
      width: 100%;
      height: 2px;
      background: linear-gradient(90deg, rgba(230, 188, 108, 0), #e6bc6c 30%, #f0dab1);
      transform-origin: 0 50%;
      pointer-events: none;
      animation: top_nav_progress linear both;
      animation-timeline: scroll(root block);
    }
  }
}

@keyframes top_nav_progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.top-nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10.7px;
  width: 20px;
  height: 100%;
  margin-right: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.top-nav__toggle-line {
  display: block;
  width: 20px;
  height: 1.8px;
  border-radius: 1px;
  background: #fff;
}

.top-nav__logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

.top-nav__logo-mark {
  display: block;
  width: 136px;
  height: auto;
}

.top-nav__links {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: 32px;
}

.top-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 21px 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.31;
  text-decoration: none;
  white-space: nowrap;
}

/* Champagne gold on hover (Figma CTA gradient's light stop), no underline. */
.top-nav__link:hover,
.top-nav__link:focus-visible {
  color: #f0dab1;
  outline: none;
}

.top-nav__cta {
  display: none;
  position: relative;
  align-self: stretch;
  flex: 0 0 auto;
  margin: 4px 0 4px 23px;
  align-items: center;
  justify-content: center;
  padding: 0 25px;
  border-radius: 1px 5px 27px 1px;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.31;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(100deg, #e6bc6c 0%, #ebcb8f 50%, #f0dab1 100%);
  transform: skewX(calc(-1 * var(--top-nav-angle)));
  transition: filter 0.2s ease;
}

.top-nav__cta:hover,
.top-nav__cta:focus-visible {
  filter: brightness(1.06);
  outline: none;
}

.top-nav__cta-label {
  display: block;
  transform: skewX(var(--top-nav-angle));
}

.top-nav__menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 14px 0 22px;
  border-radius: 0 0 24px 24px;
  background:
    radial-gradient(55% 32% at 50% 56%, rgba(128, 78, 30, 0.55), rgba(128, 78, 30, 0) 100%),
    linear-gradient(180deg, #221f1c 0%, #2c231b 24%, #4b3217 56%, #2e1d0f 82%, #140d07 100%);
  -webkit-backdrop-filter: blur(47px);
  backdrop-filter: blur(47px);
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.top-nav__menu[hidden] {
  display: none;
}

.top-nav--menu-open .top-nav__bar {
  visibility: hidden;
}

.top-nav__menu-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  height: var(--top-nav-height);
  padding: 0 20px 0 32px;
}

.top-nav__menu-logo-mark {
  display: block;
  width: 200px;
  height: auto;
}

.top-nav__close {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}

.top-nav__close-label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12.8px;
  font-weight: 500;
  line-height: 1.31;
}

.top-nav__close-icon {
  display: block;
  width: 15.6px;
  height: 16.1px;
}

.top-nav__close:focus-visible {
  outline: 2px solid #e0b25c;
  outline-offset: 4px;
  border-radius: 4px;
}

@keyframes top_nav_menu_links {
  from {
    opacity: 0;
    translate: 0 -10px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.top-nav__menu-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding: 0 25px;
  animation: top_nav_menu_links 500ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both;
}

.top-nav__menu-link {
  padding: 21px 0;
  color: #fff;
  font-size: min(28px, 7.2vw);
  font-weight: 500;
  line-height: 1.31;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.top-nav__menu-link:not(:last-child) {
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.5);
}

.top-nav__menu-link:hover {
  color: #f0dab1;
}

.top-nav__menu-link:focus-visible {
  outline: 2px solid #e0b25c;
  outline-offset: 4px;
}

.top-nav__menu-actions {
  flex: 0 0 auto;
  margin-top: 20px;
  padding: 0 20px;
}

a.top-nav__menu-cta {
  width: 100%;
  min-width: 180px;
  padding: 22px 28px;
  background: #fff;
  font-size: 20px;
}

@media (min-width: 768px) {
  .top-nav {
    --top-nav-height: 71px;
    --top-nav-top: 27px;
    padding: 0 35px;
  }

  .top-nav__bar {
    padding: 0 18.5px 0 50px;
  }

  .top-nav__bar::before {
    right: 14px;
    left: 17px;
    border-radius: 21px 6.5px 21px 6.5px;
    -webkit-backdrop-filter: blur(54px);
    backdrop-filter: blur(54px);
  }

  .top-nav__bar--shaped::before {
    --top-nav-shape-radii: 21 6.5 31.5 6.5;
    right: calc(14px - var(--top-nav-height) * 0.2406);
    left: calc(17px - var(--top-nav-height) * 0.2406);
  }

  .top-nav__toggle,
  .top-nav__menu {
    display: none;
  }

  .top-nav__links,
  .top-nav__cta {
    display: flex;
  }

  .top-nav__logo-mark {
    width: 154px;
  }
}

@media (min-width: 768px) {
  .top-nav--compact .top-nav__bar:not(.top-nav__bar--measure) {
    padding: 0 29px 0 31px;
  }

  .top-nav--compact .top-nav__bar:not(.top-nav__bar--measure) .top-nav__toggle,
  .top-nav--compact .top-nav__menu {
    display: flex;
  }

  .top-nav--compact .top-nav__menu[hidden] {
    display: none;
  }

  .top-nav--compact .top-nav__bar:not(.top-nav__bar--measure) .top-nav__links,
  .top-nav--compact .top-nav__bar:not(.top-nav__bar--measure) .top-nav__cta {
    display: none;
  }
}

.top-nav__bar--measure {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (min-width: 1280px) {
  .top-nav {
    --top-nav-top: 26px;
    padding: 0 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-nav__cta {
    transition: none;
  }

  .top-nav__menu-links {
    animation: none;
  }
}

/* The Edge pill CTA (Figma `button`): white, SemiBold, fully rounded; `--gold` is the nav gradient variant. */

a.edge-button,
button.edge-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 146px;
  margin: 0;
  padding: 18px 23px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-family: var(--font-family, 'IBM Plex Sans'), sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

a.edge-button:hover,
button.edge-button:hover {
  background: #f0dab1;
  box-shadow: 0 0 24px rgba(240, 218, 177, 0.35);
}

a.edge-button:active,
button.edge-button:active {
  transform: scale(0.98);
}

a.edge-button:focus-visible,
button.edge-button:focus-visible {
  outline: 2px solid #e0b25c;
  outline-offset: 3px;
}

a.edge-button--gold,
button.edge-button--gold {
  background: linear-gradient(100deg, #e6bc6c 0%, #ebcb8f 50%, #f0dab1 100%);
}

@media (min-width: 1280px) {
  a.edge-button,
  button.edge-button {
    min-width: 180px;
    padding: 22px 28px;
    font-size: 20px;
  }
}

/* Menu motion: the panel unrolls from the top, links rise out of a blur one after another while their gold divider
   draws in, the CTA arrives last with the nav CTA's light sweep, and the warm glow breathes. Closing rolls it back up. */
@keyframes top_nav_menu_unroll {
  from {
    clip-path: inset(0 0 100% 0 round 0 0 24px 24px);
  }
  to {
    clip-path: inset(0 0 0 0 round 0 0 24px 24px);
  }
}

@keyframes top_nav_menu_rollup {
  from {
    clip-path: inset(0 0 0 0 round 0 0 24px 24px);
  }
  to {
    clip-path: inset(0 0 100% 0 round 0 0 24px 24px);
  }
}

@keyframes top_nav_menu_item_in {
  from {
    opacity: 0;
    translate: 0 18px;
    filter: blur(8px);
  }
  to {
    opacity: 1;
    translate: 0 0;
    filter: blur(0);
  }
}

@keyframes top_nav_menu_rule_in {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes top_nav_menu_glow {
  0%,
  100% {
    opacity: 0.75;
    scale: 1;
  }
  50% {
    opacity: 1;
    scale: 1.12;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .top-nav__menu--open {
    animation: top_nav_menu_unroll 620ms cubic-bezier(0.76, 0, 0.24, 1) both;
  }

  .top-nav__menu--closing {
    animation: top_nav_menu_rollup 380ms cubic-bezier(0.76, 0, 0.24, 1) both;
  }

  .top-nav__menu::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(50% 30% at 50% 58%, rgba(224, 178, 92, 0.28), rgba(224, 178, 92, 0));
    pointer-events: none;
    animation: top_nav_menu_glow 6s ease-in-out infinite;
  }

  .top-nav__menu {
    isolation: isolate;
  }

  .top-nav__menu-bar {
    animation: top_nav_menu_links 500ms cubic-bezier(0.16, 1, 0.3, 1) 300ms both;
  }

  .top-nav__menu-links {
    animation: none;
  }

  .top-nav__menu-link {
    position: relative;
    animation: top_nav_menu_item_in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .top-nav__menu-link:nth-child(1) {
    animation-delay: 280ms;
  }

  .top-nav__menu-link:nth-child(2) {
    animation-delay: 360ms;
  }

  .top-nav__menu-link:nth-child(3) {
    animation-delay: 440ms;
  }

  .top-nav__menu-link:nth-child(4) {
    animation-delay: 520ms;
  }

  .top-nav__menu-link:not(:last-child) {
    border-bottom-color: transparent;
  }

  .top-nav__menu-link:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -0.5px;
    left: 0;
    height: 0.5px;
    background: linear-gradient(90deg, rgba(240, 218, 177, 0.9), rgba(255, 255, 255, 0.5) 60%);
    transform-origin: 0 50%;
    animation: top_nav_menu_rule_in 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: inherit;
  }

  .top-nav__menu-actions {
    animation: top_nav_menu_item_in 700ms cubic-bezier(0.16, 1, 0.3, 1) 600ms both;
  }

  a.top-nav__menu-cta {
    background-image: linear-gradient(105deg, transparent 38%, rgba(240, 218, 177, 0.7) 50%, transparent 62%);
    background-color: #fff;
    background-repeat: no-repeat;
    background-size: 250% 100%;
    animation: top_nav_menu_cta_shimmer 5s cubic-bezier(0.45, 0, 0.25, 1) 1.2s infinite;
  }

  .top-nav__menu--closing .top-nav__menu-bar,
  .top-nav__menu--closing .top-nav__menu-link,
  .top-nav__menu--closing .top-nav__menu-actions {
    opacity: 0;
    animation: none;
    transition: opacity 160ms ease;
  }
}

@keyframes top_nav_menu_cta_shimmer {
  0%,
  70% {
    background-position: 160% 0;
  }
  100% {
    background-position: -60% 0;
  }
}

