:root {
  --bg: #07090c;
  --gold: #e6b422;
  --teal: #0e7490;
  --text: #f3f4f6;
  --muted: #9aa3ad;
  --panel: rgba(13, 17, 20, 0.82);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Outfit, system-ui, sans-serif;
}

body { overflow-x: hidden; }

#diorama {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  opacity: 0;
  pointer-events: none;
}

body.is-scene #diorama {
  opacity: 1;
  pointer-events: auto;
}

#fall-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  pointer-events: none;
}

#star-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  pointer-events: none;
  opacity: 0;
}

body.is-contact #star-bg {
  opacity: 1;
}

body.is-scene #fall-bg,
body.is-contact #fall-bg {
  opacity: 0;
}

#market-flow {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 22vh;
  min-height: 120px;
  z-index: 3;
  display: block;
  pointer-events: none;
}

body.is-contact #market-flow {
  height: 22vh;
  min-height: 120px;
}

body:not(.is-home):not(.is-contact) #market-flow,
body.is-scene #market-flow {
  opacity: 0;
}

#magic {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  z-index: 2;
  display: block;
  touch-action: none;
  user-select: none;
  pointer-events: none;
}

.title-fallback {
  position: absolute;
  top: 50%;
  left: 6vw;
  right: 42vw;
  margin: 0;
  transform: translateY(-50%);
  font-size: clamp(1.26rem, 2.83vw, 2.68rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f6e7b2;
  text-shadow: 0 0 18px rgba(230, 180, 34, 0.35);
}

body.is-contact .title-fallback {
  top: 60%;
}

#magic:has(canvas) .title-fallback {
  display: none;
}

#magic canvas,
#magic canvas.title-particles {
  display: block;
  width: 100%;
  height: 100%;
}

.playground {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

body.is-scene #magic,
body.is-scene #bot-stage,
body.is-scene .playground,
body.is-about #magic,
body.is-about #bot-stage,
body.is-about .playground,
body.is-about #fall-bg,
body.is-about #market-flow,
body.is-contact #bot-stage,
body.is-contact .playground {
  opacity: 0;
  pointer-events: none;
}

.site-mark {
  position: fixed;
  left: 22px;
  bottom: 16px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  pointer-events: none;
  color: var(--gold);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  opacity: 0.8;
  text-shadow: 0 0 12px rgba(230, 180, 34, 0.22);
}

.site-qr {
  width: 28px;
  height: 28px;
  display: block;
  flex: none;
}

body.is-scene .site-mark {
  bottom: 44px;
}

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 28px;
  pointer-events: none;
}

.top .brand-col,
.top nav { pointer-events: auto; }

.brand-col {
  max-width: min(520px, 42vw);
}

.brand {
  display: block;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--gold);
}

nav {
  position: relative;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
}

@media (min-width: 1280px) {
  nav { gap: 32px; }
}

nav::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(230, 180, 34, 0),
    #e6b422 18%,
    #f6e7b2 50%,
    #e6b422 82%,
    rgba(230, 180, 34, 0)
  );
  box-shadow:
    0 0 8px #e6b422,
    0 0 18px rgba(230, 180, 34, 0.55);
  pointer-events: none;
  z-index: 0;
  animation: guide-pulse 2.8s ease-in-out infinite;
}

nav button,
nav .nav-link {
  position: relative;
  z-index: 1;
  background: #0d1114;
  color: #f6e7b2;
  border: 1px solid rgba(230, 180, 34, 0.55);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-decoration: none;
  box-shadow:
    0 0 0 1px rgba(230, 180, 34, 0.12),
    0 0 10px rgba(230, 180, 34, 0.35),
    inset 0 0 12px rgba(230, 180, 34, 0.08);
}

nav button.is-on,
nav button:hover,
nav .nav-link:hover {
  border-color: #f6e7b2;
  color: #fff6d4;
  box-shadow:
    0 0 0 1px rgba(246, 231, 178, 0.55),
    0 0 14px rgba(230, 180, 34, 0.75),
    0 0 28px rgba(230, 180, 34, 0.4),
    inset 0 0 14px rgba(230, 180, 34, 0.16);
}

@keyframes guide-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.view {
  position: relative;
  z-index: 5;
  display: none;
}

.view.is-on { display: block; }

#home {
  min-height: 100vh;
  padding: 0;
  z-index: auto;
  pointer-events: none;
}

#home .lead,
#home .lead-sub {
  pointer-events: auto;
}

#bot-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  overflow: visible;
  pointer-events: none;
  transform: translateX(30vw) scale(0.81);
  transform-origin: center center;
}

#bot-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
}

body:not(.is-home) #bot-stage,
body:not(.is-home) .lead {
  opacity: 0;
  pointer-events: none;
}

