/* ==========================================================================
   Page-specific styles: hero, lore, moderation, login, dashboard
   ========================================================================== */

/* --- Shared page scaffolding --- */
.page { padding-top: var(--sp-8); }
.page-hero {
  padding: var(--sp-7) 0 var(--sp-6);
}
.page-hero h1 { font-size: var(--fs-3xl); margin: var(--sp-3) 0 var(--sp-4); }
.page-hero p { max-width: 620px; color: var(--text-secondary); font-size: var(--fs-md); }

/* ==========================================================================
   HOME / HERO  (mirrors the reference: emblem left, title + copy right)
   ========================================================================== */
.hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: var(--sp-8) 0 var(--sp-7);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) 1.15fr;
  align-items: center;
  gap: clamp(var(--sp-6), 6vw, var(--sp-10));
  width: 100%;
}
.hero__emblem {
  position: relative;
  display: grid;
  place-items: center;
}
.hero__emblem img {
  width: min(100%, 400px);
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.5));
  animation: float 7s var(--ease) infinite alternate;
}
.hero__emblem::after {
  content: "";
  position: absolute;
  width: 70%; height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.18), transparent 70%);
  filter: blur(50px);
  z-index: -1;
}
.hero__title {
  font-size: var(--fs-4xl);
  line-height: 1.02;
  margin: var(--sp-4) 0 var(--sp-5);
}
.hero__lead {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: var(--sp-3);
}
.hero__lead strong { color: var(--text); font-weight: 600; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}
.hero__meta div span {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text);
}
.hero__meta div small {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--text-muted);
}

/* Home feature strip */
.home-section { padding: var(--sp-8) 0; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-5);
}

/* Home CTA banner */
.cta-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-gold);
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(230,57,70,0.16), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg-alt));
  padding: var(--sp-8);
  text-align: center;
}
.cta-banner h2 { font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
.cta-banner p { max-width: 520px; margin: 0 auto var(--sp-5); color: var(--text-secondary); }

/* ==========================================================================
   LORE
   ========================================================================== */
.lore-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  max-width: var(--container-narrow);
}
.lore-section {
  padding: var(--sp-6);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.lore-section h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-3); }
.lore-section p { margin-bottom: var(--sp-3); color: var(--text-secondary); }
.lore-section p:last-child { margin-bottom: 0; }

/* Timeline */
.timeline { position: relative; padding-left: var(--sp-6); margin-top: var(--sp-5); }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--primary), transparent);
}
.timeline__item { position: relative; padding-bottom: var(--sp-5); }
.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--sp-6) + 2px);
  top: 5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.timeline__date {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--gold);
}
.timeline__item h4 { font-size: var(--fs-md); margin: var(--sp-1) 0; }
.timeline__item p { font-size: var(--fs-sm); color: var(--text-secondary); }

/* ==========================================================================
   MODERATION
   ========================================================================== */
.mod-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.mod-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.filter-chip {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.filter-chip:hover { color: var(--text); border-color: var(--border-gold); }
.filter-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ==========================================================================
   LOGIN
   ========================================================================== */
.login-wrap {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: var(--sp-7) 0;
}
.login-card {
  width: 100%;
  max-width: 440px;
  padding: var(--sp-7);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  box-shadow: var(--shadow-lg);
}
.login-card__head { text-align: center; margin-bottom: var(--sp-6); }
.login-card__head img { width: 72px; margin: 0 auto var(--sp-4); }
.login-card__head h1 { font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.login-card__head p { font-size: var(--fs-sm); color: var(--text-muted); }
.login-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.login-hint {
  margin-top: var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-align: center;
}
.login-hint code { color: var(--gold); font-family: var(--font-mono); }

/* ==========================================================================
   DASHBOARD (post-login concept)
   ========================================================================== */
.dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.dash-header h1 { font-size: var(--fs-2xl); }
.dash-header p { color: var(--text-secondary); }
.dash-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: var(--fs-sm);
}
.dash-status .badge__dot { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
}
.module-card { position: relative; display: flex; flex-direction: column; height: 100%; }
.module-card .badge--soon { position: absolute; top: var(--sp-4); right: var(--sp-4); }
.module-card h3 { padding-right: 70px; }
.module-card__footer {
  margin-top: auto;
  padding-top: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}
.concept-note {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-gold);
  background: var(--gold-soft);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}
.concept-note strong { color: var(--gold); }

/* ==========================================================================
   APP PAGES (inside the sidebar shell)
   ========================================================================== */
.app-page__head { margin-bottom: var(--sp-6); }
.app-page__head h1 { font-size: var(--fs-2xl); margin-bottom: var(--sp-2); }
.app-page__head p { color: var(--text-secondary); max-width: 720px; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-5);
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.kv-row:last-child { border-bottom: none; }
.kv-key { color: var(--text-muted); font-size: var(--fs-sm); }
.kv-val { color: var(--text); font-weight: 500; text-align: right; }

.empty-hint {
  padding: var(--sp-6);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  background: var(--surface);
  text-align: center;
}
.empty-hint .msym { color: var(--text-muted); }

/* Disabled button (OAuth not yet configured) */
.btn--disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.3); }

/* Login "or" divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-4) 0 var(--sp-2);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}
.login-divider::before, .login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-form { margin-top: var(--sp-2); }
.login-card > .btn { margin-top: var(--sp-2); }

/* --- Responsive --- */
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; gap: var(--sp-6); }
  .hero__emblem { order: -1; }
  .hero__emblem img { width: min(64%, 280px); }
  .hero__lead, .section-head { margin-inline: auto; }
  .hero__actions, .hero__meta { justify-content: center; }
  .hero__title { font-size: clamp(2.5rem, 10vw, 3.5rem); }
}
@media (max-width: 520px) {
  .login-card { padding: var(--sp-5); }
  .hero__meta { gap: var(--sp-4); }
}
