/* The Floor (ryushoken.cloud): a strip bay with one flight strip per room, in Tape Room's console world. */

@font-face {
  font-family: 'Barlow';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/barlow-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-weight: 500;
  font-display: swap;
  src: url('fonts/barlow-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --console: oklch(0.175 0.012 252);
  --console-2: oklch(0.2 0.014 252);
  --strip: oklch(0.235 0.016 252);
  --strip-hi: oklch(0.27 0.02 252);
  --seam: oklch(0.33 0.016 252);
  --seam-2: oklch(0.42 0.018 252);
  --ink: oklch(0.94 0.008 252);
  --ink-2: oklch(0.8 0.014 252);
  --ink-3: oklch(0.68 0.016 252);
  --buff: oklch(0.82 0.11 82);
  --blue: oklch(0.78 0.085 232);
  --pink: oklch(0.78 0.1 352);
  --on-bay: oklch(0.2 0.02 252);
  --focus: oklch(0.86 0.1 232);
  --font-ui: 'Barlow', system-ui, sans-serif;
  --font-call: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  --r: 3px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--console);
  color: var(--ink);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--seam-2) var(--console);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  line-height: 1.4;
}

::selection {
  background: oklch(0.78 0.085 232 / 0.35);
  color: var(--ink);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* top bar: the place name and a live clock in the owner's two zones */
.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--seam);
  background: var(--console-2);
}

