/* hollowmere.org — the ledger by lamplight, on paper. */
@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=IM+Fell+English+SC&display=swap");

:root {
  --bg: #161512;
  --panel: #1f1d19;
  --rule: #3a352c;
  --ink: #e6dcc3;
  --ink-2: #c4b99f;
  --muted: #8d846f;
  --green: #8fcf7e;
  --amber: #e2b45c;
  --red: #d4614c;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 19px/1.6 "EB Garamond", "Iowan Old Style", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration-color: var(--muted); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.sc {
  font-family: "IM Fell English SC", "EB Garamond", Georgia, serif;
  letter-spacing: 0.16em;
}

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

header.top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
header.top .brand img { width: 30px; height: 30px; border-radius: 7px; }
header.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
header.top nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; }

.hero { padding: 64px 0 28px; text-align: center; }
.hero h1 {
  font-family: "IM Fell English SC", Georgia, serif;
  font-weight: normal;
  letter-spacing: 0.22em;
  font-size: clamp(36px, 7vw, 64px);
  margin: 0 0 6px;
}
.hero .expansion { color: var(--muted); font-style: italic; margin: 0 0 18px; }
.hero p.lede { font-size: clamp(20px, 2.6vw, 24px); max-width: 720px; margin: 0 auto 26px; color: var(--ink-2); }

.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  font-family: "IM Fell English SC", Georgia, serif;
  letter-spacing: 0.14em;
  font-size: 16px;
  background: none;
  cursor: pointer;
}
.btn.green { border-color: #4f7a45; color: var(--green); }
.btn:hover { border-color: var(--ink-2); }

figure.shot { margin: 34px auto 0; max-width: 1000px; }
figure.shot img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); border-radius: 6px; }
figure.shot figcaption { color: var(--muted); font-style: italic; font-size: 15px; text-align: center; margin-top: 8px; }

section { padding: 48px 0; border-top: 1px solid var(--rule); }
section h2 {
  font-family: "IM Fell English SC", Georgia, serif;
  font-weight: normal;
  letter-spacing: 0.18em;
  font-size: 26px;
  margin: 0 0 18px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 26px; }
.grid h3 { font-weight: 500; font-size: 20px; margin: 0 0 4px; }
.grid p { margin: 0; color: var(--ink-2); }

.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; align-items: start; }
.pair img { width: 100%; border: 1px solid var(--rule); border-radius: 6px; }

ol.steps { padding-left: 1.2em; }
ol.steps li { margin-bottom: 8px; color: var(--ink-2); }
ol.steps b { color: var(--ink); font-weight: 500; }

form.invite { display: flex; gap: 8px; flex-wrap: wrap; max-width: 520px; }
form.invite input {
  flex: 1;
  min-width: 220px;
  font: inherit;
  font-size: 17px;
  padding: 9px 12px;
  background: #14130f;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.formnote { color: var(--muted); font-size: 15px; margin-top: 6px; min-height: 1.4em; }

.prose { max-width: 760px; }
.prose h1 { font-family: "IM Fell English SC", Georgia, serif; font-weight: normal; letter-spacing: 0.16em; font-size: 34px; margin: 40px 0 6px; }
.prose h2 { font-size: 22px; letter-spacing: 0.1em; margin-top: 34px; }
.prose p, .prose li { color: var(--ink-2); }
.prose .when { color: var(--muted); font-style: italic; }

footer { border-top: 1px solid var(--rule); padding: 26px 0 40px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 18px; }
  .hero { padding-top: 40px; }
  header.top nav { gap: 12px; }
}

