/* ============================================
   コーディングパララックス — テストワイヤー
   100vh × スクロールスナップ（1セクションずつ）
   ============================================ */

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

:root {
  --bg-deep: #0a0e14;
  --wire: #3d5a80;
  --wire-bright: #7eb8da;
  --accent-hero: #e07a5f;
  --accent-one: #81b29a;
  --accent-two: #f2cc8f;
  --accent-three: #4cc9f0;
  --accent-four: #ee8695;
  --accent-footer: #9b8fd9;
  --text: #e8eef4;
  --text-muted: rgba(232, 238, 244, 0.55);
  font-family: "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    Meiryo, sans-serif;
}

html {
  /* 縦方向：必ずセクション境界に吸着 */
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  overflow-x: hidden;
}

/* スクリーンリーダー専用（ナビのラベル等） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 背景ワイヤー（動くグリッド） ---------- */
.wire-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.wire-grid {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: linear-gradient(
      rgba(61, 90, 128, 0.12) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(61, 90, 128, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: wire-grid-drift 28s linear infinite;
}

@keyframes wire-grid-drift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(48px, 48px);
  }
}

/* ---------- メイン：各パネル 100vh + スナップ ---------- */
.snap-container {
  position: relative;
  z-index: 1;
}

/* ---------- 右：セクションナビ（縦ドット・スクロールで発光） ---------- */
.section-nav {
  position: fixed;
  right: clamp(0.55rem, 2vw, 1.25rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  pointer-events: none;
}

.section-nav__list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.65rem, 2vh, 1.05rem);
  pointer-events: auto;
}

.section-nav__list::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 0;
  border-left: 1px dashed rgba(61, 90, 128, 0.42);
  transform: translateX(-50%);
  pointer-events: none;
}

.section-nav__item {
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.section-nav__link {
  display: grid;
  place-items: center;
  padding: 0.55rem;
  text-decoration: none;
  color: inherit;
  border-radius: 50%;
  transition: transform 0.28s ease;
}

.section-nav__link:focus-visible {
  outline: 2px solid var(--wire-bright);
  outline-offset: 2px;
}

.section-nav__dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(126, 184, 218, 0.35);
  background: rgba(10, 14, 20, 0.85);
  box-shadow: 0 0 0 1px rgba(61, 90, 128, 0.35);
  transition:
    border-color 0.35s ease,
    background-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease;
}

.section-nav__link.is-active .section-nav__dot {
  transform: scale(1.35);
  border-color: var(--wire-bright);
  background: rgba(126, 184, 218, 0.2);
}

.section-nav__link[data-section-accent="hero"].is-active .section-nav__dot {
  border-color: var(--accent-hero);
  box-shadow:
    0 0 0 1px rgba(224, 122, 95, 0.45),
    0 0 18px 5px rgba(224, 122, 95, 0.45);
}

.section-nav__link[data-section-accent="one"].is-active .section-nav__dot {
  border-color: var(--accent-one);
  box-shadow:
    0 0 0 1px rgba(129, 178, 154, 0.45),
    0 0 18px 5px rgba(129, 178, 154, 0.42);
}

.section-nav__link[data-section-accent="two"].is-active .section-nav__dot {
  border-color: var(--accent-two);
  box-shadow:
    0 0 0 1px rgba(242, 204, 143, 0.45),
    0 0 18px 5px rgba(242, 204, 143, 0.4);
}

.section-nav__link[data-section-accent="three"].is-active .section-nav__dot {
  border-color: var(--accent-three);
  box-shadow:
    0 0 0 1px rgba(76, 201, 240, 0.45),
    0 0 18px 5px rgba(76, 201, 240, 0.42);
}

.section-nav__link[data-section-accent="four"].is-active .section-nav__dot {
  border-color: var(--accent-four);
  box-shadow:
    0 0 0 1px rgba(238, 134, 149, 0.45),
    0 0 18px 5px rgba(238, 134, 149, 0.4);
}

.section-nav__link[data-section-accent="footer"].is-active .section-nav__dot {
  border-color: var(--accent-footer);
  box-shadow:
    0 0 0 1px rgba(155, 143, 217, 0.45),
    0 0 18px 5px rgba(155, 143, 217, 0.42);
}

@media print {
  .section-nav {
    display: none !important;
  }
}

