/* ============================================================
   GLOBAL / BASE STYLES
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Caveat:wght@400;600;700&family=Indie+Flower&family=Patrick+Hand&family=Shadows+Into+Light&family=Permanent+Marker&family=Sometype+Mono:wght@400;700&family=Fredoka+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;300;700&display=swap');

:root {
  --bg-color: #fffbe8; /* Restored pure black background */
  --text-color: #000000;
  --accent-color: #ff0055;
  --card-bg: rgba(255, 207, 233, 0.424);
  --card-border: rgba(255, 255, 255, 0.673);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family:'Inter', sans-serif;
  line-height: 1.6;
}

.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Header */
.home-header {
  margin-bottom: 40px;
}

.home-header-title {
  font-size: 2.5rem;
  font-family: monospace;
  font-weight: 700;
  margin-bottom: 8px;
}

.home-header p {
  opacity: 0.7;
  font-family: monospace;
}

/* ============================================================
   BUBBLE COMPONENT (Base, Hover & Responsive Pinned Variant)
   ============================================================ */
.bubbles-container {
  display: flex-wrap;
  gap: 16px;
}

/* Pinned to top-right corner with auto-wrapping */
.bubbles-container.bubbles-pinned-top-right {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: calc(100vw - 40px); /* Prevents overflow off screen */
  display: flex;
  flex-direction: row;
  flex-wrap: wrap; /* Wraps bubbles to new rows when space runs out */
  justify-content: flex-end;
  gap: 12px;
  z-index: 1000;
}

.sphere-link {
  display: inline-block;
  text-decoration: none;
  border-radius: 50%;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Smooth cubic-bezier transition */
}

/* Smooth cubic spring-hover effect */
.sphere-link:hover {
  transform: scale(1.12);
}

.sphere-wrapper {
  transform: translate(var(--float-x, 0), var(--float-y, 0));
  animation: floatAnimation var(--float-duration, 6s) ease-in-out infinite alternate;
}

@keyframes floatAnimation {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(var(--float-x, 10px), var(--float-y, 10px));
  }
}

.bubble-text {
  fill: #ffffff;
  font-family: monospace;
  font-weight: bold;
  pointer-events: none;
}

.drag-layer {
  display: inline-block;
  position: relative;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.drag-layer.dragging { cursor: grabbing; }
.sphere-link { -webkit-user-drag: none; }
/* ============================================================
   CONTENT GRID (2 Columns: Updates/Progress Left, Videos Right)
   ============================================================ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
  
}

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

/* Left Column: Updates */
.updates-column h2 {
  font-family: monospace;
  margin-bottom: 16px;
}

.update-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.update-date {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-bottom: 4px;
}

.update-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.update-card p {
  font-size: 0.9rem;
  opacity: 0.85;
}

.updates-archive-link {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.updates-archive-link:hover {
  text-decoration: underline;
}

/* Right Column: Videos */
.videos-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.video-thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--card-border);
  background: #000;
  aspect-ratio: 16 / 9; /* Sets widescreen container proportions */
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Zooms in slightly to slice off the built-in letterbox bars */
  display: block;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.video-thumb:hover img {
  opacity: 1;
}

.video-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: monospace;
}

/* ============================================================
   VOICEBOX PAGE SCOPED STYLES (.voicebox-page)
   ============================================================ */
.voicebox-page .updates-column .status-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

h2 {
  font: monospace; 
  font-size: 1.15rem;
}
.voicebox-page .updates-column .status-box h2 {
  margin: 0 0 12px 0;
  font-size: 1.15rem;
}

.voicebox-page .progress-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voicebox-page .progress-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
}

.voicebox-page .progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.voicebox-page .progress-track {
  width: 100%;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
}

.voicebox-page .progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease-in-out;
}

.voicebox-page .progress-status-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  opacity: 0.75;
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-section h2 {
  font-family: monospace;
  margin-bottom: 16px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.gallery-tile {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--card-border);
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-tile:hover img {
  transform: scale(1.04);
}

.gallery-tile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.gallery-tile:hover .gallery-tile-overlay {
  opacity: 1;
}

.gallery-tile-overlay span {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 0 8px;
}

/* ============================================================
   MODALS (Video & Image Lightbox)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  position: relative;
  max-width: 900px;
  width: 100%;
}

.video-modal-content {
  aspect-ratio: 16/9;
}

.video-modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 85vh;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center; /* centers a partly filled last row; use flex-start to left-align */
  margin: 2rem 0;
}

.artwork {
  margin: 0;
  /* 3 per row: (100% minus two 24px gaps) / 3 */
  flex: 0 0 calc((100% - 48px) / 3);
}

.artwork img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain; /* shows the whole piece; "cover" fills the box but crops */
}

.artwork-title {
  margin: 0.6rem 0 0.2rem;
  font-weight: bold;
}

.artwork-text {
  margin: 0;
  font-size: 0.9em;
}

/* Tablet: 2 per row */
@media (max-width: 900px) {
  .artwork { flex-basis: calc((100% - 24px) / 2); }
}

/* Phone: 1 per row */
@media (max-width: 560px) {
  .artwork { flex-basis: 100%; }
}