/* Room 07 — landing page, dark ward palette */

:root {
  --void: #0b1213;
  --mint: #a8d8d2;
  --mint-dim: rgba(168, 216, 210, 0.62);
  --mint-faint: rgba(168, 216, 210, 0.34);
  --paper: #f2efe6;
  --line: rgba(168, 216, 210, 0.16);
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4.5rem);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--void);
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(96, 130, 126, 0.2), transparent 62%),
    radial-gradient(100% 75% at 50% 108%, rgba(0, 0, 0, 0.6), transparent 66%),
    url("assets/img/wall-teal.jpg");
  background-size: auto, auto, 780px 780px;
  background-repeat: no-repeat, no-repeat, repeat;
  background-attachment: fixed, fixed, fixed;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

::selection { background: var(--mint); color: var(--void); }

/* Film grain ------------------------------------------------------------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

.topbar, main, .footer { position: relative; z-index: 1; }

/* Header ----------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem var(--pad);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mint-dim);
}

/* Hero ------------------------------------------------------------------- */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero {
  width: 100%;
  max-width: 1360px;
  margin: auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: center;
}

.kicker {
  margin: 0 0 clamp(1.8rem, 5vw, 3.6rem);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint-dim);
}

h1 {
  margin: 0;
  font-size: clamp(3.6rem, 9vw, 8rem);
  font-weight: 500;
  line-height: 0.84;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.lede {
  margin: clamp(1.8rem, 3.4vw, 2.8rem) 0 0;
  padding-top: clamp(1.4rem, 2.4vw, 2rem);
  border-top: 1px solid var(--line);
  max-width: 34ch;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.55;
  color: rgba(242, 239, 230, 0.78);
}

.hero-art {
  margin: 0;
  display: flex;
  justify-content: flex-end;
  padding: 1.2rem;
}

/* Instant photo ---------------------------------------------------------- */
.polaroid {
  position: relative;
  max-width: 100%;
  padding: 14px 14px 0;
  transform: rotate(-1.3deg);
  background:
    radial-gradient(70% 55% at 8% 0%, rgba(122, 98, 58, 0.18), transparent 60%),
    radial-gradient(60% 50% at 94% 100%, rgba(96, 80, 50, 0.22), transparent 62%),
    linear-gradient(160deg, #f7f4ea 0%, #eee8d7 55%, #e2dbc7 100%);
  box-shadow:
    0 42px 60px -42px rgba(0, 0, 0, 1),
    0 4px 8px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(92, 76, 48, 0.16),
    inset 0 0 28px rgba(120, 96, 58, 0.14);
}

.polaroid img {
  position: relative;
  z-index: 2;
  width: auto;
  max-width: 100%;
  max-height: min(58vh, 540px);
  filter: sepia(0.07) saturate(0.92) contrast(0.97) brightness(0.97);
}

/* foxing, grime and one crease */
.polaroid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: multiply;
  background:
    radial-gradient(circle at 14% 79%, rgba(120, 92, 48, 0.22) 0 5px, transparent 6px),
    radial-gradient(circle at 86% 15%, rgba(120, 92, 48, 0.18) 0 3px, transparent 4px),
    radial-gradient(circle at 65% 93%, rgba(120, 92, 48, 0.16) 0 7px, transparent 8px),
    linear-gradient(103deg, transparent 48.4%, rgba(92, 78, 52, 0.18) 49.8%, transparent 51.4%);
}

/* the empty bottom band of an instant photo */
.polaroid::after {
  content: "";
  display: block;
  height: clamp(42px, 4.4vw, 64px);
}

.staple {
  position: absolute;
  top: -8px;
  z-index: 5;
  width: 30px;
  height: 10px;
  border-radius: 1px;
  background: linear-gradient(180deg, #cdd6d2 0%, #7f8c88 38%, #5c6864 64%, #a9b4b0 100%);
  box-shadow:
    0 2px 3px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(16, 26, 26, 0.35) inset;
}
.staple::before {
  content: "";
  position: absolute;
  inset: 2px 7px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0.18));
  opacity: 0.55;
}
.staple-l { left: 34px; transform: rotate(-7deg); }
.staple-r { right: 34px; transform: rotate(5deg); }

/* The patients ----------------------------------------------------------- */
.cast {
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
  padding: clamp(3rem, 6vw, 5rem) var(--pad) clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
}

.cast-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint-dim);
}

h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.cast-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1rem, 3vw, 2.6rem);
  row-gap: clamp(2rem, 4vw, 3.4rem);
}

.cast-card {
  display: flex;
  flex-direction: column;
}