.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.panel__inner {
  text-align: center;
  max-width: 36rem;
}

.panel__label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.panel__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.panel__hint {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* セクションごとのトーン */
.panel--hero .panel__title {
  color: var(--accent-hero);
}
.panel--one .panel__title {
  color: var(--accent-one);
}
.panel--two .panel__title {
  color: var(--accent-two);
}
.panel--three .panel__title {
  color: var(--accent-three);
}

/* セクション３：大型フロアイラストを全面下側に配置 */
.panel.panel--three {
  overflow: hidden;
}

.panel--three .panel__inner {
  position: relative;
  z-index: 2;
  max-width: 36rem;
  padding: clamp(1.25rem, 3.5vw, 2rem) clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 4px;
  background: radial-gradient(
    ellipse 120% 100% at 50% 45%,
    rgba(10, 14, 20, 0.72) 0%,
    rgba(10, 14, 20, 0.35) 55%,
    transparent 78%
  );
}
.panel--four .panel__title {
  color: var(--accent-four);
}
.panel--footer .panel__title {
  color: var(--accent-footer);
}

/* フッター右下：Confidential */
.panel--footer {
  /* 中央の panel__inner と重ならないよう、ボタン用に十分な層を確保 */
  position: relative;
}

.footer-confidential-btn {
  position: absolute;
  right: clamp(1rem, 4vw, 2.25rem);
  bottom: clamp(1rem, 3.5vh, 2rem);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0.4rem 0.85rem 0.45rem;
  font: inherit;
  color: var(--accent-footer);
  background: rgba(10, 14, 20, 0.65);
  border: 1px dashed rgba(155, 143, 217, 0.55);
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(61, 90, 128, 0.35);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.footer-confidential-btn__ja {
  font-size: clamp(0.62rem, 1.45vw, 0.7rem);
  font-weight: 700;
  letter-spacing: 0.35em;
  line-height: 1.2;
}

.footer-confidential-btn__en {
  font-size: clamp(0.58rem, 1.35vw, 0.66rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.2;
}

.footer-confidential-btn:hover {
  color: var(--text);
  border-color: rgba(155, 143, 217, 0.85);
  background: rgba(155, 143, 217, 0.12);
  box-shadow: 0 0 20px rgba(155, 143, 217, 0.15);
}

.footer-confidential-btn:focus-visible {
  outline: 2px solid var(--accent-footer);
  outline-offset: 3px;
}

/* ---------- セクション１：横スクロール 1-a / 1-b / 1-c（縦スナップはセクション全体で1枚） ---------- */
.panel.panel--one {
  display: block;
  padding: 0;
  overflow: hidden;
}

/* セクション１：左・天地中央のアンカー（ワイヤーフレーム調パネル） */
.section-1-anchor-nav {
  --section-1-nav-pad: clamp(0.65rem, 1.8vw, 1rem);
  position: absolute;
  left: clamp(0.5rem, 2vw, 1.25rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  pointer-events: auto;
  max-width: min(46vw, 13.5rem);
  padding: var(--section-1-nav-pad) var(--section-1-nav-pad) var(--section-1-nav-pad)
    clamp(0.5rem, 1.5vw, 0.85rem);
  border: 1px dashed rgba(129, 178, 154, 0.38);
  border-radius: 2px;
  background: linear-gradient(
    135deg,
    rgba(10, 14, 20, 0.82) 0%,
    rgba(14, 22, 28, 0.72) 100%
  );
  box-shadow:
    0 0 0 1px rgba(61, 90, 128, 0.25),
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(126, 184, 218, 0.06);
}

.section-1-anchor-nav__eyebrow {
  margin: 0 0 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(61, 90, 128, 0.4);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(232, 238, 244, 0.38);
}

.section-1-anchor-nav__list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* 14px ドットの中心（7px）に合わせた破線レール */
.section-1-anchor-nav__list::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 0;
  border-left: 1px dashed rgba(61, 90, 128, 0.5);
  pointer-events: none;
}

.section-1-anchor-nav__list > li {
  margin: 0;
  padding: 0;
}

.section-1-anchor-nav__link {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  padding: 0.42rem 0.35rem 0.42rem 0;
  text-decoration: none;
  color: var(--text-muted);
  border-radius: 2px;
  transition:
    color 0.22s ease,
    background-color 0.22s ease,
    box-shadow 0.22s ease;
}

.section-1-anchor-nav__dot {
  position: relative;
  z-index: 1;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-top: 0.2rem;
  border: 2px solid rgba(129, 178, 154, 0.35);
  border-radius: 50%;
  background: rgba(10, 14, 20, 0.9);
  box-shadow: 0 0 0 1px rgba(61, 90, 128, 0.35);
  transition:
    border-color 0.22s ease,
    background-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.section-1-anchor-nav__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 0;
}

.section-1-anchor-nav__code {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(232, 238, 244, 0.35);
  transition: color 0.22s ease;
}

.section-1-anchor-nav__name {
  font-size: clamp(0.68rem, 1.55vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.3;
  transition: color 0.22s ease;
}

.section-1-anchor-nav__link:hover {
  background: rgba(129, 178, 154, 0.06);
}

.section-1-anchor-nav__link:hover .section-1-anchor-nav__dot {
  border-color: rgba(129, 178, 154, 0.65);
  box-shadow: 0 0 12px rgba(129, 178, 154, 0.2);
}

.section-1-anchor-nav__link:hover .section-1-anchor-nav__code,
.section-1-anchor-nav__link:hover .section-1-anchor-nav__name {
  color: rgba(232, 238, 244, 0.78);
}

.section-1-anchor-nav__link:focus-visible {
  outline: none;
  background: rgba(129, 178, 154, 0.1);
  box-shadow: 0 0 0 2px rgba(129, 178, 154, 0.45);
}

.section-1-anchor-nav__link:focus-visible .section-1-anchor-nav__dot {
  border-color: var(--accent-one);
}

.section-1-anchor-nav__link.is-active {
  background: rgba(129, 178, 154, 0.08);
}

.section-1-anchor-nav__link.is-active .section-1-anchor-nav__dot {
  border-color: var(--accent-one);
  background: rgba(129, 178, 154, 0.22);
  box-shadow:
    0 0 0 1px rgba(129, 178, 154, 0.35),
    0 0 16px rgba(129, 178, 154, 0.35);
  transform: scale(1.08);
}

.section-1-anchor-nav__link.is-active .section-1-anchor-nav__code {
  color: var(--accent-one);
}

.section-1-anchor-nav__link.is-active .section-1-anchor-nav__name {
  color: var(--accent-one);
}

@media (prefers-reduced-motion: reduce) {
  .section-1-anchor-nav__link,
  .section-1-anchor-nav__dot {
    transition-duration: 0.01ms;
  }
  .section-1-anchor-nav__link.is-active .section-1-anchor-nav__dot {
    transform: none;
  }
}

.section-1-hscroll {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(129, 178, 154, 0.45) rgba(0, 0, 0, 0.2);
}

.section-1-hscroll:focus-visible {
  outline: 2px solid var(--accent-one);
  outline-offset: -2px;
}

.section-1-slide {
  flex: 0 0 100%;
  width: 100%;
  min-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-sizing: border-box;
}

.section-1-slide__inner {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 1-b：バー装飾 */
.wire-frame--one-b {
  border-color: rgba(129, 178, 154, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wire-one-b__bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.65rem, 2.5vw, 1.25rem);
  height: min(36vw, 168px);
}

.wire-one-b__bars span {
  display: block;
  width: clamp(32px, 9vw, 52px);
  border: 2px solid var(--accent-one);
  border-radius: 3px;
  opacity: 0.75;
}

.wire-one-b__bars span:nth-child(1) {
  height: 42%;
}
.wire-one-b__bars span:nth-child(2) {
  height: 72%;
  border-style: dashed;
}
.wire-one-b__bars span:nth-child(3) {
  height: 58%;
}

/* 1-c：下方向のヒント */
.wire-frame--one-c {
  border-color: rgba(129, 178, 154, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wire-one-c__arrow {
  font-size: clamp(2.75rem, 14vw, 4.5rem);
  line-height: 1;
  font-weight: 300;
  color: var(--accent-one);
  opacity: 0.55;
  animation: wire-one-c-bob 1.85s ease-in-out infinite;
}

@keyframes wire-one-c-bob {
  0%,
  100% {
    transform: translateY(-4px);
  }
  50% {
    transform: translateY(12px);
  }
}

.panel--one .panel__hint strong {
  color: var(--accent-one);
  font-weight: 600;
}

/* ---------- 各セクション枠：ワイヤーフレーム ---------- */
.wire-frame {
  position: absolute;
  inset: clamp(1rem, 3vw, 2rem);
  border: 1px dashed rgba(61, 90, 128, 0.45);
  pointer-events: none;
}

.wire-frame--pulse {
  animation: wire-frame-glow 4s ease-in-out infinite;
}

@keyframes wire-frame-glow {
  0%,
  100% {
    border-color: rgba(224, 122, 95, 0.35);
    box-shadow: inset 0 0 0 0 rgba(224, 122, 95, 0);
  }
  50% {
    border-color: rgba(224, 122, 95, 0.65);
    box-shadow: inset 0 0 40px rgba(224, 122, 95, 0.08);
  }
}

/* L字コーナー */
.wire-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--wire-bright);
  border-style: solid;
  opacity: 0.85;
  animation: wire-corner-blink 2.2s ease-in-out infinite;
}

.wire-corner--tl {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
  animation-delay: 0s;
}
.wire-corner--tr {
  top: -1px;
  right: -1px;
  border-width: 2px 2px 0 0;
  animation-delay: 0.35s;
}
.wire-corner--bl {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 2px 2px;
  animation-delay: 0.7s;
}
.wire-corner--br {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
  animation-delay: 1.05s;
}

@keyframes wire-corner-blink {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

/* 破線が流れるエッジ */
.wire-dash {
  position: absolute;
  background: repeating-linear-gradient(
    90deg,
    var(--wire-bright) 0 6px,
    transparent 6px 12px
  );
  opacity: 0.5;
  animation: wire-dash-flow 1.2s linear infinite;
}

.wire-dash--h {
  left: 10%;
  right: 10%;
  height: 2px;
}
.wire-dash--top {
  top: 12%;
}
.wire-dash--bottom {
  bottom: 12%;
  animation-direction: reverse;
}

.wire-dash--v {
  top: 15%;
  bottom: 15%;
  width: 2px;
  background: repeating-linear-gradient(
    180deg,
    var(--wire-bright) 0 6px,
    transparent 6px 12px
  );
  animation: wire-dash-flow-v 1.5s linear infinite;
}
.wire-dash--left {
  left: 8%;
}
.wire-dash--right {
  right: 8%;
  animation-direction: reverse;
}

@keyframes wire-dash-flow {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 24px 0;
  }
}

@keyframes wire-dash-flow-v {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 24px;
  }
}

/* セクション1：回転リング */
.wire-frame--rotate-slow {
  border-color: rgba(129, 178, 154, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wire-orbit {
  width: min(55vw, 320px);
  height: min(55vw, 320px);
  color: var(--accent-one);
  animation: wire-orbit-spin 20s linear infinite;
}

.wire-orbit__ring {
  stroke: currentColor;
  stroke-width: 1;
  stroke-dasharray: 8 12;
  animation: wire-ring-dash 3s linear infinite;
}

.wire-orbit__dot {
  animation: wire-dot-pulse 1.5s ease-in-out infinite;
}

@keyframes wire-orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes wire-ring-dash {
  to {
    stroke-dashoffset: -40;
  }
}

@keyframes wire-dot-pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* セクション2：右上がり直線＋ブロック */
.wire-frame--two {
  border-color: rgba(242, 204, 143, 0.4);
}

/* 直線 SVG ＋ その上に正円ポイント（スタック） */
.wire-line-stack {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10%;
  width: 100%;
  height: min(32vh, 220px);
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.wire-line-stack .wire-curve--rise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* 線上：スタート(32,255)・中点(516,134.5)・終点(1000,14) — viewBox 1000×280 と同じ比率 */
.wire-line-points {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* 0×0 の基準点＝線上の座標。ドット中心がその点に来る */
.wire-point {
  position: absolute;
  width: 0;
  height: 0;
}

.wire-point__dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  margin: 0;
  border-radius: 50%;
  background: var(--accent-two);
  box-shadow: 0 0 0 2px var(--bg-deep), 0 0 14px rgba(242, 204, 143, 0.65);
  transform: translate(-50%, -50%);
  animation: wire-point-pulse 2s ease-in-out infinite;
}

.wire-point--mid .wire-point__dot {
  animation-delay: 0.35s;
}

.wire-point--end .wire-point__dot {
  animation-delay: 0.7s;
}

@keyframes wire-point-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 0.88;
  }
}

/* ラベルはドットの上（線の上側） */

/* セクション２：球＋吹き出し（位置はユニット、球は移動中22px・停止時 scale(5)） */
.wire-sphere-unit {
  position: absolute;
  width: 0;
  height: 0;
  left: 3.2%;
  top: 91.07%;
  z-index: 4;
  pointer-events: none;
  transform: translate(-50%, 0);
  transition: left 0.4s cubic-bezier(0.25, 0.85, 0.2, 1),
    top 0.4s cubic-bezier(0.25, 0.85, 0.2, 1),
    transform 0.4s cubic-bezier(0.25, 0.85, 0.2, 1);
}

.wire-sphere-unit--end {
  transform: translate(-100%, 0);
}

/* 上：吹き出し（止まった時のみ表示） */
.wire-sphere-bubble {
  position: absolute;
  left: 50%;
  z-index: 2;
  min-width: 3rem;
  padding: 0.45rem 0.85rem;
  text-align: center;
  border-radius: 10px;
  background: rgba(14, 20, 28, 0.94);
  border: 1px solid var(--accent-two);
  color: var(--accent-two);
  font-weight: 700;
  font-size: clamp(0.78rem, 2.2vw, 0.95rem);
  letter-spacing: 0.06em;
  line-height: 1.2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
  /* 小球のときも、下の球（移動中）と重ならないよう十分上へ */
  top: -132px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, top 0.35s cubic-bezier(0.25, 0.85, 0.2, 1),
    visibility 0.28s;
}

.wire-sphere-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  border: 9px solid transparent;
  border-top-color: var(--accent-two);
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.25));
}

.wire-sphere-bubble--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 非表示時は下の要素に触れないよう */
.wire-sphere-bubble:not(.wire-sphere-bubble--visible) {
  pointer-events: none;
}

/* 吹き出し内リンク（別ウィンドウで詳細） */
.wire-sphere-bubble__link {
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-decoration: none;
}

.wire-sphere-bubble__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wire-sphere-bubble__link:focus-visible {
  outline: 2px solid var(--accent-two);
  outline-offset: 3px;
  border-radius: 4px;
}

/* scale(5) 時は球の上端がかなり上に来るため、吹き出しをさらに上へ */
.wire-sphere-unit--landed .wire-sphere-bubble {
  top: -210px;
}

/* 誤クリックで別窓が開かないよう、球はクリック不可（吹き出しのリンクのみ） */
.wire-sphere {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
  background: radial-gradient(
    circle at 32% 28%,
    #fff4dc,
    #f0c46a 42%,
    #9a6b2d 88%,
    #5c4018 100%
  );
  box-shadow:
    inset 2px 3px 6px rgba(255, 255, 255, 0.45),
    inset -3px -5px 10px rgba(0, 0, 0, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, calc(-50% - 26px)) scale(1);
  transform-origin: center center;
  transition: transform 0.38s cubic-bezier(0.25, 0.85, 0.2, 1);
}

.wire-sphere--landed {
  transform: translate(-50%, calc(-50% - 26px)) scale(5);
}

.wire-sphere-unit--end .wire-sphere {
  transform: translate(-100%, calc(-50% - 26px)) scale(1);
}

.wire-sphere-unit--end .wire-sphere.wire-sphere--landed {
  transform: translate(-100%, calc(-50% - 26px)) scale(5);
}

.wire-sphere.wire-sphere--no-motion {
  transition: none !important;
}

.wire-point__label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, calc(-50% - 14px));
  font-size: clamp(0.62rem, 1.6vw, 0.72rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-two);
  text-shadow: 0 1px 3px var(--bg-deep), 0 0 12px var(--bg-deep);
  white-space: nowrap;
  pointer-events: none;
}

