/* Homepage (option E: bright wellness). Builds on the tokens in styles.css. */

.sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
.sun-core { fill: var(--yellow); }
.leaf-body { fill: var(--mint); }

.hub > .intention,
.agenda > .intention { display: flex; width: fit-content; margin-inline: auto; }
.intention svg { color: var(--red); }

/* Hero: a soft sunrise blob with hand-drawn doodles floating around it. */
.home-hero {
  position: relative;
  isolation: isolate;
  padding: 56px 16px 40px;
  margin: 8px 0 0;
}
.home-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 4%;
  border-radius: 46% 54% 42% 58% / 58% 46% 54% 42%;
  background:
    radial-gradient(60% 70% at 30% 30%, color-mix(in srgb, var(--yellow) 55%, transparent), transparent 70%),
    radial-gradient(60% 70% at 75% 65%, color-mix(in srgb, var(--peach) 85%, transparent), transparent 72%),
    radial-gradient(50% 60% at 20% 85%, color-mix(in srgb, var(--lavender) 80%, transparent), transparent 70%);
  filter: blur(2px);
}
.home-hero h1 { max-width: 16ch; margin-inline: auto; }
.hero-tags { justify-content: center; margin-top: 22px; }
.tag--sun { background: var(--butter); }
.tag--peach { background: var(--peach); }
.tag--mint { background: var(--mint); }
.tag--lav { background: var(--lavender); }

.doodle { position: absolute; z-index: -1; }
.hero-sun { width: 92px; height: 92px; top: 8px; right: 8%; color: var(--sun); animation: spin-slow 40s linear infinite; }
.hero-spark { color: var(--red); }
.hero-spark--1 { width: 30px; height: 30px; top: 42%; left: 6%; animation: twinkle 3.2s ease-in-out infinite; }
.hero-spark--2 { width: 20px; height: 20px; bottom: 14%; right: 12%; color: var(--sun); animation: twinkle 2.6s .8s ease-in-out infinite; }
.hero-leaf { width: 64px; height: 64px; bottom: 6%; left: 10%; color: var(--grass); transform: rotate(-12deg); }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.7); opacity: .6; } }

/* The big illustration, pinned to a pastel blob like a moodboard. */
.moodboard { position: relative; isolation: isolate; margin: 24px auto 40px; max-width: 980px; }
.moodboard::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 24px -10px -18px 20px;
  border-radius: 40px;
  background: linear-gradient(135deg, var(--mint), var(--lavender));
  transform: rotate(1.6deg);
}
.moodboard .frame { transform: rotate(-.6deg); }

/* Tiles: soft wellness cards, each in its own pastel. */
.hub { text-align: center; }
.tiles { text-align: left; }
.tile { border: 0; }
.tile:nth-child(5n + 1) { background: linear-gradient(160deg, var(--butter), var(--card) 75%); }
.tile:nth-child(5n + 2) { background: linear-gradient(160deg, var(--peach), var(--card) 75%); }
.tile:nth-child(5n + 3) { background: linear-gradient(160deg, var(--mint), var(--card) 75%); }
.tile:nth-child(5n + 4) { background: linear-gradient(160deg, var(--lavender), var(--card) 75%); }
.tile:nth-child(5n + 5) { background: linear-gradient(160deg, var(--blush), var(--card) 75%); }
.tile__dept {
  align-self: flex-start;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  border-radius: 999px;
  padding: 3px 12px;
  color: var(--ink);
}
.tile__aside { flex: 0 0 auto; font-size: 1.15rem; color: var(--ink-soft); }
.tile p.tile__aside { flex: 0 0 auto; }
.tile__aside::before { content: '\2727\00a0'; color: var(--red); }

/* RSVP: a gentle check-in. */
.rsvp { position: relative; overflow: hidden; background: linear-gradient(170deg, var(--blush), var(--card) 70%); border: 0; }
.rsvp-label {
  margin: 0 0 4px;
  font-family: var(--hand);
  font-size: 1.35rem;
  color: var(--red);
}
.rsvp-sub { margin: 0; color: var(--ink-soft); }
.rsvp-heart { width: 120px; height: 120px; right: -26px; top: -24px; color: var(--peach); transform: rotate(14deg); opacity: .9; }

/* Agenda: the daily ritual. */
.agenda { text-align: center; }
.agenda > h2 { margin-bottom: 0; }
.agenda-sub { margin: 0 0 22px; }
.events { text-align: left; }
.events li { border: 0; }
.events li:nth-child(5n + 1) .when { background: var(--butter); }
.events li:nth-child(5n + 2) .when { background: var(--peach); }
.events li:nth-child(5n + 3) .when { background: var(--mint); }
.events li:nth-child(5n + 4) .when { background: var(--lavender); }
.events li:nth-child(5n + 5) .when { background: var(--blush); }

/* Gratitude journal: lined paper, handwritten entries. */
.journal {
  max-width: 560px;
  margin: 48px auto 0;
  transform: rotate(-.8deg);
}
.journal h2 { margin-bottom: 4px; }
.journal-prompt { margin: 0 0 6px; color: var(--ink-soft); }
.journal-lines { margin: 0; padding-left: 1.6em; font-size: 1.45rem; line-height: 1.5; color: var(--ink); }
.journal-lines li { padding: 4px 0 2px; border-bottom: 1px dashed color-mix(in srgb, var(--line-strong) 55%, transparent); }

@media (max-width: 600px) {
  .home-hero { padding: 40px 4px 28px; }
  .home-hero::before { inset: 0 -8px; }
  .hero-sun { width: 60px; height: 60px; top: -6px; right: 0; }
  .hero-leaf { width: 44px; height: 44px; bottom: 0; left: 2%; }
  .hero-spark--1 { left: 0; top: 30%; }
  .moodboard::before { inset: 14px -6px -10px 10px; }
  .moodboard .frame, .journal { transform: none; }
  .rsvp-heart { width: 80px; height: 80px; right: -18px; top: -16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-sun, .hero-spark { animation: none; }
}

/* Three calm columns of matching photo crops. */
.events { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.events .vignette { aspect-ratio: 4 / 3; object-fit: cover; }

/* Eight tiles: 4 x 2 on desktop, 2 x 4 in between (auto-fit would give an
   uneven 3 + 3 + 2 at tablet widths), 1 column on phones. */
@media (min-width: 540px) and (max-width: 1040px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
