/* ============================================================
   blast.css — 「青春爆裂」演出パーツ
   文字の弾け / 炎グラデ / 火花 / ボタン / ヘッダー
   ============================================================ */

/* ------------------------------------------------------------
   1. 文字弾け（内側から拡大して出現）
   JSで .char に分割し、is-blast 付与でトリガー
   ------------------------------------------------------------ */
.blast-text { display: inline-block; }
.blast-text .char {
  display: inline-block;
  will-change: transform, opacity, filter;
  transform-origin: 50% 60%;
}
/* GSAPが無い環境でも見えるフォールバック */
.blast-text:not(.is-gsap) .char { opacity: 1; transform: none; }

/* 炎の残像（見出し裏で動く激しいグラデ） */
.flame-bg {
  position: relative;
  isolation: isolate;
}
.flame-bg::before {
  content: "";
  position: absolute;
  inset: -14% -8%;
  z-index: -1;
  background:
    radial-gradient(38% 60% at 22% 78%, rgba(255, 45, 14, 0.85), transparent 70%),
    radial-gradient(34% 56% at 58% 88%, rgba(255, 106, 0, 0.8), transparent 72%),
    radial-gradient(30% 50% at 82% 74%, rgba(255, 212, 58, 0.7), transparent 74%);
  filter: blur(24px) saturate(160%);
  opacity: 0.9;
  mix-blend-mode: screen;
  animation: flameRoll 3.4s ease-in-out infinite alternate;
}
@keyframes flameRoll {
  0% {
    transform: translate3d(-3%, 4%, 0) scale(1) rotate(-1.5deg);
    filter: blur(24px) saturate(150%) hue-rotate(-8deg);
  }
  50% {
    transform: translate3d(2%, -3%, 0) scale(1.14) rotate(1deg);
    filter: blur(30px) saturate(200%) hue-rotate(6deg);
  }
  100% {
    transform: translate3d(4%, 3%, 0) scale(1.06) rotate(2deg);
    filter: blur(20px) saturate(175%) hue-rotate(-4deg);
  }
}

/* 文字自体を炎グラデで塗る */
.text-blaze {
  background: linear-gradient(
    100deg,
    #fff2c4 0%,
    var(--c-spark) 18%,
    var(--c-blaze-2) 46%,
    var(--c-blaze) 72%,
    #ff9a3c 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: blazeSlide 5s linear infinite;
  filter: drop-shadow(0 0 18px rgba(255, 70, 20, 0.6));
}
@keyframes blazeSlide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 260% 50%; }
}

/* 墨の飛び散り（見出しの装飾） */
.sumi-splat {
  position: absolute;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
}

/* ------------------------------------------------------------
   2. 爆裂ボタン
   ------------------------------------------------------------ */
.btn-blast {
  --bh: 62px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: var(--bh);
  padding: 0 clamp(26px, 4vw, 44px);
  font-family: var(--font-head);
  font-size: clamp(15px, 1.7vw, 18px);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #fff;
  background: linear-gradient(120deg, var(--c-blaze) 0%, var(--c-blaze-2) 58%, #ff9d00 100%);
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 0 0 2px rgba(255, 212, 58, 0.55),
    0 14px 34px -10px rgba(255, 45, 14, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: transform 0.42s var(--e-blast), box-shadow 0.42s var(--e-out);
  will-change: transform;
}
/* 走る光 */
.btn-blast::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.55) 46%,
    transparent 62%
  );
  transform: translateX(-120%);
  transition: transform 0.7s var(--e-out);
}
/* 炎の脈動 */
.btn-blast::after {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -2;
  background: conic-gradient(
    from 0deg,
    var(--c-spark),
    var(--c-blaze),
    #ff00a8,
    var(--c-blaze-2),
    var(--c-spark)
  );
  filter: blur(18px);
  opacity: 0;
  animation: btnSpin 4s linear infinite;
  transition: opacity 0.4s ease;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

.btn-blast:hover,
.btn-blast:focus-visible {
  transform: translateY(-4px) scale(1.045);
  box-shadow:
    0 0 0 2px var(--c-spark),
    0 22px 46px -12px rgba(255, 60, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  outline: none;
}
.btn-blast:hover::before,
.btn-blast:focus-visible::before { transform: translateX(120%); }
.btn-blast:hover::after,
.btn-blast:focus-visible::after { opacity: 0.85; }
.btn-blast:active { transform: translateY(-1px) scale(0.99); }

.btn-blast__arrow {
  display: inline-block;
  font-family: var(--font-num);
  transition: transform 0.4s var(--e-blast);
}
.btn-blast:hover .btn-blast__arrow { transform: translateX(7px); }

/* 白抜き（サブ）ボタン */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 28px;
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--c-paper);
  border: 1.5px solid rgba(246, 239, 226, 0.5);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  background: rgba(12, 6, 8, 0.32);
  transition: border-color 0.35s, color 0.35s, background 0.35s, transform 0.35s var(--e-blast);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--c-spark);
  color: var(--c-spark);
  background: rgba(255, 45, 14, 0.14);
  transform: translateY(-3px);
  outline: none;
}

