/* The three-line menu: a round button on a white page. The three lines of its icon stretch across the screen and
   become the ruled lines under the menu's words, on warm paper: one canvas draws the icon, the lines and the X. */
:root {
  --page: #ffffff;          /* the page */
  --paper: #efe6d8;         /* the menu's paper, and the lines in the button */
  --ink: #2a1e18;           /* the words, the lines and the button */
  --muted: #7a6657;         /* the small words */
  --clay: #c2562f;          /* the line and the small word of the item the pointer is on, and the button's focus ring */
}

* {
  box-sizing: border-box;
}

/* a tap is a click at once: no wait for a double tap */
html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Instrument Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- the drawing and the button */
/* over the page, under the menu's words: the canvas paints the menu's paper too */
.lines {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* the button is clear: the canvas draws its ring, its three lines and its X */
.toggle {
  position: fixed;
  top: 20px;
  right: clamp(12px, 4vw, 48px);
  z-index: 5;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.toggle:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 4px;
}

/* ---------------------------------------------------------------- the menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 118px clamp(20px, 4vw, 56px) 26px;
  pointer-events: none;
  visibility: hidden;
}

.menu.is-open {
  pointer-events: auto;
  visibility: visible;
}

.menu__items {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-height: 640px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu__row {
  flex: 1;
  display: flex;
  align-items: flex-end;
  min-height: 0;
  max-height: 124px;
}

/* the line is the bottom of the link: the word rises out of it, and is cut by it */
.menu__link {
  display: block;
  width: 100%;
  padding: 10px 2px 0;
  clip-path: inset(-40% -6% 0 -6%);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.menu__lift {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 0.16em;
  will-change: transform;
}

.menu__word {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(40px, min(7vw, 8.4vh), 84px);
  font-weight: 360;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
  letter-spacing: -0.03em;
  line-height: 1;
  transition: font-weight 0.45s ease, font-variation-settings 0.45s ease, color 0.3s ease;
}

/* on the right of each item, what you can do there */
.menu__hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

/* the word under the pointer swells and softens; the current page is in clay */
.menu__link.is-on .menu__word,
.menu__link:focus-visible .menu__word {
  font-weight: 520;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}

.menu__link.is-on .menu__hint,
.menu__link:focus-visible .menu__hint,
.menu__link[aria-current='page'] .menu__hint {
  color: var(--clay);
}

.menu__link[aria-current='page'] .menu__word {
  font-style: italic;
}

.menu__link:focus-visible {
  outline: none;
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 760px) {
  .menu {
    padding-top: 104px;
  }

  .menu__word {
    font-size: clamp(36px, 11vw, 52px);
  }
}