.lead, .lead-sub {
  position: static;
  margin: 14px 0 0;
  max-width: none;
  text-align: left;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (min-width: 1280px) {
  .brand-col {
    max-width: 780px;
  }

  .lead span {
    display: block;
    white-space: nowrap;
  }
}

.work-line {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  width: min(52rem, 80vw);
  margin: 0;
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  color: var(--gold);
  font-size: clamp(0.92rem, 1.7vw, 1.18rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-shadow: 0 0 22px rgba(230, 180, 34, 0.35);
}

body.is-scene .work-line { opacity: 1; }
body.is-story .work-line { opacity: 0; }

.scene-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  color: var(--muted);
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

body.is-scene .scene-hint { opacity: 0.85; }
body.is-scene #home,
body.is-about #home { display: none; }
body.is-scene .panel,
body.is-about .panel { display: none; }

.about-2d {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  overflow: hidden;
}

#about.about-2d.is-on {
  display: block;
}

.about-stage {
  position: absolute;
  inset: 0;
}

.about-lab {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 92% 32%;
}

.about-rail {
  position: absolute;
  left: 76.4%;
  top: 11%;
  bottom: 12%;
  width: 44px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.about-rail::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(230, 180, 34, 0),
    #e6b422 12%,
    #f6e7b2 50%,
    #e6b422 88%,
    rgba(230, 180, 34, 0)
  );
  box-shadow: 0 0 10px rgba(230, 180, 34, 0.55);
  pointer-events: none;
}

.about-dot {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(246, 231, 178, 0.85);
  background: #0d1114;
  color: #ffe27a;
  font-family: Caveat, "Segoe Script", "Comic Sans MS", cursive;
  font-size: 1.28rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow:
    0 0 0 1px rgba(230, 180, 34, 0.2),
    0 0 10px rgba(230, 180, 34, 0.65),
    0 0 20px rgba(230, 180, 34, 0.35);
  animation: about-dot-pulse 2.1s ease-in-out infinite;
}

.about-dot:hover {
  background: #1a160c;
  box-shadow:
    0 0 0 1px #f6e7b2,
    0 0 14px #e6b422,
    0 0 28px rgba(230, 180, 34, 0.55);
}

@keyframes about-dot-pulse {
  0%, 100% { opacity: 0.72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}

.about-dot.is-picked {
  color: #fff6d4;
  border-color: #fff1a8;
  animation: about-dot-picked 1.15s ease-in-out infinite;
}

@keyframes about-dot-picked {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 0 2px rgba(255, 241, 168, 0.85),
      0 0 16px #e6b422,
      0 0 32px rgba(230, 180, 34, 0.55);
  }
  50% {
    transform: scale(1.18);
    box-shadow:
      0 0 0 3px #fff6d4,
      0 0 22px #ffe27a,
      0 0 44px rgba(230, 180, 34, 0.75);
  }
}

@media (max-width: 1200px) {
  body.is-about #hint {
    display: none;
  }

  .about-rail {
    left: 50%;
    top: auto;
    bottom: 36px;
    width: 44px;
    height: min(72vw, 560px);
    transform: translate(-50%, 50%) rotate(-90deg);
    transform-origin: center center;
    z-index: 6;
  }

  .about-dot {
    animation-name: about-dot-pulse-floor;
  }

  .about-dot.is-picked {
    animation-name: about-dot-picked-floor;
  }

  #about-card:not([hidden]) {
    padding-bottom: 92px;
  }
}

@keyframes about-dot-pulse-floor {
  0%, 100% { opacity: 0.72; transform: rotate(90deg) scale(1); }
  50% { opacity: 1; transform: rotate(90deg) scale(1.12); }
}

@keyframes about-dot-picked-floor {
  0%, 100% { transform: rotate(90deg) scale(1); }
  50% { transform: rotate(90deg) scale(1.18); }
}

#about-card {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12vh 3vw 3vh;
  pointer-events: auto;
  background: rgba(5, 7, 10, 0.12);
  cursor: pointer;
}

#about-card[hidden] { display: none; }
#about-card:not([hidden]) { display: flex; }

.about-card-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 22px;
  width: min(980px, 68vw);
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  overflow: auto;
  cursor: default;
  padding: 28px 52px 28px 28px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(7, 9, 12, 0.16) 55%, rgba(7, 9, 12, 0.2));
  border: 1px solid rgba(246, 231, 178, 0.22);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 18px 48px rgba(0, 0, 0, 0.28),
    0 0 36px rgba(230, 180, 34, 0.1);
}

.about-card-body:has(#about-visual[hidden]) {
  grid-template-columns: 1fr;
}