/* ------------------------------------------------------------
   3. 火花パーティクル（canvas）
   ------------------------------------------------------------ */
#spark-canvas {
  position: fixed;
  inset: 0;
  z-index: 88;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ------------------------------------------------------------
   4. ヘッダー
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}
.site-header.is-solid {
  background: rgba(10, 5, 7, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 212, 58, 0.22);
}
.site-header__inner {
  width: min(100% - 32px, 1320px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-brush);
  font-size: clamp(19px, 2.4vw, 23px);
  letter-spacing: 0.1em;
  text-shadow: 0 2px 18px rgba(255, 45, 14, 0.6);
}
.site-logo__year {
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--c-spark);
}
.gnav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); }
.gnav a {
  position: relative;
  font-size: 13.5px;
  letter-spacing: 0.12em;
  padding: 6px 0;
  white-space: nowrap;
}
.gnav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--c-blaze), var(--c-spark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--e-out);
}
.gnav a:hover::after,
.gnav a:focus-visible::after,
.gnav a[aria-current="page"]::after { transform: scaleX(1); }

/* ハンバーガー */
.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  position: relative;
  z-index: 110;
  border-radius: 50%;
  border: 1.5px solid rgba(246, 239, 226, 0.45);
}
.nav-toggle span {
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 2px;
  background: var(--c-paper);
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--e-blast), opacity 0.25s;
}
.nav-toggle span:nth-child(1) { transform: translate(-50%, calc(-50% - 6px)); }
.nav-toggle span:nth-child(3) { transform: translate(-50%, calc(-50% + 6px)); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .gnav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(160deg, rgba(12, 4, 6, 0.97), rgba(46, 6, 2, 0.97));
    backdrop-filter: blur(10px);
    clip-path: circle(0% at calc(100% - 40px) 34px);
    transition: clip-path 0.66s var(--e-out);
    pointer-events: none;
  }
  .gnav.is-open {
    clip-path: circle(150% at calc(100% - 40px) 34px);
    pointer-events: auto;
  }
  .gnav a {
    font-family: var(--font-brush);
    font-size: 25px;
    letter-spacing: 0.14em;
    padding: 13px 0;
  }
}

/* ------------------------------------------------------------
   5. フッター
   ------------------------------------------------------------ */
.site-footer {
  position: relative;
  z-index: 2;
  padding: clamp(48px, 8vw, 84px) 0 40px;
  background: linear-gradient(180deg, #0b0507, #1a0507 60%, #2a0604);
  border-top: 1px solid rgba(255, 212, 58, 0.2);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(26px, 5vw, 60px);
  align-items: start;
}
@media (max-width: 720px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}
.site-footer__brand {
  font-family: var(--font-brush);
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.25;
}
.site-footer__note {
  margin-top: 14px;
  font-size: 13px;
  line-height: 2;
  color: rgba(246, 239, 226, 0.66);
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}
.footer-links a {
  display: inline-block;
  padding: 6px 0;
  font-size: 13.5px;
  color: rgba(246, 239, 226, 0.82);
  transition: color 0.3s, transform 0.3s;
}
.footer-links a:hover { color: var(--c-spark); transform: translateX(4px); }
.copyright {
  margin-top: clamp(30px, 5vw, 52px);
  padding-top: 20px;
  border-top: 1px solid rgba(246, 239, 226, 0.14);
  font-family: var(--font-num);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: rgba(246, 239, 226, 0.5);
  text-align: center;
}
