/* ============================================================
   responsive.css — mobile/tablet reflow + reduced-motion.
   The headline change: on narrow screens the horizontal work
   track unpins and becomes a normal vertical stack (the JS
   track is gated off on touch/coarse pointers, so CSS owns
   the mobile layout entirely).
   ============================================================ */

/* ---- Tablet / small desktop ------------------------------ */
@media (max-width: 1024px) {
  .about__grid { grid-template-columns: 1fr; gap: 32px; }
  .panel { width: 74vw; }
  .work__intro { width: 56vw; }
}

/* ---- Mobile ---------------------------------------------- */
@media (max-width: 768px) {
  /* Nav: the section links don't fit — keep logo + location/clock. */
  .nav-link { display: none; }
  .topbar__spacer--border { display: none; }

  /* Hero scales up so the name still reads big. */
  .hero { padding: 96px 6vw 48px; }
  .hero__name { font-size: 18vw; }

  /* Work track: unpin and stack vertically. */
  .work { height: auto; }
  .work__sticky { position: static; height: auto; overflow: visible; touch-action: auto; }
  .work__track { flex-direction: column; width: 100%; }
  .work__intro,
  .panel,
  .work__end {
    width: 100%; height: auto;
    border-left: none;
    border-top: 1px solid rgba(244,241,234,0.22);
  }
  .work__intro { padding: 12vh 6vw 8vh; gap: 28px; }
  .panel { padding: 8vh 6vw; }
  .panel__visual { min-height: 240px; }
  .panel__title { font-size: 8vw; white-space: normal; }
  .panel__meta { flex-wrap: wrap; gap: 8px; }
  /* No drag on mobile — the door is a plain button; pad it to a real thumb target. */
  .panel__view, .panel__view--here { padding: 12px 16px; }
  .work__counter, .work__drag, .work__hint { display: none; }

  /* Process flow: vertical with rotated arrows. */
  .flow { flex-direction: column; }
  .flow__arrow { transform: rotate(90deg); padding: 10px 0; }

  /* Section padding trims. */
  .about, .process, .workshop { padding-left: 6vw; padding-right: 6vw; }
  .workshop__box { padding: 40px 28px; }
  .contact { padding: 12vh 6vw 0; }
}

/* ---- Very small phones ----------------------------------- */
@media (max-width: 420px) {
  .hero__bottom { flex-direction: column; align-items: flex-start; gap: 18px; }
  .topbar__meta { gap: 8px; padding: 0 12px; }
}

/* ---- Reduced motion -------------------------------------- *
   Honour the OS setting: stop the ticker, blink, and any
   transition-driven movement. The boot counter still runs
   (it's information, not decoration); the Three.js modules
   render a single static frame (handled in JS).               */
@media (prefers-reduced-motion: reduce) {
  .ticker__row { animation: none; }
  .terminal__cursor,
  .workshop__status-dot { animation: none; }
  .boot { transition: opacity 0.3s ease; }
  .boot.is-done { transform: none; }
  * { scroll-behavior: auto !important; }
}
