/* ═══════════════════════════════════════════════════════════════
   SUBMARINE DIAL TIMELINE — Horizontal Rotary Navigation
   ═══════════════════════════════════════════════════════════════ */

#starfield-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.sub-dial-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 2rem 1rem;
}
.sub-dial-hero h1 {
  font-family: var(--font-hud, 'Rajdhani', system-ui);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--hud-cyan, #22d3ee);
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
  margin: 0;
}
.sub-dial-hero p {
  color: var(--text-secondary, #b8b4aa);
  font-size: 0.9rem;
  margin: 0.3rem 0 0;
}

/* Filter Bar */
.sub-dial-filters {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 1rem 1rem 0.5rem;
  flex-wrap: wrap;
}
.sub-dial-filter-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary, #b8b4aa);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.sub-dial-filter-btn:hover { background: rgba(255,255,255,0.08); }
.sub-dial-filter-btn.active {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--hud-cyan, #22d3ee);
}

/* Dial Container */
.sub-dial-container {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2rem 0 3rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(34,211,238,0.3) transparent;
}
.sub-dial-container::-webkit-scrollbar { height: 4px; }
.sub-dial-container::-webkit-scrollbar-track { background: transparent; }
.sub-dial-container::-webkit-scrollbar-thumb { background: rgba(34,211,238,0.3); border-radius: 2px; }

/* Track */
.sub-dial-track {
  display: flex;
  gap: 0;
  padding: 0 calc(50vw - 160px);
  min-height: 320px;
  align-items: center;
}

/* Reticle — fixed center indicator */
.sub-dial-reticle {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 340px;
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
}
.sub-dial-reticle::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.3), transparent);
}
.sub-dial-reticle::after {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.3), transparent);
}

/* Event Cards */
.sub-dial-card {
  flex-shrink: 0;
  width: 300px;
  scroll-snap-align: center;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 0 8px;
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.sub-dial-card:hover {
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.1);
  transform: scale(1.02);
}
.sub-dial-card.active {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.15), inset 0 1px 0 rgba(255,255,255,0.05);
}
.sub-dial-card.narrating {
  border-color: var(--accent, #b91c1c);
  box-shadow: 0 0 30px rgba(185, 28, 28, 0.2);
  animation: pulse-border 2s ease-in-out infinite;
}
@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 20px rgba(185, 28, 28, 0.15); }
  50% { box-shadow: 0 0 35px rgba(185, 28, 28, 0.3); }
}

.sub-dial-card-year {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 0.7rem;
  color: var(--hud-cyan, #22d3ee);
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 0.3rem;
}
.sub-dial-card-cat {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.sub-dial-card-title {
  font-family: var(--font-headline, 'Space Grotesk', system-ui);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #e8e4dc);
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.sub-dial-card-desc {
  font-size: 0.78rem;
  color: var(--text-tertiary, #7a776e);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sub-dial-card-link {
  font-size: 0.7rem;
  color: var(--hud-cyan, #22d3ee);
  margin-top: 0.5rem;
  display: block;
}

/* Tick marks along bottom */
.sub-dial-ticks {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 0 2rem;
  overflow: hidden;
}
.sub-dial-tick {
  width: 2px;
  height: 12px;
  background: rgba(34, 211, 238, 0.2);
  flex-shrink: 0;
}
.sub-dial-tick.decade {
  height: 20px;
  background: rgba(34, 211, 238, 0.5);
}

/* Counter */
.sub-dial-counter {
  text-align: center;
  padding: 1rem;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 0.75rem;
  color: var(--text-tertiary, #7a776e);
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .sub-dial-card { width: 260px; padding: 1.2rem; }
  .sub-dial-track { padding: 0 calc(50vw - 140px); }
  .sub-dial-reticle { width: 280px; height: 280px; }
  .sub-dial-hero h1 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .sub-dial-card { width: 240px; padding: 1rem; }
  .sub-dial-track { padding: 0 calc(50vw - 130px); }
  .sub-dial-reticle { display: none; }
}