.place {
  margin: 0;
  font-family: var(--font-call);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.clock {
  font-family: var(--font-call);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  white-space: nowrap;
}

.clock b {
  color: var(--ink);
  font-weight: 600;
}

.clock span {
  color: var(--ink-3);
  margin-inline: 0.35em;
}

/* the bay */
main {
  width: min(100% - 2rem, 58rem);
  margin: 0 auto;
  padding-block: clamp(1.25rem, 4vh, 3.5rem) 2rem;
  align-self: center;
}

.bay {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.strip {
  display: grid;
  grid-template-columns: 5.5rem 1fr 9.5rem;
  min-height: 9.5rem;
  border: 1px solid var(--seam);
  border-radius: var(--r);
  background: var(--strip);
  text-decoration: none;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

/* icon cell: the room's mark on a darker slot, a seam to the right */
.cell {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--seam);
  background: var(--console-2);
  border-radius: var(--r) 0 0 var(--r);
}

.cell svg {
  width: 2.1rem;
  height: auto;
}

.body {
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding: 1.4rem clamp(1.1rem, 3vw, 2rem);
  min-width: 0;
}

.body .wordmark {
  display: block;
  height: clamp(2.4rem, 6vw, 3.4rem);
  width: auto;
  max-width: 100%;
}

.line {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}

.markets {
  margin: 0;
  font-family: var(--font-call);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* status cell: a coloured designator, as a bay code on a strip */
.status {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.3rem;
  border-left: 1px solid var(--seam);
  border-radius: 0 var(--r) var(--r) 0;
  font-family: var(--font-call);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

.status svg {
  width: 1.6rem;
  height: 1.6rem;
  transition: transform 0.35s var(--ease);
}

.open .status {
  background: var(--buff);
  color: var(--on-bay);
}

.open:hover {
  background: var(--strip-hi);
  border-color: var(--seam-2);
}

.open:hover .status svg,
.open:focus-visible .status svg {
  transform: translateX(0.3rem);
}

/* coming soon: hatched like a strip not yet active */
.soon .status {
  color: var(--ink-2);
  background:
    repeating-linear-gradient(-45deg, transparent 0 7px, oklch(0.78 0.1 352 / 0.16) 7px 9px),
    var(--console-2);
  line-height: 1.1;
}

.soon .status small {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-3);
}

.soon:hover {
  border-color: var(--seam-2);
}

footer {
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--seam);
  font-size: 0.9rem;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Bell Room coming-soon page */
.solo {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1.4rem;
}

.solo .mark {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.solo .mark > svg:first-child {
  height: 3.2rem;
  width: auto;
}

.solo .wordmark {
  height: clamp(3rem, 9vw, 4.6rem);
  width: auto;
  max-width: 100%;
}

.solo .sign {
  font-family: var(--font-call);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 1.3rem;
  border: 1px solid var(--seam-2);
  border-radius: var(--r);
  background:
    repeating-linear-gradient(-45deg, transparent 0 7px, oklch(0.78 0.1 352 / 0.16) 7px 9px),
    var(--console-2);
}

.solo .line {
  max-width: 34ch;
}

.back {
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-color: var(--seam-2);
}

.back:hover {
  color: var(--ink);
  text-decoration-color: var(--blue);
}

@media (max-width: 40rem) {
  .strip {
    grid-template-columns: 3.75rem 1fr;
    grid-template-rows: 1fr auto;
  }
  .cell {
    grid-row: 1 / 3;
    border-radius: var(--r) 0 0 var(--r);
  }
  .cell svg {
    width: 1.6rem;
  }
  .status {
    grid-auto-flow: column;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-left: 0;
    border-top: 1px solid var(--seam);
    border-radius: 0 0 var(--r) 0;
    font-size: 1rem;
  }
  .status svg {
    width: 1.25rem;
    height: 1.25rem;
  }
  .soon .status small {
    display: none;
  }
  .line {
    font-size: 1.05rem;
  }
  .clock {
    font-size: 0.9rem;
  }
  .place {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status svg {
    transition: none;
  }
}


/* The Floor, in one drawing: a ticker tape unrolls from a reel, rides like a price chart, loops and rings a bell.
   Ribbon = a wide blue stroke hollowed by a console stroke; a buff dash prints along it. Ticks run the tape. */
.title {
  margin: 0 0 clamp(1.5rem, 4vh, 2.5rem);
  text-align: center;
  font-family: var(--font-call);
  font-weight: 700;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
}

.welcome {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  letter-spacing: 0.08em;
  text-indent: 0;
  text-transform: none;
  color: var(--ink-3);
}

.art-wrap {
  margin: 0 0 1.2rem;
}

.art {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(12rem, 22vh);
  margin-inline: auto;
  overflow: visible;
}

.art-floor {
  stroke: var(--seam-2);
  stroke-width: 2;
  stroke-linecap: round;
}

.art-reel {
  stroke: var(--buff);
  stroke-width: 3;
  stroke-linecap: round;
}

.art-reel > circle:first-child,
.art-reel > circle:nth-child(2),
.art-reel > path:nth-child(3) {
  transform-box: view-box;
  transform-origin: 96px 150px;
  animation: spool 6s linear infinite;
}

@keyframes spool {
  to {
    transform: rotate(-360deg);
  }
}

.art-stand {
  stroke: var(--ink-3);
  stroke-width: 3;
  stroke-linecap: round;
}

.art-tape path {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ribbon-out {
  stroke: var(--blue);
  stroke-width: 14;
  stroke-dasharray: 1 1;
  animation: unroll 1.6s var(--ease) both;
}

.ribbon-in {
  stroke: var(--console);
  stroke-width: 8;
  stroke-dasharray: 1 1;
  animation: unroll 1.6s var(--ease) both;
}

@keyframes unroll {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.ribbon-print {
  stroke: var(--buff);
  stroke-width: 2;
  stroke-dasharray: 3 11;
  animation: print 1.4s linear infinite;
  opacity: 0;
  animation-name: print, appear;
  animation-duration: 1.4s, 0.4s;
  animation-delay: 0s, 1.4s;
  animation-iteration-count: infinite, 1;
  animation-fill-mode: none, forwards;
  animation-timing-function: linear, ease-out;
}

@keyframes print {
  to {
    stroke-dashoffset: -14;
  }
}

@keyframes appear {
  to {
    opacity: 1;
  }
}

/* price ticks running down the tape into the bell */
.art-tick {
  fill: var(--pink);
  offset-path: path('M96 104C150 104 168 182 214 182C240 182 246 150 266 150L292 166L344 92L372 112L414 58C440 28 494 30 498 76C502 118 446 124 446 86C446 46 520 30 562 70C600 106 640 120 676 84C700 60 724 52 752 56');
  offset-rotate: 0deg;
  opacity: 0;
  animation: run 4s cubic-bezier(0.45, 0, 0.55, 1) 1.6s infinite;
}

.art-tick.t2 {
  fill: var(--buff);
  animation-delay: 3.6s;
}

@keyframes run {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }
  6% {
    opacity: 1;
  }
  94% {
    opacity: 1;
  }
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

.art-bell {
  stroke: var(--pink);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.art-bell .swing {
  transform-box: view-box;
  transform-origin: 760px 44px;
  animation: ring 2s var(--ease) 4s infinite;
}

/* the bell swings when a tick arrives: ticks reach it every 2 s */
@keyframes ring {
  0%,
  70% {
    transform: rotate(0);
  }
  78% {
    transform: rotate(9deg);
  }
  86% {
    transform: rotate(-7deg);
  }
  93% {
    transform: rotate(3deg);
  }
  100% {
    transform: rotate(0);
  }
}

.art-bell .ring {
  stroke-width: 2.5;
  opacity: 0;
  animation: ringlines 2s ease-out 4s infinite;
}

@keyframes ringlines {
  0%,
  74% {
    opacity: 0;
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .art *,
  .art-reel > * {
    animation: none !important;
  }
  .ribbon-print {
    opacity: 1;
  }
  .art-tick {
    display: none;
  }
  .art-bell .ring {
    opacity: 1;
  }
}

/* The Floor fits one screen on every device: the page is exactly one viewport high, and the title, drawing and
   strips scale with the viewport height (vh), not only the width. On very short screens the drawing steps out
   so the two rooms stay in view. */
body.floor {
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 0;
}

.floor .bar {
  padding-block: clamp(0.5rem, 1.6svh, 1rem);
}

.floor main {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding-block: clamp(0.5rem, 2.5svh, 2.5rem);
}

.floor .title {
  font-size: clamp(1.45rem, min(5.5vw, 5.5svh), 3.4rem);
  margin-bottom: clamp(0.6rem, 3.5svh, 2.5rem);
}

.floor .welcome {
  font-size: clamp(0.8rem, min(2.2vw, 2.1svh), 1.25rem);
  margin-bottom: clamp(0.2rem, 0.9svh, 0.55rem);
}

/* the drawing takes only the height that is left: it shrinks first, so the strips are never pushed down */
.floor .art-wrap {
  flex: 0 1 min(12rem, 20svh);
  min-height: 0;
  display: flex;
  justify-content: center;
  margin-bottom: clamp(0.5rem, 2.2svh, 1.2rem);
}

.floor .art {
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: none;
}

.floor .bay {
  gap: clamp(0.45rem, 1.4svh, 0.9rem);
}

.floor .strip {
  min-height: clamp(5rem, 16svh, 9.5rem);
}

.floor .body {
  padding-block: clamp(0.55rem, 2svh, 1.4rem);
  gap: clamp(0.25rem, 1.1svh, 0.75rem);
}

.floor .body .wordmark {
  height: clamp(1.6rem, min(6vw, 5svh), 3.4rem);
}

.floor footer {
  padding-block: clamp(0.5rem, 1.6svh, 1.1rem);
}

@media (max-width: 40rem) {
  .floor .line {
    font-size: clamp(0.92rem, 2.3svh, 1.05rem);
  }
  .floor .markets {
    font-size: clamp(0.78rem, 1.9svh, 0.95rem);
  }
  .floor .status {
    padding-block: clamp(0.35rem, 1.2svh, 0.6rem);
  }
  .floor footer {
    font-size: 0.8rem;
  }
}

@media (max-height: 36rem) {
  .floor .art-wrap,
  .floor .welcome {
    display: none;
  }
}
