/* The Lantern Frequency — shared styles
   Concept: the site is a house at dusk. The Front Porch is outside —
   deep dusk, one lantern as the only light source. Every room you
   enter is a lamplit paper interior, made for long reading.
   Palette:
     --night      #1c2434   dusk exterior
     --deep-night #141a27   exterior gradient floor
     --lamp       #e2a558   lantern gold
     --glow       #f3c887   inner flame
     --paper      #f6f1e7   interior walls / reading surface
     --ink        #2b2620   text on paper
     --dusk-text  #b3bac9   text on night
*/

:root {
  --night: #1c2434;
  --deep-night: #141a27;
  --lamp: #e2a558;
  --glow: #f3c887;
  --paper: #f6f1e7;
  --paper-deep: #efe7d8;
  --ink: #2b2620;
  --ink-soft: #5c554b;
  --dusk-text: #b3bac9;
  --dusk-faint: #7d8598;
  --rule: #ddd2bf;
  --maxw: 42rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
}

/* ---------- Exterior (Front Porch) ---------- */

body.porch {
  color: var(--dusk-text);
  background:
    radial-gradient(ellipse 90rem 60rem at 50% -8rem, #2a3450 0%, var(--night) 45%, var(--deep-night) 100%);
  min-height: 100vh;
}

.lantern {
  width: 3.6rem;
  height: 5.6rem;
  margin: 0 auto 1.75rem;
  display: block;
}
.lantern .flame {
  animation: breathe 5s ease-in-out infinite;
  transform-origin: center;
}
@keyframes breathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.porch-hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5.5rem 1.5rem 3rem;
  text-align: center;
  position: relative;
}
.porch-hero::before {
  /* The lantern's pool of light — the page's single light source */
  content: "";
  position: absolute;
  top: 2rem; left: 50%;
  transform: translateX(-50%);
  width: min(52rem, 120vw);
  height: 34rem;
  background: radial-gradient(ellipse at center top, rgba(226,165,88,0.16) 0%, rgba(226,165,88,0.05) 45%, transparent 70%);
  pointer-events: none;
}
.porch-hero > * { position: relative; }

.eyebrow {
  font-family: "Newsreader", serif;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--lamp);
  margin: 0 0 1.25rem;
}

h1.site-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 550;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #f2ede2;
  margin: 0 0 1.5rem;
}
h1.site-title em {
  font-style: italic;
  color: var(--glow);
}

.porch-lede {
  font-size: 1.15rem;
  line-height: 1.8;
  max-width: 36rem;
  margin: 0 auto;
}

.porch-section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.porch-section h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
  color: #ecd9b8;
  margin: 0 0 1rem;
}
.porch-section p { margin: 0 0 1.15rem; }
.porch-section a { color: var(--glow); }

.porch hr.ember {
  border: none;
  width: 4rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lamp), transparent);
  margin: 1.5rem auto;
}

/* Lines we keep — principles on the porch */
.principles {
  list-style: none;
  margin: 0; padding: 0;
}
.principles li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(226,165,88,0.18);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 450;
  color: #e8e2d4;
}
.principles li:last-child { border-bottom: none; }
.principles li span {
  display: block;
  font-family: "Newsreader", serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--dusk-text);
  margin-top: 0.3rem;
}

/* The rooms — doorway list */
.rooms {
  list-style: none;
  margin: 0; padding: 0;
}
.rooms li {
  border-bottom: 1px solid rgba(226,165,88,0.18);
}
.rooms a, .rooms .unlit {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 1.05rem 0.25rem;
  text-decoration: none;
}
.rooms a { color: #f0ead9; }
.rooms a:hover .room-name { color: var(--glow); }
.rooms .unlit { color: var(--dusk-faint); cursor: default; }
.room-dot {
  flex: none;
  width: 0.55rem; height: 0.55rem;
  border-radius: 50%;
  position: relative; top: -0.1rem;
}
.rooms a .room-dot {
  background: var(--lamp);
  box-shadow: 0 0 10px 2px rgba(226,165,88,0.55);
}
.rooms .unlit .room-dot {
  background: transparent;
  border: 1px solid var(--dusk-faint);
}
.room-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 480;
  transition: color 0.2s;
}
.room-note {
  font-size: 0.85rem;
  color: var(--dusk-faint);
  margin-left: auto;
  text-align: right;
}

/* ---------- Interior (room / essay pages) ---------- */

.threshold {
  /* thin band of dusk at the top of every interior page — the doorway back out */
  background: linear-gradient(180deg, var(--deep-night), var(--night));
  padding: 0.9rem 1.5rem;
}
.threshold-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.threshold a {
  color: var(--glow);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}
.threshold a:hover { text-decoration: underline; }
.threshold .mark { color: var(--lamp); font-size: 0.8rem; }

main.room {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

main.room h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 550;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.75rem;
}
main.room h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.4rem;
  margin: 2.25rem 0 0.75rem;
}
main.room h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
}
main.room blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--lamp);
  font-style: italic;
  color: var(--ink-soft);
}
main.room a { color: #9a6b1f; }
main.room hr {
  border: none;
  width: 4rem;
  height: 1px;
  background: var(--lamp);
  opacity: 0.5;
  margin: 2.25rem 0;
}
main.room img { max-width: 100%; height: auto; border-radius: 4px; }

.room-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #9a6b1f;
  margin: 0 0 1rem;
}

.unlit-banner {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.85rem 1.15rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0 0 2.25rem;
}

/* ---------- Footer (shared) ---------- */

footer.site-foot {
  padding: 3rem 1.5rem 3.5rem;
  text-align: center;
  font-size: 0.9rem;
}
body.porch footer.site-foot { color: var(--dusk-faint); }
body:not(.porch) footer.site-foot {
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
}
footer.site-foot .foot-mark { color: var(--lamp); }
footer.site-foot a { color: inherit; }

/* ---------- Quality floor ---------- */

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 480px) {
  .porch-hero { padding-top: 4rem; }
  .room-note { display: none; }
}
