/* ═══════════════════════════════════════════════════════════════
   FREQ — Landing Page Styles
   Black stage, album cover flip synced to 3D rotation
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ──────────────────────────── */
:root {
  --bg-black: #000000;
  --bone: #e8e0d0;
  --text-dark: #333333;
  --text-muted: #666666;
  --loader-track: #333333;
  --loader-accent: #e8e0d0;
  --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --album-size: min(65vh, 65vw);
  --album-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                  0 8px 20px rgba(0, 0, 0, 0.4);
}

/* ─── Reset & Base ───────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-black);
  font-family: var(--font-system);
  overscroll-behavior: none;
  touch-action: none;
}

/* ─── Album Cover Container ────────────────────
   Two faces: bone back + fractal front.
   JS toggles .show-art class on rotation.
   ─────────────────────────────────────────────── */
.album-cover {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: var(--album-size);
  height: var(--album-size);
  z-index: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--album-shadow);
  opacity: 0;
  animation: albumFadeIn 0.8s ease 0.3s forwards;
}

/* Face A — Solid gray with noise texture */
.album-face-bone {
  position: absolute;
  inset: 0;
  background-color: #5A5A5A;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  transition: opacity 1.4s ease-in-out;
  opacity: 1;
}

/* Face B — Photo artwork image */
.album-face-art {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}



.album-face-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* When .show-art is active, crossfade */
.album-cover.show-art .album-face-bone {
  opacity: 0;
}

.album-cover.show-art .album-face-art {
  opacity: 1;
}

/* ─── 3D Canvas — Transparent, over album cover ── */
#viewer-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
}

/* ─── Loading Overlay ────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-black);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--loader-track);
  border-top-color: var(--loader-accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}



/* ─── Animations ─────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes albumFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ─── Glass Text ────────────────────────────── */
.glass-text-container {
  position: absolute;
  bottom: 8px;
  left: 16px;
  z-index: 10;
  pointer-events: none; /* so it doesn't block interactions */
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.glass-text {
  font-family: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;

  /* Make text look like blended round glass */
  color: rgba(255, 255, 255, 0.25); 
  mix-blend-mode: overlay; /* blends with the image underneath beautifully */
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.4); 
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5)) drop-shadow(0 1px 3px rgba(255, 255, 255, 0.6));
}

.glass-subtext {
  font-family: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;

  color: rgba(255, 255, 255, 0.25); 
  mix-blend-mode: overlay;
  -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.4); 
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)) drop-shadow(0 1px 2px rgba(255, 255, 255, 0.6));
}