.wire-curve__path {
  stroke: var(--accent-two);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 18 12;
  opacity: 1;
  animation: wire-curve-dash 2.2s linear infinite;
}

@keyframes wire-curve-dash {
  to {
    stroke-dashoffset: -30;
  }
}

.wire-blocks {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.5rem);
  z-index: 1;
}

.wire-block {
  width: clamp(48px, 12vw, 80px);
  height: clamp(80px, 22vw, 140px);
  border: 2px solid var(--accent-two);
  opacity: 0.7;
  animation: wire-block-yoyo 2.8s ease-in-out infinite;
}

.wire-block--a {
  animation-delay: 0s;
}
.wire-block--b {
  animation-delay: 0.35s;
  border-style: dashed;
}
.wire-block--c {
  animation-delay: 0.7s;
}

@keyframes wire-block-yoyo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

/* セクション３：大型フロア（ワイヤー全景・床グリッド） */
.wire-frame--three {
  border-color: rgba(76, 201, 240, 0.45);
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.panel--three .wire-frame--three {
  inset: 0;
}

.wire-factory {
  width: min(210vw, 2800px);
  max-width: none;
  flex-shrink: 0;
  margin-bottom: clamp(-6vh, -4vw, -1rem);
  pointer-events: none;
}

.wire-factory__svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 400;
  color: var(--accent-three);
}

