/* The desk: the first viewport of /tradestage. The browser window is the centre screen. */

.hero {
  position: relative; min-height: max(100svh, 720px); overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(60% 55% at 50% -4%, rgba(47, 134, 255, 0.20), transparent 70%),
    radial-gradient(40% 40% at 50% 100%, rgba(255, 184, 77, var(--warm, 0)), transparent 70%),
    var(--stage);
  transition: --warm 1.2s;
}
.hero-copy { padding: 112px var(--gutter) 0; text-align: center; position: relative; z-index: 3; }
.hero-copy h1 { font-size: clamp(44px, 6.4vw, 100px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.92; }
.hero-copy .sub { margin: 18px auto 0; max-width: 38em; font-size: clamp(18px, 1.7vw, 22px); color: var(--chalk-2); min-height: 1.6em; }
.hero-copy .sub span { display: inline-block; transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out); }
.hero-copy .sub span.swap { opacity: 0; transform: translateY(8px); }

/* stage: a 1600 × 700 coordinate world that scales with the window */
.desk { position: relative; z-index: 2; display: grid; place-items: center; padding: 18px var(--gutter) 0; }
.stage { position: relative; width: min(100%, 1500px, calc((100svh - 400px) * 16 / 7)); aspect-ratio: 1600 / 700; container-type: inline-size; }

