/*
 * Dashie Theme — "Inkwell"
 * Warm dark editorial aesthetic with amber accents
 */

/* ─── Custom DaisyUI Theme ─── */
[data-theme="dashie"] {
  color-scheme: dark;

  /* Base — warm charcoal */
  --color-base-100: oklch(17.5% 0.012 55);
  --color-base-200: oklch(14.5% 0.01 55);
  --color-base-300: oklch(23% 0.015 55);
  --color-base-content: oklch(88% 0.02 70);

  /* Primary — warm amber */
  --color-primary: oklch(78% 0.145 70);
  --color-primary-content: oklch(15% 0.01 55);

  /* Secondary — muted copper */
  --color-secondary: oklch(55% 0.06 55);
  --color-secondary-content: oklch(88% 0.02 70);

  /* Accent — sage */
  --color-accent: oklch(70% 0.11 165);
  --color-accent-content: oklch(15% 0.01 55);

  /* Neutral */
  --color-neutral: oklch(22% 0.012 55);
  --color-neutral-content: oklch(75% 0.015 55);

  /* Semantic */
  --color-info: oklch(70% 0.1 240);
  --color-info-content: oklch(95% 0.02 240);
  --color-success: oklch(72% 0.14 150);
  --color-success-content: oklch(15% 0.01 55);
  --color-warning: oklch(78% 0.14 80);
  --color-warning-content: oklch(15% 0.01 55);
  --color-error: oklch(65% 0.19 25);
  --color-error-content: oklch(95% 0.02 25);

  --radius-selector: 0.5rem;
  --radius-field: 0.5rem;
  --radius-box: 0.75rem;
  --size-selector: 0.25rem;
  --size-field: 0.25rem;
  --border: 1px;
  --depth: 1;
  --noise: 0;
}

/* ─── Typography ─── */
body {
  font-family: 'Karla', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Newsreader', 'Georgia', serif;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ─── Body Atmosphere ─── */
body {
  background: oklch(14.5% 0.01 55);
  background-image: radial-gradient(ellipse at 50% -20%, oklch(20% 0.025 60) 0%, transparent 65%);
}

/* ─── Grain Texture ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ─── Navbar ─── */
.navbar {
  border-bottom: 1px solid oklch(25% 0.015 55);
  background: oklch(16% 0.012 55) !important;
  position: relative;
}

.navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    oklch(78% 0.145 70),
    oklch(68% 0.12 50),
    oklch(78% 0.145 70)
  );
}

.navbar .btn-ghost {
  transition: color 0.2s ease, background 0.2s ease;
}

.navbar .menu a {
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0;
  transition: color 0.2s ease;
}

.navbar .menu a:hover {
  color: oklch(78% 0.145 70);
  background: transparent;
}

/* ─── Cards ─── */
.card {
  border: 1px solid oklch(24% 0.015 55);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

a.card:hover,
.card-hover:hover {
  border-color: oklch(32% 0.02 55);
  box-shadow: 0 4px 24px oklch(0% 0 0 / 0.3);
}

/* ─── Inputs ─── */
.input {
  font-family: 'Karla', system-ui, sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus {
  box-shadow: 0 0 0 3px oklch(78% 0.145 70 / 0.12);
  border-color: oklch(78% 0.145 70 / 0.5);
}

/* ─── Buttons ─── */
.btn {
  font-family: 'Karla', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  transition: all 0.15s ease;
}

.btn-primary {
  box-shadow: 0 1px 4px oklch(78% 0.145 70 / 0.2);
}

.btn-primary:hover {
  box-shadow: 0 2px 12px oklch(78% 0.145 70 / 0.25);
}

/* ─── Badges ─── */
.badge {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes subtlePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-in {
  animation: fadeInUp 0.4s ease-out both;
}

/* Stagger children */
.stagger > * { animation: fadeInUp 0.35s ease-out both; }
.stagger > *:nth-child(1) { animation-delay: 0s; }
.stagger > *:nth-child(2) { animation-delay: 0.04s; }
.stagger > *:nth-child(3) { animation-delay: 0.04s; }
.stagger > *:nth-child(4) { animation-delay: 0.08s; }
.stagger > *:nth-child(5) { animation-delay: 0.1s; }
.stagger > *:nth-child(6) { animation-delay: 0.12s; }
.stagger > *:nth-child(7) { animation-delay: 0.14s; }
.stagger > *:nth-child(8) { animation-delay: 0.16s; }
.stagger > *:nth-child(9) { animation-delay: 0.18s; }
.stagger > *:nth-child(10) { animation-delay: 0.2s; }
.stagger > *:nth-child(n+11) { animation-delay: 0.22s; }

/* ─── Drop Zone ─── */
.drop-zone {
  border: 2px dashed oklch(30% 0.015 55);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  position: relative;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: oklch(78% 0.145 70);
  background: oklch(78% 0.145 70 / 0.04);
  box-shadow: inset 0 0 40px oklch(78% 0.145 70 / 0.03);
}

/* ─── Speaker Colors ─── */
.speaker-0 { --speaker-color: oklch(78% 0.145 70); }
.speaker-1 { --speaker-color: oklch(70% 0.11 165); }
.speaker-2 { --speaker-color: oklch(68% 0.15 290); }
.speaker-3 { --speaker-color: oklch(72% 0.14 25); }
.speaker-4 { --speaker-color: oklch(75% 0.13 200); }
.speaker-5 { --speaker-color: oklch(70% 0.14 340); }

.speaker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--speaker-color);
  flex-shrink: 0;
}

.speaker-label {
  color: var(--speaker-color);
  font-weight: 600;
}

.speaker-border {
  border-left: 3px solid var(--speaker-color);
}

/* ─── Transcript View ─── */
.utterance {
  padding: 0.75rem 0 0.75rem 1rem;
  transition: background 0.2s ease;
}

.utterance:hover {
  background: oklch(20% 0.012 55);
  border-radius: 0.5rem;
}

/* ─── Progress Spinner ─── */
.processing-glow {
  box-shadow: 0 0 60px oklch(78% 0.145 70 / 0.08);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: oklch(30% 0.015 55);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: oklch(40% 0.02 55);
}

/* ─── Selection ─── */
::selection {
  background: oklch(78% 0.145 70 / 0.25);
}

/* ─── Misc ─── */
.divider-amber {
  width: 2rem;
  height: 2px;
  background: oklch(78% 0.145 70);
  border-radius: 1px;
}

.text-muted {
  color: oklch(60% 0.015 55);
}
