/* Mahalo Wubz — v3
   Same real palette/motifs as before (night-forest fae, linocut avatar art,
   fireflies, glass cards) — that's hers, untouched.
   Structure this time is an homage to puffy.jp specifically (researched
   11/27): title-as-home-link header, nav + social row, a mobile menu
   toggle, a rotating hero slideshow with autoplay/pause under it, a promo
   banner linking into the content, stacked titled modules with "MORE"
   links, and a footer that repeats the social row and adds a back-to-top
   link. None of PUFFY's colors, fonts, logos, or content are used here —
   only that layout pattern, adapted to Mahalo's real content. */

:root {
  --bg-deep: #0a0611;
  --bg-mid: #1a0f2e;
  --bg-glow: #12241c;
  --moss: #3f6b4a;
  --fae: #ff8fd6;
  --fae-soft: #ffc2ec;
  --lilac: #a45bff;
  --electric: #4de8ff;
  --card: rgba(26, 14, 40, 0.62);
  --text-main: #f6ecff;
  --text-sub: #c0a8d8;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(255,143,214,0.14), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 15%, rgba(77,232,255,0.10), transparent 65%),
    radial-gradient(ellipse 55% 35% at 10% 85%, rgba(63,107,74,0.30), transparent 70%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 50%, var(--bg-glow) 100%);
  font-family: var(--serif);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  padding: 0 0 56px;
}

/* ---------- forest backdrop (bg.jpg, real asset) ---------- */
.forest {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,6,17,0) 0%, rgba(10,6,17,0.35) 45%, rgba(10,6,17,0.15) 100%),
    url("assets/bg.jpg") center top / cover no-repeat;
}

/* ---------- fireflies ---------- */
.fireflies { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.fireflies i {
  position: absolute;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px 2px var(--c);
  opacity: 0;
  animation: drift var(--d) ease-in-out infinite alternate, blink var(--b) ease-in-out infinite;
  animation-delay: var(--w), var(--w);
}
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(var(--x), var(--y)); } }
@keyframes blink { 0%, 100% { opacity: 0; } 40%, 60% { opacity: 0.95; } }

.page { width: 100%; max-width: 480px; text-align: center; position: relative; z-index: 1; }

/* ============================================================
   HEADER — title/home link + nav + social row + mobile toggle
   (structural pattern from puffy.jp: site title top-left as a
   home link, primary nav, a social-link row under it, and a
   menu toggle for small screens)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 20;
  padding: 14px 18px 10px;
  background: linear-gradient(180deg, rgba(10,6,17,0.92), rgba(10,6,17,0.78));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,143,214,0.12);
}
.header-row { display: flex; align-items: center; justify-content: space-between; }
.wordmark {
  font-family: var(--sans); font-weight: 800; font-size: 15px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-main); text-decoration: none;
  background: linear-gradient(100deg, var(--fae-soft) 10%, var(--fae) 60%, var(--lilac) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-toggle {
  display: none;
  background: none; border: 1px solid rgba(255,143,214,0.35); border-radius: 8px;
  color: var(--text-sub); font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 12px; cursor: pointer;
}

.site-nav {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 4px;
  margin: 10px 0 10px;
}
.site-nav a {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-sub); text-decoration: none;
  padding: 7px 11px; border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.site-nav a:hover { color: var(--fae-soft); background: rgba(255,143,214,0.1); }

.social-row { display: flex; justify-content: center; gap: 16px; }
.social-row a {
  color: var(--text-sub); display: flex; width: 22px; height: 22px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.social-row a:hover { color: var(--fae-soft); transform: translateY(-1px); }
.social-row svg { width: 100%; height: 100%; }

@media (max-width: 480px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav { display: none; flex-direction: column; align-items: center; }
  .site-header.is-open .site-nav { display: flex; }
}

/* ============================================================
   HERO — rotating slideshow + caption, autoplay/pause (puffy.jp pattern)
   ============================================================ */
.hero-slideshow { position: relative; width: 100%; aspect-ratio: 4/5; max-height: 560px; overflow: hidden; }
.slides { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease;
}
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slideshow::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,6,17,0.05) 0%, rgba(10,6,17,0.25) 55%, rgba(10,6,17,0.92) 100%);
  pointer-events: none;
}

.slide-caption {
  position: absolute; left: 0; right: 0; bottom: 56px; z-index: 2; padding: 0 22px; text-align: center;
}
.slide-caption h1 {
  font-size: 30px; margin: 0 0 8px; font-weight: 700; letter-spacing: 0.02em;
  background: linear-gradient(100deg, var(--fae-soft) 10%, var(--fae) 45%, var(--lilac) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(255,143,214,0.35));
}
.slide-caption p.bio { color: var(--text-sub); font-size: 14px; font-style: italic; margin: 0 auto; line-height: 1.6; max-width: 340px; }

.slide-controls {
  position: absolute; left: 0; right: 0; bottom: 16px; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.slide-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3);
  background: rgba(10,6,17,0.45); color: var(--text-main); display: flex; align-items: center; justify-content: center;
  cursor: pointer; backdrop-filter: blur(4px);
}
.slide-btn svg { width: 15px; height: 15px; }
.slide-dots { display: flex; gap: 8px; }
.slide-dots .dot {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.3);
  cursor: pointer; transition: background 0.2s ease, transform 0.2s ease;
}
.slide-dots .dot.is-active { background: var(--fae); transform: scale(1.3); }

