/* 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; }

/* the shelf, in the page's own right edge */
/* the notch sits in the clear field right of the headline, never over the monitors */
.shelf-wrap { position: absolute; right: 0; top: clamp(150px, 22svh, 240px); z-index: 25; display: flex; align-items: center; height: 170px; }
.notch {
  width: 22px; height: 170px; border: 2px solid var(--cue); border-right: 0; border-radius: 12px 0 0 12px;
  background: #08090b; cursor: pointer; padding: 0;
  box-shadow: 0 0 26px rgba(47, 134, 255, 0.7), inset 0 0 12px rgba(47, 134, 255, 0.25);
  transition: width 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.notch:hover, .shelf-wrap.near .notch { width: 30px; box-shadow: 0 0 40px rgba(47, 134, 255, 0.95), inset 0 0 14px rgba(47, 134, 255, 0.35); }
.notch-hint {
  position: absolute; right: 36px; white-space: nowrap; font: 600 15px/1.2 var(--display); color: var(--cue-hot);
  display: flex; align-items: center; gap: 8px; pointer-events: none; transition: opacity 0.3s;
  padding: 9px 14px; border-radius: 999px; background: rgba(8, 9, 11, 0.86); border: 1px solid rgba(47, 134, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.notch-hint svg { width: 18px; height: 18px; animation: nudge 1.6s var(--ease-out) infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
.shelf-wrap.open .notch-hint, .shelf-wrap.used .notch-hint { opacity: 0; }
.hint-tap { display: none; }

.shelf {
  position: absolute; right: 0; top: 0; width: 196px; padding: 14px 12px 14px 14px;
  transform: translate(105%, 0); transition: transform 0.55s var(--land);
  background: #08090b; border: 1px solid rgba(255, 255, 255, 0.22); border-right: 0; border-radius: 22px 0 0 22px;
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex; flex-direction: column; gap: 10px;
}
.shelf::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(80% 60% at 50% 0%, rgba(47, 134, 255, 0.12), transparent 70%); }
.shelf-wrap.open .shelf { transform: translate(0, 0); }
.shelf-wrap.open .notch { opacity: 0; pointer-events: none; }
.tile {
  position: relative; display: grid; grid-template-columns: 1fr; gap: 8px; text-align: left; cursor: pointer;
  padding: 10px; border-radius: 13px; color: var(--chalk); font: 600 13px/1.2 var(--display);
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.25s var(--ease-out), background 0.2s, border-color 0.2s, box-shadow 0.25s;
}
.tile:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.24); transform: translateX(-3px); }
.tile:active { transform: scale(0.97); }
.tile.lit { background: var(--cue-deep); color: #fff; border-color: rgba(255, 255, 255, 0.45); box-shadow: 0 0 30px rgba(47, 134, 255, 0.55); }
.tile .num { position: absolute; left: 8px; top: 8px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11.5px; background: rgba(0, 0, 0, 0.55); }
.tile .mini { position: relative; height: 54px; border-radius: 8px; background: rgba(0, 0, 0, 0.35); }
.tile .mini span { position: absolute; border-radius: 2px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.25); }
.tile.lit .mini span { background: rgba(255, 255, 255, 0.35); border-color: rgba(255, 255, 255, 0.7); }
.tile .lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.tile .lbl em { font: 500 11px/1 var(--display); font-style: normal; color: var(--chalk-3); }
.tile.lit .lbl em { color: rgba(255, 255, 255, 0.85); }

/* 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; }
  .desk { padding-right: 34px; }          /* a lane for the notch beside the tall monitor */
  .shelf-wrap { top: calc(var(--hero-copy-h, 216px) + 18px); height: 120px; }
  .notch { height: 120px; width: 22px; }
  .notch-hint { font-size: 13px; right: 12px; top: calc(100% + 18px); }
  .hint-push { display: none; }
  .hint-tap { display: inline; }
  .shelf { width: 168px; }
  .tile .mini { height: 40px; }
  .hero-foot .or { display: none; }
  .bubble { bottom: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  .notch-hint svg { animation: none; }
  .shelf, .bubble { transition-duration: 0.01ms; }
}
