/* ─────────────────────────────────────────────
   Chronicler — Coming Soon
   Colors pulled from the actual app's dark-mode theme (tailwind.css)
   ───────────────────────────────────────────── */

:root {
  /* Exact oklch values from the app dark theme */
  --background:       oklch(0.145 0 0);
  --foreground:       oklch(0.985 0 0);
  --card:             oklch(0.205 0 0);
  --card-foreground:  oklch(0.985 0 0);
  --primary:          oklch(0.606 0.25 292.717);
  --primary-accent:   oklch(0.72 0.18 293);
  --primary-foreground: oklch(0.969 0.016 293.756);
  --muted:            oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --border:           oklch(1 0 0 / 10%);
  --input:            oklch(1 0 0 / 15%);
  --ring:             oklch(0.55 0.15 295);
  --destructive:      oklch(0.704 0.191 22.216);

  --radius: 0.625rem;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* ── Background gallery ───────────────────── */

.bg-gallery {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  will-change: opacity;
  transform: scale(1.04);
  animation: ken-burns 20s ease-in-out infinite alternate;
}

.bg-slide.active {
  opacity: 1;
}

@keyframes ken-burns {
  from { transform: scale(1.04); }
  to   { transform: scale(1.12); }
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 30%, oklch(0.4 0.15 293 / 20%) 0%, transparent 60%),
    linear-gradient(180deg,
      oklch(0.145 0 0 / 55%) 0%,
      oklch(0.145 0 0 / 80%) 40%,
      oklch(0.145 0 0 / 92%) 100%
    );
  pointer-events: none;
}

/* ── Particles ────────────────────────────── */

.particles {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--primary-accent);
  opacity: 0;
  animation: float-up linear forwards;
  will-change: transform, opacity;
}

@keyframes float-up {
  0%   { opacity: 0; transform: translateY(0) translateX(0) scale(1); }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.15; }
  100% { opacity: 0; transform: translateY(-100vh) translateX(var(--drift)) scale(0.3); }
}

/* ── Content ──────────────────────────────── */

.content {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

/* ── Card ─────────────────────────────────── */

.card {
  max-width: 580px;
  width: 100%;
  padding: 3rem 2.5rem;
  border-radius: 0.75rem;
  background: oklch(0.17 0 0 / 65%);
  border: 1px solid var(--border);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 0 80px -20px oklch(0.5 0.15 293 / 15%),
    0 30px 60px -15px oklch(0 0 0 / 50%);
  text-align: center;

  animation: card-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Logo (BookOpen icon + text, matching login screen) ── */

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.logo-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: oklch(0.606 0.25 292.717 / 10%);
}

.logo-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.logo-text {
  font-family: 'Roboto Slab', serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--foreground);
}

/* ── Typography ───────────────────────────── */

.headline {
  font-family: 'Roboto Slab', serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--foreground) 30%, var(--primary-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.tagline {
  color: var(--muted-foreground);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2.25rem;
}

/* ── Section labels ───────────────────────── */

.section-label {
  font-size: 0.75rem;
  color: oklch(0.5 0 0);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ── Resources grid (entity types) ────────── */

.resources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem 1rem;
  margin-bottom: 2.25rem;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-weight: 500;
  transition: color 0.3s, transform 0.3s;
}

.feature:hover {
  transform: translateY(-2px);
}

/* Rounded icon box — rounded-xl matches app */
.feature-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  transition: filter 0.3s, transform 0.3s;
}

.feature:hover .feature-icon-box {
  filter: brightness(1.2);
  transform: scale(1.05);
}

.feature-icon {
  width: 1.35rem;
  height: 1.35rem;
  transition: filter 0.3s;
}

/* ── Per-resource colours (matching resources.ts) ── */

/* Location — blue-500/20 + blue-400 */
.color-blue     { background: rgba(59, 130, 246, 0.2);  color: rgb(96, 165, 250); }
/* Figure — violet-500/20 + violet-400 */
.color-violet   { background: rgba(139, 92, 246, 0.2);  color: rgb(167, 139, 250); }
/* Faction — amber-500/20 + amber-400 */
.color-amber    { background: rgba(245, 158, 11, 0.2);  color: rgb(251, 191, 36); }
/* Item — emerald-500/20 + emerald-400 */
.color-emerald  { background: rgba(16, 185, 129, 0.2);  color: rgb(52, 211, 153); }
/* Bestiary — rose-500/20 + rose-400 */
.color-rose     { background: rgba(244, 63, 94, 0.2);   color: rgb(251, 113, 133); }
/* Timelines — sky-500/20 + sky-400 */
.color-sky      { background: rgba(14, 165, 233, 0.2);  color: rgb(56, 189, 248); }
/* Relationships — cyan-500/20 + cyan-400 */
.color-cyan     { background: rgba(6, 182, 212, 0.2);   color: rgb(34, 211, 238); }
/* Lore — orange-500/20 + orange-400 */
.color-orange   { background: rgba(249, 115, 22, 0.2);  color: rgb(251, 146, 60); }
/* Maps — teal-500/20 + teal-400 */
.color-teal     { background: rgba(20, 184, 166, 0.2);  color: rgb(45, 212, 191); }

/* ── Divider ──────────────────────────────── */

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), var(--ring), var(--border), transparent);
  margin-bottom: 2rem;
}

/* ── Wide layout: resources + tools side-by-side ── */

.card-body {
  display: flex;
  flex-direction: column;
}

@media (min-width: 800px) {
  .card {
    max-width: 780px;
    padding: 3rem;
  }

  .card-body {
    flex-direction: row;
    gap: 2.5rem;
    text-align: left;
  }

  .card-body-left {
    flex: 1;
  }

  .card-body-right {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .card-body-right .section-label {
    margin-top: 0;
  }

  .divider {
    display: none;
  }
}

/* ── App features (lower section) ─────────── */

.app-features {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  text-align: left;
}

.app-feature {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  background: oklch(1 0 0 / 3%);
  border: 1px solid oklch(1 0 0 / 5%);
  transition: background 0.3s, border-color 0.3s;
}

.app-feature:hover {
  background: oklch(1 0 0 / 6%);
  border-color: var(--border);
}

.app-feature-icon {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--primary);
  flex-shrink: 0;
}

.app-feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.app-feature-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--foreground);
}

.app-feature-desc {
  font-size: 0.72rem;
  color: var(--muted-foreground);
}

/* ── Footer ───────────────────────────────── */

.footer {
  margin-top: 2.5rem;
  opacity: 0;
  animation: fade-in 1s 1.2s ease both;
}

.footer p {
  font-size: 0.75rem;
  color: oklch(0.4 0 0);
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Mobile ───────────────────────────────── */

@media (max-width: 600px) {
  .card {
    padding: 2rem 1.5rem;
  }

  .headline {
    font-size: 2rem;
  }

  .tagline br {
    display: none;
  }

  .resources {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .logo-icon-box {
    width: 2.5rem;
    height: 2.5rem;
  }

  .logo-text {
    font-size: 1.15rem;
  }

  .feature-icon-box {
    width: 2.75rem;
    height: 2.75rem;
  }
}