.about-card-visual {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.about-card-visual img {
  width: 100%;
  height: min(34vh, 280px);
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(246, 231, 178, 0.18);
}

.about-card-visual:has(img:only-child) img {
  height: min(52vh, 420px);
}

.about-card-text h2 {
  margin: 0 0 10px;
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
}

#about-kicker { font-size: 0.95rem; }
#about-line { color: var(--gold); margin: 0 0 14px; font-size: 1.12rem; }
#about-copy { color: var(--muted); }
#about-copy p { margin: 0 0 12px; font-size: 1.05rem; line-height: 1.55; }
#about-points {
  margin: 8px 0 0;
  padding-left: 22px;
  font-size: 1.02rem;
  line-height: 1.55;
}
#about-more { margin: 18px 0 0; }

@media (max-width: 900px) {
  .about-card-body {
    width: min(920px, 92vw);
  }
  .about-card-body {
    grid-template-columns: 1fr;
  }
  .about-card-visual img,
  .about-card-visual:has(img:only-child) img {
    height: 22vh;
  }
}

#about-more button {
  background: #0d1114;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: #ffe27a;
  cursor: pointer;
  font-family: inherit;
  padding: 8px 16px;
  box-shadow: 0 0 16px rgba(230, 180, 34, 0.4);
}

.modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(13, 17, 20, 0.72);
  color: #ffe27a;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.45rem;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 0 16px rgba(230, 180, 34, 0.4);
  pointer-events: auto;
}

.modal-x:hover {
  color: #fff6c4;
  box-shadow: 0 0 22px rgba(230, 180, 34, 0.75);
}

#close-story.modal-x {
  position: fixed;
  top: 18px;
  right: 22px;
  left: auto;
  z-index: 30;
}

body.is-about #hint { opacity: 0.85; }

@media (max-width: 1200px) {
  body.is-about #hint { display: none; }
}

#hover-label {
  position: fixed;
  z-index: 12;
  pointer-events: none;
  background: #11181d;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
}

body.is-story .top {
  opacity: 0;
  pointer-events: none;
}

#story {
  position: fixed;
  inset: 0;
  z-index: 25;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgba(5, 6, 8, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0;
  border-radius: 0;
  padding: 56px 4vw 20px;
  pointer-events: auto;
}

.story-inner {
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.story-visual {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 14px;
  align-items: stretch;
}

#story-cover {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: left center;
  border-radius: 8px;
  margin: 0;
  box-shadow: 0 0 48px rgba(230, 180, 34, 0.16);
}

#story[hidden] { display: none; }

#story-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  min-height: 0;
  overflow: auto;
}

#story-gallery img {
  width: 100%;
  height: 92px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #2b3136;
  cursor: pointer;
}

#story-gallery img:hover,
#story-gallery img.is-on {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(230, 180, 34, 0.35);
}

.story-meta {
  flex: 0 0 auto;
  max-width: 720px;
}

.story-meta > * {
  margin: 0 0 6px;
}

.story-meta > *:last-child {
  margin-bottom: 0;
}

#story-line { color: var(--text); font-size: 0.95rem; }
#story-tags { color: var(--gold); font-size: 0.82rem; letter-spacing: 0.04em; }

.kicker {
  color: var(--teal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin: 0 0 6px;
}

#story-title { margin: 0 0 6px; font-size: clamp(1.45rem, 2.6vw, 2.15rem); line-height: 1.1; }
#story-copy { color: var(--muted); font-size: 0.92rem; line-height: 1.4; }
#story-points {
  padding-left: 18px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 4px 0 8px;
}
#story-links a { color: var(--gold); margin-right: 16px; text-underline-offset: 3px; }

.panel {
  position: relative;
  z-index: 6;
  padding: 40px 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(180deg, transparent, rgba(7, 9, 12, 0.88) 12%);
}

.about-panel {
  padding-top: 92px;
  min-height: 100vh;
  max-width: 1180px;
}

.about-panel h2 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}

.about-role {
  color: var(--gold);
  margin: 0 0 16px;
  letter-spacing: 0.04em;
}

.about-lead {
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.5;
  margin: 0 0 12px;
}

.about-lead strong { color: var(--text); }

.about-journey {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.journey-card {
  background: #11161a;
  border: 1px solid #2b3136;
  border-radius: 14px;
  padding: 16px 16px 18px;
  min-height: 0;
}

.journey-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.journey-card p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
}

.journey-go {
  margin-top: 14px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  cursor: pointer;
}

.journey-go:hover {
  box-shadow: 0 0 16px rgba(230, 180, 34, 0.35);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  background: #11161a;
  border: 1px solid #2b3136;
  border-radius: 14px;
  padding: 16px;
}

.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { color: var(--muted); font-size: 0.9rem; }
.card a { color: var(--gold); }

.contact-view {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  pointer-events: none;
}

#contact.contact-view.is-on {
  display: block;
}

.contact-shell {
  position: absolute;
  left: 50%;
  top: 92px;
  bottom: auto;
  transform: translateX(-50%);
  width: min(1080px, 88vw);
  pointer-events: auto;
  text-align: center;
}

