/* ==========================================================================
   The desk — hero scene.
   Everything except Lame Guy and the coin is drawn with CSS geometry so the
   two pieces of canonical artwork stay the only illustration on screen.
   ========================================================================== */

/* --- cold boot ---------------------------------------------------------- */
.boot {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink-950);
  display: grid; place-content: center; justify-items: start;
  gap: 6px; padding: clamp(20px, 6vw, 64px);
  font-size: var(--t-sm); color: var(--sage-400);
  transition: opacity var(--dur-3) var(--ease);
  /* The overlay clears itself on a timer so it can never trap the page,
     whatever happens to the scripts. JS just gets there sooner. */
  animation: boot-clear 3s var(--ease) forwards;
}
@keyframes boot-clear {
  0%, 84% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}
.boot.is-done { animation: none; opacity: 0; pointer-events: none; }
.boot__line { opacity: 0; }
.boot__line.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .boot { display: none; } }
.boot__skip {
  position: absolute; right: clamp(16px, 4vw, 40px); bottom: clamp(16px, 4vw, 40px);
  font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--bone-500);
}
.no-js .boot { display: none; }

/* --- hero shell --------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(24px, 5vw, 56px));
  padding-bottom: clamp(40px, 7vw, 90px);
  overflow: hidden;
  isolation: isolate;
}

/* room light: one warm pool from the screen, nothing else */
.hero::before {
  content: ""; position: absolute; z-index: -1;
  inset: -10% -10% 20% -10%;
  background:
    radial-gradient(58% 46% at 68% 42%, rgba(120,136,112,.18), transparent 70%),
    radial-gradient(38% 34% at 74% 52%, rgba(224,168,56,.09), transparent 72%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 30%, transparent 40%, rgba(7,8,6,.85) 100%);
}

.hero__inner {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
/* Two columns only once there is genuinely room for both. Below this the
   hero stacks, which reads far better than a 490px-wide desk scene. */
@media (min-width: 1080px) {
  .hero__inner { grid-template-columns: minmax(380px, 40%) 1fr; }
}

/* --- copy column -------------------------------------------------------- */
.hero__eyebrow {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3);
  font-size: var(--t-xs); letter-spacing: .18em; text-transform: uppercase;
  color: var(--bone-500); margin-bottom: var(--s-4);
}
.hero__eyebrow .dotlive {
  width: 7px; height: 7px; border-radius: 50%; background: var(--go-400);
  box-shadow: 0 0 9px var(--go-400); animation: pulse 2.4s var(--ease) infinite;
}
@media (prefers-reduced-motion: reduce) { .hero__eyebrow .dotlive { animation: none; } }

.hero h1 { font-size: var(--t-display); margin-bottom: .06em; }
.hero h1 .l2 { display: block; color: var(--sage-500); }

.hero__cook {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.4rem, 3.6vw, 2.4rem); line-height: 1.05; letter-spacing: -.02em;
  color: var(--gold-300);
  margin-block: clamp(10px, 2vw, 18px) 4px;
}
.hero__cook em { font-style: normal; color: var(--bone-400); }
@media (max-width: 640px) { .hero__cook em { display: block; } }
.hero__sub { color: var(--bone-400); font-size: var(--t-md); max-width: 44ch; line-height: 1.7; }
.hero__sub strong { color: var(--bone-200); font-weight: 500; }

.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-block: clamp(20px, 3.4vw, 30px) clamp(18px, 3vw, 26px); }
.hero__chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* --- the scene ---------------------------------------------------------- */
.scene {
  position: relative;
  width: 100%;
  height: clamp(360px, 44vw, 560px);
  --px: 0px; --py: 0px;
}
.scene__layer {
  position: absolute;
  transform: translate3d(calc(var(--px) * var(--d, 0)), calc(var(--py) * var(--d, 0)), 0);
  transition: transform 420ms var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .scene__layer { transform: none !important; }
}

