:root {
  --paper-light: #fbf6ea;
  --paper-edge: #efe5cf;
  --ink: #241c17;
  --ink-soft: #6b5a4e;
  --vermilion: #d6452b;
  --vermilion-deep: #b5341e;
  --gold: #e8a838;
  --roller: #c8a96e;
  --roller-dark: #8f6d3b;
  --card-border: rgba(143, 109, 59, 0.28);
  --shadow-ink: rgba(36, 28, 23, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: "PingFang HK", "Hiragino Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  line-height: 1.5;
  background-color: var(--paper-light);
  background-image:
    radial-gradient(circle at 50% 42%, rgba(251, 246, 234, 0.72) 0%, rgba(239, 229, 207, 0.88) 72%, rgba(226, 211, 182, 0.94) 100%),
    url("assets/bg/bg_papper_tile.png");
  background-repeat: no-repeat, repeat;
  background-size: 100% 100%, auto;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.scroll-page {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 4vw, 36px) clamp(16px, 5vw, 32px);
}

/* Subtle top and bottom scroll-roller trim lines */
.scroll-page::before,
.scroll-page::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--roller-dark) 0%, var(--roller) 22%, #edd29c 50%, var(--roller) 78%, var(--roller-dark) 100%);
  box-shadow: 0 1px 4px rgba(36, 28, 23, 0.18);
  pointer-events: none;
  z-index: 10;
}

.scroll-page::before {
  top: 0;
}

.scroll-page::after {
  bottom: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.72);
  box-shadow: 0 2px 10px rgba(36, 28, 23, 0.05);
  backdrop-filter: blur(4px);
}

.seal-stamp {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, var(--vermilion) 0%, var(--vermilion-deep) 100%);
  color: #fff8f0;
  font-family: "Songti TC", "Noto Serif TC", "PMingLiU", Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 6px rgba(214, 69, 43, 0.28);
  user-select: none;
}

.brand-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.brand-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--roller-dark);
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(232, 168, 56, 0.16);
  border: 1px solid rgba(200, 169, 110, 0.42);
}

.hero-showcase {
  width: 100%;
  max-width: 680px;
  margin: auto 0;
  padding: clamp(16px, 3vh, 28px) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-stage {
  position: relative;
  width: min(340px, 76vw);
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-stage:hover {
  transform: translateY(-2px);
}

.hero-stage:active {
  transform: scale(0.98);
}

.hero-stage:focus-visible {
  outline: 3px solid var(--vermilion);
  outline-offset: 8px;
}

/* Soft warm parchment halo behind the Fire Hero */
.hero-stage::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(232, 168, 56, 0.24) 0%,
    rgba(214, 69, 43, 0.1) 46%,
    rgba(214, 69, 43, 0) 72%
  );
  filter: blur(4px);
  transition: transform 320ms ease, opacity 320ms ease, background 320ms ease;
  pointer-events: none;
}

/* Ground contact shadow ellipse underneath the hero */
.hero-stage::after {
  content: "";
  position: absolute;
  left: 26%;
  right: 26%;
  bottom: 6%;
  height: 10%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(36, 28, 23, 0.22) 0%, rgba(36, 28, 23, 0) 72%);
  transition: transform 260ms ease, opacity 260ms ease;
  pointer-events: none;
}

.hero-stage.is-effect::before {
  transform: scale(1.16);
  background: radial-gradient(
    circle,
    rgba(232, 168, 56, 0.48) 0%,
    rgba(214, 69, 43, 0.24) 48%,
    rgba(214, 69, 43, 0) 75%
  );
}

.hero-stage.is-effect::after {
  transform: scaleX(1.08);
  opacity: 0.78;
}

#heroCanvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 280ms ease, transform 280ms ease;
}

.hero-stage.is-ready #heroCanvas {
  opacity: 1;
  transform: scale(1);
}

.headline {
  margin: clamp(14px, 2.5vh, 24px) 0 8px;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.subline {
  margin: 0;
  max-width: 36ch;
  font-size: clamp(0.92rem, 1.8vw, 1.05rem);
  color: var(--ink-soft);
}

.hint-pill {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: rgba(255, 252, 245, 0.65);
  border: 1px solid var(--card-border);
}

.hint-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vermilion);
  box-shadow: 0 0 0 3px rgba(214, 69, 43, 0.16);
}

.site-footer {
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  text-align: center;
  padding-bottom: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-stage,
  .hero-stage::before,
  .hero-stage::after,
  #heroCanvas {
    transition: none;
  }
}
