/* ===========================================================
   トップページ専用の着せ替え「熱量レッド」（2026-10-23〜）
   -----------------------------------------------------------
   読み込むのは index.html だけ。style.css の後に置いて後勝ちさせる。
   ルールは body.theme-red の下に閉じ込めてある（流れる英字の帯も、theme-red が
   無いときは display:none で隠れる）。gallery.html・matsuno.html・privacy.html・
   makai-kekkon/ はこのファイルを読み込まないので、効かない。
   共有の style.css と main.js は書き換えていない（P041設計書6章の決まり）。

   元に戻すとき：git checkout main -- index.html を実行し、
   css/top-red.css と js/top-red.js を消す（index.html の変更は5か所あるので、手で外すより確実）。

   考え方（見本帳 docs/design-systems/台帳.md の「熱量レッド」）
     - 白い面と赤い面を交互に並べる
     - 見出しは太く、字間を詰める
     - ボタンは丸く、大事な一文は赤い帯に乗せる
     - 大きな英字は横に流す（動きを減らす設定の人には止める）

   コントラスト（実測）
     #db1527 と #ffffff …… 5.0:1 → 赤い面の上の白文字は小さくても可
     #333333 と #ffffff …… 12.6:1
     #666666 と #ffffff …… 5.7:1
   =========================================================== */

body.theme-red {
  --red:        #db1527;
  --red-deep:   #b3101f;
  --ink:        #333333;
  --ink-muted:  #666666;
  --paper:      #ffffff;
  --line:       #d9d9d9;
  --font-latin: 'Outfit', 'Noto Sans JP', Arial, sans-serif;

  --color-accent:          var(--red);
  --color-accent-lt:       var(--red-deep);
  --color-accent-on-light: var(--red);

  background: var(--paper);
  color: var(--ink);
}

/* ---------- 面の色：白い面 ---------- */
.theme-red .news,
.theme-red .members,
.theme-red .trailer,
.theme-red .contact {
  --color-bg:     var(--paper);
  --color-bg-2:   #f4f4f4;
  --color-bg-3:   var(--paper);
  --color-text:   var(--ink);
  --color-muted:  var(--ink-muted);
  --color-border: var(--line);
  background: var(--paper);
  color: var(--ink);
}

/* ---------- 面の色：赤い面 ---------- */
.theme-red .next-stage,
.theme-red .past-stage,
.theme-red .about {
  --color-bg:     var(--red);
  --color-bg-2:   var(--red-deep);
  --color-bg-3:   var(--red-deep);
  --color-text:   #ffffff;
  --color-muted:  #ffffff;
  --color-accent: #ffffff;
  --color-border: rgba(255, 255, 255, 0.4);
  background: var(--red);
  color: #ffffff;
}

/* 赤い面の上では、フォーカスの輪を白にする（赤い輪は見えない） */
.theme-red .next-stage :focus-visible,
.theme-red .past-stage :focus-visible,
.theme-red .about :focus-visible,
.theme-red .red-marquee--on-red :focus-visible,
.theme-red .nav__links.is-open :focus-visible,
.theme-red .site-header:not(.scrolled) :focus-visible,
.theme-red .hero :focus-visible {
  outline-color: #ffffff;
}

/* style.css で半透明の白に固定されている文字を、面に合わせて読める濃さに戻す */
.theme-red .next-stage__detail dd,
.theme-red .next-stage__story-text,
.theme-red .about__concept-text,
.theme-red .about__info dd,
.theme-red .about__director-bio {
  color: #ffffff;
}

.theme-red .news__text,
.theme-red .news__body,
.theme-red .members__bio,
.theme-red .trailer__main-title,
.theme-red .trailer__name {
  color: var(--ink);
}

