/* ==========================================================================
   UNUM LUX — Journal Article System (blog.css)
   Extends the incumbent parchment / quiet-luxury world onto long-form
   reading surfaces. Loaded by blog article pages only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Browser surfaces — the parts the default stylesheet never draws
   -------------------------------------------------------------------------- */
::selection {
  background: rgba(181, 142, 88, 0.28);
  color: var(--text-obsidian);
}

:focus-visible {
  outline: 2px solid var(--gold-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--gold-border) transparent;
}
::-webkit-scrollbar {
  width: 11px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--gold-border);
  border-radius: 8px;
  border: 3px solid var(--bg-parchment);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-accent);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.article-hero {
  position: relative;
  padding: 96px 24px 64px;
  text-align: center;
  overflow: hidden;
}
.article-hero-glow {
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 380px;
  background: radial-gradient(circle, rgba(181, 142, 88, 0.14) 0%, rgba(250, 248, 245, 0) 70%);
  pointer-events: none;
}

.hero-constellation {
  position: absolute;
  top: 44px;
  right: -36px;
  width: min(50vw, 560px);
  height: auto;
  pointer-events: none;
  opacity: 0.6;
}
.hero-constellation .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: constellation-draw 1.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-constellation .d1 { animation-delay: 0.15s; }
.hero-constellation .d2 { animation-delay: 0.75s; }
.hero-constellation .d3 { animation-delay: 1.2s; }
.hero-constellation .fade {
  opacity: 0;
  animation: constellation-node 0.9s ease forwards;
  animation-delay: 1.5s;
}
.hero-constellation .node {
  opacity: 0;
  animation: constellation-node 0.7s ease forwards;
}
.hero-constellation .n1 { animation-delay: 1.1s; }
.hero-constellation .n2 { animation-delay: 1.5s; }
.hero-constellation .n3 { animation-delay: 1.8s; }

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}
.breadcrumbs a:hover {
  color: var(--gold-accent-text);
}

.article-headline {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 600;
  color: var(--text-obsidian);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 840px;
  margin: 0 auto 26px;
  position: relative;
  z-index: 1;
  text-wrap: balance;
}

.article-byline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
}
.article-byline img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.byline-sep {
  color: var(--gold-accent);
}

/* Staggered hero entrance */
.article-hero .container > * {
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.article-hero .container > :nth-child(2) { animation-delay: 0.08s; }
.article-hero .container > :nth-child(3) { animation-delay: 0.16s; }
.article-hero .container > :nth-child(4) { animation-delay: 0.24s; }

/* --------------------------------------------------------------------------
   Reading typography
   -------------------------------------------------------------------------- */
.article-wrap {
  max-width: 700px;
  margin: 0 auto 110px;
  padding: 0 24px;
}

.article-wrap .editorial-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: 22px;
}

.article-wrap .editorial-heading {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 32px);
  font-weight: 600;
  color: var(--text-obsidian);
  line-height: 1.25;
  margin: 56px 0 18px;
  text-wrap: balance;
}

.article-wrap .editorial-body a {
  color: var(--text-obsidian);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--gold-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: var(--transition);
}
.article-wrap .editorial-body a:hover {
  color: var(--gold-accent-text);
  text-decoration-color: var(--gold-accent-text);
}

.article-wrap p > strong {
  color: var(--text-obsidian);
}

.article-wrap ul.editorial-body {
  list-style: none;
  padding: 0;
  margin: 26px 0 30px;
}
.article-wrap ul.editorial-body li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 13px;
}
.article-wrap ul.editorial-body li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.95em;
  width: 14px;
  height: 1px;
  background: var(--gold-accent);
}

.lead-paragraph {
  font-size: 19.5px;
  line-height: 1.75;
  color: var(--text-obsidian);
  margin-bottom: 30px;
}
.lead-paragraph::first-letter {
  font-family: var(--font-serif);
  font-size: 3.35em;
  font-weight: 600;
  float: left;
  line-height: 0.82;
  padding: 8px 12px 0 0;
  color: var(--gold-accent-text);
}

