* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'EB Garamond', serif;
}

/* BODY AND HTML */
body, html {
  width: 100%;
  height: 100%;
  overflow: hidden; /* desktop: no scrolling */
  margin: 0;
  padding: 0;
}

/* GENERAL PAGE SYSTEM */
.page {
  position: absolute;
  width: 100vw;
  height: 100vh;
  display: none;
  overflow: hidden;
}

.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* LANDING */
#landing {
  background: #3b0a45; /* aubergine */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* CENTER TEXT */
.center-text {
  color: #ff2da6; /* classy magenta */
  text-align: center;
  z-index: 10;
  cursor: pointer;
}

.center-text h1 {
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  font-weight: 400;
  white-space: normal;
  line-height: 1.2;

  text-shadow: 
    0 0 6px rgba(255, 45, 166, 0.6),
    0 0 12px rgba(255, 45, 166, 0.4);
}

.center-text span {
  font-weight: 700;
  text-decoration: none;
}

/* SPIRAL BUTTONS */
.spiral {
  position: absolute;
  width: 100%;
  height: 100%;
}

.button {
  position: absolute;
  padding: 14px 18px;
  color: #f5f5f5;
  border: none;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: breathe 4s infinite ease-in-out, morph 10s infinite ease-in-out;
  font-size: 0.9rem;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 
    0 0 6px rgba(255, 45, 166, 0.25),
    0 0 12px rgba(255, 45, 166, 0.15);
}

.button:hover {
  transform: translate(-50%, -50%) scale(1.15);

  box-shadow: 
    0 0 10px rgba(255, 45, 166, 0.6),
    0 0 20px rgba(255, 45, 166, 0.35);
}

/* Example: button #8 is the 8th button in your spiral */
.spiral button:nth-child(8) {
  color: black;  /* sets text color to black */
}

/* Bold text for the 5th spiral button */
.spiral button:nth-child(5) {
  font-weight: bold;
}

/* breathing animation */
@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* morphing blob shapes */
@keyframes morph {
  0%   { border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%; }
  50%  { border-radius: 60% 40% 45% 55% / 40% 60% 40% 60%; }
  100% { border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%; }
}

/* BACK BUTTON */
.back {
  position: absolute;
  top: 10px;
  left: 10px;
  background: lightgray;
  padding: 8px 12px;
  cursor: pointer;
}

/* GENERIC CENTER */
.center {
  margin: auto;
  text-align: center;
}

/* VIDEO PAGE - RESPONSIVE */
#video {
  background: #e67e22; /* orange background */
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

video, iframe {
  width: 54vw;
  max-width: 840px;
  aspect-ratio: 3 / 2;
  background: black;
  margin-bottom: 15px;
}

.video-caption {
  color: #3b0a45; /* aubergine text */
  text-align: center;
  font-size: 1.2rem;
  margin-top: 10px;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 600px) {
  video, iframe {
    width: 95%;
    max-width: 100%;
    margin-bottom: 10px;
  }

  .video-caption {
    padding-right: 20px;
    font-size: 0.9rem;
  }
}

/* POEM */
#poem { 
  background: #FFCD1C; /* gold */
}

.poem-text {
  color: #2f6f4f; /* mossy green (not olive) */
  width: 70%;
  margin-left: 10%;
  text-align: left;
}

/* ESSAY */
#essay {
  background: #1e3a8a; /* keep your royal blue */
  color: gold;
  padding: 40px 20px;
  justify-content: center;
  align-items: center;
}

/* container controls layout */
.essay-container {
  max-width: 700px;
  width: 100%;
  text-align: left;
}

/* title */
#essay h2 {
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

/* paragraphs */
#essay p {
  margin-bottom: 16px;
  line-height: 1.5;
}

#essay .back {
  color: black;
}

/* DESKTOP: centered, no scrolling */
@media (min-width: 768px) {
  #essay {
    overflow: hidden;
  }
}

/* MOBILE: allow scrolling */
@media (max-width: 600px) {
  #essay {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    align-items: flex-start;
    padding-top: 60px;
  }

  .essay-container {
    max-width: 100%;
  }
}

/* SPEAK */
#speak { background: #2f6f4f; flex-direction: column; }
#speak input {
  padding: 12px;
  width: 80%;
  font-size: 1rem;
  transition: opacity 0.35s ease;
}

#speak h2 {
  color: #E63946;
  font-size: 1.6rem;
  padding: 10px;
}

#speakMessage {
  margin-top: 15px;
  font-size: 1.1rem;
  color: #E63946;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ELEVATOR PAGE */
#elevator {
  background: #8b2f6b; /* stormy magenta */
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* checklist container */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 24px;

  font-size: 1.4rem;
  color: #5fd3d3; /* stormy cyan */

  align-items: flex-start;
}