.wire-factory__hall {
  opacity: 0.92;
  animation: wire-factory-hall 3.6s ease-in-out infinite;
}

.wire-factory__chimney {
  opacity: 0.88;
}

.wire-factory__belt {
  animation: wire-factory-dash 2.5s linear infinite;
}

.wire-factory__belt--b {
  animation: wire-factory-dash 3.1s linear infinite reverse;
  animation-delay: -0.4s;
  opacity: 0.85;
}

.wire-factory__belt--c {
  animation: wire-factory-dash 2.2s linear infinite;
  animation-delay: -0.9s;
  opacity: 0.78;
}

.wire-factory__smoke--a {
  animation: wire-factory-dash 2.8s linear infinite;
}

.wire-factory__smoke--b {
  animation: wire-factory-dash 3.4s linear infinite reverse;
  animation-delay: -0.6s;
}

.wire-factory__smoke--c {
  animation: wire-factory-dash 3s linear infinite;
  animation-delay: -1s;
}

@keyframes wire-factory-hall {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@keyframes wire-factory-dash {
  to {
    stroke-dashoffset: -28;
  }
}

/* セクション４：プリズム（二重三角形＋コア） */
.wire-frame--four {
  border-color: rgba(238, 134, 149, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wire-four-scene {
  position: relative;
  width: min(72vw, 380px);
  aspect-ratio: 1;
  max-height: min(72vw, 380px);
}

.wire-four-prism {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--accent-four);
}

.wire-four-prism__face {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12 8;
  vector-effect: non-scaling-stroke;
  animation: wire-four-dash 2.6s linear infinite;
}

.wire-four-prism__face--mid {
  stroke-opacity: 0.72;
  animation-duration: 3.4s;
  animation-direction: reverse;
}

.wire-four-prism__core {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  opacity: 0.55;
  animation: wire-four-core 2.2s ease-in-out infinite;
}

@keyframes wire-four-dash {
  to {
    stroke-dashoffset: -40;
  }
}

@keyframes wire-four-core {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.95;
  }
}

/* フッター：底辺ライン */
.wire-frame--footer {
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: rgba(155, 143, 217, 0.5);
}

.wire-footer-line {
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 18%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-footer),
    transparent
  );
  animation: wire-footer-sweep 3s ease-in-out infinite;
}

