/* ==========================================================================
   sweetooth.org — parked page styles
   A minimal dark placeholder page with a candy feel. Pure CSS, no build step.
   The dancing candy strip along the bottom lives in css/candies.css; it sets
   --candy-stage-height on :root, which we use to pad the bottom of the page.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Candy accents, bright enough to pop on the dark background */
  --cherry:    #ff4d6d;
  --bubblegum: #ff7eb3;
  --mint:      #7ef5cf;
  --lemon:     #ffe066;

  /* Surfaces and text */
  --bg:        #17121c;
  --bg-lift:   #241b2c;
  --ink:       #f6eef8;
  --ink-soft:  #b9a9c4;

  /* Typography */
  --font-display: "Fredoka", "Baloo 2", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --gutter: 16px;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  /* Full-viewport column: main fills the space, footer sits above the strip */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-inline: var(--gutter);
  /* Reserve room for the fixed candy strip so nothing hides behind it */
  padding-bottom: var(--candy-stage-height, 160px);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  text-align: center;
  background-color: var(--bg);
  /* Subtle candy pattern in a slightly lighter shade: faint dot grid over
     soft diagonal stripes */
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.07) 1.5px, transparent 1.6px),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.035) 0 14px,
      transparent 14px 28px
    );
  background-size: 26px 26px, auto;
}

p {
  margin: 0;
}

/* Visually hidden but available to assistive tech */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Main stage: the wordmark, centred in the viewport
   -------------------------------------------------------------------------- */
.stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 3rem;
}

/* Soft blurred candy-coloured glows behind the wordmark. They are fixed to
   the viewport: fixed boxes never add scrollable overflow, so they can hang
   off the edges without causing horizontal scroll or clipped seams. */
.stage::before,
.stage::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.22;
  pointer-events: none;
}

.stage::before {
  width: 22rem;
  height: 22rem;
  left: -8rem;
  top: 10%;
  background: var(--bubblegum);
}

.stage::after {
  width: 20rem;
  height: 20rem;
  right: -8rem;
  bottom: 10%;
  background: var(--mint);
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 7rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--bubblegum);
}

/* Each letter is inline-block so it can bob on its own. The gradient is
   painted per letter: with --n letters (set on .letters), the image is n
   times the letter's width and shifted by --i, so letter i shows slice
   i/n -> (i+1)/n and the colours run continuously across the whole word. */
.letters {
  --n: 10;
}

.letters span {
  display: inline-block;
  animation: bob 3s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.22s);
  will-change: transform;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .letters span {
    background-image: linear-gradient(90deg, var(--bubblegum), var(--lemon), var(--mint));
    background-size: calc(var(--n) * 100%) 100%;
    background-position: calc(var(--i, 0) * 100% / (var(--n) - 1)) 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

@keyframes bob {
  0%,
  100% { transform: translateY(0); }
  50%  { transform: translateY(-0.12em); }
}

/* --------------------------------------------------------------------------
   4. Small note (used on the 404 page)
   -------------------------------------------------------------------------- */
.note {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mint);
}

.note a {
  color: var(--bubblegum);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.note a:hover {
  color: var(--lemon);
}

.note a:focus-visible {
  outline: 3px solid var(--lemon);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   5. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .letters span {
    animation: none;
  }
}
