/*
  Spotlight 2026 on phones: the dock and the full-screen menu (js/menu.js).
  The dock is two flat tape tabs at the thumb. The menu is the night colourway with the
  identity's ring and dot in the corner and the sections set large, like the speaker names.
  Wide windows keep the hero navigation instead, so neither is shown from 900 px up.
*/

:root {
  --layer-dock: 20;
  --dock-gap: 8px;
  --dock-height: 52px;
}

/* ---------- Dock ---------- */

.dock {
  position: fixed;
  left: var(--space-page);
  right: var(--space-page);
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: var(--layer-dock);
  display: flex;
  gap: var(--dock-gap);
  pointer-events: none;
  transform: translateY(calc(100% + 28px));
  transition: transform 420ms var(--ease-out-expo);
}

.dock.is-shown,
.dock:focus-within {
  pointer-events: auto;
  transform: none;
}

/* Without JavaScript nothing slides it in, and there is no menu to open: tickets stay at hand. */
html:not(.js) .dock {
  pointer-events: auto;
  transform: none;
}

html:not(.js) .dock__menu {
  display: none;
}

.dock__menu,
.dock__tickets {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--dock-height);
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  font-family: var(--font-text);
  font-size: var(--text-body);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.45);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--duration-fast) var(--ease-out-expo), background-color var(--duration-fast) linear;
}

.dock__menu {
  flex: none;
  background: var(--color-paper);
  color: var(--color-black);
}

.dock__tickets {
  flex: 1;
  background: var(--color-lime);
  color: var(--color-black);
}

.dock__menu:active,
.dock__tickets:active {
  transform: translateY(1px) scale(0.98);
}

/* Two rings, black outside and paper inside, so focus shows on black, green, blue and lime alike. */
.dock :focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--color-paper), 0 10px 28px rgb(0 0 0 / 0.45);
}

/* Two strips of tape. */
.dock__icon {
  width: 18px;
  height: 2px;
  margin: -6px 0 0;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor;
}

/* ---------- Menu ---------- */

.menu {
  --menu-ring-d: min(118vw, 620px);

  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: max(16px, env(safe-area-inset-top)) var(--space-page) max(24px, env(safe-area-inset-bottom));
  border: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
  background: var(--color-black);
  color: var(--color-paper);
}

@supports (height: 1dvh) {
  .menu {
    height: 100dvh;
  }
}

.menu[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}

.menu:not([open]) {
  display: none;
}

.menu::backdrop {
  background: var(--color-black);
}

html.is-menu-open {
  overflow: hidden;
}

/* The identity's ring and dot, cropped by the bottom-right corner. Fixed, so the parts that
   hang off the screen never make the menu itself scroll on short phones. */
.menu__art {
  position: fixed;
  right: calc(var(--menu-ring-d) * -0.42);
  bottom: calc(var(--menu-ring-d) * -0.34);
  width: var(--menu-ring-d);
  height: var(--menu-ring-d);
  pointer-events: none;
}

.menu__ring,
.menu__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  translate: -50% -50%;
}

.menu__ring {
  width: 100%;
  height: 100%;
  border: calc(var(--menu-ring-d) * var(--ring-stroke-ratio)) solid var(--color-blue);
}

.menu__dot {
  width: calc(var(--menu-ring-d) * var(--dot-ratio));
  height: calc(var(--menu-ring-d) * var(--dot-ratio));
  background: var(--color-paper);
}

.menu__top,
.menu__nav,
.menu__foot {
  position: relative;
}

.menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.menu__wordmark {
  width: min(36vw, 150px);
}

.menu__close {
  position: relative;
  width: var(--tap-target);
  height: var(--tap-target);
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-paper);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.menu__close::before,
.menu__close::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: currentColor;
  rotate: 45deg;
}

.menu__close::after {
  rotate: -45deg;
}

.menu__close:active {
  color: var(--color-lime);
}

.menu__nav {
  display: grid;
  align-content: center;
  gap: 4px;
}

.menu__link {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: start;
  padding: 8px 0;
  color: var(--color-pink);
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 14vw, 4rem);
  font-weight: 400;
  line-height: var(--leading-display);
  letter-spacing: 0.015em;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--duration-fast) linear;
}

/* "Become a partner": lime, so it stands out from the pink links. */
.menu__link--accent {
  color: var(--color-lime);
}

.menu__link .wipe__inner {
  padding-top: 0.05em;
}

/* The display face has no digits, so they fall back to Gotham, which runs larger: bring them to its cap height. */
.menu__digits {
  font-size: 0.8em;
  letter-spacing: 0;
}

.menu__link:hover,
.menu__link:active {
  color: var(--color-paper);
}

.menu__num {
  padding-top: 0.35em;
  color: var(--color-lime);
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}

.menu__foot {
  display: grid;
  justify-items: start;
  gap: 10px;
  max-width: 55%;
}

.menu__when {
  font-family: var(--font-label);
  font-size: var(--text-small);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.menu__buy {
  margin-top: 6px;
}

.menu__mail {
  color: var(--color-paper-soft);
  font-size: var(--text-small);
  text-underline-offset: 3px;
}

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

/* High-contrast modes drop backgrounds: keep the drawn X and the menu strips visible. */
@media (forced-colors: active) {
  .menu__close::before,
  .menu__close::after,
  .dock__icon {
    forced-color-adjust: none;
    background: ButtonText;
  }

  .dock__icon {
    box-shadow: 0 6px 0 ButtonText;
  }
}

/* A field scrolled to by keyboard never ends up under the dock. */
@media (max-width: 899.98px) {
  html {
    scroll-padding-bottom: calc(var(--dock-height) + 24px);
  }
}

@media (min-width: 900px) {
  .dock,
  .menu,
  .menu[open] {
    display: none;
  }
}
