/*
 * Loaded only on /articles/* (article lite layout).
 * Mirrors guides.css cosmic glass theme.
 */

body.ecliptica-article-lite {
  font-family: "DM Sans", sans-serif;
  background: #050818;
  color: #e8e6f0;
}

.article-page {
  --article-p: #5ef0d8;
  --article-s: #7fb4ff;
  --article-t: #a378ff;
  --article-txt: #edeaf8;
  --article-txt-sec: #9590b8;
  --article-deep: #050818;
  --article-glass-fill: rgba(255, 255, 255, 0.045);
  --article-glass-border: rgba(255, 255, 255, 0.09);
  isolation: isolate;
  position: relative;
  min-height: 100vh;
}

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

.article-page__nebula {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 72% 58% at 28% 38%, rgba(94, 240, 216, 0.18) 0%, transparent 62%),
    radial-gradient(ellipse 50% 42% at 88% 22%, rgba(94, 240, 216, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 55% 48% at 60% 78%, rgba(127, 180, 255, 0.07) 0%, transparent 52%);
  animation: article-nebula-drift 10s ease-in-out infinite alternate;
}

.article-page__cosmic .article-page__ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 70% at 50% -15%, rgba(94, 240, 216, 0.2) 0%, transparent 52%),
    radial-gradient(ellipse 85% 50% at 8% 92%, rgba(94, 240, 216, 0.1) 0%, transparent 46%),
    radial-gradient(ellipse 70% 45% at 100% 105%, rgba(127, 180, 255, 0.08) 0%, transparent 44%);
}

/* Star dots use global .star / @keyframes twinkle from application.css (article-lite loads both). */
.article-page__starfield {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.article-page__scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 75% 65% at 50% 45%,
    rgba(5, 8, 24, 0) 0%,
    rgba(5, 8, 24, 0.22) 70%,
    rgba(5, 8, 24, 0.38) 100%
  );
}

.article-sheet {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px 100px;
  position: relative;
  z-index: 1;
}

.article-sheet__panel {
  background: var(--article-glass-fill);
  border: 1px solid var(--article-glass-border);
  border-radius: 20px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  margin-bottom: 20px;
}

.article-sheet__panel--masthead {
  padding: 28px 26px;
  margin-top: 20px;
  border-color: rgba(94, 240, 216, 0.14);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(94, 240, 216, 0.08);
}

.article-sheet__panel--article {
  padding: 28px 26px 32px;
}

.article-sheet__panel--reactions {
  padding: 22px 26px;
  border-color: rgba(163, 120, 255, 0.14);
}

.article-sheet__panel--empty {
  padding: 28px 26px;
  color: var(--article-txt-sec);
}

.article-sheet__eyebrow-brand {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--article-txt-sec);
}

.article-sheet__crumb-link {
  color: var(--article-p);
  text-decoration: none;
}

.article-sheet__crumb-link:hover {
  text-decoration: underline;
}

.article-sheet__title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 12px 0 8px;
  color: var(--article-txt);
}

.article-sheet__lede,
.article-sheet__meta {
  color: var(--article-txt-sec);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.article-hero {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  height: clamp(200px, 32vw, 320px);
  overflow: hidden;
  border-radius: 0 0 24px 24px;
}

.article-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 8, 24, 0.85) 100%);
}

.article-hero--default {
  background: #08101f;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(127, 180, 255, 0.22);
}

.article-hero--default .article-default-banner {
  border-radius: 0 0 24px 24px;
  box-shadow: none;
}

/* Default placeholder banner — blue/indigo palette (distinct from teal page cosmic) */
.article-default-banner {
  --banner-blue: #7fb4ff;
  --banner-sky: #63b4ff;
  --banner-indigo: #5a7fd4;
  --banner-deep: #0a1428;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(155deg, #122040 0%, var(--banner-deep) 42%, #070d1a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(127, 180, 255, 0.32),
    inset 0 1px 0 rgba(168, 204, 255, 0.12);
}

.article-default-banner--hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse 85% 75% at 50% 45%,
    transparent 52%,
    rgba(5, 8, 24, 0.32) 100%
  );
}

.article-default-banner--hero {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 24px 24px;
}

.article-default-banner--card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card__media:has(.article-default-banner) {
  background: #08101f;
  box-shadow: inset 0 0 0 1px rgba(127, 180, 255, 0.2);
}

.article-default-banner__nebula {
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(ellipse 68% 52% at 28% 32%, rgba(99, 168, 255, 0.42) 0%, transparent 58%),
    radial-gradient(ellipse 52% 44% at 82% 18%, rgba(90, 127, 212, 0.32) 0%, transparent 54%),
    radial-gradient(ellipse 58% 48% at 48% 82%, rgba(56, 132, 220, 0.26) 0%, transparent 52%);
  animation: article-banner-nebula-drift 12s ease-in-out infinite alternate;
}

.article-default-banner__sparkles {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.article-sparkle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: var(--base-op, 0.35);
  animation: article-sparkle-twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--del, 0s);
}

.article-sparkle--white {
  background: #fff;
  --base-op: 0.25;
}

.article-sparkle--teal {
  background: var(--article-p);
  --base-op: 0.3;
  box-shadow: 0 0 6px rgba(94, 240, 216, 0.45);
}

.article-sparkle--blue {
  background: var(--article-s);
  --base-op: 0.28;
  box-shadow: 0 0 5px rgba(127, 180, 255, 0.4);
}

