/* Beauby — home page and 404 page (big centered message + bubbles) */

body {
  overflow-x: hidden;
  font-family: "Matcha Style", cursive;
  text-align: center;
}

/* Main content, centered between header and footer */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem max(var(--gutter), env(safe-area-inset-right)) 1rem max(var(--gutter), env(safe-area-inset-left));
}

h1 {
  max-width: 22ch;
  font-size: clamp(2.25rem, 8vw, 5rem);
  font-weight: normal;
  line-height: 1.25;
  text-wrap: balance;
}

main p {
  margin-top: 0.75rem;
  font-size: clamp(1.25rem, 3.5vw, 2.25rem);
}

main a {
  color: inherit;
  text-decoration: none;
}

@media (hover: hover) {
  main a:hover { color: var(--grenadine-pink); }
}

/* Phones in landscape: little height, so tighten everything */
@media (max-height: 30rem) and (orientation: landscape) {
  .site-header, .site-footer { padding-top: 0.5rem; padding-bottom: 0.5rem; }
  h1 { max-width: none; font-size: clamp(1.75rem, 6vh + 2vw, 3rem); }
  main p { font-size: clamp(1.1rem, 4vh, 1.5rem); margin-top: 0.4rem; }
}

/* ---------- Background bubbles ---------- */

.bubbles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bubble {
  position: absolute;
  opacity: 0.55;
  animation: float var(--duration, 8s) ease-in-out var(--delay, 0s) infinite alternate;
}

/* Glossy highlight so they read as bubbles */
.bubble::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 22%;
  width: 22%;
  height: 14%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  transform: rotate(-30deg);
}

.bubble.ring {
  background: transparent !important;
  border: clamp(0.2rem, 0.6vmin, 0.35rem) solid currentColor;
}
.bubble.ring::after { display: none; }

@keyframes float {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(var(--dx, 0px), var(--dy, -20px)) rotate(var(--rot, 8deg)); }
}

@media (prefers-reduced-motion: reduce) {
  .bubble { animation: none; }
}

/* ---------- Colour coding ---------- */

.soon   { color: var(--calamine-blue); }
.name   { color: var(--grenadine-pink); }
.friend { color: var(--turquoise-green); }
