/* ============================================================
   動的UI機能（第2段階）— 全ページ共通
   - SWELL本体のクラス・JSの挙動には触れない
   - 非表示系のスタイルは .tz-js を起点にスコープし、
     JSが動かない場合はそもそも非表示にならない設計にする
   ============================================================ */

/* ------------------------------------------------------------
   1. スクロール表示アニメーション (.tz-reveal)
   ------------------------------------------------------------ */
.tz-js .tz-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.tz-js .tz-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .tz-js .tz-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ------------------------------------------------------------
   2. ヘッダー スクロール時スタイル（body.tz-scrolled）
   SWELL本体の固定ヘッダー表示/非表示ロジックには触れず、
   見た目の補強（背景を濃く・影を強める）のみを追加する。
   ------------------------------------------------------------ */
body.tz-scrolled #header.l-header {
  background-color: rgba(4, 4, 4, 0.97) !important;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(192, 24, 24, 0.25) !important;
}

body.tz-scrolled #fix_header.l-fixHeader {
  box-shadow: 0 2px 22px rgba(0, 0, 0, 0.55) !important;
}

/* ------------------------------------------------------------
   3. ヘッダー右側：SNS + チケットCTA (.tz-head-actions)
   initHeaderActions() がPC幅でのみDOMに追加する。
   モバイル幅では非表示（既存のSPメニュー導線と重複させない）。
   ------------------------------------------------------------ */
.tz-head-actions {
  display: none;
}

@media (min-width: 1024px) {
  .tz-head-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 24px;
    flex-shrink: 0;
  }

  .tz-head-actions__sns {
    display: flex;
    gap: 8px;
  }

  .tz-head-actions__sns-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(232, 228, 222, 0.7) !important;
    text-decoration: none !important;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  }

  .tz-head-actions__sns-link:hover,
  .tz-head-actions__sns-link:focus-visible {
    color: var(--tz-red-bright) !important;
    border-color: rgba(238, 34, 34, 0.6);
    background: rgba(192, 24, 24, 0.1);
    box-shadow: 0 0 14px rgba(238, 34, 34, 0.3);
  }

  .tz-head-actions__sns-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: block;
  }

  .tz-head-actions__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    background: var(--tz-red);
    color: #fff !important;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none !important;
    border: 1px solid var(--tz-red);
    box-shadow: 0 0 16px rgba(192, 24, 24, 0.4);
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
  }

  .tz-head-actions__cta:hover,
  .tz-head-actions__cta:focus-visible {
    background: var(--tz-red-bright);
    border-color: var(--tz-red-bright);
    box-shadow: 0 0 24px rgba(238, 34, 34, 0.55);
    transform: translateY(-1px);
    color: #fff !important;
  }
}

/* ------------------------------------------------------------
   5. 下層ページ共通ヒーロー
   overview / ticket / history / faq / sponsor / contact / member
   ------------------------------------------------------------ */
.tz-subpage-hero {
  --tz-subhero-red: var(--tz-red, #c01818);
  --tz-subhero-red-bright: var(--tz-red-bright, #ef2b2b);
  --tz-subhero-text: #f4f0e9;
  --tz-subhero-muted: rgba(244, 240, 233, 0.72);
  --tz-subhero-line: rgba(255, 255, 255, 0.14);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: max(680px, calc(100svh - 80px));
  padding: clamp(8rem, 15vh, 11rem) clamp(1.5rem, 5vw, 5.5rem) 0;
  overflow: hidden;
  color: var(--tz-subhero-text);
  background:
    linear-gradient(108deg, rgba(20, 4, 5, 0.96) 0%, rgba(8, 8, 8, 0.94) 48%, rgba(5, 5, 5, 0.99) 100%),
    repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(255, 255, 255, 0.025) 80px),
    #080808;
  border-bottom: 1px solid rgba(192, 24, 24, 0.42);
}

.tz-subpage-hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -20% 36% -35% -18%;
  background: radial-gradient(circle at 32% 45%, rgba(192, 24, 24, 0.3), rgba(87, 5, 10, 0.12) 34%, transparent 69%);
  pointer-events: none;
}

