/* HARIAKU — metamorphosis hero (Option 02 & 04). Pair with shared/js/meta.js. */
.room { position: relative; height: 420vh; }
.room__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.room__media { position: absolute; inset: 0; }
.room__arch { position: absolute; inset: 0; margin: 0; clip-path: inset(100% 0 0 0); will-change: clip-path; }
.room__arch img { position: absolute; max-width: none; height: auto; }
.room__tag { position: absolute; left: 0; top: 0; translate: -50% -100%; padding-bottom: 14px; font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.35vw, 22px); line-height: 1.2; color: var(--terracotta-ink); white-space: nowrap; opacity: 0; }
.room__tag::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 1px; height: 10px; background: currentColor; opacity: .5; }

/* the creature: line drawing in the logo's ink */
.meta { position: absolute; left: var(--pad); top: calc(var(--nav-h) + 4vh); width: min(340px, 25vw); height: auto; overflow: visible; }
.meta__twig { fill: none; stroke: #8A6A52; stroke-width: 2.6; stroke-linecap: round; }
.meta__twig--sprig { stroke-width: 1.8; }
.meta__leaf { fill: #B9C2A6; stroke: #7D8B6E; stroke-width: 1.2; }
.meta__leaf--b { fill: #CFD5BF; }
.meta__silk { stroke: #C9A46A; stroke-width: 2; stroke-linecap: round; }
.meta__shell { fill: #F1E3CB; stroke: var(--terracotta); stroke-width: 2.4; stroke-linejoin: round; }
.meta__band { fill: none; stroke: var(--terracotta); stroke-width: 1.3; stroke-linecap: round; opacity: .55; }
.meta__seam { fill: none; stroke: #B08A4E; stroke-width: 1.6; stroke-dasharray: 5 4; stroke-linecap: round; }
.meta__dot { fill: #C9A46A; }
.meta__pupa { opacity: 0; transform-origin: 150px 50px; transform-box: view-box; }
.meta__pupa [data-half] { transform-origin: 150px 52px; transform-box: view-box; }
.meta__pupa.is-swaying { animation: o2-sway 3.6s ease-in-out infinite; }
@keyframes o2-sway { 0%, 100% { rotate: -2.5deg; } 50% { rotate: 2.5deg; } }
.meta__seg circle { fill: #FBF3E6; stroke: var(--terracotta); stroke-width: 2.2; }
.meta__seg .spot { fill: #C9A46A; stroke: none; }
.meta__seg .leg { stroke: var(--terracotta); stroke-width: 1.8; stroke-linecap: round; fill: none; }
.meta__seg--head circle { fill: var(--terracotta); }
.meta__seg--head .eye { fill: #FBF3E6; stroke: none; }
.meta__seg--head .ant { fill: none; stroke: var(--terracotta); stroke-width: 1.6; stroke-linecap: round; }
.meta__seg--head .ant-tip { fill: var(--terracotta); stroke: none; }
.meta__bob { animation: o2-inch 1.25s ease-in-out infinite; animation-delay: calc(var(--i) * -.11s); }
.meta.is-still .meta__bob { animation-play-state: paused; }
@keyframes o2-inch { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3.5px); } }

/* poem: three stages, the active one lit */
.room__poem { position: absolute; left: var(--pad); bottom: 11vh; width: min(460px, 33vw); list-style: none; margin: 0; padding: 0; font-family: var(--serif); font-size: clamp(27px, 2.5vw, 40px); line-height: 1.12; color: var(--espresso); }
.room__poem li { opacity: .16; margin-top: 16px; }
.room__poem li span { display: block; margin-bottom: 6px; font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--terracotta-ink); }
.room__poem li:nth-child(3) { font-style: italic; color: var(--terracotta-ink); }
.room__scroll { position: absolute; left: var(--pad); bottom: 4.5vh; color: var(--terracotta-ink); }
.room__scroll span { display: inline-block; animation: o2-bob 1.8s var(--ease) infinite; }
@keyframes o2-bob { 50% { transform: translateY(5px); } }
.room__copy { position: absolute; left: var(--pad); bottom: 10vh; width: min(460px, 32vw); color: var(--espresso); opacity: 0; pointer-events: none; }
.room__copy .eyebrow { color: var(--terracotta-ink); }
.room__copy h1 { font-size: clamp(52px, 5.6vw, 96px); margin: 16px 0 20px; }
.room__copy h1 em { color: var(--terracotta-ink); }
.room__lead { font-size: 17px; max-width: 34ch; margin-bottom: 28px; }
.room__copy .btn { background: var(--espresso); color: var(--ecru); }
.room.is-static { height: auto; }
.room.is-static .room__sticky { position: relative; }

@media (max-width: 760px) {
  .room { height: 380vh; }
  .meta { width: 118px; top: calc(var(--nav-h) + 6px); left: 10px; }
  .room__poem { left: var(--pad); right: var(--pad); width: auto; top: calc(62vh + 22px); bottom: auto; font-size: 24px; }
  .room__poem li { margin-top: 10px; }
  .room__poem li span { font-size: 10px; margin-bottom: 3px; }
  .room__scroll { display: none; }
  .room__copy { left: var(--pad); right: var(--pad); width: auto; bottom: 4.5vh; }
  .room__copy h1 { font-size: 46px; margin: 10px 0 12px; }
  .room__lead { font-size: 15.5px; margin-bottom: 18px; }
  .room__tag { font-size: 15px; padding-bottom: 10px; }
}
