/* 3.2 — two passing tides; the background itself stays still. */
.motion-boot #site-content { opacity: 0; animation: boot-fallback .01s 1.5s forwards; }
@keyframes boot-fallback { to { opacity: 1; } }
.page-room, .hero-poster { animation: none; }
.poster-arrival { position: absolute; inset: 0; z-index: 7; overflow: hidden; pointer-events: none; opacity: 0; }
.poster-arrival svg { position: absolute; left: -38%; top: -8%; width: 100%; height: 116%; overflow: visible; }
.poster-arrival .arrival-edge { fill: none; stroke-width: .8; vector-effect: non-scaling-stroke; }
.hero-poster.motion-staging > :not(.poster-arrival) { opacity: 0; }
.is-home-entering .poster-arrival { animation: arrival-water 2.8s ease-in-out both; }
.is-home-entering .poster-arrival svg { animation: arrival-crossing 2.4s cubic-bezier(.24,.58,.3,1) both; }
.is-home-entering .poster-arrival .arrival-wave-light { animation-delay: .28s; }
.is-home-entering .poster-art { animation: ink-surface 1.6s .08s ease-out both; }
.is-home-entering .poster-title h1 > span { animation: title-surface 1.45s .15s cubic-bezier(.22,.68,.25,1) both; }
.is-home-entering .poster-title h1 > .title-second { animation-delay: .3s; }
.is-home-entering .poster-signature, .is-home-entering .poster-topline { animation: page-surface 1.2s .09s ease-out both; }
.is-home-entering .poster-quote { animation: page-surface 1.4s .36s cubic-bezier(.22,.68,.25,1) both; }
.is-home-entering .poster-enter { animation: page-surface 1.25s .5s cubic-bezier(.22,.68,.25,1) both; }
.is-home-entering .poster-bottom, .is-home-entering .poster-copyright, .is-home-entering .poster-aside { animation: ink-surface 1.25s .43s ease-out both; }
/* Opacity is a separate animation; it never resets the record's existing drift. */
.is-home-entering .earth-record { animation: record-drift 12s ease-in-out infinite alternate, ink-surface 1.5s .22s ease-out both; }
.page-room.motion-staging { opacity: 0; }
.page-room.is-page-entering { animation: page-surface 1.25s cubic-bezier(.22,.68,.25,1) both; }
.is-page-entering .page-intro { animation: title-surface 1.35s .08s cubic-bezier(.22,.68,.25,1) both; }
@keyframes arrival-water { 0% { opacity: 0; } 20% { opacity: .75; } 60% { opacity: .55; } 100% { opacity: 0; } }
@keyframes arrival-crossing { from { transform: translate3d(-18%,0,0) rotate(-7deg); } to { transform: translate3d(145%,0,0) rotate(5deg); } }
@keyframes title-surface { from { opacity: 0; transform: translate3d(0,32px,0) rotate(1deg); } to { opacity: 1; transform: none; } }
@keyframes page-surface { from { opacity: 0; transform: translate3d(0,25px,0); } to { opacity: 1; transform: none; } }
@keyframes ink-surface { from { opacity: 0; } to { opacity: 1; } }

