/* MoonGlass_Integration comic strip — mobile-first */
:root {
  --ink: #1a1a2e;
  --paper: #fff8f0;
  --panel: #ffffff;
  --accent: #ff6b35;
  --accent2: #4ecdc4;
  --accent3: #ffe66d;
  --accent4: #7c5cff;
  --bubble: #fffef5;
  --muted: #5a5a72;
  --ok: #2ecc71;
  --warn: #e74c3c;
  --shadow: 4px 4px 0 #1a1a2e;
  --radius: 12px;
  --font-display: "Comic Neue", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12% 18%, #ffe8d6 0%, transparent 42%),
    radial-gradient(circle at 88% 12%, #d4f5f0 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, #e8e0ff 0%, transparent 45%),
    var(--paper);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--accent4); font-weight: 600; }
a:hover { color: var(--accent); }

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 1.5rem 1rem 1rem;
  position: relative;
}

.hero-badge {
  display: inline-block;
  background: var(--accent3);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.hero h1 .slash {
  color: var(--accent);
  font-weight: 800;
}

.hero .tagline {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--muted);
  max-width: 36em;
  margin: 0.5rem auto 1rem;
}

.hero .wink {
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.85;
  font-style: italic;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn.secondary { background: var(--accent2); color: var(--ink) !important; }
.btn.ghost { background: var(--panel); color: var(--ink) !important; }
.btn.purple { background: var(--accent4); }

/* Strip */
.strip-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-align: center;
  margin: 1.75rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}
.strip-title::before,
.strip-title::after {
  content: "";
  height: 3px;
  width: 48px;
  background: var(--ink);
  border-radius: 2px;
}

.comic {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.panel {
  background: var(--panel);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .panel {
    grid-template-columns: 200px 1fr;
    min-height: 180px;
  }
  .panel.reverse { grid-template-columns: 1fr 200px; }
  .panel.reverse .art { order: 2; }
  .panel.reverse .story { order: 1; }
}

.panel .art {
  background: linear-gradient(145deg, #f0f4ff, #fff5eb);
  border-bottom: 4px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  min-height: 160px;
  position: relative;
}
@media (min-width: 640px) {
  .panel .art {
    border-bottom: none;
    border-right: 4px solid var(--ink);
  }
  .panel.reverse .art {
    border-right: none;
    border-left: 4px solid var(--ink);
  }
}

.panel .art svg {
  width: 100%;
  max-width: 180px;
  height: auto;
}

.panel-num {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel .story {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
}

.bubble {
  background: var(--bubble);
  border: 2.5px solid var(--ink);
  border-radius: 18px 18px 18px 4px;
  padding: 0.65rem 0.85rem;
  position: relative;
  font-size: 0.98rem;
}
.bubble.right {
  border-radius: 18px 18px 4px 18px;
  align-self: flex-end;
}
.bubble .en {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

.caption {
  font-size: 0.88rem;
  color: var(--muted);
  border-left: 3px solid var(--accent2);
  padding-left: 0.65rem;
}

.panel.chaos .art { background: linear-gradient(145deg, #ffe0e0, #fff0d0); }
.panel.yaml .art { background: linear-gradient(145deg, #e0f0ff, #e8ffe8); }
.panel.agent .art { background: linear-gradient(145deg, #efe0ff, #e0f8ff); }
.panel.gate .art { background: linear-gradient(145deg, #e0ffe8, #fffde0); }
.panel.cameo .art { background: linear-gradient(145deg, #ffe8f0, #e8f0ff); }
.panel.why .art { background: linear-gradient(145deg, #e8ecff, #fff0e8); }
.panel.boundary .art { background: linear-gradient(145deg, #fff0e0, #e0ffe8); }
.panel.cta-panel .art { background: linear-gradient(145deg, #ffe66d33, #4ecdc433); }

/* Footer CTA card */
.finale {
  margin-top: 1.5rem;
  background: var(--panel);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.2rem;
  text-align: center;
}
.finale h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}
.finale p { color: var(--muted); margin-bottom: 1rem; font-size: 0.95rem; }

.links-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1fr;
  text-align: left;
  max-width: 520px;
  margin: 0 auto 1rem;
}
@media (min-width: 520px) {
  .links-grid { grid-template-columns: 1fr 1fr; }
}
.links-grid a {
  display: block;
  padding: 0.55rem 0.75rem;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.88rem;
  transition: background 0.12s;
}
.links-grid a:hover { background: var(--accent3); }
.links-grid a strong { display: block; font-size: 0.95rem; }

.footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.footer code {
  background: #eee;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Decorative sparkles */
.spark {
  display: inline-block;
  animation: pop 1.6s ease-in-out infinite;
}
@keyframes pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