.tz-subpage-hero::after {
  content: attr(data-ghost);
  position: absolute;
  z-index: -1;
  top: 8%;
  right: -0.04em;
  color: rgba(255, 255, 255, 0.026);
  font-family: "Times New Roman", serif;
  font-size: clamp(8rem, 18vw, 19rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
}

.tz-subpage-hero__texture {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.52;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  pointer-events: none;
}

.tz-subpage-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(360px, 34vw, 560px);
  align-items: center;
  gap: clamp(3rem, 7vw, 8rem);
  width: min(100%, 1480px);
  margin: 0 auto;
  padding-bottom: clamp(4.5rem, 9vh, 7.5rem);
}

.tz-subpage-hero__copy {
  min-width: 0;
}

.tz-subpage-hero__label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 clamp(1.35rem, 2.5vw, 2rem);
  color: var(--tz-subhero-red-bright);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tz-subpage-hero__label::before {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 12px rgba(239, 43, 43, 0.65);
}

.tz-subpage-hero__title {
  margin: 0;
  color: var(--tz-subhero-text);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 3px 28px rgba(0, 0, 0, 0.78);
}

.tz-subpage-hero__title span {
  display: block;
  font-size: clamp(3.65rem, 7vw, 7.8rem);
}

.tz-subpage-hero__title small {
  display: block;
  margin-top: 0.95rem;
  color: rgba(244, 240, 233, 0.52);
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(0.76rem, 1vw, 0.95rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.2em;
}

.tz-subpage-hero--history .tz-subpage-hero__title span {
  font-size: clamp(3.15rem, 5.8vw, 6.6rem);
}

.tz-subpage-hero--member .tz-subpage-hero__title span,
.tz-subpage-hero--sponsor .tz-subpage-hero__title span {
  font-size: clamp(3.25rem, 6.2vw, 7rem);
}

.tz-subpage-hero__lead {
  max-width: 45rem;
  margin: clamp(1.6rem, 3vw, 2.35rem) 0 0;
  color: var(--tz-subhero-muted);
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  line-height: 2;
}

.tz-subpage-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.tz-subpage-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 3.5rem;
  padding: 0.85rem 1.35rem 0.85rem 1.55rem;
  border: 1px solid var(--tz-subhero-line);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.tz-subpage-hero__button::after {
  content: "\2192";
  display: inline-block;
  color: currentColor;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.22s ease;
}

.tz-subpage-hero__button--primary {
  border-color: var(--tz-subhero-red);
  background: var(--tz-subhero-red);
  box-shadow: 0 0 24px rgba(192, 24, 24, 0.32);
}

.tz-subpage-hero__button--ghost {
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(6px);
}

.tz-subpage-hero__visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: clamp(350px, 39vw, 500px);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(145deg, rgba(192, 24, 24, 0.16), rgba(10, 10, 10, 0.25) 42%, rgba(10, 10, 10, 0.92)),
    repeating-linear-gradient(135deg, transparent 0, transparent 16px, rgba(255, 255, 255, 0.026) 17px, rgba(255, 255, 255, 0.026) 18px);
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.43), inset 0 0 0 1px rgba(192, 24, 24, 0.07);
}

.tz-subpage-hero__visual:has(> img),
.tz-subpage-hero__visual:has(.p-page-hero__photo-img) {
  width: 100%;
  min-height: 0;
  aspect-ratio: 3 / 2;
  justify-self: end;
  padding: 0;
}

