/* heisei.boo - Deep-Sea MCBling Heisei Archive */
/* Colors: #1a3a4a, #e0f4ff, #ff6b6b, #b8d8e8, #2a7a6a, #7fcdff, #081c2e, #0a3d5c, #4ecdc4 */
/* Fonts: Josefin Sans (display), Nunito Sans (body) */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Nunito Sans', sans-serif;
  background-color: #081c2e;
  color: #e0f4ff;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Sparkle Canvas */
#sparkle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* HUD Overlay */
#hud-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

.sonar-ring {
  position: absolute;
  opacity: 0.3;
}

.sonar-ring-1 {
  width: 180px;
  height: 180px;
  top: 20px;
  right: 20px;
  animation: sonarPulse1 4s ease-out infinite;
}

.sonar-ring-2 {
  width: 140px;
  height: 140px;
  bottom: 40px;
  left: 20px;
  animation: sonarPulse2 4s ease-out infinite 2s;
}

@keyframes sonarPulse1 {
  0% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 0.2; transform: scale(1.05); }
  100% { opacity: 0.4; transform: scale(0.95); }
}

@keyframes sonarPulse2 {
  0% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.15; transform: scale(1.08); }
  100% { opacity: 0.3; transform: scale(1); }
}

/* Depth Gauges */
.depth-gauge {
  position: fixed;
  display: flex;
  gap: 8px;
  z-index: 101;
  pointer-events: none;
}

.depth-gauge-left {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: row;
  height: 60vh;
}

.depth-gauge-right {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: row-reverse;
  height: 60vh;
}

.depth-gauge-track {
  width: 3px;
  height: 100%;
  background: rgba(10, 61, 92, 0.4);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.depth-gauge-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, #4ecdc4, #7fcdff, #ff6b6b);
  border-radius: 2px;
  transition: height 0.3s ease;
}

.depth-gauge-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(184, 216, 232, 0.5);
}

/* Section Panels */
.section-panel {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 60px;
  overflow: hidden;
}

/* Kanji Watermark */
.kanji-watermark {
  position: absolute;
  font-family: 'Josefin Sans', serif;
  font-size: clamp(200px, 35vw, 500px);
  font-weight: 700;
  color: rgba(10, 61, 92, 0.12);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.kanji-small {
  font-size: clamp(120px, 20vw, 300px);
  top: 15%;
  left: 70%;
}

/* Splash Section */
#splash {
  background: radial-gradient(ellipse at 30% 50%, rgba(10, 61, 92, 0.6) 0%, #081c2e 70%);
}

.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.splash-card {
  position: relative;
  text-align: center;
  padding: 60px 80px;
  background: rgba(8, 28, 46, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(78, 205, 196, 0.15);
  border-radius: 2px;
  max-width: 700px;
}

.rhinestone-border {
  position: absolute;
  inset: -2px;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 25%, #7fcdff 50%, #ff6b6b 75%, #4ecdc4 100%) 1;
  pointer-events: none;
  animation: rhinestoneShimmer 3s linear infinite;
}

@keyframes rhinestoneShimmer {
  0% { opacity: 0.5; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.3); }
  100% { opacity: 0.5; filter: brightness(1); }
}

.splash-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e0f4ff;
  margin-bottom: 16px;
  text-shadow: 0 0 40px rgba(78, 205, 196, 0.3);
}

.splash-subtitle {
  font-family: 'Nunito Sans', sans-serif;
  font-size: clamp(14px, 2vw, 20px);
  font-weight: 300;
  color: #b8d8e8;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.splash-period {
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 300;
  color: #4ecdc4;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
}

.splash-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.tagline-line {
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ff6b6b, transparent);
}

.tagline-text {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ff6b6b;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  animation: bobFloat 2s ease-in-out infinite;
}

.scroll-indicator span {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(184, 216, 232, 0.5);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 1px solid #4ecdc4;
  border-bottom: 1px solid #4ecdc4;
  transform: rotate(45deg);
  opacity: 0.6;
}

@keyframes bobFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Magazine Spread Layout */
.spread {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 0;
  position: relative;
  padding: 60px 40px;
  align-items: center;
}

.spread-item {
  padding: 20px;
  z-index: 2;
}

.spread-col-1-2 {
  grid-column: 1 / 3;
}

.spread-col-3-4 {
  grid-column: 3 / 5;
}

.spread-col-1-3 {
  grid-column: 1 / 4;
}

.spread-col-4 {
  grid-column: 4 / 5;
}