/* --------------------------------------------------------------------------
   Pull quote — almanac rules, no accent bar
   -------------------------------------------------------------------------- */
.pullquote {
  position: relative;
  margin: 48px 0;
  padding: 38px 8px 34px;
  border-top: 1px solid var(--gold-border);
  border-bottom: 1px solid var(--gold-border);
}
.pullquote::before {
  content: '\201C';
  position: absolute;
  top: 14px;
  left: -4px;
  font-family: var(--font-serif);
  font-size: 92px;
  line-height: 1;
  color: var(--gold-accent);
  opacity: 0.3;
  pointer-events: none;
}
.pullquote-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 3vw, 27px);
  line-height: 1.5;
  color: var(--text-obsidian);
  margin: 0 0 14px;
  padding-left: 52px;
  text-wrap: balance;
}
.pullquote-author {
  padding-left: 52px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-accent-text);
}

/* --------------------------------------------------------------------------
   Article end mark
   -------------------------------------------------------------------------- */
.article-end {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 56px;
}
.article-end::before,
.article-end::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hairline);
}
.end-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-accent);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Ephemeris card (transit article)
   -------------------------------------------------------------------------- */
.ephemeris-card {
  background: var(--surface-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 44px 0;
  box-shadow: 0 24px 48px -20px rgba(28, 25, 21, 0.12);
}
.ephemeris-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.ephemeris-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-accent-text);
}
.ephemeris-glyphs {
  display: flex;
  gap: 14px;
  color: var(--gold-accent);
}
.trademark-box {
  background: var(--surface-subtle);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 50px;
}
.ephemeris-glyphs svg {
  width: 20px;
  height: 20px;
}
.ephemeris-title {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  color: var(--text-obsidian);
  margin-bottom: 8px;
}
.ephemeris-coord {
  font-size: 13.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 18px;
}
.progress-track {
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--surface-hover);
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gold-accent);
}
.ephemeris-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Comparison matrix (Co-Star article)
   -------------------------------------------------------------------------- */
.compare-matrix {
  background: var(--surface-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 34px;
  margin: 44px 0;
  box-shadow: 0 24px 48px -20px rgba(28, 25, 21, 0.1);
}
.matrix-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-bottom: 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--hairline);
}
.matrix-col-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-muted);
}
.matrix-col-title svg {
  width: 17px;
  height: 17px;
  color: var(--text-light);
  flex-shrink: 0;
}
.matrix-col-title.highlight {
  color: var(--gold-accent-text);
}
.matrix-col-title.highlight svg {
  color: var(--gold-accent);
}
.matrix-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 15px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
  line-height: 1.6;
}
.matrix-row:last-child {
  border-bottom: none;
}
.matrix-bad {
  color: var(--text-muted);
}
.matrix-good {
  color: var(--text-obsidian);
  font-weight: 500;
}
.matrix-good strong {
  color: var(--gold-accent-text);
}

/* --------------------------------------------------------------------------
   Step timeline (widgets guide)
   -------------------------------------------------------------------------- */
.step-list {
  list-style: none;
  margin: 40px 0;
  padding: 0;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  padding-bottom: 38px;
}
.step:last-child {
  padding-bottom: 0;
}
.step::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 52px;
  bottom: 6px;
  width: 1px;
  background: var(--hairline);
}
.step:last-child::before {
  display: none;
}
.step-num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-card);
  border: 1px solid var(--gold-border);
  box-shadow: 0 6px 16px -6px rgba(181, 142, 88, 0.35);
  color: var(--gold-accent-text);
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
}
.step-heading {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-obsidian);
  margin: 10px 0;
  text-wrap: balance;
}
.step .editorial-body {
  margin-bottom: 0;
}
.step .editorial-body + .editorial-body {
  margin-top: 14px;
}

