/* Nítido · work.html only. The dock that moves between the seven brands and the three websites, and the colour cut
   that carries a long jump. Built by switcher.js from the cases on the page; without a script none of it exists. */

.dock {
  --d-bg: var(--night); --d-ink: var(--night-ink); --d-hi: var(--accent);
  position: fixed; z-index: 90;
  left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  translate: -50% 0;
  width: max-content; max-width: calc(100vw - 32px);
  display: flex; align-items: stretch;
  background: var(--d-bg); color: var(--d-ink);
  border: 1px solid color-mix(in srgb, var(--d-ink) 22%, transparent);
  border-radius: 2px;
  font-family: var(--font-label), ui-monospace, monospace; font-size: 12px; letter-spacing: .04em;
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .55);
  transition: background-color var(--dur-standard) var(--ease-stop), color var(--dur-standard) var(--ease-stop),
    opacity var(--dur-standard) var(--ease-stop), transform var(--dur-standard) var(--ease-stop);
}
.dock[data-hidden] { opacity: 0; transform: translateY(calc(100% + 24px)); pointer-events: none; }
.menu-open .dock { opacity: 0; pointer-events: none; }
.dock > * + * { border-left: 1px solid color-mix(in srgb, var(--d-ink) 18%, transparent); }
.dock a, .dock button { color: inherit; font: inherit; letter-spacing: inherit; text-decoration: none; background: none; border: 0; cursor: pointer; }
.dock :focus-visible { outline: 2px solid var(--d-hi); outline-offset: -4px; }

/* the two sets: brands and websites */
.dock__sets { display: flex; }
.dock__set {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; padding: 0 14px; text-transform: uppercase; font-weight: 700; opacity: .55;
  transition: opacity var(--dur-quick) var(--ease-stop);
}
.dock__set sup { font-weight: 400; font-size: 10px; translate: 0 -2px; }
.dock__set:hover, .dock__set[aria-current="true"] { opacity: 1; }
.dock__set::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 10px; height: 2px; background: var(--d-hi);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-standard) var(--ease-pull);
}
.dock__set[aria-current="true"]::after { transform: scaleX(1); }

/* where you are: previous, the name (opens the list), next */
.dock__step { display: inline-grid; place-items: center; width: 44px; min-height: 48px; font-size: 16px; transition: opacity var(--dur-quick); }
.dock__step:disabled { opacity: .25; cursor: default; }
.dock__step:not(:disabled):hover span { display: inline-block; animation: dock-nudge var(--dur-long) var(--ease-stop); }
.dock__step--prev:not(:disabled):hover span { animation-name: dock-nudge-back; }
@keyframes dock-nudge { 40% { transform: translateX(4px); } }
@keyframes dock-nudge-back { 40% { transform: translateX(-4px); } }
.dock__now {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; min-width: 15rem;
  text-align: left;
}
.dock__dot { width: 10px; height: 10px; flex: none; background: var(--d-hi); transition: background-color var(--dur-standard); }
.dock__n { opacity: .6; }
.dock__name { font-family: var(--font-display), system-ui, sans-serif; font-size: 17px; font-weight: 700; letter-spacing: -.02em; text-transform: none; }
.dock__what { opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16rem; }
.dock__caret { margin-left: auto; padding-left: 6px; transition: transform var(--dur-standard) var(--ease-stop); }
.dock__now[aria-expanded="true"] .dock__caret { transform: rotate(180deg); }

/* the way to a website's live address, only while a website is in view */
.dock__live {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; min-height: 48px;
  background: var(--d-hi); color: var(--d-bg) !important; font-weight: 700; text-transform: uppercase; white-space: nowrap;
}
.dock__live[hidden] { display: none; }
.dock__live b { font-weight: 700; transition: transform var(--dur-standard) var(--ease-pull); }
.dock__live:hover b { transform: translate(2px, -2px); }