/* The footpath along the bottom of the landing page, and the villager who walks it (villager.js). */
body.has-footpath { padding-bottom: 64px; }
.footpath {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  z-index: 20;
  pointer-events: none;
  background: linear-gradient(to top, rgba(22, 21, 18, 0.96) 55%, rgba(22, 21, 18, 0));
}
.footpath .path-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  border-top: 2px dashed var(--rule);
}
.footpath .lamp,
.footpath .villager,
.footpath .cottage { position: absolute; bottom: 10px; pointer-events: auto; }
.footpath .lamp { width: 12px; height: 30px; display: block; }
.footpath .lamp svg { width: 12px; height: 30px; display: block; }
.footpath .lamp-glass { fill: #2b2822; transition: fill 0.4s ease; }
.footpath .lamp.lit .lamp-glass { fill: var(--amber); }
.footpath .lamp.lit svg { filter: drop-shadow(0 0 4px rgba(226, 180, 92, 0.55)); }
.footpath .lamp:hover .lamp-glass { fill: var(--ink-2); }
.footpath .cottage { right: 18px; width: 34px; height: 30px; }
.footpath .cottage svg { width: 34px; height: 30px; display: block; }
.footpath .cottage-window { fill: #2b2822; transition: fill 0.6s ease; }
.footpath .cottage.lit .cottage-window { fill: var(--amber); }
.footpath .villager {
  left: 0;
  width: 24px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  will-change: transform;
}
.footpath .villager svg { width: 24px; height: 34px; display: block; transition: transform 0.15s ease; }
.footpath .leg { transform-box: fill-box; transform-origin: 50% 0; }
.footpath .villager.walking .leg-a { animation: stride 0.42s ease-in-out infinite; }
.footpath .villager.walking .leg-b { animation: stride 0.42s ease-in-out infinite reverse; }
.footpath .villager.walking svg { animation: bob 0.21s ease-in-out infinite alternate; }
.footpath .lantern { transform-box: view-box; transform-origin: 17.5px 16px; animation: sway 2.6s ease-in-out infinite alternate; }
.footpath .lantern rect { filter: drop-shadow(0 0 3px rgba(226, 180, 92, 0.8)); }
@keyframes stride { from { transform: rotate(22deg); } to { transform: rotate(-22deg); } }
@keyframes bob { from { translate: 0 0; } to { translate: 0 -1px; } }
@keyframes sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.footpath .bubble {
  position: absolute;
  bottom: 40px;
  left: 50%;
  translate: -50% 0;
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 6px 10px;
  background: var(--panel);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font: italic 15px/1.35 "EB Garamond", Georgia, serif;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.footpath .villager.talking .bubble { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .footpath .lantern, .footpath .villager.walking .leg, .footpath .villager.walking svg { animation: none; }
}
@media print { .footpath { display: none; } body.has-footpath { padding-bottom: 0; } }

/* Fireflies all through the page (ambient.js): a layer as tall as the page, above the content
   but below the footpath, never catching clicks. A quarter are "near": a little bigger and brighter. */
.fireflies { position: absolute; top: 0; left: 0; right: 0; overflow: hidden; pointer-events: none; z-index: 15; }
.fireflies span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 6px 2px rgba(226, 180, 92, 0.35);
  opacity: 0.35;
  animation-name: drift, glow;
  animation-timing-function: ease-in-out, ease-in-out;
  animation-iteration-count: infinite, infinite;
  animation-direction: alternate, alternate;
}
.fireflies span.near { width: 4px; height: 4px; box-shadow: 0 0 9px 3px rgba(226, 180, 92, 0.4); }
body.night .fireflies span { box-shadow: 0 0 8px 3px rgba(226, 180, 92, 0.45); }
body.night .fireflies span.near { box-shadow: 0 0 12px 4px rgba(226, 180, 92, 0.5); }
@keyframes drift { from { translate: 0 0; } to { translate: var(--dx) var(--dy); } }
@keyframes glow { from { opacity: 0.2; } to { opacity: 0.85; } }

/* Sections ease in the first time they come into view (ambient.js adds .reveal, then .seen). */
section.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.9s ease, transform 0.9s ease; }
section.reveal.seen { opacity: 1; transform: none; }

/* The FAQ: quiet disclosure rows. */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 12px 0; }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; font-size: 20px; color: var(--ink); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-family: "IM Fell English SC", Georgia, serif; transition: transform 0.3s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 8px 0 2px; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  .fireflies span { animation: none; opacity: 0.3; }
}