/* ---------- promo banner (below the slideshow, puffy.jp pattern) ---------- */
.promo-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: -22px 18px 0; padding: 13px 18px; text-decoration: none; position: relative; z-index: 2;
  font-family: var(--sans);
}
.promo-banner .kicker {
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--electric);
}
.promo-banner .promo-text { font-size: 13px; color: var(--text-main); font-weight: 600; }

.page-body { padding: 0 18px; }

.vines { width: 100%; height: 40px; margin-bottom: 2px; opacity: 0.45; }

a.cta {
  display: block; text-decoration: none; margin: 0 0 14px; padding: 17px 20px; border-radius: 18px;
  font-family: var(--sans); font-weight: 700; font-size: 16px; letter-spacing: 0.02em; color: #1a0717;
  background: linear-gradient(120deg, var(--fae-soft), var(--fae) 45%, #d98cff);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25) inset, 0 8px 30px rgba(255,143,214,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.cta small { display: block; font-weight: 500; font-size: 12px; opacity: 0.7; margin-top: 3px; letter-spacing: 0; }
a.cta:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset, 0 12px 40px rgba(255,143,214,0.5); }

.glass {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, rgba(255,143,214,0.55), rgba(164,91,255,0.12) 45%, rgba(77,232,255,0.45)) border-box;
  border: 1px solid transparent;
  border-radius: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---------- section scaffolding ---------- */
section { padding: 34px 0 4px; scroll-margin-top: 160px; }
section .section-head {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--electric);
  margin: 0 0 14px; text-align: left; padding-left: 4px;
}
.news-line { text-align: left; font-size: 14px; color: var(--text-sub); padding-left: 4px; margin: 0 0 10px; }

/* ---------- "MORE" link (puffy.jp pattern: each module links out) ---------- */
.more-link {
  display: inline-block; margin-top: 12px; font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--fae-soft); text-decoration: none;
  border-bottom: 1px solid rgba(255,194,236,0.4); padding-bottom: 2px;
}
.more-link:hover { color: var(--fae); border-color: var(--fae); }

/* ---------- next show (badge/card) ---------- */
.show { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; font-family: var(--sans); }
.show .date {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(63,107,74,0.35); border: 1px solid rgba(143,255,176,0.25);
  font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: #a8ffc4; line-height: 1.3;
}
.show .what { flex: 1; min-width: 0; }
.show strong { display: block; font-size: 16px; margin: 2px 0; color: var(--text-main); }

/* ---------- links / platform row ---------- */
.links { display: flex; flex-direction: column; gap: 12px; }
a.link-card {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  text-decoration: none; color: var(--text-main);
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
a.link-card:hover { transform: translateY(-2px); box-shadow: 0 0 26px rgba(255,143,214,0.25); }
a.link-card .label { flex: 1; text-align: left; }
.icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(164,91,255,0.16); border: 1px solid rgba(164,91,255,0.3);
}
.icon svg { width: 20px; height: 20px; }
.arrow { width: 18px; height: 18px; opacity: 0.45; transition: transform 0.2s ease, opacity 0.2s ease; }
a.link-card:hover .arrow { transform: translateX(4px); opacity: 0.9; }

/* ---------- flyer grid (card-grid, ready for more than one) ---------- */
.flyer-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 420px) { .flyer-grid.has-multiple { grid-template-columns: 1fr 1fr; } }
a.flyer { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; text-decoration: none; text-align: left; font-family: var(--sans); transition: transform 0.2s ease, box-shadow 0.2s ease; }
a.flyer:hover { transform: translateY(-2px); box-shadow: 0 0 26px rgba(255,143,214,0.25); }
a.flyer img { display: block; width: 76px; height: 95px; object-fit: cover; border-radius: 8px; transform: rotate(-3deg); box-shadow: 0 6px 16px rgba(0,0,0,0.5); flex-shrink: 0; }
a.flyer .what { flex: 1; }
a.flyer .kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; color: var(--electric); }
a.flyer strong { display: block; font-size: 16px; margin: 2px 0; color: var(--text-main); }
a.flyer small { font-size: 13px; color: var(--fae-soft); }

/* ---------- book section ---------- */
.book-block { text-align: center; padding: 6px 4px 10px; }
.book-block p { color: var(--text-sub); font-size: 14px; margin: 0 0 16px; }

/* ============================================================
   FOOTER — repeats the social row, adds a back-to-top link
   (puffy.jp pattern: repeated social links, label/credit link,
   copyright-style line, "UP" back-to-top link)
   ============================================================ */
footer { margin-top: 40px; padding: 0 18px; text-align: center; }
.footer-social { margin-bottom: 18px; }
footer .motto { color: rgba(255,143,214,0.55); font-size: 13px; font-style: italic; margin: 0 0 6px; }
footer .credit { display: block; font-family: var(--sans); font-size: 11px; color: rgba(192,168,216,0.6); }
footer a { color: rgba(77,232,255,0.75); text-decoration: none; }
footer .back-to-top {
  display: inline-block; margin-top: 16px; font-family: var(--sans); font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; color: var(--text-sub); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px; padding: 6px 14px;
}
footer .back-to-top:hover { color: var(--fae-soft); border-color: rgba(255,143,214,0.4); }
footer .ver { display: block; margin-top: 10px; opacity: 0.6; font-family: var(--sans); font-size: 10px; }

@media (prefers-reduced-motion: reduce) {
  .fireflies i, .slide { animation: none; transition: none; }
  .fireflies i { opacity: 0.6; }
}
