/* ── Reset & base ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
  background-color: #121212;
}

/* ── Index page ── */
.title {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.logo {
  width: 200px;
  height: auto;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.title a {
  outline: none;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.logo:hover {
  opacity: 0.55;
  transform: scale(1.06);
}

.logo:active {
  transform: scale(0.97);
  opacity: 0.35;
}

.hero {
  max-width: 600px;
  height: auto;
  margin-top: 10px;
  flex-shrink: 0;
}

.footer {
  position: fixed;
  bottom: 10px;
  left: 0;
  width: 100%;
  color: #a0a0a0;
  text-align: center;
  padding: 10px;
  font-family: sans-serif;
  font-size: 12px;
}

/* ── Breathe page ── */
body.breathe-page {
  background-color: #121212;
}

.breathe-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
  width: 100vw;
  height: 100vh;
}

.breathe-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.breathe-cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  transition: filter 0.08s ease;
}

.breathe-cell.grey img {
  filter: opacity(0.18);
}

.breathe-cell.white img {
  filter: opacity(1);
}

.breathe-cell.flicker img {
  animation: flicker var(--flicker-duration, 0.15s) infinite alternate;
  animation-delay: var(--flicker-delay, 0s);
  transition: none;
}

@keyframes flicker {
  0%, 100% { filter: opacity(1); }
  50% { filter: opacity(0.4); }
}

#breathe-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  font-family: sans-serif;
}

#breath-label {
  font-size: 128px;
  letter-spacing: 6px;
  text-transform: uppercase;
  font-weight: 700;
  color: #ff7eb3;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9);
}

/* ── Responsive ── */
@media (max-width: 768px) {
#breath-label {
    font-size: 48px;
    letter-spacing: 4px;
  }

  .logo {
    max-width: 300px;
  }

  .hero {
    max-width: 350px;
    margin-top: 15px;
  }

  .footer {
    font-size: 12px;
    padding: 14px;
  }
}