/* site.css — shared shell for the landing page, /read/ pages and /app/.
   Tokens mirror css/app.css so the reader and the site are one thing. */
:root {
  --night: #0C0F16; --panel: #141926; --line: #242D42;
  --text: #EDE6D6; --scripture: #D8D2C2; --dim: #9A917C; --faint: #676050;
  --ember: #E8A33D; --flame: #C96A1E; --on-ember: #16100A;
  --speak-fg: #FFF3DC; --speak-bg: rgba(201,106,30,0.55); --speak-glow: 0 0 18px rgba(232,163,61,0.65);
  --serif: 'Literata', 'Iowan Old Style', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --measure: 66ch;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --night: #F6F1E6; --panel: #FDFAF2; --line: #E2D8C0;
  --text: #241B10; --scripture: #2A2114; --dim: #6E5C41; --faint: #9B8A6B;
  --ember: #A56A10; --flame: #8F4E0F; --on-ember: #FFF8EC;
  --speak-fg: #2A1804; --speak-bg: rgba(201,106,30,0.30); --speak-glow: none;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--text);
  font-family: var(--serif); font-size: 1.125rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ember); text-decoration-thickness: 1px; text-underline-offset: .15em; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ember); color: var(--on-ember); padding: .5rem .9rem; font-family: var(--sans); z-index: 10; }
.skip:focus { left: 8px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.9rem; margin-bottom: .6em; }
h3 { font-size: 1.15rem; }
b { font-weight: 500; color: var(--ember); }   /* sacred names */
p { margin: 0 0 1em; }

/* ---- header / footer ---- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line);
  font-family: var(--sans); font-size: .95rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }
.brand .flame { width: 11px; height: 15px; margin: 0; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: linear-gradient(180deg, var(--ember), var(--flame)); flex: none; box-shadow: none; animation: none; position: static; }
.site-header nav { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.4rem); }
.site-header nav a { color: var(--dim); text-decoration: none; }
.site-header nav a:hover { color: var(--text); }
.theme { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer; display: grid; place-items: center; padding: 0; }
.theme .sun { width: 14px; height: 14px; border-radius: 50%; background: var(--ember); box-shadow: inset -5px -3px 0 0 var(--panel); }
:root[data-theme="light"] .theme .sun { box-shadow: none; }

.site-footer {
  border-top: 1px solid var(--line); margin-top: 4rem; padding: 2rem clamp(1rem, 4vw, 2.5rem) 3.5rem;
  font-family: var(--sans); font-size: .9rem; color: var(--dim);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-bottom: 1rem; }
.site-footer nav a { color: var(--text); text-decoration: none; }
.site-footer a { color: var(--dim); }
.site-footer a:hover { color: var(--text); }
.site-footer p { max-width: var(--measure); }

/* ---- landing ---- */
.landing main { padding: 0 clamp(1rem, 4vw, 2.5rem); }
.landing main > section { max-width: var(--measure); margin: 0 auto; padding: 3.5rem 0 0; }
.landing .hero { padding-top: clamp(2.5rem, 7vw, 5rem); }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); max-width: 14ch; }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.3rem); color: var(--scripture); margin: 1.2rem 0 1.6rem; max-width: 42ch; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: .95rem 1.4rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--ember); color: var(--text); }
.btn.primary { background: linear-gradient(90deg, var(--ember), var(--flame)); color: var(--on-ember); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.continue { font-family: var(--sans); font-size: .95rem; color: var(--dim); margin: 1rem 0 0; }

/* the living verse */
.living { margin: 2.6rem 0 0; padding: 1.4rem clamp(1rem, 3vw, 1.8rem) 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.living figcaption { display: flex; justify-content: space-between; font-family: var(--sans); font-size: .85rem; color: var(--dim); margin-bottom: .8rem; }
.living blockquote { margin: 0; font-size: clamp(1.25rem, 2.6vw, 1.55rem); line-height: 1.6; color: var(--scripture); }
.living blockquote p { margin: 0 0 .6em; }
.living .vn { font-family: var(--sans); font-size: .6em; color: var(--ember); vertical-align: super; margin-right: .3em; }
.living .w { border-radius: 3px; padding: 0 .05em; transition: background .12s, color .12s; }
.living .w.speak { background: var(--speak-bg); color: var(--speak-fg); box-shadow: var(--speak-glow); }
.transport { display: flex; align-items: center; gap: .9rem; margin-top: 1rem; font-family: var(--sans); }
.play { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; flex: none; background: linear-gradient(90deg, var(--ember), var(--flame)); display: grid; place-items: center; }
.play .ico { width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--on-ember); margin-left: 3px; }
.play.on .ico { width: 13px; height: 15px; border: 0; margin: 0; background: linear-gradient(90deg, var(--on-ember) 0 38%, transparent 38% 62%, var(--on-ember) 62%); }
.rail { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.fill { height: 100%; width: 0; background: var(--ember); }
.time { font-size: .85rem; color: var(--dim); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }

.names p, .ways dd { color: var(--scripture); }
.verse { margin: 1.4rem 0; padding-left: 1.1rem; border-left: 3px solid var(--ember); font-size: 1.15rem; }
.verse p { margin-bottom: .4em; }
.verse cite { font-family: var(--sans); font-style: normal; font-size: .9rem; }
.more { font-family: var(--sans); font-weight: 500; }

.landing .ways { max-width: min(58rem, 100%); }
.ways h2, .ways dl { max-width: var(--measure); }
.ways dl { display: grid; gap: 1.6rem 2.2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 0; max-width: none; }
.ways dt { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; margin-bottom: .3rem; }
.ways dd { margin: 0; font-size: 1rem; }

.landing .books { max-width: min(64rem, 100%); }
.books-lede { color: var(--dim); font-family: var(--sans); font-size: .95rem; }
.canon { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.canon h3 { margin-bottom: .8rem; }
.canon small { font-family: var(--sans); font-weight: 400; color: var(--dim); font-size: .85rem; margin-left: .5rem; }
.canon ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .25rem 1.5rem; font-family: var(--sans); font-size: 1rem; }
.canon li a { display: block; padding: .35rem 0; color: var(--text); text-decoration: none; border-bottom: 1px solid transparent; }
.canon li a:hover { color: var(--ember); border-bottom-color: var(--ember); }

.app p { color: var(--scripture); max-width: 46ch; }

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .site-header { padding: .8rem 1rem; }
  .site-header nav a:nth-child(4) { display: none; }   /* Sign in lives in the reader on small screens */
  .actions .btn { flex: 1 1 100%; }
  .canon ul { grid-template-columns: repeat(2, 1fr); }
  .living { margin-left: -1rem; margin-right: -1rem; border-radius: 0; border-left: 0; border-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .living .w { transition: none; } }