.theme-red .news__body b { color: var(--ink); }
.theme-red .contact__field textarea::placeholder { color: #767676; }


/* ===========================================================
   メニューバー
   =========================================================== */

/* 動画の上：透明のまま、文字を大きく太くして影で浮かせる */
.theme-red .nav__links a {
  font-family: var(--font-latin);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

/* 幅が足りない画面では、文字を少しだけ詰めて1行に収める */
@media (max-width: 1280px) {
  .theme-red .nav__links a { font-size: 0.74rem; padding: 8px 6px; }
}

@media (max-width: 1100px) {
  .theme-red .nav__links a { font-size: 0.68rem; padding: 8px 5px; letter-spacing: 0; }
}

/* ロゴは縮ませない（縦横比が崩れるため）。メニューが三本線に切り替わる手前の幅では、
   SNSアイコンを隠して場所を空ける（SNSはページ下のフッターにもある） */
.theme-red .nav__logo { flex-shrink: 0; }

/* 幅の狭いスマホ（400px以下）では、ロゴを縦横比のまま少し小さくして1行に収める */
@media (max-width: 400px) {
  .theme-red .nav__logo-img { height: 38px; }
}

@media (min-width: 1025px) and (max-width: 1250px) {
  .theme-red .nav__sns { display: none; }
  .theme-red .nav__links { margin-left: auto; }
}

.theme-red .nav__links a:hover { color: #ffffff; text-decoration: underline; text-underline-offset: 6px; }
.theme-red .nav__sns { color: #ffffff; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.55)); }
.theme-red .nav__hamburger span { background: #ffffff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55); }

/* BLOG・SHOP・MOVIE は丸い札に */
.theme-red .nav__btn {
  border-radius: 999px;
  text-shadow: none !important;
}

/* MOVIE の地と枠は style.css が --color-accent を使うので、変数の置き換えだけで赤になる。
   文字色だけは style.css が #000 !important なので、こちらも !important で白にする */
.theme-red .nav__btn--movie {
  color: #ffffff !important;
}

.theme-red .nav__btn--movie:hover {
  text-decoration: none;
}

.theme-red .nav__btn--shop {
  color: #ffffff !important;
  border-color: #ffffff !important;
}

/* スクロール後：白い帯＋下に赤い線 */
.theme-red .site-header.scrolled::before {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 3px solid var(--red);
}

.theme-red .site-header.scrolled .nav__links a {
  color: var(--ink);
  text-shadow: none;
}

.theme-red .site-header.scrolled .nav__links a:hover { color: var(--red); }
.theme-red .site-header.scrolled .nav__sns { color: var(--ink); filter: none; }
.theme-red .site-header.scrolled .nav__hamburger span { background: var(--ink); box-shadow: none; }

.theme-red .site-header.scrolled .nav__btn--shop {
  color: var(--red) !important;
  border-color: var(--red) !important;
}

/* SHOP にマウスを乗せると style.css が地を赤にするので、文字は白に（赤地に赤文字で消えるのを防ぐ） */
.theme-red .nav__btn--shop:hover,
.theme-red .site-header.scrolled .nav__btn--shop:hover {
  color: #ffffff !important;
  text-decoration: none;
}

.theme-red .site-header.scrolled .nav__btn--movie {
  color: #ffffff !important;
}

/* スマホ・タブレットで開くメニュー：赤い面に白い文字 */
@media (max-width: 1024px) {
  .theme-red .nav__links.is-open {
    background: var(--red);
  }

  .theme-red .nav__links.is-open li {
    border-bottom-color: rgba(255, 255, 255, 0.35);
  }

  .theme-red .nav__links.is-open a,
  .theme-red .site-header.scrolled .nav__links.is-open a {
    font-size: 1.05rem;
    color: #ffffff;
    text-shadow: none;
  }

  .theme-red .nav__links.is-open .nav__btn--movie,
  .theme-red .nav__links.is-open .nav__btn--shop {
    background: transparent !important;
    color: #ffffff !important;
    border-radius: 0;
  }
}


/* ===========================================================
   表紙（動画はそのまま。文字だけ大きく太く）
   =========================================================== */
.theme-red .hero__content { padding-bottom: 8px; }

.theme-red .hero__heading {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

.theme-red .hero__label {
  color: #ffffff;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

/* 劇団名は赤い帯に乗せる */
.theme-red .hero__title {
  display: inline-block;
  background: var(--red);
  color: #ffffff;
  font-size: clamp(1.2rem, 2.4vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.3;
  padding: 2px 12px 4px;
  border-radius: 4px;
}

/* 「演劇でゼロから感動する 舞台創作集団」を主役の一言にする */
.theme-red .hero__subtitle {
  display: block;
  font-size: clamp(2.4rem, 7vw, 6.4rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em; /* 日本語の極太は詰めすぎると字がぶつかる */
  color: #ffffff;
  margin-bottom: 28px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

@media (max-width: 768px) {
  /* style.css はスマホで一言を隠しているが、着せ替えでは主役なので出す */
  .theme-red .hero__subtitle {
    display: block;
    order: 3;
    /* 「演劇でゼロから感動する」の11文字が1行に収まる大きさ */
    font-size: clamp(1.7rem, 7.6vw, 3.2rem);
    margin: 14px 0 0;
  }

  .theme-red .hero__heading { order: 2; gap: 8px; margin-bottom: 0; }
  .theme-red .hero__cta { order: 4; margin: 20px 0 0; }
}

@media (max-width: 480px) {
  .theme-red .hero__heading .hero__title { font-size: 1.15rem; }
}


/* ===========================================================
   ボタン：角を丸く、色を面に合わせる
   =========================================================== */
.theme-red .btn {
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.theme-red .btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}

.theme-red .btn--primary:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: #ffffff;
}

.theme-red .hero .btn--outline {
  color: #ffffff;
  border-color: #ffffff;
}

.theme-red .hero .btn--outline:hover {
  background: #ffffff;
  color: var(--red);
}

/* 赤い面の上のボタンは白抜きにする */
.theme-red .next-stage .btn--primary,
.theme-red .past-stage .btn--primary,
.theme-red .about .btn--primary {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--red);
}

.theme-red .next-stage .btn--primary:hover,
.theme-red .past-stage .btn--primary:hover,
.theme-red .about .btn--primary:hover {
  background: var(--red-deep);
  border-color: #ffffff;
  color: #ffffff;
}


/* ===========================================================
   見出し：英字を太く詰め、日本語の小見出しを赤く
   =========================================================== */
.theme-red .section__title {
  font-family: var(--font-latin);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-transform: uppercase;
}

/* Outfit は Bebas Neue より横に広いので、スマホでは小さめにして「NEXT STAGE」を1行に収める */
@media (max-width: 768px) {
  .theme-red .section__title { font-size: 2.8rem; }
}

.theme-red .section__label {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--red);
}

.theme-red .next-stage .section__label,
.theme-red .past-stage .section__label,
.theme-red .about .section__label {
  color: #ffffff;
}


/* ===========================================================
   各セクションの細部
   =========================================================== */

/* NEWS：分類は赤い帯 */
.theme-red .news { border: 0; }

.theme-red .news__tag {
  color: #ffffff;
  border-radius: 4px;
  font-weight: 700;
}

.theme-red .news__text:hover { color: var(--red); }

/* NEXT STAGE：公演名を太く、チラシの角は丸めない */
.theme-red .next-stage__name {
  font-weight: 900;
  letter-spacing: -0.04em;
}

.theme-red .next-stage__count {
  display: inline-block;
  background: #ffffff;
  color: var(--red);
  font-weight: 700;
  padding: 2px 10px 3px;
  border-radius: 4px;
}

.theme-red .next-stage__detail dt { font-weight: 900; }

/* MEMBERS：写真を丸く切り抜く */
.theme-red .members__photo {
  isolation: isolate; /* Safari で拡大中に角が四角く見えるのを防ぐ */
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  overflow: hidden;
  background: #f4f4f4;
}

.theme-red .members__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.theme-red .members__info { background: transparent; padding-left: 0; padding-right: 0; }

.theme-red .members__name {
  font-weight: 900;
  letter-spacing: -0.03em;
}

.theme-red .members__role {
  font-family: var(--font-latin);
  font-weight: 800;
  color: var(--red);
}

/* PAST STAGE：年号を太い英字に */
.theme-red .past-stage__year {
  font-family: var(--font-latin);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.theme-red .past-stage__title { font-weight: 700; }

/* TRAILER：選んでいる1本は赤い枠 */
.theme-red .trailer__item--active {
  border-color: var(--red);
  background: rgba(219, 21, 39, 0.06);
}

.theme-red .trailer__play { color: #ffffff; }

/* ABOUT：創作理念の見出しを白い帯に */
.theme-red .about__concept-title {
  display: inline-block;
  background: #ffffff;
  color: var(--red);
  padding: 2px 10px 3px;
  border-radius: 4px;
}

/* CONTACT：入力欄を明るく */
.theme-red .contact__field input,
.theme-red .contact__field textarea,
.theme-red .contact__select-wrap select {
  background: #ffffff;
  border-color: #8c8c8c; /* 白地と 3.4:1。入力欄の境目に要る 3:1 を超える */
  color: var(--ink);
}

.theme-red .contact__select-wrap select option { background: #ffffff; }

/* FOOTER：すぐ上が赤い英字の帯なので、境目の線は引かない（二重になるため） */
.theme-red .footer { border-top: 0; }


/* ===========================================================
   流れる英字の帯（飾り。文字は読み上げでは飛ばす）
   止めるボタンは js/top-red.js が動かす（WCAG 2.2.2）
   =========================================================== */
.red-marquee { display: none; }

.theme-red .red-marquee {
  display: block;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  padding: clamp(18px, 3vw, 32px) 0;
  background: var(--paper);
}

.theme-red .red-marquee--on-red { background: var(--red); }

/* すき間は gap ではなく各 span の右余白で作る。
   gap だと「半分の長さ」と「1周期」がずれて、28秒ごとに帯が跳ねるため */
.theme-red .red-marquee__track {
  display: inline-flex;
  margin: 0;
  font-family: var(--font-latin);
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--red);
  animation: red-marquee-scroll 28s linear infinite;
}

.theme-red .red-marquee__track span { padding-right: 0.35em; }

.theme-red .red-marquee--on-red .red-marquee__track { color: #ffffff; }

/* 止めたとき（ボタンを押す・マウスを乗せる） */
.theme-red.marquee-paused .red-marquee__track,
.theme-red .red-marquee:hover .red-marquee__track {
  animation-play-state: paused;
}

/* 止める・動かすボタン（帯の右下に小さく） */
.theme-red .red-marquee__toggle {
  position: absolute;
  right: var(--pad-x);
  bottom: 6px;
  padding: 4px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: var(--paper);
  color: var(--red);
  font-family: var(--font-ja);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.theme-red .red-marquee--on-red .red-marquee__toggle {
  background: var(--red);
  color: #ffffff;
}

@keyframes red-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* 動きを減らす設定の人には、最初から止めて、ボタンも出さない */
@media (prefers-reduced-motion: reduce) {
  .theme-red .red-marquee__track { animation: none; }
  .theme-red .red-marquee__toggle { display: none; }
}
