/* HGS front page. Colours come from Dudu himself: his fur, his cheeks and his
   brown cartoon outline, on a clubhouse-at-night background. */

@font-face {
  font-family: "Bagel Fat One";
  src: url("/fonts/bagel-fat-one-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --night: #2a1730;
  --night-deep: #1d0f22;
  --fur: #d49a86;
  --cheek: #f2c063;
  --ink: #3b1f1a;
  --paper: #fff6ee;
  --paper-locked: #f7e4d8;
  --ink-soft: #7a5a50;
  --moon: #d9c6db;

  --display: "Bagel Fat One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: "Atkinson Hyperlegible", system-ui, sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60rem 34rem at 78% 0%, #4a2a4f 0%, transparent 70%),
    var(--night);
  color: var(--paper);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.5;
}

/* --- The door: wordmark + Dudu ------------------------------------------- */

.door {
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1.5rem;
  border-bottom: 6px solid var(--ink);
  box-shadow: 0 6px 0 var(--night-deep);
}

.door-text { padding-bottom: clamp(1.5rem, 5vw, 3.5rem); }

.mark {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(5.5rem, 22vw, 13rem);
  line-height: 0.85;
  letter-spacing: 0.01em;
  color: var(--fur);
  -webkit-text-stroke: 0.045em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.06em 0.06em 0 var(--ink);
}

.welcome {
  margin: 1.25rem 0 0;
  max-width: 26ch;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.35;
  color: var(--paper);
}

.bouncer img {
  display: block;
  width: clamp(9rem, 26vw, 17rem);
  height: auto;
  margin-bottom: -6px; /* stand on the threshold line */
  animation: step-up 700ms cubic-bezier(.2, .9, .3, 1.15) 150ms both;
}

@keyframes step-up {
  from { transform: translateY(2.5rem); }
  to   { transform: none; }
}

/* --- The rooms ------------------------------------------------------------ */

main {
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 1rem;
}

.floor + .floor { margin-top: clamp(2.5rem, 6vw, 4rem); }

.floor h2 {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.1;
  color: var(--cheek);
}

.floor-note {
  margin: -0.75rem 0 1.25rem;
  color: var(--moon);
}

.rooms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
}

.rooms li { display: flex; }

.room {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 1.35rem 1.1rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  border: 3px solid var(--ink);
  border-radius: 1.1rem;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.room-locked { background: var(--paper-locked); }

.room:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}
.room:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}
.room:focus-visible {
  outline: 3px solid var(--cheek);
  outline-offset: 4px;
}

.room-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.15;
}

.lock {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  color: #a5614f;
}

.room-what { flex: 1; }

.room-host {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* --- Footer --------------------------------------------------------------- */

.closing {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3rem;
  color: var(--moon);
  font-size: 0.95rem;
}
.closing p { margin: 0; }

/* --- Small screens: Dudu stands above the name ------------------------------ */

@media (max-width: 40rem) {
  .door {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .bouncer { order: -1; justify-self: end; margin-bottom: -1.5rem; }
  .bouncer img { width: 8.5rem; margin-bottom: 0; }
  .door-text { padding-bottom: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bouncer img { animation: none; }
  .room { transition: none; }
}
