:root {
  --blue: #1c95fd;
  --navy: #062457;
  --white: #ffffff;
  --choc: #3b1e12;
  --gold: #d8963f;
  --cream: #fff3dc;

  --display: "Bagel Fat One", "Readex Pro", system-ui, sans-serif;
  --body: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* type scale, ratio ~1.333 */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.5rem, 6vw, 4.75rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--navy);
  background: var(--blue);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 6px;
}

.events :focus-visible {
  outline-color: var(--cream);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: var(--white);
  border-radius: 999px;
}

.skip:focus {
  top: 1rem;
}

/* ---------- shared bits ---------- */

.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--blue);
}

.display--white {
  color: var(--white);
}

.display--cream {
  color: var(--cream);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 2.9rem;
  padding: 0.65rem 1.35rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 600 var(--step-0) / 1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease-spring),
    background-color 0.2s,
    color 0.2s;
}

.pill:hover {
  transform: translateY(-2px);
}

.pill:active {
  transform: translateY(1px) scale(0.98);
}

.pill--white {
  background: var(--white);
  color: var(--navy);
}

.pill--navy {
  background: var(--navy);
  color: var(--white);
}

.pill--ghost {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.pill--ghost:hover {
  background: var(--navy);
  color: var(--white);
}

.pill--cream {
  background: var(--cream);
  color: var(--choc);
}

.pill--outline {
  background: transparent;
  border-color: var(--cream);
  color: var(--cream);
}

/* ---------- header ---------- */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
}

.top__logo {
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--white);
  text-decoration: none;
}

.top__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.4vw, 2rem);
  font-weight: 500;
}

.top__nav > a:not(.pill) {
  text-decoration: none;
  color: var(--navy);
}

.top__nav > a:not(.pill):hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: max(100svh, 680px);
  display: grid;
  grid-template-columns: 1fr minmax(0, 0.9fr) 1fr;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 1.5rem var(--gutter);
  padding: 6rem var(--gutter) 2.5rem;
  overflow: hidden;
  isolation: isolate;
}

.hero__word {
  position: absolute;
  inset: 0;
  z-index: -1;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 8vh;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(7rem, 28vw, 30rem);
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: var(--white);
  user-select: none;
}

.hero__word span {
  display: inline-block;
  transform-origin: 50% 90%;
}

.hero__tower {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  justify-self: center;
  width: 100%;
  max-width: 420px;
  height: min(86svh, 900px);
  margin-bottom: -1rem;
}

#tower {
  width: 100%;
  height: 100%;
  overflow: visible;
  touch-action: none;
  cursor: crosshair;
}

.tower__ground {
  fill: var(--navy);
  opacity: 0.28;
}

