:root { --menu-panel: min(980px, 100%); }

/* The sheet is a container now: a scrim you can see the page through,
   and a white panel over it. The compiled rules still fade #sheet in
   and out on .open, so opening and closing are unchanged. */
#sheet { background: transparent; }
#sheet .menu-scrim {
  position: absolute; inset: 0; background: var(--scrim);
}
#sheet .menu-panel {
  position: relative; height: 100%; width: var(--menu-panel);
  margin-inline-start: auto; background: var(--ground);
  overflow-y: auto; display: flex; flex-direction: column;
  transform: translateX(2%); opacity: 0;
  transition: transform .3s cubic-bezier(.32,.72,0,1), opacity .22s ease;
}
[dir="rtl"] #sheet .menu-panel { transform: translateX(-2%); }
#sheet.open .menu-panel { transform: none; opacity: 1; }

/* left: the six. right: the pane the hovered one opens. */
.menu-two { display: grid; gap: 0 clamp(32px, 5vw, 72px); }
@media (min-width: 900px) {
  .menu-two { grid-template-columns: 7fr 5fr; align-items: start; }
}
.menu-right { display: none; }
@media (min-width: 900px) {
  /* Both panes occupy one grid cell and a hidden pane keeps its box, so
     the right column is always as tall as the taller pane. With
     display:none the column had three heights — nothing open, Services
     open, What we build open — and the panel moved under the pointer. */
  .menu-right { display: grid; padding-top: .4rem; }
  .menu-pane { grid-area: 1 / 1; display: block; }
  .menu-pane[hidden] { display: block; visibility: hidden;
                       pointer-events: none; }
}
.menu-pane:not([hidden]) {
  animation: pane-in .28s cubic-bezier(.23,1,.32,1) both;
}
@keyframes pane-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.pane-list { margin: 0; padding: 0; list-style: none; }
.pane-row {
  display: block; padding: .62rem 0; text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.pane-t {
  display: block; font-family: var(--font-head); color: var(--ink);
  font-size: 1.0625rem; line-height: 1.3;
  transition: transform .22s cubic-bezier(.23,1,.32,1), color .18s ease;
}
.pane-s {
  display: block; color: var(--text-2); font-size: .875rem;
  margin-top: .15rem;
}
:lang(ja) .pane-s, :lang(ar) .pane-s { color: var(--text); }

/* the row that owns the open pane keeps a teal mark */
.menu-row[aria-expanded="true"] .menu-t { color: var(--teal-text); }

@media (hover: hover) and (pointer: fine) {
  .pane-row:hover .pane-t, .pane-row:focus-visible .pane-t {
    color: var(--teal-text); transform: translateX(6px);
  }
  [dir="rtl"] .pane-row:hover .pane-t { transform: translateX(-6px); }
}

/* step 2 of the picker has no photograph; the tile keeps its shape */
.pick-plain { text-decoration: none; }
.pick-plain .pick-body {
  border-top: 1px solid var(--rule); padding-top: 1rem;
}
.pick:active { transform: scale(.97); }
.pick { transition: transform .14s cubic-bezier(.23,1,.32,1); }
#bq-step1 .pick.on .pick-label, #bq-step2 .pick.on .pick-label {
  color: var(--teal-text);
}
#bq-step1 .pick:not(.on).dim { opacity: .45; }

@media (prefers-reduced-motion: reduce) {
  #sheet .menu-panel, .menu-pane, .pick { transition: none; animation: none; }
}