/* floor + light pool */
.scene__floor {
  left: -12%; right: -12%; bottom: 0; height: 30%;
  background:
    radial-gradient(60% 100% at 62% 0%, rgba(120,136,112,.13), transparent 72%),
    linear-gradient(180deg, rgba(35,40,30,.55), transparent 70%);
  border-top: 1px solid rgba(120,136,112,.12);
  --d: .006;
}

/* --- desk --------------------------------------------------------------- */
.desk {
  left: -8%; right: -8%; bottom: 28%; height: 30%;
  --d: .014;
}
/* the surface: lighter at the back where the screen light lands */
.desk__top {
  position: absolute; inset: 0 0 26% 0;
  background:
    radial-gradient(70% 120% at 46% 0%, rgba(224,168,56,.14), transparent 68%),
    linear-gradient(180deg, #333929 0%, #22271c 45%, #171b12 100%);
  border-top: 1px solid rgba(163,177,154,.45);
  box-shadow: 0 -1px 0 rgba(255,255,255,.05);
}
/* the front lip and face */
.desk__front {
  position: absolute; inset: 74% 0 0 0;
  background: linear-gradient(180deg, #0f120b 0%, #070905 100%);
  border-top: 1px solid rgba(163,177,154,.22);
}
.desk__glow {
  position: absolute; left: 38%; right: 6%; top: 0; height: 60%;
  background: radial-gradient(52% 100% at 46% 0%, rgba(224,168,56,.16), transparent 70%);
  filter: blur(8px);
}

/* --- monitor ------------------------------------------------------------ */
.monitor {
  left: 42%; right: 2%; top: 6%; height: 44%;
  --d: .026;
}
.monitor__frame {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #1c2018, #12150f);
  border: 1px solid var(--ink-500);
  border-radius: 6px;
  padding: 10px 10px 22px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.6);
}
.monitor__frame::after {
  content: "LAME-24\""; position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%);
  font-size: 8px; letter-spacing: .2em; color: var(--bone-500); opacity: .55;
}
.monitor__screen {
  position: absolute; inset: 10px 10px 22px;
  background: linear-gradient(180deg, #0b1109, #070b06);
  border-radius: 2px;
  overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto;
  box-shadow: inset 0 0 40px rgba(0,0,0,.9), inset 0 0 0 1px rgba(120,136,112,.16);
}
/* screen sheen + a slow brightness drift, so the room feels lit by a
   working machine rather than a static image */
.monitor__screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(112deg, rgba(255,255,255,.055) 0 22%, transparent 42%);
  animation: screen-breathe 7s ease-in-out infinite;
}
@keyframes screen-breathe { 50% { opacity: .55; } }
.desk__glow { animation: screen-breathe 7s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .monitor__screen::after, .desk__glow { animation: none; }
}
.monitor__stand {
  position: absolute; left: 50%; bottom: -13%; transform: translateX(-50%);
  width: 16%; height: 14%;
  background: linear-gradient(180deg, #1c2018, #14170f);
  border-inline: 1px solid rgba(0,0,0,.7);
}
.monitor__foot {
  position: absolute; left: 50%; bottom: -15%; transform: translateX(-50%);
  width: 34%; height: 8px; border-radius: 3px;
  background: linear-gradient(180deg, #232820, #12150f);
  box-shadow: 0 8px 18px rgba(0,0,0,.7);
}

/* screen contents */
.scr__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px; border-bottom: 1px solid rgba(120,136,112,.16);
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--bone-500);
}
.scr__bar b { color: var(--gold-300); font-weight: 700; white-space: nowrap; }
.scr__bar .scr__clock { margin-left: auto; color: var(--sage-400); font-variant-numeric: tabular-nums; }

.scr__body {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 10px;
  padding: 10px; min-height: 0; overflow: hidden;
}
.scr__kv { display: grid; align-content: start; gap: 5px; min-width: 0; }
.scr__row { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; letter-spacing: .1em; }
.scr__row span { color: var(--bone-500); text-transform: uppercase; }
.scr__row b { color: var(--bone-100); font-weight: 700; letter-spacing: .04em; }
.scr__row b.go { color: var(--go-400); }
.scr__row b.warn { color: var(--warn-400); }