/* each row */
.check-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* checkbox base */
.check-item input {
  appearance: none;
  -webkit-appearance: none;

  width: 24px;
  height: 24px;

  background: white;
  border: 1.5px solid black;

  position: relative;
}

/* checkmark */
.check-item input:checked::after {
  content: '';
  position: absolute;

  width: 7px;
  height: 14px;

  border: solid #5fd3d3;
  border-width: 0 3px 3px 0;

  transform: rotate(45deg);
  top: 2px;
  left: 7px;
}

/* LOCKED ITEMS (first three) */
.check-item input:disabled {
  pointer-events: none;   /* no clicking at all */
  opacity: 1;             /* keep full brightness */
}

/* interactive item (4th) */
.check-item input:not(:disabled) {
  cursor: pointer;
}

/* ensure NO hover effects anywhere */
.check-item input:hover {
  box-shadow: none;
}

/* BACK BUTTON (force black text) */
#elevator .back {
  color: black;
}

/* MAN PAGE */
#man {
  background: #AD1A1A;
  color: gold;
  flex-direction: column;
}

#man .back {
  color: black; /* back button text black */
}

.man-container {
  text-align: center;
}

#manText {
  color: #121994; /* h2 text for instructions/results */
}

.crowd {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 18px;
  margin-top: 40px;
}

.person {
  width: 50px;
  height: 100px;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s;
}

.person {
  -webkit-tap-highlight-color: transparent; /* removes gray/black tap box */
  outline: none;
}

/* stagger for crowd feel */
.person:nth-child(odd) { transform: translateY(-10px); }
.person:nth-child(even) { transform: translateY(10px); }

/* head */
.head {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: peachpuff;
  margin: 0 auto;
  position: relative;
}

/* body (split shirt/pants) */
.body {
  width: 100%;
  height: 72px;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
}

/* top = shirt, bottom = pants */
.shirt {
  height: 50%;
  width: 100%;
}

.pants {
  height: 50%;
  width: 100%;
}

/* turned indicator (little dots for eyes) */
.front-view .head::after {
  content: '• •';
  font-size: 10px;
  position: absolute;
  top: 8px;
  left: 10px; /* slightly off-center for "looking over shoulder" effect */
  color: black;
}

/* disable clicks after success */
.disabled .person { pointer-events: none; }

@media (max-width: 600px) {
  .crowd {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .person {
    width: 30%;               /* 3 per row */
    display: flex;
    justify-content: center;
    transform: none;
  }

  /* 🔥 KEY: scale entire character instead of resizing pieces */
  .person-inner {
    transform: scale(0.8);    /* adjust this number if needed */
    transform-origin: top center;
  }
}

/* ===== MAN PAGE ANIMATIONS ===== */
/* ❌ FAILED CLICK: vibration */
@keyframes shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-3px); }
  40%  { transform: translateX(3px); }
  60%  { transform: translateX(-3px); }
  80%  { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.25s;
}

/* ✅ SUCCESS: jump */
@keyframes jump {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-12px); }
  60%  { transform: translateY(4px); }
  100% { transform: translateY(0); }
}

.jump {
  animation: jump 0.4s ease;
}

/* THERMOMETER */
/* THERMO PAGE */
#thermo {
  background: #5fd3d3; /* stormy cyan */
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.thermo-container {
  text-align: center;
  width: 80%;
  max-width: 400px;
}

/* prompt */
#thermoPrompt {
  color: #cc5500; /* bright burnt orange */
  margin-bottom: 20px;
}

/* input */
#wordInput {
  width: 100%;
  padding: 12px;
  font-size: 1.2rem;
  text-align: center;
  border: 2px solid black;
  margin-bottom: 15px;
}

/* word count */
#wordCount {
  color: navy;
  font-size: 1.1rem;
}

/* lose text */
#loseText {
  margin-top: 20px;
  font-size: 2rem;
  color: black;
}

#playAgain {
  margin-top: 15px;
  padding: 10px 16px;
  font-size: 1rem;
  background: black;
  color: white;
  border: none;
  cursor: pointer;
}

/* ❌ invalid word flash */
@keyframes flashRed {
  0%   { background-color: white; }
  50%  { background-color: rgba(255, 0, 0, 0.6); }
  100% { background-color: white; }
}

.flash-red {
  animation: flashRed 0.3s;
}

/* WIFI */
/* WIFI / ELEVATOR PAGE */
#wifi {
  background: white;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#wifi .back {
  background: lightgray;
  color: black;
}

/* container */
.elevator-container {
  text-align: center;
}

/* floor display */
.floor-indicator {
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: black;
}

/* elevator box */
.elevator {
  width: 200px;
  height: 260px;
  background: #ccc;
  border: 4px solid #444;
  position: relative;
  overflow: hidden;
  margin: 0 auto 20px auto;
}

/* inside (hidden content area) */
.inside {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
}

/* doors container */
.doors {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  z-index: 2;
}