/* the list of all ten, opening above the dock */
.dock__list {
  position: absolute; left: -1px; right: -1px; bottom: calc(100% + 8px);
  display: grid; gap: 0; padding: 8px 0;
  background: var(--d-bg); color: var(--d-ink);
  border: 1px solid color-mix(in srgb, var(--d-ink) 22%, transparent); border-radius: 2px;
  max-height: min(70vh, 640px); overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .55);
  transform-origin: bottom center;
}
.dock__list[hidden] { display: none; }
.dock__col { display: grid; align-content: start; }
.dock__col + .dock__col { border-top: 1px solid color-mix(in srgb, var(--d-ink) 18%, transparent); }
@media (min-width: 960px) {
  .dock__list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 8px 0; min-width: 38rem; left: 50%; right: auto; translate: -50% 0; }
  .dock__col + .dock__col { border-top: 0; border-left: 1px solid color-mix(in srgb, var(--d-ink) 18%, transparent); }
}
.dock__group { padding: 10px 16px 6px; text-transform: uppercase; font-weight: 700; opacity: .55; font-size: 11px; }
.dock__group + .dock__item { border-top: 0; }
.dock__list :focus-visible { outline-offset: -2px; }
.dock__item {
  display: grid; grid-template-columns: 2.2rem 22px minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 9px 16px; border-top: 1px solid color-mix(in srgb, var(--d-ink) 10%, transparent);
  transition: background-color var(--dur-quick);
}
.dock__item:hover, .dock__item:focus-visible { background: color-mix(in srgb, var(--d-ink) 8%, transparent); }
.dock__item[aria-current="true"] .dock__item-name { text-decoration: underline; text-decoration-color: var(--d-hi); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.dock__item-n { opacity: .55; }
.dock__sw { width: 22px; height: 22px; background: var(--sw-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--d-ink) 25%, transparent); position: relative; }
.dock__sw::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 7px; height: 7px; background: var(--sw-hi); }
.dock__item-name { font-family: var(--font-display), system-ui, sans-serif; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.dock__item-what { display: block; opacity: .65; font-size: 11px; margin-top: 2px; }

@media (max-width: 959px) {
  .dock { left: 16px; right: 16px; translate: none; width: auto; }
  .dock__sets { flex: none; }
  .dock__set { padding: 0 10px; }
  .dock__set sup { display: none; }
  .dock__now { flex: 1; min-width: 0; padding: 0 10px; gap: 8px; }
  .dock__n, .dock__what { display: none; }
  .dock__step { width: 40px; }
  .dock__live { padding: 0 14px; }
  .dock__live span { display: none; }
  .dock__live b { font-size: 16px; }
}
@media (max-width: 959px) {
  .dock__list { max-height: min(62vh, 520px); }
  .dock__item { padding: 7px 14px; }
  .dock__item-name { font-size: 18px; }
}
@media (max-width: 380px) { .dock__set { padding: 0 8px; font-size: 11px; } }

/* the cut: the next brand's own colour wipes over the page, the page moves underneath, the colour leaves */
.cut {
  position: fixed; inset: 0; z-index: 140; pointer-events: none;
  display: grid; place-content: center; justify-items: center; gap: 18px; text-align: center;
  background: var(--c-bg); color: var(--c-ink);
  clip-path: inset(100% 0 0 0);
}
.cut__label { font-family: var(--font-label), ui-monospace, monospace; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; display: flex; gap: 14px; align-items: center; }
.cut__label i { width: 10px; height: 10px; background: var(--c-hi); }
.cut__name { font-family: var(--font-display), system-ui, sans-serif; font-weight: 700; letter-spacing: -.055em; line-height: .85; font-size: clamp(72px, 16vw, 240px); }

@media (prefers-reduced-motion: reduce) {
  .dock, .dock__set::after, .dock__caret { transition: none; }
}
@media print { .dock, .cut { display: none !important; } }
