/* Burger button and full-screen menu shared by the variants. */

html.menu-open {
  overflow: hidden;
}

.burger {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #12141b;
  box-shadow: inset 0 0 0 1.5px var(--color-accent-soft);
  color: var(--color-text);
  cursor: pointer;
  transition: transform 140ms ease-out;
}

.burger:active {
  transform: scale(0.92);
}

.burger__lines {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

.burger__lines i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.burger__lines i:nth-child(1) {
  top: 0;
}

.burger__lines i:nth-child(2) {
  top: 6px;
  right: 0;
  left: auto;
  width: 66%;
  background: var(--color-accent-light);
}

.burger__lines i:nth-child(3) {
  top: 12px;
}

/* Overlay: an iris grows from the button */

.menu {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--color-text);
}

.menu::backdrop {
  background: transparent;
}

.menu__panel {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 3px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  overflow: hidden auto;
  background: var(--color-bg);
  clip-path: circle(0 at var(--mx) var(--my));
  transition: clip-path 0.42s cubic-bezier(0.7, 0, 0.2, 1);
}

.menu.is-open .menu__panel {
  clip-path: circle(150vmax at var(--mx) var(--my));
}

.menu__panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 11, 18, 0.88), rgba(9, 11, 18, 0.5)), linear-gradient(0deg, var(--color-bg) 8%, transparent 60%);
}

.menu__photo {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}

.menu__head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
}

.menu__brand {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.menu__brand b {
  color: var(--color-accent);
  font-weight: inherit;
}

.menu__close .burger__lines i {
  transition: transform 0.26s ease-out, opacity 0.15s ease;
}

.menu.is-open .menu__close .burger__lines i:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu.is-open .menu__close .burger__lines i:nth-child(2) {
  opacity: 0;
}

.menu.is-open .menu__close .burger__lines i:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Links */

.menu__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding-block: 8px;
}

.menu__nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  text-decoration: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.26s ease-out, background-color 120ms ease;
}

.menu.is-open .menu__nav a {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.1s + var(--i) * 30ms);
}

.menu__nav a:active {
  background: rgba(255, 113, 10, 0.16);
}

.menu__num {
  flex: none;
  width: 24px;
  color: var(--color-accent-light);
  font-size: 12px;
  font-weight: 600;
}

.menu__mask {
  flex: 1;
  min-width: 0;
}

.menu__label {
  display: block;
  font-size: 29px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.6px;
}

.menu__nav svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--color-accent-light);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Feature card and the main button */

.menu__feature,
.menu__go,
.menu__foot {
  flex: none;
}

.menu__feature {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 113, 10, 0.4);
  border-radius: 18px;
  background: rgba(25, 27, 35, 0.85);
  color: inherit;
  text-decoration: none;
}

.menu__ring {
  flex: none;
  width: 50px;
  height: 50px;
  padding: 2px;
  border-radius: 50%;
  background-image: var(--grad);
}

.menu__ring img {
  display: block;
  width: 46px;
  height: 46px;
  border: 2px solid var(--color-bg);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 12%;
}

.menu__feature b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.menu__feature small {
  color: var(--color-muted-2);
  font-size: 13px;
}

.menu__go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  margin-top: 10px;
  border-radius: 16px;
  background-image: var(--grad);
  box-shadow: 0 8px 22px rgba(255, 89, 0, 0.4);
  color: var(--color-on-accent);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease-out;
}

.menu__go:active {
  transform: scale(0.97);
}

.menu__go svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu__foot {
  margin: 10px 0 0;
  color: var(--color-muted-2);
  font-size: 12px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .menu *,
  .burger,
  .burger__lines i {
    transition: none !important;
  }
}
