/* SPDX-License-Identifier: MPL-2.0
 * Copyright (C) 2026 Styves Goupil
 * What the landing and the guide share: the chips (a choice: ice when made), HARMONY's keys, the MIDI channels. */

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 34px; padding: 6px 11px 5px;
  font: 600 12.5px/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase;
  color: var(--mist); background: rgba(10, 13, 18, .65); border: 1px solid var(--steel); border-radius: 5px; cursor: pointer;
  transition: color .3s, border-color .3s, background-color .4s;
}
.chip:hover { color: var(--white); border-color: var(--slate); }
.chip[aria-pressed="true"] { color: var(--night); background: var(--ice); border-color: var(--ice); }

/* ================================================================ the harmony's widget (the landing and the guide) */
.harmony { display: grid; gap: 28px; }
.h-ctl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px clamp(14px, 2.5vw, 32px); }
.h-sel { display: grid; gap: 10px; min-width: 0; }
.h-lab { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px/1 var(--f-ui); letter-spacing: .16em; color: var(--mist); }
.h-lab .disc { font-size: 10px; }
.h-sel select {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: 48px;
  padding: 8px 34px 6px 0;
  font: 500 clamp(22px, 2.3vw, 30px)/1.1 var(--f-ui); letter-spacing: .04em; color: var(--white);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%238b95a4' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 4px center / 14px;
  border: 0; border-bottom: 1px solid var(--steel); border-radius: 0; cursor: pointer;
  transition: border-color .3s;
}
.h-sel select:hover { border-bottom-color: var(--slate); }
.h-sel select:focus-visible { outline: none; border-bottom-color: var(--lamp); box-shadow: 0 1px 0 var(--lamp); }
.h-sel option, .h-sel optgroup { background: var(--panel); color: var(--fog); font-size: 16px; }
@media (max-width: 760px) { .h-ctl { grid-template-columns: 1fr 1fr; } }
.h-swipe { display: none; font: 600 12px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--mist); margin-bottom: -14px; }
@media (max-width: 620px) { .h-swipe { display: block; } }
.h-board { padding: clamp(16px, 2.4vw, 28px); background: #070a0e; border: 1px solid var(--rule); border-radius: 14px; box-shadow: inset 0 1px 0 #151c24; overflow-x: auto; }
.h-keys { position: relative; min-width: 560px; aspect-ratio: 16 / 4.1; }
.h-key {
  position: absolute; padding: 0; border: 1px solid #1d252f; border-radius: 7px; cursor: pointer;
  background: #10151c; color: transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.h-key.up { border-radius: 99px; }
.h-key .nm { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font: 600 10px/1 var(--f-ui); letter-spacing: .08em; color: #6b7686; transition: color .35s; }
.h-key.up .nm { bottom: auto; top: 50%; transform: translateY(-50%); }
.h-key.in { background: #1a222c; border-color: #2a3542; box-shadow: inset 0 0 14px rgba(220, 227, 234, .05); }
.h-key.in .nm { color: var(--mist); }
.h-key:hover { border-color: var(--slate); }
.h-key.tone { background: color-mix(in srgb, var(--ice) 22%, #10151c); border-color: var(--ice); box-shadow: 0 0 22px -4px rgba(110, 208, 255, .6), inset 0 0 16px rgba(110, 208, 255, .25); }
.h-key.tone .nm { color: var(--white); }
.h-key.hand { border-color: var(--lamp); box-shadow: 0 0 0 1px var(--lamp), 0 0 26px -2px rgba(242, 166, 90, .55); }
.h-key.hand .nm { color: var(--lamp); }
.h-key:focus-visible { outline-offset: 2px; }
.h-out { min-height: 3.2em; font-size: 18px; color: var(--text-2); }
.h-out .label { color: var(--lamp); font-size: 13px; margin-right: 6px; }
.h-out b { font: 600 .92em var(--f-ui); letter-spacing: .1em; color: var(--ice); white-space: nowrap; }
.h-out .k { color: var(--white); }


/* the channels: a signal running along each */
.midi-ch { list-style: none; padding: 0; display: grid; gap: 18px; }
.midi-ch li { display: grid; grid-template-columns: 4.2em 1fr 5.4em; align-items: center; gap: 16px; }
.ch-n { font: 600 13px/1 var(--f-ui); letter-spacing: .14em; color: var(--mist); }
.ch-t { font: 700 15px/1 var(--f-ui); letter-spacing: .2em; color: var(--c); text-align: right; }
.ch-line { position: relative; height: 1px; background: linear-gradient(90deg, var(--steel), color-mix(in srgb, var(--c) 60%, transparent)); overflow: visible; }
.ch-line::after {
  content: ""; position: absolute; top: -2px; left: 0; width: 5px; height: 5px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 10px var(--c);
  animation: signal 3.6s var(--ease-io) infinite; animation-delay: var(--sd, 0s);
}
.midi-ch li:nth-child(2) { --sd: 1.2s; }
.midi-ch li:nth-child(3) { --sd: 2.4s; }
@keyframes signal { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 5px); opacity: 0; } }