.cast-figure {
  aspect-ratio: 480 / 700;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.cast-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.45));
  transition: transform 0.4s ease;
}

.cast-card:hover .cast-figure img { transform: translateY(-7px); }

.cast-room {
  margin: 1.1rem 0 0;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint-dim);
}

.cast-name {
  margin: 0.3rem 0 0;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.cast-note {
  margin: 0.5rem 0 0;
  max-width: 32ch;
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(242, 239, 230, 0.58);
}

/* Game summary ----------------------------------------------------------- */
.summary {
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
  padding: clamp(3rem, 6vw, 5rem) var(--pad);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.8rem, 4vw, 4rem);
  align-items: start;
}

.summary-title {
  margin: 0.9rem 0 0;
  max-width: 32ch;
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.summary-title strong { font-weight: 600; }

.summary-body p {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(0.96rem, 1.15vw, 1.02rem);
  line-height: 1.7;
  color: rgba(242, 239, 230, 0.72);
}

.summary-pitch {
  margin-top: 1.5rem !important;
  color: rgba(242, 239, 230, 0.88) !important;
}

.summary-hook {
  margin-top: 0.35rem !important;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem) !important;
  line-height: 1.5 !important;
  color: var(--paper) !important;
}

/* Footer ----------------------------------------------------------------- */
.footer {
  padding: 2rem var(--pad) 2.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
}

.footer .wordmark {
  font-size: 0.95rem;
  color: var(--mint-faint);
}

.copyright {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: rgba(242, 239, 230, 0.34);
}

/* Bun Bun companion ------------------------------------------------------ */
.bunny {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 0 var(--pad) clamp(0.7rem, 1.6vw, 1.1rem);
  pointer-events: none;
}

.bunny[hidden] { display: none; }

.bunny-frame {
  position: relative;
  pointer-events: auto;
  width: min(100%, 730px);
  padding: 0.85rem 1.4rem 0.9rem 1rem;
  background: rgba(9, 16, 20, 0.93);
  box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.9);
}

/* double hairline, as in the in-game panel */
.bunny-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(153, 212, 207, 0.5);
  pointer-events: none;
}
.bunny-frame::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(153, 212, 207, 0.18);
  pointer-events: none;
}

.bunny-tick {
  position: absolute;
  z-index: 2;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(153, 212, 207, 0.55);
  transform: rotate(45deg);
  pointer-events: none;
}
.bunny-tick.tl { left: 9px; top: 9px; }
.bunny-tick.tr { right: 9px; top: 9px; }
.bunny-tick.bl { left: 9px; bottom: 9px; }
.bunny-tick.br { right: 9px; bottom: 9px; }

.bunny-name {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-100%);
  padding: 0.26rem 0.75rem 0.24rem;
  background: rgba(29, 17, 45, 0.95);
  border: 1px solid rgba(212, 168, 255, 0.34);
  border-bottom: 0;
  color: #d4a8ff;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
}

.bunny-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
}

.bunny-portrait {
  width: 76px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

.bunny-line {
  margin: 0 auto;
  max-width: none;
  min-height: 1.5em;
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.4;
  text-align: center;
  color: #e8ebe3;
}

.bunny-close {
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  z-index: 3;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(168, 216, 210, 0.5);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}
.bunny-close:hover { color: var(--mint); }

/* keep the footer clear of the fixed panel while it is open */
.bunny-on .footer { padding-bottom: 11rem; }

/* Small screens ---------------------------------------------------------- */
@media (max-width: 860px) {
  .hero {
    display: block;
    padding: 0 0 clamp(2.5rem, 8vw, 4rem);
  }
  .hero-art {
    display: block;
    padding: 1.6rem var(--pad) 0;
  }
  .polaroid { transform: rotate(-0.9deg); }
  .polaroid img {
    width: 100%;
    max-width: none;
    max-height: none;
  }
  .staple-l { left: 26px; }
  .staple-r { right: 26px; }
  .hero-copy { padding: clamp(1.8rem, 6vw, 2.6rem) var(--pad) 0; }
  .kicker { margin-bottom: 1.4rem; }
  .lede { max-width: 38ch; }

  .cast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.4rem; }
  .summary { grid-template-columns: 1fr; gap: 1.4rem; }

  .bunny-frame { padding: 0.75rem 0.9rem; }
  .bunny-portrait { width: 58px; }
  .bunny-body { gap: 0.7rem; }
  .bunny-line { font-size: 0.96rem; padding-right: 0.6rem; max-width: 34ch; }
  .bunny-name { left: 0.8rem; }
}

@media (max-width: 560px) {
  .cast-note { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