/* --------------------------------------------------------------------------
   Widget showcase (base carried over from article template)
   -------------------------------------------------------------------------- */
.article-widget-showcase {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  margin: 44px 0;
  padding: 32px 20px;
  background: radial-gradient(circle, rgba(181, 142, 88, 0.1) 0%, rgba(250, 248, 245, 0.6) 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
}
.lumi-companion-widget {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: min(360px, 100%);
  padding: 12px 14px 10px;
  border-radius: 22px;
  border: 1px solid rgba(196, 166, 115, 0.28);
  background:
    radial-gradient(circle 240px at 88% 0%, rgba(242, 209, 148, 0.25), rgba(242, 209, 148, 0) 70%),
    linear-gradient(135deg, #FBF9F4 0%, #F6F1EA 100%);
  box-shadow: 0 10px 24px rgba(28, 25, 21, 0.07);
}
.lumi-companion-avatar {
  width: 92px;
  height: auto;
  flex-shrink: 0;
  margin-bottom: -8px;
}
.lumi-companion-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lumi-companion-quote {
  font-family: Georgia, var(--font-serif);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  color: #26211A;
}
.lumi-companion-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9C7C44;
}
.lumi-companion-meta svg {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   CTA + read-next
   -------------------------------------------------------------------------- */
.article-cta {
  background:
    radial-gradient(ellipse at top, rgba(181, 142, 88, 0.08), rgba(250, 248, 245, 0) 62%),
    var(--surface-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 48px 36px 40px;
  text-align: center;
  margin-top: 56px;
}
.article-cta .btn-primary {
  display: inline-block;
}
.article-cta-heading {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 600;
  color: var(--text-obsidian);
  margin-bottom: 12px;
}
.article-cta-copy {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-body);
  max-width: 480px;
  margin: 0 auto 26px;
}
.article-cta-next {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-size: 13.5px;
  color: var(--text-muted);
}
.next-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-accent-text);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.next-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.next-link:hover {
  color: var(--text-obsidian);
}
.next-link:hover svg {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
@keyframes constellation-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes constellation-node {
  to {
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 840px) {
  .hero-constellation {
    display: none;
  }
  .article-hero {
    padding: 72px 20px 52px;
  }
  .article-cta {
    padding: 40px 24px 34px;
  }
  .ephemeris-card,
  .compare-matrix {
    padding: 26px 22px;
  }
}

@media (max-width: 640px) {
  .article-wrap {
    margin-bottom: 88px;
  }
  .article-wrap .editorial-body {
    font-size: 16.5px;
  }
  .lead-paragraph {
    font-size: 18px;
  }
  .pullquote::before {
    font-size: 64px;
    top: 22px;
  }
  .pullquote-text,
  .pullquote-author {
    padding-left: 36px;
  }

  /* Matrix stacks into labelled blocks */
  .matrix-head {
    display: none;
  }
  .matrix-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 0;
  }
  .matrix-bad::before,
  .matrix-good::before {
    display: block;
    font-family: var(--font-sans);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 3px;
  }
  .matrix-bad::before {
    content: 'Social feeds';
    color: var(--text-light);
  }
  .matrix-good::before {
    content: 'Unum Lux';
    color: var(--gold-accent-text);
  }

  .step {
    grid-template-columns: 44px 1fr;
    gap: 16px;
  }
  .step-num {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  .step::before {
    left: 19px;
    top: 46px;
  }
  .step-heading {
    margin-top: 6px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .article-hero .container > *,
  .hero-constellation .draw,
  .hero-constellation .node,
  .hero-constellation .fade {
    animation: none;
  }
  .hero-constellation .draw {
    stroke-dashoffset: 0;
  }
  .hero-constellation .node,
  .hero-constellation .fade {
    opacity: 1;
  }
  .next-link svg {
    transition: none;
  }
}