/* Prepainted rim; hover only fades its opacity, never redraws a glowing shadow. */
.has-card-halo { position: relative; }
.card-halo { position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .42s ease; }
.card-halo::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(130deg,#e1f3ff,#a6c9e6 38%,#c4dcb7 72%,#bcdcf0); -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); mask-composite: exclude; }
.card-halo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 17px #c1dcf018,0 0 13px #bdd9ee15; }
.has-card-halo:focus-within > .card-halo { opacity: .95; }
.community-empty, .community-loading, .community-error { color: #d3e2f0a6; font-size: 13px; padding: 14px 0; margin: 0; }
.community-error button { margin-left: 12px; padding: 0; background: none; border: 0; color: #c8dfbb; font: inherit; cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .has-card-halo:hover > .card-halo { opacity: .95; }
}

/* A compact, asymmetrical ripple: three contours and a few escaping droplets. */
.click-tide, .click-tide[popover] { display: block; position: fixed; z-index: 9999; inset: auto; width: 160px; height: 160px; margin: -80px 0 0 -80px; border: 0; padding: 0; background: transparent; overflow: visible; pointer-events: none; color: #ebf4ff; }
.click-tide svg { width: 100%; height: 100%; overflow: visible; }
.tide-echo, .tide-heart, .tide-drop { transform-origin: 80px 80px; opacity: 0; }
.tide-echo { stroke: currentColor; stroke-width: 1.1; animation: tide-spread .92s cubic-bezier(.16,.65,.3,1) both; }
.tide-echo-two { color: #bfdcbc; stroke-width: .8; animation-delay: .085s; }
.tide-echo-three { stroke-width: .65; animation-delay: .17s; }
.tide-heart { fill: #d3ead6; animation: tide-heart .55s ease-out both; }
.tide-drop { fill: #ecf4fc; animation: tide-droplet .85s .06s cubic-bezier(.2,.7,.3,1) both; }
@keyframes tide-spread { 0% { opacity: 0; transform: scale(.12) rotate(-12deg); } 18% { opacity: .67; } 100% { opacity: 0; transform: scale(1.04) rotate(13deg); } }
@keyframes tide-heart { 0% { opacity: 0; transform: scale(.3); } 22% { opacity: .42; } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes tide-droplet { 0% { opacity: 0; transform: translate3d(0,0,0) scale(.2); } 22% { opacity: .62; } 100% { opacity: 0; transform: translate3d(var(--dx),var(--dy),0) scale(.5); } }

/* Small reading-margin details, kept outside the column of text. */
.room-detail { position: absolute; width: clamp(48px,6vw,96px); height: auto; opacity: .32; pointer-events: none; }
.room-detail-left { left: 8px; top: 47%; transform: rotate(-8deg); }
.room-detail-right { right: 9px; top: 15%; transform: scaleX(-1) rotate(13deg); opacity: .25; }
.about-portrait { transform-origin: 50% 70%; transition: transform .48s cubic-bezier(.16,1,.3,1); }
.about-portrait::before { transition: transform .48s cubic-bezier(.16,1,.3,1), opacity .4s ease; }
@media (hover: hover) and (pointer: fine) {
  .about-portrait:hover { transform: perspective(900px) translate3d(0,-10px,0) rotateX(7deg) rotateZ(-1deg) scale(1.035); }
  .about-portrait:hover::before { transform: translate3d(-4px,7px,0) rotate(-3deg); opacity: .75; }
}
@media (max-width: 760px) {
  .room-detail { width: 47px; opacity: .17; }
  .room-detail-left { left: -26px; }
  .room-detail-right { right: -27px; }
  .poster-arrival svg { width: 180%; left: -80%; }
}
@media (prefers-reduced-motion: reduce) {
  .motion-boot #site-content { opacity: 1; animation: none; }
  .page-room.motion-staging, .hero-poster.motion-staging > :not(.poster-arrival) { opacity: 1; }
  .page-room.is-page-entering, .is-page-entering .page-intro, .is-home-entering .poster-arrival, .is-home-entering .poster-arrival svg,
  .is-home-entering .poster-art, .is-home-entering .poster-title h1 > span, .is-home-entering .poster-signature, .is-home-entering .poster-topline,
  .is-home-entering .poster-quote, .is-home-entering .poster-enter, .is-home-entering .poster-bottom, .is-home-entering .poster-copyright,
  .is-home-entering .poster-aside, .is-home-entering .earth-record { animation: none; }
  .poster-arrival, .click-tide { display: none; }
  .about-portrait, .about-portrait::before { transition: none; }
  .card-halo { transition: none; }
  .about-portrait:hover { transform: rotate(-4deg); }
  .about-portrait:hover::before { transform: none; }
}
