/* The Luminaire's Archive — reproduces the approved design mockup.
   Palette: parchment #f7f4ef / ink #241833 / royal #5b3a8e / deep #2e1a4d. */

:root {
  --parchment: #f7f4ef;
  --lilac: #efe9f7;
  --ink: #241833;
  --royal: #5b3a8e;
  --deep: #2e1a4d;
  --deepest: #241338;
  --violet: #8a63c4;
  --muted: #7a6a92;
  --muted2: #5a4a74;
  --line: #e2d9ea;
  --card: #ffffff;
  --serif: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --script: 'Pinyon Script', 'Segoe Script', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--royal); text-decoration: none; }
a:hover { color: #3a2166; text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* keyframes from the mockup */
@keyframes laSpin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@keyframes laFloat { 0%,100% { transform: translateY(0) rotateX(8deg); } 50% { transform: translateY(-14px) rotateX(-6deg); } }
@keyframes laDrift { 0%,100% { transform: translate3d(0,0,0) rotateZ(0); } 50% { transform: translate3d(10px,-18px,40px) rotateZ(6deg); } }
@keyframes laRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes laCine { 0% { opacity: 0; transform: translateY(46px) rotateX(7deg) scale(.98); filter: blur(8px); } 60% { filter: blur(0); } 100% { opacity: 1; transform: none; filter: blur(0); } }
@keyframes laCineDeep { 0% { opacity: 0; transform: translateZ(-160px) rotateX(10deg); filter: blur(10px); } 100% { opacity: 1; transform: none; filter: blur(0); } }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ticker */
.ticker { background: var(--deep); color: #e9dff7; font-size: 15px; letter-spacing: .4px; text-align: center; padding: 8px 16px; }
.ticker a { color: #d9b8ff; text-decoration: underline; }

/* header */
header.site { position: sticky; top: 0; z-index: 50; background: rgba(247,244,239,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hrow { display: flex; align-items: center; gap: 24px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.emblem { position: relative; width: 40px; height: 40px; perspective: 600px; flex: none; }
.emblem .ring { position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid var(--royal); border-top-color: #c9aef0; animation: laSpin 10s linear infinite; transform-style: preserve-3d; }
.emblem .l { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--script); font-size: 26px; color: var(--royal); padding-bottom: 4px; }
.brand .name { font-family: var(--script); font-size: 26px; line-height: 1; color: #3a2166; }
.brand .sub { font-size: 13px; letter-spacing: 5px; color: var(--muted); margin-top: 2px; }
nav.main { display: flex; gap: 26px; margin-left: auto; font-size: 17px; flex-wrap: wrap; }
nav.main a { color: var(--muted2); padding-bottom: 2px; border-bottom: 2px solid transparent; }
nav.main a.active { color: var(--deep); border-bottom-color: var(--royal); }
nav.main a:hover { text-decoration: none; color: var(--deep); }
.hactions { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--royal); background: transparent; color: var(--royal); font-size: 17px; cursor: pointer; }
.icon-btn:hover { background: var(--lilac); }
.pill { display: inline-block; background: var(--royal); color: #fff; padding: 9px 18px; border-radius: 999px; font-size: 16px; font-weight: 500; }
.pill:hover { background: #3a2166; color: #fff; text-decoration: none; }

main { flex: 1; perspective: 1400px; overflow-x: hidden; }

/* buttons */
.btn { display: inline-block; border-radius: 999px; font-size: 18px; font-family: var(--serif); cursor: pointer; padding: 13px 28px; border: 1.5px solid var(--royal); }
.btn-primary { background: var(--royal); color: #fff; border-color: var(--royal); }
.btn-primary:hover { background: #3a2166; color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--royal); }
.btn-ghost:hover { background: var(--lilac); text-decoration: none; }
.btn-sm { padding: 10px 22px; font-size: 16px; }

/* hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--parchment) 0%, var(--lilac) 100%); border-bottom: 1px solid var(--line); animation: laCineDeep .9s cubic-bezier(.22,.9,.3,1) both; transform-origin: 50% 20%; }
.hero .inner { max-width: 900px; margin: 0 auto; padding: 96px 28px 88px; text-align: center; position: relative; z-index: 1; }
.orb { position: absolute; border-radius: 50%; }
.orb.o1 { top: 60px; left: 8%; width: 120px; height: 120px; background: radial-gradient(circle at 35% 30%, #c9aef0, #5b3a8e); opacity: .35; animation: laDrift 9s ease-in-out infinite; }
.orb.o2 { bottom: 40px; right: 10%; width: 180px; height: 180px; background: radial-gradient(circle at 35% 30%, #e4d4fa, #7a52b5); opacity: .3; animation: laDrift 12s ease-in-out 1s infinite; }
.orb.o3 { top: 30%; right: 28%; width: 60px; height: 60px; background: radial-gradient(circle at 35% 30%, #d9c4f5, #8a63c4); opacity: .4; animation: laDrift 7s ease-in-out 2s infinite; }
.hero-emblem { position: relative; width: 92px; height: 92px; margin: 0 auto 22px; perspective: 900px; }
.hero-emblem .ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--royal); border-top-color: #c9aef0; animation: laSpin 14s linear infinite; background: rgba(255,255,255,.6); box-shadow: 0 18px 40px rgba(46,26,77,.18); }
.hero-emblem .l { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--script); font-size: 58px; color: var(--royal); padding-bottom: 10px; }
h1.display { font-family: var(--script); font-size: clamp(48px, 8vw, 76px); font-weight: 400; margin: 0; color: var(--deep); line-height: 1.1; }
.hero p.lede { font-size: 22px; color: var(--muted2); max-width: 560px; margin: 18px auto 0; line-height: 1.6; }
.hero .cta { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }

/* sections */
section.band { padding: 64px 0; animation: laCine .9s cubic-bezier(.22,.9,.3,1) .15s both; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; gap: 16px; }
h2.section-title { font-size: 34px; margin: 0; color: var(--deep); font-weight: 600; }
.viewall { color: var(--royal); font-size: 17px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; perspective: 1200px; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px; color: inherit; transform-style: preserve-3d; transition: transform .35s ease, box-shadow .35s ease; }
.card:hover { transform: rotateX(4deg) rotateY(-4deg) translateY(-6px); box-shadow: 0 18px 36px rgba(46,26,77,.16); text-decoration: none; }
.eyebrow { font-size: 13px; letter-spacing: 2.5px; color: var(--violet); text-transform: uppercase; }
.card h3 { font-size: 23px; margin: 10px 0 6px; color: var(--deep); line-height: 1.25; }
.byline { font-size: 15px; color: var(--muted); font-style: italic; }
.card p { font-size: 16px; color: var(--muted2); line-height: 1.55; margin: 12px 0 0; }

/* arsenals teaser (dark) */
.dark { background: var(--deep); color: var(--lilac); animation: laCine .9s cubic-bezier(.22,.9,.3,1) .3s both; }
.dark .inner { padding: 60px 0; text-align: center; }
.dark h2 { font-size: 32px; margin: 0 0 8px; font-weight: 600; color: var(--lilac); }
.dark p.sub { margin: 0 auto 30px; max-width: 520px; font-size: 18px; color: #c6b4e0; line-height: 1.55; }
.chips { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; perspective: 900px; }
.chip { border: 1.5px solid var(--violet); color: #e9dff7; padding: 11px 22px; border-radius: 999px; font-size: 17px; transform-style: preserve-3d; transition: transform .3s ease, background .3s ease; }
.chip:hover { background: var(--royal); transform: translateZ(24px) translateY(-3px); color: #fff; text-decoration: none; }

/* generic page */
.narrow { max-width: 860px; margin: 0 auto; padding: 56px 28px; animation: laCineDeep .8s cubic-bezier(.22,.9,.3,1) both; transform-origin: 50% 15%; }
.mid { max-width: 1000px; margin: 0 auto; padding: 56px 28px; animation: laCineDeep .8s cubic-bezier(.22,.9,.3,1) both; }
h1.script { font-family: var(--script); font-size: clamp(40px, 7vw, 54px); font-weight: 400; color: var(--deep); margin: 0; }
.intro { font-size: 19px; color: var(--muted2); margin: 8px 0 40px; }

/* conversations list */
.article-list { display: flex; flex-direction: column; gap: 28px; }
article.entry { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 32px; animation: laRise .5s ease both; }
article.entry h2 { font-size: 28px; margin: 8px 0 4px; color: var(--deep); }
.outline-box { border: 1px solid var(--lilac); background: #faf8fd; border-radius: 10px; padding: 16px 20px; margin-top: 16px; }
.outline-box .lbl { font-size: 13px; letter-spacing: 2px; color: var(--muted); margin-bottom: 8px; }
.outline-box ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.outline-box a { font-size: 17px; }
.entry .row { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* post reader */
.post-grid { max-width: 1100px; margin: 0 auto; padding: 56px 28px; display: grid; grid-template-columns: 250px 1fr; gap: 48px; align-items: start; animation: laCineDeep .8s cubic-bezier(.22,.9,.3,1) both; transform-origin: 50% 10%; }
aside.toc { position: sticky; top: 110px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 20px 22px; }
aside.toc .lbl { font-size: 13px; letter-spacing: 2px; color: var(--muted); margin-bottom: 10px; }
aside.toc ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
aside.toc .foot { border-top: 1px solid var(--lilac); margin-top: 16px; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.post-body h1 { font-size: clamp(32px, 5vw, 42px); margin: 10px 0 6px; color: var(--deep); line-height: 1.15; }
.post-body > .byline { margin-bottom: 24px; }
.tldr { background: var(--lilac); border-radius: 12px; padding: 18px 22px; margin: 0 0 28px; }
.tldr .lbl, .takeaways .lbl, .faq .lbl { font-size: 13px; letter-spacing: 2.5px; color: var(--violet); text-transform: uppercase; margin-bottom: 8px; }
.tldr p { margin: 0; font-size: 18px; color: #3a2166; }
.takeaways { margin: 0 0 30px; }
.takeaways ul { margin: 0; padding-left: 22px; }
.takeaways li { font-size: 18px; margin-bottom: 6px; color: var(--muted2); }
.post-body section.chunk { margin-bottom: 34px; scroll-margin-top: 110px; }
.post-body section.chunk h2 { font-size: 27px; color: #3a2166; margin: 0 0 10px; }
.post-body p { font-size: 18.5px; line-height: 1.75; color: #3d3052; margin: 0 0 14px; }
.support-cta { background: var(--lilac); border-radius: 14px; padding: 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 44px 0; flex-wrap: wrap; }
.support-cta .msg { font-size: 19px; color: #3a2166; max-width: 420px; }
.faq { margin: 40px 0; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; background: var(--card); }
.faq summary { font-size: 19px; color: var(--deep); cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; font-size: 17px; color: var(--muted2); }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.related-grid .card h4 { margin: 6px 0 0; font-size: 19px; color: var(--deep); }

/* arsenals page */
.bubbles { display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; perspective: 1100px; margin-top: 40px; }
.bubble { width: 168px; height: 168px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #f3ecfc, #d9c4f5 55%, #8a63c4); border: 1.5px solid #b795e6; display: grid; place-items: center; padding: 16px; text-align: center; color: var(--deep); font-size: 19px; line-height: 1.25; transform-style: preserve-3d; transition: box-shadow .3s ease; }
.bubble:hover { box-shadow: 0 22px 40px rgba(46,26,77,.28); text-decoration: none; }
.bubble.f0 { animation: laFloat 5s ease-in-out infinite; }
.bubble.f1 { animation: laFloat 6.2s ease-in-out .6s infinite; }
.bubble.f2 { animation: laFloat 5.6s ease-in-out 1.1s infinite; }
.bubble-big { width: 270px; height: 270px; border-radius: 50%; margin: 26px auto 0; background: radial-gradient(circle at 32% 28%, #f3ecfc, #d9c4f5 50%, #7a52b5); border: 2px solid #b795e6; display: grid; place-items: center; padding: 30px; text-align: center; color: var(--deep); font-size: 29px; line-height: 1.25; animation: laFloat 6s ease-in-out infinite; box-shadow: 0 30px 60px rgba(46,26,77,.25); }
.mini-chips { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 8px; }
.mini { background: var(--card); border: 1.5px solid #cdbde4; color: #3a2166; padding: 12px 22px; border-radius: 999px; font-size: 17px; transition: transform .3s ease, border-color .3s ease; }
.mini:hover { transform: translateY(-3px); border-color: var(--royal); text-decoration: none; }
.dev-note { font-size: 15px; color: #9a8ab2; margin-top: 40px; font-style: italic; }

/* stub / static page */
.stub { max-width: 680px; margin: 0 auto; padding: 96px 28px; text-align: center; animation: laCineDeep .8s cubic-bezier(.22,.9,.3,1) both; }
.stub .mark { font-size: 44px; margin-bottom: 14px; }
.stub .body { font-size: 19px; color: var(--muted2); line-height: 1.65; margin: 18px 0 0; text-align: left; }
.page-body { font-size: 19px; color: #3d3052; line-height: 1.75; }
.page-body p { margin: 0 0 16px; }

/* footer */
footer.site { background: var(--deepest); color: #c6b4e0; margin-top: auto; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 52px 0 36px; }
footer.site .name { font-family: var(--script); font-size: 32px; color: var(--lilac); }
footer.site .sub { font-size: 12px; letter-spacing: 5px; color: #8a75ab; margin-top: 2px; }
footer.site p { font-size: 16px; line-height: 1.6; margin: 16px 0 0; max-width: 300px; }
footer.site .colhead { font-size: 13px; letter-spacing: 2.5px; color: #8a75ab; margin-bottom: 4px; }
footer.site .fcol { display: flex; flex-direction: column; gap: 10px; font-size: 17px; }
footer.site a, footer.site .fcol a { color: #c6b4e0; }
footer.site a:hover { color: var(--lilac); }
footer.site .legal { border-top: 1px solid #3a2755; text-align: center; padding: 16px; font-size: 14px; color: #8a75ab; }

/* toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--deep); color: var(--lilac); padding: 11px 24px; border-radius: 999px; font-size: 16px; z-index: 99; box-shadow: 0 10px 24px rgba(46,26,77,.3); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* responsive */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  aside.toc { position: static; }
  footer.site .cols { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .cards, .related-grid { grid-template-columns: 1fr; }
  .hrow { flex-wrap: wrap; gap: 12px; }
  nav.main { order: 3; width: 100%; margin-left: 0; justify-content: flex-start; gap: 16px; font-size: 16px; }
  .hactions { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