@keyframes wire-footer-sweep {
  0%,
  100% {
    transform: scaleX(0.6);
    opacity: 0.4;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* ---------- セクション２：ページ内詳細（backdrop-filter なし） ---------- */
/* [hidden] と display:flex の競合で初期から表示されるのを防ぐ */
.s2-inline-modal[hidden] {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.s2-inline-modal:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.s2-inline-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  padding: clamp(1rem, 4vw, 2rem);
  box-sizing: border-box;
}

/* 開くアニメ中は誤操作防止 */
.s2-inline-modal:not([hidden]):not(.s2-inline-modal--open) {
  pointer-events: none;
}

.s2-inline-modal.s2-inline-modal--open {
  pointer-events: auto;
}

/* 暗幕は薄め — フェードのみ（backdrop-filter なし） */
.s2-inline-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.32s ease;
}

.s2-inline-modal--open .s2-inline-modal__backdrop {
  opacity: 1;
}

.s2-inline-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  max-height: min(88vh, 32rem);
  overflow: auto;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: 14px;
  border: 1px solid rgba(242, 204, 143, 0.55);
  background: #121a24;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  color: var(--text);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: opacity 0.32s ease,
    transform 0.38s cubic-bezier(0.22, 1, 0.32, 1);
  will-change: opacity, transform;
}