/* individual doors */
.door {
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, #888, #bbb);
  transition: transform 0.6s ease;
}

/* left door */
.door.left {
  border-right: 1px solid #444;
}

/* right door */
.door.right {
  border-left: 1px solid #444;
}

/* OPEN STATE */
.doors.open .left {
  transform: translateX(-100%);
}

.doors.open .right {
  transform: translateX(100%);
}

/* keypad */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 60px);
  gap: 10px;
  justify-content: center;
}

/* keypad buttons */
.keypad button {
  width: 60px;
  height: 60px;
  font-size: 1.2rem;
  background: #222;
  color: white;
  border: 2px solid #555;
  cursor: pointer;
}

.keypad button:hover {
  background: #444;
}

/* FLOOR BASE */
.floor-scene {
  width: 100%;
  height: 100%;
  position: relative;
}

/* ========================= */
/* FLOOR 1 */
/* ========================= */

.floor1 {
  background: #3b0a45; /* soft aubergine */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* text styling */
.floor1-text {
  color: #ff2da6; /* magenta */
  font-size: 1.6rem;
  text-align: center;
  line-height: 1.6;
}

/* ========================= */
/* FLOOR 2 */
/* ========================= */

.floor2 {
  background: orange;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* text styling */
.floor2-text {
  color: #5b0c6b; /* aubergine */
  font-size: 1.6rem;
  text-align: center;
  line-height: 1.6;
}

/* ========================= */
/* FLOOR 3 */
/* ========================= */

.floor3 {
  background: #FFD633;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* text styling */
.floor3-text {
  color: #2f6f4f; /* green */
  font-size: 1.6rem;
  text-align: center;
  line-height: 1.6;
}

/* ========================= */
/* FLOOR 4 */
/* ========================= */

.floor4 {
  background: #1e3a8a;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* text styling */
.floor4-text {
  color: #FFDE21; /* yellow */
  font-size: 1.6rem;
  text-align: center;
  line-height: 1.6;
}

/* ========================= */
/* FLOOR 5 */
/* ========================= */

.floor5 {
  background: #6b8e23;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* text styling */
.floor5-text {
  color: #E60000; /* red */
  font-size: 1.6rem;
  text-align: center;
  line-height: 1.6;
}

/* ========================= */
/* FLOOR 6 */
/* ========================= */

.floor6 {
  background: #9b1f7f;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* text styling */
.floor6-text {
  color: #00b3b3; /* cyan */
  font-size: 1.6rem;
  text-align: center;
  line-height: 1.6;
}

/* ========================= */
/* FLOOR 7 */
/* ========================= */

.floor7 {
  background: #C4141D;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* text styling */
.floor7-text {
  color: #191F85; /* blue */
  font-size: 1.6rem;
  text-align: center;
  line-height: 1.6;
}

/* ========================= */
/* FLOOR 8 */
/* ========================= */

.floor8 {
  background: #00b3b3;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* text styling */
.floor8-text {
  color: #FF7F0A;
  font-size: 1.6rem;
  text-align: center;
  line-height: 1.6;
}

/* ========================= */
/* FLOOR 9 */
/* ========================= */

.floor9 {
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* text styling */
.floor9-text {
  color: #000000;
  font-size: 1.6rem;
  text-align: center;
  line-height: 1.6;
}

/* ABOUT */
#about {
  background: black;
  color: white;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

/* container for better text layout */
.about-container {
  max-width: 700px;
  text-align: left;
}

/* image placeholder */
.about-banner {
  width: min(90vw, 720px);
  aspect-ratio: 18 / 3;

  background-image: url("your_banner.jpg");
  background-size: cover;
  background-position: center;

  margin: 0 auto 25px auto;
}

/* paragraphs */
#about p {
  margin-bottom: 18px;
  line-height: 1.6;
}


@media (max-width: 600px) {

  body, html {
    overflow-y: auto;
  }

  .page {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  /* 🔥 KEY FIX: make landing taller */
  #landing {
    padding-top: 40px;   /* space above text */
    padding-bottom: 120px; /* space below spiral */
  }

  .center-text h1 {
    font-size: 1.6rem;   /* was 1.8rem */
    line-height: 1.1;
  }

  .center-text span {
    font-size: 2.2rem;
  }

  #landing .center-text {
    transform: translateY(-10px); /* subtle upward shift */
  }

  #essay {
    column-count: 1;
  }
}

@media (orientation: landscape) and (max-height: 500px) {

  html, body {
    background: #3b0a45;
    overflow: hidden !important;
    height: 100%;
  }

  /* hide entire app */
  .page {
    display: none !important;
  }

  /* full-screen overlay message */
  body::before {
    content: "Repeating Myself. Summer 2026.";
    position: fixed;
    inset: 0;
    background: #3b0a45;
    color: #ff2da6;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.6rem;
    padding: 20px;
    z-index: 999999;
  }
}