.spread-overlay-text {
  position: absolute;
  font-family: 'Josefin Sans', serif;
  font-size: clamp(100px, 18vw, 280px);
  font-weight: 700;
  color: rgba(10, 61, 92, 0.08);
  pointer-events: none;
  user-select: none;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

/* Panel Cards */
.panel-card {
  padding: 40px;
  border-radius: 2px;
  position: relative;
}

.glass-panel {
  background: rgba(10, 61, 92, 0.25);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(78, 205, 196, 0.1);
}

.accent-panel {
  background: rgba(42, 122, 106, 0.15);
  border: 1px solid rgba(78, 205, 196, 0.2);
}

/* Section Headings */
.section-heading {
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e0f4ff;
  margin-bottom: 20px;
}

.section-heading.centered {
  text-align: center;
  margin-bottom: 40px;
}

.body-text {
  font-family: 'Nunito Sans', sans-serif;
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 300;
  color: #b8d8e8;
  line-height: 1.8;
}

.centered-text {
  text-align: center;
}

/* Data Cluster */
.data-cluster {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.data-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.data-value {
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  color: #4ecdc4;
  line-height: 1;
  text-shadow: 0 0 30px rgba(78, 205, 196, 0.4);
}

.data-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(184, 216, 232, 0.6);
  margin-top: 8px;
}

/* Cultural Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1200px;
  width: 100%;
  z-index: 2;
  position: relative;
}

.pillar-card {
  background: rgba(10, 61, 92, 0.2);
  border: 1px solid rgba(78, 205, 196, 0.08);
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease;
  border-radius: 2px;
}

.pillar-card:hover {
  transform: translateY(-8px);
  border-color: rgba(78, 205, 196, 0.3);
  background: rgba(10, 61, 92, 0.35);
}

.pillar-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.pillar-icon svg {
  width: 100%;
  height: 100%;
}

.pillar-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e0f4ff;
  margin-bottom: 12px;
}

.pillar-desc {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: #b8d8e8;
  line-height: 1.7;
}

/* Timeline */
#timeline {
  background: linear-gradient(180deg, #081c2e 0%, rgba(10, 61, 92, 0.3) 50%, #081c2e 100%);
}

.timeline-container {
  position: relative;
  max-width: 800px;
  width: 100%;
  z-index: 2;
  padding: 40px 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, #0a3d5c 10%, #0a3d5c 90%, transparent);
  transform: translateX(-50%);
}

.timeline-entry {
  display: flex;
  align-items: flex-start;
  margin-bottom: 48px;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-entry.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-entry:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  z-index: 3;
}

.marker-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4ecdc4;
  margin: 2px;
  position: relative;
  box-shadow: 0 0 12px rgba(78, 205, 196, 0.6);
}

.marker-pulse::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(78, 205, 196, 0.3);
  animation: markerRipple 2s ease-out infinite;
}

@keyframes markerRipple {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

.timeline-card {
  width: calc(50% - 40px);
  padding: 24px;
}

.timeline-entry:nth-child(odd) .timeline-card {
  margin-right: auto;
}

.timeline-entry:nth-child(even) .timeline-card {
  margin-left: auto;
}

.timeline-year {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #ff6b6b;
  display: block;
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.timeline-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4ecdc4;
  margin-bottom: 8px;
}

.timeline-desc {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: #b8d8e8;
  line-height: 1.7;
}

/* Research Section */
.research-panel {
  padding: 48px;
}

.research-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(10, 61, 92, 0.4);
}

.research-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(184, 216, 232, 0.5);
}

.research-status {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #4ecdc4;
}

.research-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(10, 61, 92, 0.4);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
  color: #7fcdff;
  display: block;
  line-height: 1;
  text-shadow: 0 0 20px rgba(127, 205, 255, 0.3);
}

.stat-label {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: rgba(184, 216, 232, 0.6);
  margin-top: 8px;
  display: block;
}

/* Sonar Panel */
.sonar-panel {
  background: rgba(8, 28, 46, 0.8);
  border: 1px solid rgba(10, 61, 92, 0.4);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sonar-display {
  width: 100%;
  max-width: 280px;
}

.sonar-sweep {
  transform-origin: 150px 150px;
  animation: sonarSweep 4s linear infinite;
}

@keyframes sonarSweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sonar-blip {
  animation: blipPulse 2s ease-in-out infinite;
}

.sonar-blip:nth-child(odd) {
  animation-delay: 0.5s;
}

@keyframes blipPulse {
  0%, 100% { opacity: 0.4; r: 2; }
  50% { opacity: 1; r: 4; }
}

/* Closing Section */
#closing {
  background: radial-gradient(ellipse at 70% 50%, rgba(42, 122, 106, 0.15) 0%, #081c2e 70%);
}

.closing-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 700px;
}

.closing-card {
  padding: 60px;
  text-align: center;
}

.closing-signature {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(78, 205, 196, 0.15);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sig-domain {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #4ecdc4;
  text-shadow: 0 0 30px rgba(78, 205, 196, 0.4);
}

.sig-year {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(184, 216, 232, 0.5);
}

/* Responsive */
@media (max-width: 900px) {
  .spread {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 20px;
  }

  .spread-col-1-2,
  .spread-col-3-4,
  .spread-col-1-3,
  .spread-col-4 {
    grid-column: 1 / -1;
  }

  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-panel {
    padding: 60px 24px;
  }

  .splash-card {
    padding: 40px 32px;
  }

  .timeline-card {
    width: calc(50% - 24px);
  }

  .depth-gauge {
    display: none;
  }

  .sonar-ring-1 {
    width: 120px;
    height: 120px;
  }

  .sonar-ring-2 {
    width: 90px;
    height: 90px;
  }

  .research-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .timeline-entry,
  .timeline-entry:nth-child(even) {
    flex-direction: column;
    align-items: center;
  }

  .timeline-card {
    width: 100%;
  }

  .timeline-entry:nth-child(odd) .timeline-card,
  .timeline-entry:nth-child(even) .timeline-card {
    margin: 24px auto 0;
  }

  .timeline-marker {
    position: relative;
    left: auto;
    transform: none;
  }

  .timeline-line {
    display: none;
  }

  .closing-card {
    padding: 40px 24px;
  }
}

/* Reveal animations */
.section-panel {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-panel.revealed {
  opacity: 1;
  transform: translateY(0);
}

#splash {
  opacity: 1;
  transform: none;
}

#splash.revealed {
  opacity: 1;
  transform: none;
}
