/* A project's room: the whole page in the project's own colour (--own, from
   base.css), its name in the middle. The way in from the home (enter.js)
   draws this same layout in the same colour, so arriving looks seamless. */

:root:has(> .room) { background: var(--own); }   /* no other colour at the edges */

.room {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);   /* the name exactly in the middle */
  min-block-size: 100svh;
  padding: var(--gutter);
  background: var(--own);
  color: oklch(from var(--own) clamp(0.2, (var(--mark-flip) - l) * 1000, 0.98) calc(c * 0.15) h);   /* as the prints' marks, stronger for reading: 4.5:1 or more in Kanagawa */
  font-family: 'Public Sans', system-ui, sans-serif;
}

.room-name {
  grid-row: 2;
  margin: 0;
  font: 500 clamp(3.5rem, 19vw, 11rem) / 0.88 'Barlow Condensed', 'Arial Narrow', sans-serif;
  letter-spacing: -0.005em;
  text-align: center;
  text-transform: uppercase;
}

/* The way home: an arrow, top left (its name is its label, for screen
   readers); a finger's width to hit, the arrow itself flush with the gutter.
   Escape goes the same way (leave.js). Always above the room's content: an
   animated part of a room (the Tickets door) is a layer of its own, which
   later in the page would draw over the arrow and take its taps (WebKit
   keeps it a layer after its animation, so on iPhones for good). */
.room-home {
  z-index: 1;
  grid-row: 1;
  align-self: start;
  justify-self: start;
  display: grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  margin: -0.625rem;
  border-radius: 50%;
  color: inherit;
}
.room-home svg { transition: translate 0.2s; }
.room-home:is(:hover, :focus-visible) svg { translate: -3px 0; }
.room-home:focus-visible { outline: 2px solid currentColor; }

.room-note { grid-row: 3; justify-self: center; max-inline-size: 26rem; padding-block-start: 1.5rem; text-align: center; }
.room-note p { margin: 0; }
.room-line { font-size: 1.0625rem; line-height: 1.45; text-wrap: balance; }
.room-note .room-status { margin-block-start: 0.75rem; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* Arriving: the name is already in place; the rest settles in after it. */
@media (prefers-reduced-motion: no-preference) {
  .room-home, .room-note { animation: room-arrive 0.5s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}
@keyframes room-arrive { from { opacity: 0; translate: 0 0.5rem; } }