.tz-subpage-hero__visual:has(.p-page-hero__photo-img) .p-page-hero__photo {
  position: absolute;
  inset: 0;
  isolation: isolate;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.tz-subpage-hero__visual:has(.p-page-hero__photo-img) .p-page-hero__photo::before,
.tz-subpage-hero__visual:has(.p-page-hero__photo-img) .p-page-hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.tz-subpage-hero__visual:has(.p-page-hero__photo-img) .p-page-hero__photo::before {
  background:
    radial-gradient(circle at 18% 12%, rgba(239, 43, 43, 0.26), transparent 28%),
    linear-gradient(135deg, rgba(96, 0, 0, 0.2), transparent 38%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.34));
}

.tz-subpage-hero__visual:has(.p-page-hero__photo-img) .p-page-hero__photo::after {
  opacity: 0.48;
  background:
    linear-gradient(to bottom, transparent 68%, rgba(0, 0, 0, 0.52)),
    repeating-linear-gradient(135deg, transparent 0, transparent 18px, rgba(255, 255, 255, 0.04) 19px, rgba(255, 255, 255, 0.04) 20px);
}

.tz-subpage-hero__visual > img,
.tz-subpage-hero__visual .p-page-hero__photo-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  filter: brightness(0.72) contrast(1.16) saturate(0.78) sepia(0.12);
  object-fit: cover;
  object-position: center center;
}

.tz-subpage-hero__visual::before,
.tz-subpage-hero__visual::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 4.5rem;
  height: 4.5rem;
  pointer-events: none;
}

.tz-subpage-hero__visual::before {
  top: 0.8rem;
  left: 0.8rem;
  border-top: 2px solid var(--tz-subhero-red-bright);
  border-left: 2px solid var(--tz-subhero-red-bright);
}

.tz-subpage-hero__visual::after {
  right: 0.8rem;
  bottom: 0.8rem;
  border-right: 2px solid rgba(239, 43, 43, 0.55);
  border-bottom: 2px solid rgba(239, 43, 43, 0.55);
}

.tz-subpage-hero__visual-label {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--tz-subhero-red-bright);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tz-subpage-hero__visual-main {
  position: relative;
  z-index: 1;
  margin: auto 0;
  padding: 2rem 0;
  color: rgba(244, 240, 233, 0.9);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(1.75rem, 2.8vw, 3.1rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
}

.tz-subpage-hero__visual-note {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(244, 240, 233, 0.55);
  font-size: 0.78rem;
  line-height: 1.8;
}

.tz-subpage-hero__visual-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  margin: auto 0;
  padding: 1.5rem 0;
  list-style: none;
}

.tz-subpage-hero__visual-list li {
  position: relative;
  padding: 0.9rem 0.4rem 0.9rem 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(244, 240, 233, 0.82);
  font-size: 0.94rem;
  line-height: 1.6;
}

.tz-subpage-hero__visual-list li::before {
  content: "";
  position: absolute;
  top: 1.45rem;
  left: 0.15rem;
  width: 0.38rem;
  height: 0.38rem;
  background: var(--tz-subhero-red-bright);
  box-shadow: 0 0 10px rgba(239, 43, 43, 0.6);
}

.tz-subpage-hero__meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 1480px);
  margin: 0 auto;
  border-top: 1px solid var(--tz-subhero-line);
  border-right: 1px solid var(--tz-subhero-line);
  background: rgba(3, 3, 3, 0.66);
  backdrop-filter: blur(9px);
}

.tz-subpage-hero__meta-item,
.tz-subpage-hero__meta > div {
  min-width: 0;
  padding: 1.2rem clamp(1rem, 2.2vw, 2rem);
  border-left: 1px solid var(--tz-subhero-line);
}

.tz-subpage-hero__meta-label,
.tz-subpage-hero__meta dt {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--tz-subhero-red-bright);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tz-subpage-hero__meta-value,
.tz-subpage-hero__meta dd {
  display: block;
  margin: 0;
  color: rgba(244, 240, 233, 0.9);
  font-size: clamp(0.83rem, 1vw, 0.96rem);
  font-weight: 600;
  line-height: 1.55;
}

