/* PSYAI LLC — global atmospheric styles
   Ported nearly verbatim from the real React app's src/App.css.
   Loaded AFTER the Tailwind CDN script so these custom classes
   (.glass, .rise, .text-spectral, etc.) are available alongside
   Tailwind's utility classes, exactly as they were in the React build. */

html, body, #root, .App {
  min-height: 100vh;
}

body {
  margin: 0;
  background: transparent;
  color: inherit;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.is-light {
  background: #fafaf7;
  color: #0a0a0a;
  transition: background-color 1200ms cubic-bezier(0.22, 1, 0.36, 1), color 1200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.is-bloomed {
  background:
    radial-gradient(1200px 800px at 30% 20%, rgba(46, 22, 70, 0.55), transparent 60%),
    radial-gradient(900px 700px at 80% 80%, rgba(12, 60, 80, 0.55), transparent 60%),
    radial-gradient(700px 500px at 50% 50%, rgba(10, 70, 50, 0.35), transparent 70%),
    #050407;
  color: #ece6d9;
  transition: background-color 1200ms cubic-bezier(0.22, 1, 0.36, 1), color 1200ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Grain texture overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection { background: #b8ff5a; color: #0a0a0a; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(184,255,90,0.18); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(184,255,90,0.35); }

.font-display { font-family: 'Cormorant Garamond', 'Playfair Display', serif; }
.font-mono-soft { font-family: 'JetBrains Mono', 'Source Code Pro', monospace; letter-spacing: 0.02em; }
.font-sans-soft { font-family: 'Manrope', 'Inter', sans-serif; }

.glass {
  background: rgba(20, 18, 26, 0.42);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(236, 230, 217, 0.10);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.04);
}
.glass-light {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(10, 10, 10, 0.08);
}

@keyframes drift {
  0%, 100% { transform: translate3d(0,0,0) rotate(0deg); }
  50% { transform: translate3d(8px,-6px,0) rotate(0.6deg); }
}
.drift { animation: drift 14s ease-in-out infinite; }

@keyframes drift-rev {
  0%, 100% { transform: translate3d(0,0,0) rotate(0deg); }
  50% { transform: translate3d(-10px,8px,0) rotate(-0.5deg); }
}
.drift-rev { animation: drift-rev 18s ease-in-out infinite; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.rise { animation: rise 1100ms cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.orbit-slow { animation: orbit-spin 120s linear infinite; }
.orbit-mid { animation: orbit-spin 80s linear infinite reverse; }
.orbit-fast { animation: orbit-spin 50s linear infinite; }

.hair-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(236,230,217,0.35), transparent);
}
.is-light .hair-divider {
  background: linear-gradient(90deg, transparent, rgba(10,10,10,0.25), transparent);
}

@keyframes node-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,255,90,0.45); }
  50% { box-shadow: 0 0 0 14px rgba(184,255,90,0); }
}
.node-pulse { animation: node-pulse 3.4s ease-in-out infinite; }

.cursor-dot {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #b8ff5a;
  pointer-events: none;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 90ms ease-out, width 200ms ease, height 200ms ease, background 600ms ease;
  z-index: 100;
}
.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(184,255,90,0.55);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), width 240ms ease, height 240ms ease, border-color 600ms ease;
  z-index: 100;
}
.is-light .cursor-dot { background: #0a0a0a; }
.is-light .cursor-ring { border-color: rgba(10,10,10,0.45); }

.text-spectral {
  background: linear-gradient(120deg, #b8ff5a 0%, #6ee7ff 35%, #c084fc 70%, #b8ff5a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-pill {
  border: 1px solid rgba(236,230,217,0.18);
  background: rgba(20, 18, 26, 0.35);
  backdrop-filter: blur(12px);
}
.is-light .nav-pill {
  border-color: rgba(10,10,10,0.12);
  background: rgba(255,255,255,0.55);
}

.btn-primary {
  background: #b8ff5a;
  color: #0a0a0a;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  border: none;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(184,255,90,0.5); background: #c5ff7a; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-ghost {
  border: 1px solid rgba(236,230,217,0.22);
  color: inherit;
  border-radius: 999px;
  padding: 12px 22px;
  background: transparent;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}
.btn-ghost:hover { border-color: rgba(236,230,217,0.55); background: rgba(236,230,217,0.06); }
.is-light .btn-ghost { border-color: rgba(10,10,10,0.18); }
.is-light .btn-ghost:hover { border-color: rgba(10,10,10,0.45); background: rgba(10,10,10,0.04); }

.field {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(236,230,217,0.16);
  border-radius: 14px;
  padding: 14px 16px;
  color: inherit;
  width: 100%;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease;
  font-family: 'Manrope', sans-serif;
  box-sizing: border-box;
}
.field:focus { border-color: rgba(184,255,90,0.6); background: rgba(255,255,255,0.06); }
.is-light .field { background: rgba(10,10,10,0.03); border-color: rgba(10,10,10,0.12); }
.is-light .field:focus { border-color: rgba(10,10,10,0.5); background: rgba(10,10,10,0.05); }

@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---- Additions for the vanilla port (not in the original App.css) ---- */

/* Deck FFT canvas + track selector wheel need a couple of small helpers
   that Tailwind utilities alone don't cleanly cover. */
.deck-fft-canvas { display: block; width: 100%; height: 100%; }

.track-selector-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 7, 0.72);
  backdrop-filter: blur(6px);
  z-index: 90;
}

.mobile-menu-enter {
  animation: rise 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---- Content panels (Mission/Research/Design/Contact popups) ---- */

body.panel-lock-scroll {
  overflow: hidden;
}

.content-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 68;
  background: rgba(5, 4, 7, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 280ms ease, visibility 280ms ease;
}
.content-panel-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.content-panel {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px);
  background: linear-gradient(180deg, rgba(10, 9, 13, 0.97), rgba(5, 4, 7, 0.99));
  color: #ece6d9;
  transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1), transform 320ms cubic-bezier(0.22, 1, 0.36, 1), visibility 320ms;
}
.content-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.content-panel-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.content-panel-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 71;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 18, 26, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: inherit;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 150ms ease;
}
.content-panel-close:hover { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.08); }
.content-panel-close:active { transform: scale(0.92); }

@media (prefers-reduced-motion: reduce) {
  .content-panel,
  .content-panel-backdrop {
    transition: opacity 1ms linear !important;
    transform: none !important;
  }
}
