@font-face {
  font-family: 'Soul Handwriting';
  src: url('soul-handwriting.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Hopeless Romantic';
  src: url('HopelessRomanticSociety.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Vogue';
  src: url('Vogue.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Ballet';
  src: url('Ballet.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  font-family: Didot;
}

h1 {
  font-size: 7rem;
  font-style: italic;
  margin-bottom: 2rem;
  color: white;
  text-align: center;
  font-family: Ballet;
  font-weight: 400;
}

#subtitle {
  color: white;
  font-family: Didot;
  font-size: 15px;
  font-style: italic;
}

.palette-wrapper {
  width: 100%;
  max-width: 40rem;
}

.palette-frame {
  position: relative;
  width: 100%;

  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(255, 255, 255, 0);
}

.palette-image {
  width: 100%;
  height: auto;
  display: block;
}

.squares-container {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
}

.square {
  position: absolute;
  cursor: pointer;
  transition: transform 0.2s ease;
  border-radius: 0.4rem;   
  overflow: hidden;     
}

.square:hover {
  transform: translateY(-1px);
}

.square-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.square:hover .square-overlay {
  opacity: 1;
}

.overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 0.125rem;
}

.overlay-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  border-radius: 0.125rem;
}

.overlay-label {
  position: relative;
  z-index: 1;
  color: white;
  font-style: italic;
  font-size: 1.3rem;
  padding: 0.25rem 0.6rem;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.04em;
  font-family: Ballet;
}

.line-output {
  margin-top: 1.5rem;
  max-width: 40rem;
  text-align: center;
  font-style: italic;
  color: #444;
  font-size: 1.2rem;
  min-height: 1.4em;
  padding: 0 0.5rem;
  color: white;
}

.hover-text {
  text-align: center;
  margin-top: 0.5rem;
  color: #777;
  font-size: 0.85rem;
  font-style: italic;
  color: rgb(149, 145, 145);
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
}

#bgAudio {
  display: none;
}

/* minimal audio button */
.audio-toggle {
  position: fixed;          /* always visible */
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  letter-spacing: 0.04em;
  font-family: Ballet;
  background: rgba(255, 255, 255, 0.7);
  color: #969696;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 50;
}

.audio-toggle:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* optional: smaller on mobile */
@media (max-width: 600px) {
  .audio-toggle {
    bottom: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    padding: 0.35rem 0.8rem;
  }
}

#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  filter: grayscale(1) brightness(0.3) contrast(1.2) blur(2px);
}