.s2-inline-modal--open .s2-inline-modal__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.s2-inline-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.s2-inline-modal__close:hover,
.s2-inline-modal__close:focus-visible {
  background: rgba(242, 204, 143, 0.15);
  color: var(--accent-two);
  outline: none;
}

.s2-inline-modal__title {
  margin: 0 2.5rem 0.75rem 0;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--accent-two);
  letter-spacing: 0.04em;
}

.s2-inline-modal__body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
}

body.s2-inline-modal-open {
  overflow: hidden;
}

/* ---------- Confidential 動画モーダル ---------- */
.confidential-modal[hidden] {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.confidential-modal:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.confidential-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  padding: clamp(1rem, 4vw, 2rem);
  box-sizing: border-box;
}

.confidential-modal:not([hidden]):not(.confidential-modal--open) {
  pointer-events: none;
}

.confidential-modal.confidential-modal--open {
  pointer-events: auto;
}

.confidential-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.32s ease;
}

.confidential-modal--open .confidential-modal__backdrop {
  opacity: 1;
}

.confidential-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 56rem);
  max-height: min(92vh, 48rem);
  overflow: auto;
  padding: clamp(1.1rem, 2.8vw, 1.6rem);
  padding-top: clamp(2.5rem, 5vw, 3rem);
  border-radius: 14px;
  border: 1px solid rgba(155, 143, 217, 0.55);
  background: #121a24;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  color: var(--text);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: opacity 0.32s ease,
    transform 0.38s cubic-bezier(0.22, 1, 0.32, 1);
  will-change: opacity, transform;
}