@media (hover: hover) {
  .tz-subpage-hero__button:hover {
    color: #fff;
    transform: translateY(-2px);
  }

  .tz-subpage-hero__button:hover::after {
    transform: translateX(0.22rem);
  }

  .tz-subpage-hero__button--primary:hover {
    border-color: var(--tz-subhero-red-bright);
    background: var(--tz-subhero-red-bright);
    box-shadow: 0 0 32px rgba(239, 43, 43, 0.42);
  }

  .tz-subpage-hero__button--ghost:hover {
    border-color: rgba(239, 43, 43, 0.62);
    background: rgba(192, 24, 24, 0.1);
  }
}

@media (max-width: 960px) {
  .tz-subpage-hero {
    min-height: auto;
    padding-top: 8.5rem;
  }

  .tz-subpage-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 3.5rem;
  }

  .tz-subpage-hero__visual {
    width: min(100%, 44rem);
    min-height: 310px;
  }

  .tz-subpage-hero__visual:has(> img),
  .tz-subpage-hero__visual:has(.p-page-hero__photo-img) {
    min-height: 0;
    aspect-ratio: 3 / 2;
  }
}

@media (max-width: 767px) {
  .tz-subpage-hero {
    display: block;
    padding: 7.25rem 1.25rem 0;
  }

  .tz-subpage-hero::after {
    display: none;
  }

  .tz-subpage-hero__texture {
    background-size: 42px 42px;
  }

  .tz-subpage-hero__inner {
    gap: 2.5rem;
    padding-bottom: 3.25rem;
  }

  .tz-subpage-hero__label {
    margin-bottom: 1.15rem;
    font-size: 0.66rem;
  }

  .tz-subpage-hero__title span,
  .tz-subpage-hero--member .tz-subpage-hero__title span,
  .tz-subpage-hero--sponsor .tz-subpage-hero__title span {
    font-size: clamp(2.65rem, 12.5vw, 4.2rem);
    line-height: 1.15;
  }

  .tz-subpage-hero--history .tz-subpage-hero__title span {
    font-size: clamp(2.35rem, 10.8vw, 3.55rem);
  }

  .tz-subpage-hero--member .tz-subpage-hero__title span {
    font-size: clamp(2.25rem, 10.8vw, 3.4rem);
  }

  .tz-subpage-hero__title small {
    margin-top: 0.7rem;
    font-size: 0.66rem;
    letter-spacing: 0.14em;
  }

  .tz-subpage-hero__lead {
    margin-top: 1.4rem;
    font-size: 0.95rem;
    line-height: 1.9;
  }

  .tz-subpage-hero__actions {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.8rem;
  }

  .tz-subpage-hero__button {
    width: 100%;
    min-height: 3.55rem;
  }

  .tz-subpage-hero__visual {
    min-height: 255px;
    padding: 1.4rem;
  }

  .tz-subpage-hero__visual:has(> img),
  .tz-subpage-hero__visual:has(.p-page-hero__photo-img) {
    width: 100%;
    min-height: 0;
    aspect-ratio: 3 / 2;
    padding: 0;
  }

  .tz-subpage-hero__visual::before,
  .tz-subpage-hero__visual::after {
    width: 3rem;
    height: 3rem;
  }

  .tz-subpage-hero__visual-main {
    padding: 1.5rem 0;
    font-size: clamp(1.55rem, 7vw, 2.3rem);
  }

  .tz-subpage-hero__meta {
    grid-template-columns: minmax(0, 1fr);
    border-right: 0;
  }

  .tz-subpage-hero__meta-item,
  .tz-subpage-hero__meta > div {
    padding: 1rem 0.25rem;
    border-left: 0;
    border-bottom: 1px solid var(--tz-subhero-line);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tz-subpage-hero__button,
  .tz-subpage-hero__button::after {
    transition: none;
  }
}
