/* renai.studio — Emotional Data Dashboard */
/* Colors:
  Charcoal Slate: #1E293B
  Steel Gray: #94A3B8
  Ash Gray: #CBD5E1
  Mist White: #F8FAFC
  Slate Violet: #6B7280
  Bright Amber: #F59E0B
  Pale Gold: #FDE68A
*/

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1E293B;
}

body {
  font-family: 'Space Mono', monospace;
  color: #F8FAFC;
}

/* ================================================
   DASHBOARD GRID
   ================================================ */
.dashboard {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, calc(100vh / 8));
  gap: 2px;
  background: #1E293B;
  height: 100vh;
  overflow: hidden;
}

/* ================================================
   BASE PANEL
   ================================================ */
.panel {
  background: #CBD5E1;
  overflow: hidden;
  position: relative;
}

/* ================================================
   SIGNAL PANEL — col 1-4, row 1-3
   ================================================ */
.panel-signal {
  grid-column: 1 / 5;
  grid-row: 1 / 4;
  background: #1E293B;
  border: 1px solid #6B7280;
}

.signal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  display: block;
}

.signal-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F59E0B;
  z-index: 10;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

.signal-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #94A3B8;
  text-transform: uppercase;
  z-index: 10;
}

/* ================================================
   DUOTONE PANEL SYSTEM
   ================================================ */
.duotone-panel {
  position: relative;
  overflow: hidden;
}

.duotone-panel .panel-img {
  filter: grayscale(100%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.duotone-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #FDE68A;
  mix-blend-mode: multiply;
  z-index: 1;
  pointer-events: none;
}

.duotone-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #6B7280;
  mix-blend-mode: screen;
  z-index: 2;
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* ================================================
   DATA HEADER — col 5-10, row 1-2
   ================================================ */
.panel-header {
  grid-column: 5 / 11;
  grid-row: 1 / 3;
  background: #1E293B;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 20px 14px;
  position: relative;
}

.grid-rule {
  position: absolute;
  bottom: 56px;
  left: 0;
  right: 0;
  height: 1px;
  background: #94A3B8;
  opacity: 0.3;
}

.studio-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 72px;
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: #F8FAFC;
  margin-bottom: 10px;
}

.metric-readouts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mono-readout {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: #94A3B8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ================================================
   OVERFLOW LABEL — col 11-12, row 1 (6px bleed)
   ================================================ */
.panel-overflow {
  grid-column: 11 / 13;
  grid-row: 1 / 2;
  background: #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.overflow-text {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #1E293B;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  position: relative;
  right: -6px; /* intentional 6px overflow */
}

/* ================================================
   METRICS STRIP — col 5-12, row 3
   ================================================ */
.panel-metrics {
  grid-column: 5 / 13;
  grid-row: 3 / 4;
  background: #1E293B;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 0;
}

.metric-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 12px;
  border-right: 1px solid #94A3B830;
}

.metric-cell:last-child {
  border-right: none;
}

.metric-label {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: #94A3B8;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.metric-value {
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 6px;
  line-height: 1;
}

.metric-bar-bg {
  width: 100%;
  height: 3px;
  background: #94A3B840;
  border-radius: 0;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  width: 0%;
  background: #F59E0B;
  transition: width 0s;
}

/* animated state — applied by JS */
.metric-bar-fill.animate {
  transition: width 1.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ================================================
   WORK GRID — col 1-8, row 4-7
   ================================================ */
.panel-work {
  grid-column: 1 / 9;
  grid-row: 4 / 8;
  background: #1E293B;
  padding: 2px;
}

.work-grid-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  width: 100%;
  height: 100%;
}

.work-thumb {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.work-thumb .panel-img {
  transition: filter 0.4s ease;
}

.work-thumb::before {
  transition: opacity 0.4s ease;
}

.work-thumb::after {
  transition: opacity 0.4s ease;
}

.work-thumb:hover .panel-img {
  filter: grayscale(0%);
}

.work-thumb:hover::before,
.work-thumb:hover::after {
  opacity: 0;
}

.work-thumb-crooked .panel-img {
  transform: rotate(-0.8deg) scale(1.02);
}

.work-caption {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  color: #F8FAFC;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 10;
  opacity: 0.7;
}

/* ================================================
   MANIFESTO PANEL — col 9-12, row 4-6
   ================================================ */
.panel-manifesto {
  grid-column: 9 / 13;
  grid-row: 4 / 7;
  background: #CBD5E1;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed #94A3B8; /* only dashed panel — anti-design */
}

.panel-title {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6B7280;
  margin-bottom: 8px;
}

.mono-small {
  font-size: 9px;
  letter-spacing: 0.15em;
}

.manifesto-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manifesto-line {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: #1E293B;
}

.manifesto-line:nth-child(1) { transform: translateX(0px); }
.manifesto-line:nth-child(2) { transform: translateX(4px); }
.manifesto-line:nth-child(3) { transform: translateX(-2px); }
.manifesto-line:nth-child(4) { transform: translateX(6px); }
.manifesto-line:nth-child(5) { transform: translateX(-4px); }

/* ================================================
   PARTICLE CANVAS — col 9-12, row 7
   ================================================ */
.panel-particles {
  grid-column: 9 / 13;
  grid-row: 7 / 8;
  background: #1E293B;
  padding: 8px 12px;
}

.panel-particles .panel-title {
  color: #94A3B8;
}

/* Particle elements */
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(248, 250, 252, 0.6);
  border-radius: 50%;
  animation: morph var(--duration, 4s) ease-in-out infinite alternate,
             drift var(--drift-duration, 6s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}

@keyframes morph {
  0% { border-radius: 50%; }
  50% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  100% { border-radius: 50% 20% 50% 80% / 60% 50% 40% 50%; }
}

@keyframes drift {
  0% { transform: translate(0px, 0px); }
  33% { transform: translate(var(--dx, 8px), var(--dy, -6px)); }
  66% { transform: translate(var(--dx2, -5px), var(--dy2, 10px)); }
  100% { transform: translate(var(--dx3, 4px), var(--dy3, -4px)); }
}

/* ================================================
   STATUS BAR — col 1-12, row 8
   ================================================ */
.panel-status {
  grid-column: 1 / 13;
  grid-row: 8 / 9;
  background: #1E293B;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-top: 1px solid #94A3B830;
}

.status-items {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.status-item {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #94A3B8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-error {
  color: #F59E0B;
  text-decoration: underline wavy #F59E0B;
  text-underline-offset: 3px;
}

/* ================================================
   PULL QUOTE OVERLAY (Libre Baskerville)
   Used on duotone images
   ================================================ */
.pull-quote {
  position: absolute;
  font-family: 'Libre Baskerville', serif;
  font-size: 48px;
  font-style: italic;
  color: rgba(248, 250, 252, 0.7);
  z-index: 5;
  pointer-events: none;
  line-height: 1;
}

.pull-quote-signal {
  bottom: 30%;
  left: 14%;
}