.confidential-modal--open .confidential-modal__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.confidential-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.confidential-modal__close:hover,
.confidential-modal__close:focus-visible {
  background: rgba(155, 143, 217, 0.18);
  color: var(--accent-footer);
  outline: none;
}

.confidential-modal__label {
  margin: 0 2.5rem 0.2rem 0;
  font-size: clamp(0.72rem, 1.8vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.42em;
  color: var(--text-muted);
}

.confidential-modal__title {
  margin: 0 2.5rem 0.35rem 0;
  font-size: clamp(1.1rem, 2.8vw, 1.4rem);
  font-weight: 600;
  color: var(--accent-footer);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.confidential-modal__note {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.confidential-modal__video-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(61, 90, 128, 0.45);
  background: #0a0e14;
  aspect-ratio: 16 / 9;
}

.confidential-modal__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.confidential-modal-open {
  overflow: hidden;
}

/* アクセシビリティ：動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .section-1-hscroll {
    scroll-behavior: auto;
  }
  .wire-one-c__arrow {
    animation: none !important;
  }
  .s2-inline-modal__backdrop,
  .s2-inline-modal__panel,
  .confidential-modal__backdrop,
  .confidential-modal__panel {
    transition-duration: 0.01ms !important;
  }
  .section-nav__link,
  .section-nav__dot {
    transition-duration: 0.01ms;
  }
  .section-nav__link.is-active .section-nav__dot {
    transform: none;
  }
  .wire-grid,
  .wire-frame--pulse,
  .wire-corner,
  .wire-dash,
  .wire-orbit,
  .wire-orbit__ring,
  .wire-orbit__dot,
  .wire-block,
  .wire-curve__path,
  .wire-point__dot,
  .wire-factory__hall,
  .wire-factory__belt,
  .wire-factory__belt--b,
  .wire-factory__belt--c,
  .wire-factory__smoke,
  .wire-four-prism__face,
  .wire-four-prism__core,
  .wire-footer-line {
    animation: none !important;
  }
  .wire-factory__hall {
    opacity: 0.88;
  }
  .wire-four-prism__core {
    opacity: 0.65;
  }
  .wire-orbit {
    transform: none;
  }
  .wire-point__dot {
    transform: translate(-50%, -50%);
  }
  .wire-sphere,
  .wire-sphere-unit,
  .wire-sphere-bubble {
    transition: none !important;
  }
}