.contact-shell .kicker {
  color: var(--gold);
  letter-spacing: 0.28em;
}

.contact-shell h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: 0.06em;
  font-weight: 700;
  text-shadow: 0 0 24px rgba(230, 180, 34, 0.28);
}

.contact-lead {
  color: var(--muted);
  margin: 0 auto 22px;
  max-width: 34rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}

.contact-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 132px;
  padding: 18px 18px 16px;
  text-decoration: none;
  color: var(--text);
  border-radius: 20px;
  border: 1px solid rgba(246, 231, 178, 0.2);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(230, 180, 34, 0.1), transparent 46%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(7, 9, 12, 0.38));
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 14px 36px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.contact-tile::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 10px rgba(230, 180, 34, 0.7);
}

.contact-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(246, 231, 178, 0.72);
  box-shadow:
    0 0 0 1px rgba(255, 241, 168, 0.16) inset,
    0 18px 40px rgba(0, 0, 0, 0.34),
    0 0 32px rgba(230, 180, 34, 0.22);
}

.contact-kind {
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.contact-handle {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  font-size: 0.92rem;
  line-height: 1.25;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.contact-hint {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.contact-type {
  margin: 22px auto 0;
  max-width: 46rem;
  min-height: 3.2em;
  color: var(--gold);
  font-size: clamp(0.92rem, 1.6vw, 1.08rem);
  line-height: 1.55;
  letter-spacing: 0.02em;
  text-shadow: 0 0 16px rgba(230, 180, 34, 0.28);
}

.contact-caret {
  display: inline-block;
  width: 0.55em;
  margin-left: 2px;
  border-right: 2px solid var(--gold);
  animation: contact-blink 0.9s steps(1) infinite;
}

@keyframes contact-blink {
  50% { border-color: transparent; }
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-shell { top: 78px; }
}

@media (max-width: 560px) {
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1200px) {
  .title-fallback {
    top: 50%;
    left: 16px;
    right: 38vw;
    font-size: clamp(1.24rem, 3.86vw, 2.12rem);
  }
}

@media (max-width: 1100px) {
  .title-fallback {
    left: 5vw;
    right: 38vw;
    font-size: clamp(1.1rem, 2.48vw, 2.21rem);
  }
  #bot-stage {
    transform: translateX(26vw) scale(0.6);
    transform-origin: center center;
  }

  nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    width: auto;
    padding: 16px 12px;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }

  nav::before {
    left: 50%;
    right: auto;
    top: 10px;
    bottom: 10px;
    width: 2px;
    height: auto;
    transform: translateX(-50%);
    background: linear-gradient(
      180deg,
      rgba(230, 180, 34, 0),
      #e6b422 14%,
      #f6e7b2 50%,
      #e6b422 86%,
      rgba(230, 180, 34, 0)
    );
    box-shadow:
      0 0 8px #e6b422,
      0 0 20px rgba(230, 180, 34, 0.55);
  }

  nav button,
  nav .nav-link {
    min-width: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    text-align: center;
    letter-spacing: 0.14em;
    padding: 14px 8px;
    transform: rotate(180deg);
  }
}

@media (max-width: 960px) {
  .top {
    flex-wrap: nowrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .brand-col {
    max-width: calc(100vw - 72px);
  }

  nav {
    width: auto;
    height: 100vh;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
  }

  nav button,
  nav .nav-link {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 12px 7px;
    font-size: 0.78rem;
    min-width: 0;
    transform: rotate(180deg);
  }

  .title-fallback {
    top: 50%;
    left: 16px;
    right: 16px;
    font-size: clamp(1.24rem, 5.7vw, 1.93rem);
  }

  .lead,
  .lead-sub {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  #bot-stage {
    inset: auto;
    top: auto;
    left: auto;
    right: 0;
    bottom: 0;
    width: min(69vw, 352px);
    height: min(35vh, 246px);
    overflow: visible;
    transform: none;
    transform-origin: right bottom;
    z-index: 6;
  }

  #story {
    padding: 52px 14px 12px;
  }

  .story-visual {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  #story-gallery {
    flex-direction: row;
    overflow-x: auto;
  }

  #story-gallery img {
    width: 112px;
    height: 68px;
  }

  .story-meta {
    max-width: none;
  }

  #story-title { font-size: 1.35rem; }
  #story-copy, #story-line, #story-points { font-size: 0.82rem; }

  .cards,
  .about-journey {
    grid-template-columns: 1fr 1fr;
  }

  .contact-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .about-journey {
    grid-template-columns: 1fr;
  }

  .title-fallback {
    font-size: clamp(1.06rem, 6.44vw, 1.56rem);
  }

  #bot-stage {
    width: min(56vw, 211px);
    height: min(30vh, 194px);
    right: 0;
    bottom: 0;
  }
}