.article-default-banner .article-sparkle--blue {
  background: #8ec0ff;
  --base-op: 0.38;
  box-shadow: 0 0 8px rgba(127, 180, 255, 0.55);
}

.article-default-banner .article-sparkle--cyan {
  background: #a8d4ff;
  --base-op: 0.36;
  box-shadow: 0 0 7px rgba(168, 212, 255, 0.5);
}

.article-default-banner .article-sparkle--indigo {
  background: #6b8fd8;
  --base-op: 0.34;
  box-shadow: 0 0 6px rgba(107, 143, 216, 0.45);
}

.article-sparkle--purple {
  background: var(--article-t);
  --base-op: 0.28;
  box-shadow: 0 0 5px rgba(163, 120, 255, 0.4);
}

.article-sparkle--accent {
  animation-name: article-sparkle-flare;
  z-index: 2;
}

.article-default-banner__emblem {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(52vw, 260px);
  height: min(52vw, 260px);
  pointer-events: none;
}

.article-default-banner__emblem::before,
.article-default-banner__emblem::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.article-default-banner__emblem::before {
  width: min(42vw, 200px);
  height: min(42vw, 200px);
  border: 1px solid rgba(127, 180, 255, 0.14);
}

.article-default-banner__emblem::after {
  width: min(52vw, 260px);
  height: min(52vw, 260px);
  border: 1px solid rgba(127, 180, 255, 0.08);
  box-shadow: 0 0 48px rgba(99, 168, 255, 0.12);
}

.article-default-banner__mark {
  position: relative;
  z-index: 1;
  line-height: 1;
  color: #b8d4ff;
  text-shadow:
    0 0 20px rgba(127, 180, 255, 0.45),
    0 0 40px rgba(99, 168, 255, 0.2);
}

.article-default-banner__emblem .article-default-banner__mark {
  font-size: clamp(2.25rem, 6vw, 2.75rem);
  animation: fadeInUp 1s ease both;
}

.article-default-banner--card .article-default-banner__mark {
  position: relative;
  flex-shrink: 0;
  font-size: 2rem;
  pointer-events: none;
}

.article-default-banner--card .article-sparkle {
  transform: translate(-50%, -50%) scale(0.85);
}

@keyframes article-nebula-drift {
  0% {
    opacity: 0.75;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(2%, -1.5%) scale(1.04);
  }
}

@keyframes article-banner-nebula-drift {
  0% {
    opacity: 0.85;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(-1.5%, 2%) scale(1.05);
  }
}

@keyframes article-sparkle-twinkle {
  0%,
  100% {
    opacity: var(--base-op, 0.3);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

@keyframes article-sparkle-flare {
  0%,
  100% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(0.6);
  }
  45% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
  }
  70% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-page__nebula,
  .article-page__cosmic .star,
  .article-default-banner__nebula,
  .article-sparkle,
  .article-default-banner__emblem .article-default-banner__mark {
    animation: none;
  }
}

.article-default-banner .article-sparkle--purple {
  background: #8a9ee8;
  box-shadow: 0 0 6px rgba(138, 158, 232, 0.45);
}

.article-index-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 20px;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--article-txt-sec);
  background: var(--article-glass-fill);
  border: 1px solid var(--article-glass-border);
  border-radius: 12px;
}

.article-index-pagination a {
  color: var(--article-p);
  text-decoration: none;
}

.article-index-pagination a:hover {
  text-decoration: underline;
}

.article-index-pagination__sep {
  opacity: 0.5;
}

.article-index-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .article-index-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--article-glass-fill);
  border: 1px solid var(--article-glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  border-color: rgba(94, 240, 216, 0.25);
  box-shadow: 0 8px 28px rgba(94, 240, 216, 0.08);
}

.article-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0e28;
}

.article-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card__body {
  padding: 18px 20px 22px;
}

.article-card__title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  margin: 0 0 8px;
  color: var(--article-txt);
}

.article-card__excerpt {
  font-size: 0.95rem;
  color: var(--article-txt-sec);
  margin: 0 0 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta {
  font-size: 0.8rem;
  color: var(--article-txt-sec);
  margin: 0;
}

.article-prose {
  color: var(--article-txt);
  line-height: 1.75;
  font-size: 1.05rem;
}

.article-prose h1,
.article-prose h2,
.article-prose h3 {
  font-family: "Cormorant Garamond", serif;
  color: var(--article-txt);
  margin: 1.5em 0 0.5em;
}

.article-prose h1 {
  font-size: 1.75rem;
}

.article-prose h2 {
  font-size: 1.5rem;
}

.article-prose h3 {
  font-size: 1.25rem;
}

.article-prose p {
  margin: 0 0 1em;
}

.article-prose a {
  color: var(--article-p);
}

.article-prose ul,
.article-prose ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.article-prose blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 3px solid var(--article-p);
  color: var(--article-txt-sec);
}

.article-prose code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.article-prose pre {
  background: rgba(0, 0, 0, 0.35);
  padding: 1em;
  border-radius: 8px;
  overflow-x: auto;
}

.article-reactions__label {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--article-txt-sec);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-reactions__bar {
  display: flex;
  gap: 12px;
}

.article-reactions__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--article-glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--article-txt);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.article-reactions__btn:hover {
  border-color: rgba(94, 240, 216, 0.35);
}

.article-reactions__btn.is-active {
  border-color: rgba(94, 240, 216, 0.5);
  background: rgba(94, 240, 216, 0.12);
  color: var(--article-p);
}

.article-reactions__hint {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: #f0a0a8;
}