.screen { position: absolute; }
.screen .bezel {
  position: absolute; inset: 0; border-radius: 1.1cqw; background: #050506;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2.4cqw 4.4cqw -1.2cqw rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.screen .glass {
  position: absolute; inset: 0.62cqw; border-radius: 0.5cqw; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #1a2333 0%, #0e1118 55%, #0a0b0e 100%);
}
.screen .stand { position: absolute; left: 50%; top: 100%; width: 1.9cqw; height: 4.4cqw; transform: translateX(-50%); background: linear-gradient(#1c1d20, #111214); }
.screen .foot { position: absolute; left: 50%; top: calc(100% + 4.3cqw); width: 11cqw; height: 0.75cqw; transform: translateX(-50%); border-radius: 0.4cqw; background: #1c1d20; }
.screen.laptop .base { position: absolute; left: -2cqw; right: -2cqw; top: 100%; height: 0.95cqw; border-radius: 0 0 1cqw 1cqw; background: linear-gradient(#2a2b2f, #141518); }

/* zone spotlight: flashes Cue Blue as a window lands */
.zone-flash {
  position: absolute; border-radius: 0.5cqw; pointer-events: none; z-index: 40; opacity: 0;
  border: 2px solid var(--cue); background: rgba(47, 134, 255, 0.14);
  box-shadow: 0 0 2.4cqw rgba(47, 134, 255, 0.7);
}

/* the windows */
.win {
  position: absolute; z-index: 10; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 0.42cqw; background: #111214; border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 0.8cqw 2cqw rgba(0, 0, 0, 0.55);
}
.win header { height: 1.05cqw; flex: none; display: flex; align-items: center; gap: 0.28cqw; padding: 0 0.42cqw; background: #1b1c1f; }
.win header i { width: 0.36cqw; height: 0.36cqw; border-radius: 50%; background: #ff5f57; opacity: 0.75; }
.win header i:nth-child(2) { background: #febc2e; }
.win header i:nth-child(3) { background: #28c840; }
.win header b { margin-left: 0.4cqw; font: 600 0.6cqw/1 var(--text); color: var(--chalk-3); white-space: nowrap; }
.win .body { position: relative; flex: 1; }
.win svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.win .rows { position: absolute; inset: 0.4cqw; display: flex; flex-direction: column; gap: 0.2cqw; font: 500 0.56cqw/1.1 var(--mono); color: var(--chalk-3); }
.win .rows div { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255, 255, 255, 0.04); padding-bottom: 0.12cqw; }
.win .rows b { color: var(--chalk); font-weight: 500; }

/* TradeStage's menu, hanging from its icon in the top bar, as the app's own menu bar panel does */
.menu-extra { position: relative; margin-left: 4px; }
.menu-cue {
  position: relative; display: grid; place-items: center; width: 34px; height: 26px; padding: 0; cursor: pointer;
  border: 0; border-radius: 7px; background: transparent; color: var(--chalk);
  transition: background 0.2s var(--ease-out);
}
.menu-cue .mark { width: 20px; height: 20px; }
.menu-cue:hover { background: rgba(255, 255, 255, 0.1); }
.menu-extra.open .menu-cue { background: rgba(255, 255, 255, 0.18); }
/* until it's first used, the icon carries the Cue: one soft blue breath, like the old wing tab */
.menu-cue::after {
  content: ""; position: absolute; inset: -3px; border-radius: 9px; pointer-events: none;
  box-shadow: 0 0 0 1.5px rgba(47, 134, 255, 0.85), 0 4px 18px rgba(47, 134, 255, 0.55);
  animation: cue-breathe 2.4s var(--ease-out) infinite; transition: opacity 0.3s;
}
.menu-extra.used .menu-cue::after { opacity: 0; animation: none; }
@keyframes cue-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.cue-hint {
  position: absolute; top: calc(100% + 12px); right: -6px; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font: 600 14px/1.2 var(--display); color: var(--cue-hot); pointer-events: none;
  padding: 8px 13px; border-radius: 999px; background: rgba(8, 9, 11, 0.9); border: 1px solid rgba(47, 134, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); transition: opacity 0.3s var(--ease-out);
}
.cue-hint svg { width: 16px; height: 16px; transform: rotate(-90deg); animation: lift 1.6s var(--ease-out) infinite; }
@keyframes lift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
.menu-extra.open .cue-hint, .menu-extra.used .cue-hint { opacity: 0; }

.tray {
  width: 344px; padding: 14px; display: flex; flex-direction: column; gap: 6px; text-align: left; color: var(--chalk);
  border-radius: 18px; background:
    radial-gradient(90% 60% at 50% 0%, rgba(47, 134, 255, 0.09), transparent 70%), #0e0e0f;
  border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.menu-extra .tray {
  position: absolute; top: calc(100% + 10px); right: -8px; z-index: 31; transform-origin: top right;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.95);
  transition: opacity 0.2s var(--ease-out), transform 0.42s var(--land), visibility 0s 0.2s;
}
.menu-extra.open .tray { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s var(--ease-out), transform 0.42s var(--land), visibility 0s; }
.tray-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tray-mark {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px;
  background: linear-gradient(#2b2c30, #0d0d0f); border: 0.75px solid rgba(255, 255, 255, 0.18);
}
.tray-mark .mark { width: 24px; height: 24px; }
.tray-name { display: flex; flex-direction: column; gap: 3px; }
.tray-name b { font: 650 16px/1 var(--display); letter-spacing: -0.01em; }
.tray-name small { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--chalk-3); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--done); box-shadow: 0 0 6px rgba(61, 220, 132, 0.7); }
.tray-title { font: 650 11px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--chalk-3); margin: 4px 0 2px; }
.setup-row {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 8px; cursor: pointer; text-align: left; width: 100%;
  border-radius: 10px; color: var(--chalk); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(47, 134, 255, 0.32);
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.25s;
}
.setup-row + .setup-row { margin-top: 4px; }
.setup-row:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(47, 134, 255, 0.6); }
.setup-row:active { transform: scale(0.98); }
.setup-row.lit { background: var(--cue-deep); border-color: rgba(255, 255, 255, 0.45); box-shadow: 0 0 26px rgba(47, 134, 255, 0.5); }
.setup-row .num {
  position: absolute; left: -5px; top: -5px; width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center;
  font: 700 10px/1 var(--display); color: #fff; background: var(--cue-deep);
}
.setup-row.lit .num { background: #fff; color: var(--cue-deep); }
.setup-row .mini { position: relative; width: 58px; height: 32px; flex: none; border-radius: 5px; background: rgba(0, 0, 0, 0.35); }
.setup-row .mini span { position: absolute; border-radius: 1.5px; background: rgba(255, 255, 255, 0.16); border: 0.5px solid rgba(255, 255, 255, 0.3); }
.setup-row.lit .mini span { background: rgba(255, 255, 255, 0.35); border-color: rgba(255, 255, 255, 0.75); }
.setup-row .lbl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.setup-row .lbl b { font: 650 14px/1.1 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setup-row .lbl small { font-size: 12px; color: var(--chalk-3); }
.setup-row.lit .lbl small { color: rgba(255, 255, 255, 0.85); }
.setup-row .keys kbd { min-width: 17px; height: 17px; font-size: 10px; border-radius: 4px; padding: 0 3px; }
.tray .day { margin-top: 8px; }

/* Start day · Done, above the setups; Done asks once before it closes anything */
.day { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.daykey {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 8px; cursor: pointer;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05);
  color: var(--chalk); font: 600 12.5px/1 var(--display); white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
}
.daykey svg { width: 15px; height: 15px; flex: none; }
.daykey:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.24); }
.daykey:active { transform: scale(0.97); }
.day.armed [data-start] { display: none; }
.day.armed, .day:has(.confirm) { grid-template-columns: 1fr; }
.day.armed [data-done], .daykey.confirm { background: rgba(255, 69, 58, 0.2); border-color: rgba(255, 69, 58, 0.6); color: #fff; white-space: normal; height: auto; min-height: 34px; padding-block: 7px; line-height: 1.2; }
.tray.static .daykey, .tray.static .setup-row { cursor: default; }

/* snap bubble */
.bubble {
  position: absolute; left: 50%; bottom: 24px; z-index: 26; transform: translate(-50%, 20px) scale(0.94); opacity: 0;
  display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 18px 0 12px; border-radius: 25px;
  background: #0b0c0e; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  transition: transform 0.45s var(--land), opacity 0.25s var(--ease-out); pointer-events: none;
}
.bubble.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.bubble .ok { width: 24px; height: 24px; border-radius: 50%; background: var(--done); display: grid; place-items: center; }
.bubble .ok svg { width: 14px; height: 14px; }
.bubble strong { font: 650 16px/1 var(--display); }
.bubble .pill { font: 650 12.5px/1 var(--display); color: var(--cue-hot); background: rgba(47, 134, 255, 0.18); padding: 5px 9px; border-radius: 8px; }
.bubble small { font-size: 12.5px; color: var(--chalk-3); }

/* bottom bar of the first viewport */
.hero-foot { position: relative; z-index: 27; display: flex; align-items: center; gap: 18px 22px; flex-wrap: wrap; padding: 26px var(--gutter) 34px; }
.hero-foot .note { font-size: 14px; color: var(--chalk-3); }
.hero-foot .or { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--chalk-3); }

/* ghost pointer that shows the move once if the visitor waits */
.ghost { position: absolute; z-index: 29; width: 22px; height: 30px; pointer-events: none; opacity: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }

@media (max-width: 760px) {
  .hero { min-height: auto; }
  .stage { width: 100%; }
  .hero-copy { padding-top: 92px; }
  .desk { padding-inline: 10px; }
  /* on a phone the menu spans the screen under the bar, never off its edge; no shortcut keys to show */
  .menu-extra .tray { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; }
  .setup-row .keys { display: none; }
  .cue-hint { font-size: 13px; right: -50px; }
  .daykey { padding: 0 4px; font-size: 12px; }
  .day:not(.armed) .daykey svg { display: none; }
  .hero-foot .or { display: none; }
  .bubble { bottom: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  .cue-hint svg, .menu-cue::after { animation: none; }
  .menu-extra .tray, .bubble { transition-duration: 0.01ms; }
}
