/* The live web version of the app in the hero phone. Sizes are in the app's
   points: --s is one point at the screen's current width (402 pt wide). */

.demo-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.demo-wrap .phone { width: 100%; }
.demo-note { color: var(--ink-soft); font-size: 15px; margin: 0; }

.demo {
  width: 330px;
  max-width: 100%;
  border: 6px solid #2a2420;
  border-radius: 46px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
  background: #000;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.demo:focus-visible { outline: 3px solid var(--ember); outline-offset: 4px; }

.screen {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 402 / 874;
  overflow: hidden;
  background: #080604;
  font-family: "Roboto Condensed", sans-serif;
  color: #fff;
}
.screen * { --s: calc(100cqw / 402); box-sizing: border-box; }
:where(.screen button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; }
.screen button:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.screen svg { display: block; }
.screen [hidden] { display: none !important; }

/* Wood, fit to width and faded at top and bottom, as in the app. */
.wood {
  position: absolute; inset: 0;
  background: url(images/wood.jpg) center / contain no-repeat;
  -webkit-mask-image: linear-gradient(transparent 0%, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(transparent 0%, #000 12%, #000 88%, transparent 100%);
}
/* "Fit" in the app means the board spans the width, centered vertically. */
.wood { background-size: 100% auto; -webkit-mask-size: 100% calc(100cqw * 1070 / 1000); mask-size: 100% calc(100cqw * 1070 / 1000);
        -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }

.view { position: absolute; inset: 0; display: flex; flex-direction: column; }

.glass {
  width: calc(var(--s) * 40); height: calc(var(--s) * 40); border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.glass svg { width: calc(var(--s) * 20); height: calc(var(--s) * 20); }

.main .topbar { display: flex; justify-content: flex-end; padding: calc(var(--s) * 64) calc(var(--s) * 18) 0; }

.stack {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(var(--s) * 28); padding: calc(var(--s) * 24); padding-bottom: calc(var(--s) * 90);
}
.row { display: flex; align-items: center; gap: calc(var(--s) * 12); }

.arrow { width: calc(var(--s) * 44); height: calc(var(--s) * 64); display: grid; place-items: center; touch-action: none; transition: transform 0.08s, opacity 0.08s; }
.arrow svg { width: calc(var(--s) * 26); height: calc(var(--s) * 26); }
.arrow.touching { transform: scale(0.88); opacity: 0.7; }

.panel {
  padding: calc(var(--s) * 14) calc(var(--s) * 18);
  border-radius: calc(var(--s) * 16);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 calc(var(--s) * 1.5) 0 rgba(0, 0, 0, 0.8), inset 0 calc(var(--s) * -1.5) 0 rgba(255, 255, 255, 0.12);
  display: flex; flex-direction: column; align-items: flex-end; gap: calc(var(--s) * 6);
}
.panel-top { align-self: stretch; display: flex; align-items: center; justify-content: space-between; height: calc(var(--s) * 18); }
.light { width: calc(var(--s) * 10); height: calc(var(--s) * 10); border-radius: 50%; background: rgba(255, 0, 0, 0.18); transition: background 0.12s ease-out 0.06s, box-shadow 0.12s ease-out 0.06s; }
.light.lit { background: #ff3b30; box-shadow: 0 0 calc(var(--s) * 5) rgba(255, 0, 0, 0.9); transition: none; }
.caption, .bpm { font-size: calc(var(--s) * 15); color: rgba(255, 161, 64, 0.8); }
.caption { font-weight: 300; }
.bpm { font-weight: 700; letter-spacing: calc(var(--s) * 2); }
.digits { width: calc(var(--s) * 165); height: calc(var(--s) * 110); filter: drop-shadow(0 0 calc(var(--s) * 6) rgba(255, 161, 64, 0.6)); overflow: visible; }

.mode {
  position: relative; display: flex; padding: calc(var(--s) * 2);
  border-radius: 999px; background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.mode::before {
  content: ""; position: absolute; top: calc(var(--s) * 2); left: calc(var(--s) * 2);
  width: calc(var(--s) * 38); height: calc(var(--s) * 34); border-radius: 999px;
  background: #bd4a0a; transition: transform 0.2s cubic-bezier(0.3, 0.9, 0.4, 1);
}
.mode.vibrate::before { transform: translateX(calc(var(--s) * 38)); }
.seg { position: relative; width: calc(var(--s) * 38); height: calc(var(--s) * 34); display: grid; place-items: center; color: rgba(255, 161, 64, 0.6); }
.seg svg { width: calc(var(--s) * 17); height: calc(var(--s) * 17); }
.mode:not(.vibrate) .seg.sound, .mode.vibrate .seg.vibrate { color: #fff; }

.buttons { display: flex; align-items: center; gap: calc(var(--s) * 36); }

/* Lacquered discs: color, a top-left shine, and the wood grain showing through. */
.disc {
  --d: 104; --c: rgb(61, 38, 28); --hi: rgb(90, 71, 62);
  position: relative; width: calc(var(--s) * var(--d)); height: calc(var(--s) * var(--d)); border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle calc(var(--s) * var(--d)) at 0 0, var(--hi), var(--c));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 calc(var(--s) * 3) calc(var(--s) * 10) rgba(0, 0, 0, 0.6);
  transition: transform 0.08s ease-out, filter 0.08s ease-out, box-shadow 0.08s ease-out;
  touch-action: none;
}
.disc::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: url(images/wood.jpg) top / cover; mix-blend-mode: overlay; opacity: 0.3; pointer-events: none;
}
.disc > * { position: relative; }
.disc.pressed { transform: scale(0.94); filter: brightness(1.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 calc(var(--s) * 1) calc(var(--s) * 2) rgba(0, 0, 0, 0.6); }
.disc.play { --d: 148; --c: #bd4a0a; --hi: #c76530; }
.disc.tap span { font-weight: 700; font-size: calc(var(--s) * 33); color: #ffa140; }
.disc.play svg { width: calc(var(--s) * 59); height: calc(var(--s) * 59); }
.disc.play .icon-play { transform: translateX(calc(var(--s) * 4)); }

/* Tempos screen */
.tempos { background: transparent; }
.navbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: calc(var(--s) * 60) calc(var(--s) * 16) calc(var(--s) * 12); }
.navbar h3 { margin: 0; font: 600 calc(var(--s) * 17) / 1 -apple-system, "Helvetica Neue", Arial, sans-serif; letter-spacing: 0; text-transform: none; color: #fff; }
.navbar .glass.trash { justify-self: end; }
.scroll { flex: 1; overflow-y: auto; padding: 0 calc(var(--s) * 16) calc(var(--s) * 40); scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.empty { font-weight: 300; font-size: calc(var(--s) * 15); color: rgba(255, 161, 64, 0.8); padding: calc(var(--s) * 10) calc(var(--s) * 4); }
.list { border-radius: calc(var(--s) * 20); overflow: hidden; }
.tempo-row {
  width: 100%; display: flex; align-items: baseline; gap: calc(var(--s) * 6);
  padding: calc(var(--s) * 10) calc(var(--s) * 16); background: rgba(0, 0, 0, 0.35);
  color: #ffa140; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.tempo-row:last-child { border-bottom: 0 !important; }
.tempo-row b { font-weight: 300; font-size: calc(var(--s) * 28); font-variant-numeric: tabular-nums; }
.tempo-row small { font-weight: 300; font-size: calc(var(--s) * 16); }
.tempo-row .check { margin-left: auto; align-self: center; width: calc(var(--s) * 18); height: calc(var(--s) * 18); }
.tempo-row.current { background: rgba(189, 74, 10, 0.85); color: #fff; }
.tempo-row:not(.current) .check { display: none; }

.pickers { display: flex; padding: calc(var(--s) * 22) 0 calc(var(--s) * 6); }
.picker { flex: 1; display: flex; flex-direction: column; align-items: center; gap: calc(var(--s) * 6); }
.picker .disc { --d: 64; }
.picker .disc.lit { --c: #bd4a0a; --hi: #c76530; }
.picker .disc svg { width: calc(var(--s) * 23); height: calc(var(--s) * 23); }
.picker-name { font-weight: 700; font-size: calc(var(--s) * 15); color: #ffa140; }
.dots { display: flex; gap: calc(var(--s) * 5); }
.dots i { width: calc(var(--s) * 5); height: calc(var(--s) * 5); border-radius: 50%; background: rgba(255, 161, 64, 0.25); }
.dots i.on { background: #ffa140; }

.about h4 { margin: calc(var(--s) * 18) calc(var(--s) * 4) calc(var(--s) * 8); font: 600 calc(var(--s) * 15) / 1.2 -apple-system, "Helvetica Neue", Arial, sans-serif; color: rgba(255, 255, 255, 0.6); text-transform: none; letter-spacing: 0; }
.about p { margin: 0; padding: calc(var(--s) * 12) calc(var(--s) * 16); border-radius: calc(var(--s) * 20); background: rgba(0, 0, 0, 0.35); font-weight: 300; font-size: calc(var(--s) * 15); line-height: 1.35; color: rgba(255, 161, 64, 0.8); }

/* iOS-style alert */
.alert-scrim { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); animation: fade 0.18s ease-out; z-index: 5; }
.alert {
  width: calc(var(--s) * 290); border-radius: calc(var(--s) * 22); overflow: hidden; text-align: center;
  background: rgba(44, 36, 30, 0.9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; color: #fff;
  animation: pop 0.22s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.alert-body { padding: calc(var(--s) * 20) calc(var(--s) * 18) calc(var(--s) * 18); }
.alert-body svg { width: calc(var(--s) * 34); height: calc(var(--s) * 34); margin: 0 auto calc(var(--s) * 8); color: #ffa140; }
.alert h3 { margin: 0 0 calc(var(--s) * 6); font: 600 calc(var(--s) * 17) / 1.25 -apple-system, "Helvetica Neue", Arial, sans-serif; text-transform: none; letter-spacing: 0; }
.alert p { margin: 0; font-size: calc(var(--s) * 13.5); line-height: 1.35; color: rgba(255, 255, 255, 0.85); }
.alert-buttons { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.alert-buttons > * { padding: calc(var(--s) * 13) 0; font-size: calc(var(--s) * 17); color: #ffa140; text-decoration: none; display: block; }
.alert-buttons > * + * { border-left: 1px solid rgba(255, 255, 255, 0.15); }
.alert-buttons .primary { font-weight: 600; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(1.12); opacity: 0; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .alert, .alert-scrim { animation: none; }
  .mode::before, .disc, .arrow { transition: none; }
}