.scr__chart { position: relative; min-width: 0; display: grid; align-content: end; gap: 5px; }
.scr__chart svg { width: 100%; height: auto; overflow: visible; }
.scr__chart .cap {
  font-size: 9px; white-space: nowrap; letter-spacing: .12em; text-transform: uppercase; color: var(--bone-500);
  border-top: 1px solid rgba(120,136,112,.14); padding-top: 4px;
}
.spark-line { fill: none; stroke: var(--sage-400); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark-line.is-down { stroke: var(--bad-400); }
.spark-fill { fill: url(#sparkGrad); opacity: .35; }

.scr__foot {
  border-top: 1px solid rgba(120,136,112,.16);
  padding: 6px 9px;
  font-size: 10px; color: var(--sage-400);
  display: flex; align-items: center; gap: 8px;
  min-height: 26px;
}
.scr__foot .prompt { color: var(--go-400); }
.scr__foot .line { color: var(--bone-400); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* --- Lame Guy ----------------------------------------------------------- */
.guy {
  left: 3%; bottom: 1%; height: 55%;
  --d: .04;
  z-index: 2;
}
.guy picture { display: block; height: 100%; }
/* He faces right, into the monitor. The source art faces left. */
.guy img {
  height: 100%; width: auto;
  transform: scaleX(-1);
  filter: drop-shadow(14px 6px 26px rgba(0,0,0,.55));
}
.guy__shadow {
  position: absolute; left: 2%; right: -4%; bottom: -2%; height: 18px;
  background: radial-gradient(50% 100% at 50% 50%, rgba(0,0,0,.75), transparent 72%);
  filter: blur(3px);
}
.guy:hover picture,
.guy:focus-within picture { transform: translateY(-3px); }
/* A flinch, not a deformation: rigid vertical motion only, never a rotation
   or a scale, so the canonical artwork is never distorted. */
.guy.is-poked picture { animation: guy-poke 520ms var(--ease); }
@keyframes guy-poke {
  30% { transform: translateY(-7px); }
  62% { transform: translateY(2px); }
}
@media (prefers-reduced-motion: reduce) { .guy.is-poked picture { animation: none; } }

/* The crate he sits on.
   Its height is not decorative: the seat line in the artwork is 41.7% of his
   figure up from his feet, so with him at 55% of the scene the crate top has to
   reach ~24% or he is visibly sitting on air. Change his height and this has to
   follow. It also shares his parallax depth — two different depths would slide
   him off it as the scene moves. */
.crate {
  left: 1%; bottom: 0; width: 26%; height: 24%;
  --d: .04;
}
.crate__top {
  position: absolute; inset: 0 0 auto 0; height: 9px;
  background: linear-gradient(180deg, #2a2f23, #1a1e16);
  border-top: 1px solid rgba(163,177,154,.18);
}
.crate__front {
  position: absolute; inset: 8px 0 0 0;
  background: linear-gradient(180deg, #101309, #0a0c07);
  border-top: 1px solid rgba(0,0,0,.6);
  box-shadow: inset 0 0 0 1px rgba(120,136,112,.06);
}

/* ==========================================================================
   Desk objects share one interaction language, so "can I click that?" always
   has the same answer: a small lift, a warm rim, and a label naming the thing.
   ========================================================================== */
.dobj { cursor: pointer; }
.dobj > picture,
.dobj > .coin-obj__float,
.dobj > .phone-btn,
.dobj > .can-btn,
.dobj > .sticky {
  transition: transform var(--dur-2) var(--ease), filter var(--dur-2) var(--ease);
}

/* the rim reads as screen light catching the object, not as a glow effect */
.dobj:hover > picture img,
.dobj:focus-within > picture img,
.dobj:hover > .coin-obj__float img,
.dobj:focus-within > .coin-obj__float img {
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)) drop-shadow(0 0 10px rgba(224,168,56,.42));
}
.dobj:hover > .phone-btn,
.dobj:hover > .can-btn,
.dobj:hover > .sticky,
.dobj:focus-within > .phone-btn,
.dobj:focus-within > .can-btn,
.dobj:focus-within > .sticky {
  box-shadow: 0 8px 18px rgba(0,0,0,.6), 0 0 0 1px rgba(224,168,56,.5);
}

/* the label */
.dobj[data-hint]::after {
  content: attr(data-hint);
  position: absolute; left: 50%; top: 100%;
  transform: translate(-50%, 2px);
  margin-top: 6px;
  padding: 3px 7px;
  background: color-mix(in oklab, var(--ink-950) 88%, transparent);
  border: 1px solid var(--gold-700); border-radius: var(--r-1);
  font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-300); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.dobj:hover::after,
.dobj:focus-within::after { opacity: 1; transform: translate(-50%, 6px); }

/* the monitor's hit area sits over the screen but under the sticky note */
.obj-hit {
  position: absolute; inset: 0; z-index: 2;
  border-radius: 6px;
  background: none; border: 0;
}
.monitor.dobj:hover .monitor__screen,
.monitor.dobj:focus-within .monitor__screen {
  box-shadow: inset 0 0 40px rgba(0,0,0,.9), inset 0 0 0 1px rgba(224,168,56,.4);
}
.monitor.dobj[data-hint]::after { top: auto; bottom: -18%; }

/* --- desk objects ------------------------------------------------------- */
.coin-obj {
  left: 37%; bottom: 5%;
  width: clamp(104px, 14vw, 176px);
  --d: .06;
  z-index: 3;
  perspective: 700px;
}
.coin-obj:hover .coin-obj__float,
.coin-obj:focus-within .coin-obj__float { transform: translateY(-4px); }
.coin-btn {
  display: block; width: 100%; border-radius: 50%;
  transform-style: preserve-3d;
  transition: transform 260ms var(--ease-out);
}
.coin-btn img { width: 100%; filter: drop-shadow(0 12px 20px rgba(0,0,0,.65)); }
.coin-obj__float { animation: coin-float 6.5s var(--ease) infinite; }
@keyframes coin-float { 50% { transform: translateY(-7px); } }
.coin-obj__shadow {
  position: absolute; left: 8%; right: 8%; bottom: -14px; height: 14px;
  background: radial-gradient(50% 100% at 50% 50%, rgba(0,0,0,.7), transparent 70%);
  filter: blur(4px);
}
.coin-btn.is-spin { animation: coin-spin 900ms var(--ease-out); }
@keyframes coin-spin { to { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .coin-obj__float { animation: none; }
  .coin-btn.is-spin { animation: none; }
}
/* phone lying on the desk */
.phone-obj {
  left: 73%; bottom: 32%; width: clamp(38px, 4.6vw, 54px);
  --d: .05; z-index: 3;
}
.phone-btn {
  display: block; width: 100%; aspect-ratio: 1/1.9;
  background: linear-gradient(160deg, #1d2119, #0e100c);
  border: 1px solid var(--ink-500); border-radius: 5px;
  transform: rotate(-14deg);
  box-shadow: 0 8px 16px rgba(0,0,0,.6);
  position: relative;
  transition: transform var(--dur-2) var(--ease);
}
.phone-btn:hover { transform: rotate(-14deg) translateY(-3px); }
.phone-btn::before {
  content: ""; position: absolute; inset: 4px; border-radius: 3px;
  background: linear-gradient(180deg, rgba(120,136,112,.22), rgba(0,0,0,.5));
}
.phone-badge {
  position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px;
  display: grid; place-items: center; padding-inline: 4px;
  background: var(--bad-400); color: #fff;
  font-size: 9px; font-weight: 700; border-radius: var(--r-pill);
  box-shadow: 0 0 0 2px var(--ink-900);
}
.phone-obj.is-buzz .phone-btn { animation: buzz 420ms var(--ease); }
@keyframes buzz {
  0%,100% { transform: rotate(-14deg); }
  25% { transform: rotate(-17deg) translateX(-1px); }
  75% { transform: rotate(-11deg) translateX(1px); }
}
@media (prefers-reduced-motion: reduce) { .phone-obj.is-buzz .phone-btn { animation: none; } }

/* energy drink */
.can-obj { left: 90%; bottom: 46%; width: clamp(22px, 2.6vw, 30px); --d: .05; z-index: 3; }
.can-btn {
  display: block; width: 100%; aspect-ratio: 1/2.3;
  border-radius: 3px / 6px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.5) 0 10%, transparent 26% 74%, rgba(0,0,0,.55) 90% 100%),
    linear-gradient(180deg, #6f7f68 0 16%, #3f4a3a 16% 62%, #6f7f68 62% 100%);
  border: 1px solid rgba(0,0,0,.7);
  box-shadow: 0 6px 14px rgba(0,0,0,.55);
  position: relative;
  transition: transform var(--dur-2) var(--ease);
}
.can-btn:hover { transform: translateY(-3px); }
.can-btn::after {
  content: ""; position: absolute; left: 50%; top: 34%; transform: translateX(-50%);
  width: 60%; height: 2px; background: var(--gold-400); opacity: .85;
}

/* sticky note taped to the bezel */
.sticky-obj {
  z-index: 4;
  right: 2%; top: -4%;
  width: clamp(112px, 13vw, 158px);
  --d: .034;
}
.scene .sticky {
  display: block; width: 100%; max-width: none; text-align: left;
  transform: rotate(3deg);
  font-size: clamp(9.5px, 1vw, 12px); line-height: 1.3;
  cursor: pointer;
}
.sticky-obj:hover .sticky,
.sticky-obj:focus-within .sticky { transform: rotate(1.4deg) translateY(-2px); }
.sticky-obj[data-hint]::after { top: 100%; }

/* cable */
.cable { position: absolute; right: 16%; bottom: 4%; width: 56px; height: 28%; --d: .02; }
.cable svg { width: 100%; height: 100%; overflow: visible; }
.cable path { fill: none; stroke: #0a0c07; stroke-width: 3; stroke-linecap: round; }

/* --- scene at small sizes ---------------------------------------------- */
@media (max-width: 1079px) {
  /* Single-column hero: cap the scene so the composition stays as tight as
     it is on desktop instead of stretching across the full width. */
  .scene { height: clamp(380px, 58vw, 500px); max-width: 560px; margin-inline: auto; }
}
@media (max-width: 720px) {
  .scene { height: clamp(330px, 82vw, 440px); }
  /* a phone-sized monitor only has room for the headline numbers */
  .scr__body { grid-template-columns: 1fr; padding: 7px 8px; }
  .scr__chart { display: none; }
  .scr__row:not(.is-sm) { display: none; }
  .scr__row { font-size: 9.5px; }
  .scr__bar { padding: 5px 8px; font-size: 9px; }
  .scr__foot { padding: 5px 8px; font-size: 9px; min-height: 22px; }
  .can-obj, .cable { display: none; }
  .monitor { left: 38%; right: 0; top: 2%; height: 48%; }
  .desk { bottom: 26%; height: 30%; }
  .coin-obj { left: 30%; bottom: 4%; width: clamp(86px, 24vw, 128px); }
  .phone-obj { left: 66%; bottom: 31%; width: 34px; }
  .guy { left: 0; height: 54%; }
  /* On a phone the note would sit on top of the screen it is stuck to, so it
     moves to the empty wall above him instead. */
  .sticky-obj { left: 0; right: auto; top: 0; width: clamp(96px, 25vw, 118px); }
  .dobj[data-hint]::after { display: none; }
}
@media (max-width: 400px) {
  .scene { height: 320px; }
  .sticky-obj { display: none; }
  .phone-obj { display: none; }
  .monitor { left: 36%; }
}
