/* ===================================
   ICHIGU Terrace — Additional Styles
   ギミック・エフェクト補完
   =================================== */

/* カーソルカスタム */
body { cursor: none; }

.cursor-dot {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--red, #D32F2F);
  border-radius: 0;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 2px solid var(--black, #111);
  border-radius: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.2s, height 0.2s;
}
.cursor-ring.hover {
  width: 56px; height: 56px;
  background: rgba(253,216,53,0.3);
  border-color: var(--yellow, #FDD835);
}
.cursor-dot.click { transform: translate(-50%, -50%) scale(2); }

/* タイピングテキスト */
.typing-cursor {
  display: inline-block;
  width: 3px;
  background: var(--red, #D32F2F);
  animation: blink 0.7s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}
@keyframes blink { 50%{opacity:0} }

/* スムーズホバーライン */
.hover-underline {
  position: relative;
  display: inline-block;
}
.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 3px;
  background: var(--red, #D32F2F);
  transition: width 0.3s ease;
}
.hover-underline:hover::after { width: 100%; }

/* グリッチテキスト */
@keyframes glitch1 {
  0%,100%{clip-path:inset(0 0 95% 0);transform:translate(-3px,0)}
  20%{clip-path:inset(20% 0 60% 0);transform:translate(3px,0)}
  40%{clip-path:inset(50% 0 30% 0);transform:translate(-3px,0)}
  60%{clip-path:inset(75% 0 5% 0);transform:translate(3px,0)}
  80%{clip-path:inset(90% 0 0 0);transform:translate(-3px,0)}
}
@keyframes glitch2 {
  0%,100%{clip-path:inset(90% 0 0 0);transform:translate(3px,0)}
  20%{clip-path:inset(60% 0 20% 0);transform:translate(-3px,0)}
  40%{clip-path:inset(30% 0 50% 0);transform:translate(3px,0)}
  60%{clip-path:inset(5% 0 75% 0);transform:translate(-3px,0)}
  80%{clip-path:inset(0 0 95% 0);transform:translate(-3px,0)}
}
.glitch {
  position: relative;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  font: inherit;
}
.glitch::before {
  color: var(--red, #D32F2F);
  animation: glitch1 3s infinite linear;
}
.glitch::after {
  color: var(--blue, #1565C0);
  animation: glitch2 3s infinite linear;
}

/* カウントアップアニメーション */
.counting { transition: color 0.1s; }

/* モンドリアンリップル */
@keyframes mondriRipple {
  0% { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}
.mondri-ripple {
  position: absolute;
  width: 60px; height: 60px;
  background: var(--yellow, #FDD835);
  pointer-events: none;
  animation: mondriRipple 0.8s ease-out forwards;
  z-index: 10;
  transform-origin: center;
}

/* ===== NOISE OVERLAY ===== */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ===== MARQUEE ===== */
.marquee-wrapper {
  overflow: hidden;
  background: var(--yellow, #FDD835);
  border-top: 3px solid #111;
  border-bottom: 3px solid #111;
  padding: 12px 0;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  animation: marqueeScroll 20s linear infinite;
}
.marquee-track span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--black, #111);
  padding: 0 32px;
}
.marquee-track span.dot {
  color: var(--red, #D32F2F);
  padding: 0 8px;
  font-size: 1rem;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== スクロール進捗バー ===== */
#progressBar {
  position: fixed;
  top: 64px; left: 0;
  height: 4px;
  background: var(--red, #D32F2F);
  z-index: 1001;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--red, #D32F2F);
}

/* ===== HOVER TILT ===== */
.tilt-card { transform-style: preserve-3d; }

/* ===== スマホ用カーソル非表示 ===== */
@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}