.tower__body {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.drizzle path {
  fill: none;
  stroke: var(--cream);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero__copy {
  grid-column: 1;
  grid-row: 2;
  max-width: 24rem;
}

.hero__lede {
  margin: 0 0 1.25rem;
  font-size: var(--step-1);
  line-height: 1.4;
  font-weight: 500;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: var(--step--1);
}

.status::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.status[data-open="true"]::before {
  background: var(--white);
  opacity: 1;
  box-shadow: 0 0 0 0 rgb(255 255 255 / 0.7);
  animation: ping 2.4s infinite;
}

@keyframes ping {
  70%,
  100% {
    box-shadow: 0 0 0 0.6rem rgb(255 255 255 / 0);
  }
}

.hero__toy {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  text-align: right;
  max-width: 16rem;
}

.hero__hint {
  margin: 0;
  font-size: var(--step--1);
  font-weight: 500;
}

/* load sequence: starts hidden only when JS is running and motion is allowed */
.js-motion .hero__word span,
.js-motion .tower__body,
.js-motion .hero__copy,
.js-motion .hero__toy {
  opacity: 0;
}

.is-loaded .hero__word span {
  animation: pop 0.7s var(--ease-spring) both;
  animation-delay: calc(var(--i) * 70ms);
}

.is-loaded .tower__body {
  animation: rise 0.9s var(--ease-out) 0.35s both;
}

.is-loaded .hero__copy {
  animation: fade 0.6s var(--ease-out) 1.4s both;
}

.is-loaded .hero__toy {
  animation: fade 0.6s var(--ease-out) 2.6s both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(18%) scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(30%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- menu ---------- */

.menu {
  background: var(--white);
  padding: clamp(4rem, 9vw, 7.5rem) var(--gutter);
  border-radius: 2.5rem 2.5rem 0 0;
  position: relative;
  z-index: 1;
}

.menu__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 3rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.menu__note {
  margin: 0;
  max-width: 26rem;
  color: var(--navy);
}

.menu__body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.menu__photo {
  margin: 0;
  position: sticky;
  top: 2rem;
}

.menu__photo img {
  width: 100%;
  height: auto;
  border-radius: 1.75rem;
}

.menu__photo figcaption {
  margin-top: 0.85rem;
  font-size: var(--step--1);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tab {
  padding: 0.55rem 1.1rem;
  min-height: 2.75rem;
  border: 2px solid var(--blue);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font: 500 var(--step--1) / 1 var(--body);
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s,
    transform 0.25s var(--ease-spring);
}

.tab:hover {
  transform: translateY(-2px);
}

.tab[aria-selected="true"] {
  background: var(--blue);
  color: var(--white);
}

.tab:focus-visible {
  outline-color: var(--navy);
}

.board {
  border-radius: 6px;
}

.board__title {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.1;
  color: var(--navy);
}

.board__blurb {
  margin: 0 0 1.5rem;
  max-width: 34rem;
}

.board__list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 16rem;
  column-gap: 2.5rem;
}

.item {
  break-inside: avoid;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.7rem 0;
  border-bottom: 2px dotted rgb(6 36 87 / 0.22);
}

.item__name {
  font-weight: 500;
}

.item__lead {
  flex: 1;
}

.item__price {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
  color: #0a6fd0;
}

.item--star .item__name::after {
  content: "the one in the photo";
  margin-left: 0.55rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--choc);
  color: var(--cream);
  font-size: 0.75rem;
  font-weight: 500;
  vertical-align: 0.15em;
  white-space: nowrap;
}

.board.is-swapping .item {
  animation: slot 0.45s var(--ease-out) both;
  animation-delay: calc(var(--i) * 35ms);
}

@keyframes slot {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
}

/* ---------- visit ---------- */

.visit {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  padding: clamp(4.5rem, 10vw, 8rem) var(--gutter);
}

.visit__lede {
  margin: 1.5rem 0 2rem;
  max-width: 32rem;
  font-size: var(--step-1);
  line-height: 1.45;
  font-weight: 500;
}

.visit__facts {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 2.25rem;
}

.visit__facts div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
}

.visit__facts dt {
  font-weight: 400;
  opacity: 0.8;
}

.visit__facts dd {
  margin: 0;
  font-weight: 600;
}

.visit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dial {
  margin: 0;
  justify-self: center;
  width: min(100%, 26rem);
}

.dial svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.dial__track {
  fill: none;
  stroke: rgb(6 36 87 / 0.2);
  stroke-width: 34;
}

.dial__open {
  fill: none;
  stroke: var(--white);
  stroke-width: 34;
  stroke-linecap: round;
}

.dial__tick {
  stroke: var(--navy);
  stroke-width: 2;
  opacity: 0.45;
}

.dial__hand {
  stroke: var(--navy);
  stroke-width: 6;
  stroke-linecap: round;
  transition: transform 0.8s var(--ease-spring);
  transform-origin: 160px 160px;
}

.dial__hub {
  fill: var(--navy);
}

.dial__label {
  font: 600 15px var(--body);
  fill: var(--navy);
}

.dial__small {
  font: 500 12px var(--body);
  fill: var(--navy);
  opacity: 0.7;
}

.dial__caption {
  margin-top: 1rem;
  text-align: center;
  font-weight: 500;
}

/* ---------- events ---------- */

.events {
  position: relative;
  background: var(--choc);
  color: var(--cream);
  padding: clamp(6rem, 12vw, 9rem) var(--gutter) clamp(4.5rem, 10vw, 7.5rem);
}

.events__drizzle {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: clamp(40px, 6vw, 80px);
  fill: var(--blue);
}

.events__inner {
  max-width: 44rem;
}

.events p {
  margin: 1.5rem 0 2.25rem;
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 36rem;
}

.events__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- footer ---------- */

.foot {
  padding: clamp(3rem, 8vw, 5rem) var(--gutter) 2rem;
  overflow: hidden;
}

.foot__word {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(5rem, 27vw, 26rem);
  line-height: 0.8;
  color: var(--white);
  letter-spacing: -0.02em;
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 2rem;
  font-weight: 500;
}

.foot__row p {
  margin: 0;
}

.foot__ar {
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--white);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .top__nav > a:not(.pill) {
    display: none;
  }

  .hero {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: auto;
    padding-top: 5rem;
  }

  .hero__word {
    inset: 6.5rem 0 auto;
    align-items: flex-start;
    padding: 0;
    font-size: 27vw;
  }

  .hero__tower {
    height: min(66svh, 560px);
    max-width: 280px;
    margin: 1.5rem auto 0;
  }

  .hero__toy {
    order: 2;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    justify-self: auto;
    max-width: none;
    margin-top: 1.5rem;
    text-align: left;
  }

  .hero__hint {
    flex: 1;
  }

  .hero__copy {
    order: 3;
    max-width: none;
    margin-top: 2rem;
  }

  .menu__body,
  .visit {
    grid-template-columns: 1fr;
  }

  .menu__photo {
    position: static;
    max-width: 28rem;
  }

  .dial {
    width: min(100%, 20rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
