@font-face {
  font-family: Cinzel;
  src: url("fonts/cinzel-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Cinzel;
  src: url("fonts/cinzel-700.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("fonts/libre-baskerville-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("fonts/libre-baskerville-700.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("fonts/libre-baskerville-400i.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0c0f10;
  --bg-2: #14191a;
  --bg-3: #1b2322;
  --ink: #e9e4da;
  --muted: #aaa398;
  --stone: #cfc6b4;
  --copper: #c49a72;
  --copper-deep: #b08968;
  --emerald: #3e8f74;
  --emerald-2: #4aa887;
  --emerald-deep: #2a5f50;
  --line: rgba(207, 198, 180, 0.18);
  --card: #151b1b;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
  --display: Cinzel, Palatino, "Palatino Linotype", "Times New Roman", serif;
  --body: "Libre Baskerville", Palatino, Georgia, "Times New Roman", serif;
  --measure: 42rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1100px 620px at 50% -8%, #24302e 0%, var(--bg) 58%),
    var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.75;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a {
  color: var(--copper);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--stone); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--emerald-deep);
  color: #f3eee4;
  padding: 0.6rem 0.9rem;
  z-index: 20;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(1120px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--display);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--stone);
  text-decoration: none;
}
.brand:hover { color: #fff; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.15rem;
}
.site-nav a {
  font-family: var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }

.hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: 3.1rem;
  align-items: start;
  padding: 3.2rem 0 3.4rem;
}
.cover-frame {
  margin: 0;
  background: #000;
  box-shadow: var(--shadow), 0 0 0 1px rgba(207, 198, 180, 0.16);
}
.cover-frame img { display: block; width: 100%; }
.badge {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--emerald-2);
  border: 1px solid var(--emerald);
  padding: 0.42rem 0.75rem 0.35rem;
  margin: 0 0 1.25rem;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.3rem, 5.6vw, 3.9rem);
  line-height: 0.95;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
  color: #f3eee4;
}
.hero h1 span { display: block; }
.byline {
  font-family: var(--display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--copper);
  margin: 0 0 1.5rem;
}
.hook {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--stone);
  max-width: 38rem;
  margin: 0 0 1.4rem;
}
.blurb {
  max-width: 40rem;
}
.blurb p { margin: 0 0 1rem; color: var(--ink); }
.comp {
  margin: 0.2rem 0 1.7rem;
  color: var(--copper);
  font-style: italic;
  max-width: 38rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: center;
}
.btn {
  display: inline-block;
  font-family: var(--display);
  background: var(--copper-deep);
  color: #140f0c;
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.95rem 1.2rem 0.88rem;
  border: 1px solid var(--copper-deep);
}
.btn:hover { background: #d4ae83; color: #140f0c; }
.btn-ghost {
  background: transparent;
  color: var(--stone);
  border: 1px solid rgba(207, 198, 180, 0.4);
}
.btn-ghost:hover { background: rgba(62, 143, 116, 0.14); color: #fff; border-color: var(--emerald); }

section {
  padding: 2.7rem 0;
  border-top: 1px solid var(--line);
}
.section-kicker, h2 {
  margin: 0 0 1.15rem;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--emerald-2);
}
.feature {
  display: grid;
  grid-template-columns: minmax(140px, 190px) 1fr;
  gap: 2rem;
  align-items: start;
}
.feature-cover {
  margin: 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(207, 198, 180, 0.16);
  background: #f3eee4;
}
.feature-cover img { display: block; width: 100%; }
.feature p { margin: 0 0 1.1rem; max-width: 40rem; }
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 0.8rem;
}
.link-row a { margin: 0; }

.signup-card {
  max-width: 36rem;
}
.signup-card p { margin: 0 0 1.1rem; }
form.signup {
  display: grid;
  gap: 0.55rem;
  max-width: 28rem;
}
form.signup label {
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.35rem;
}
form.signup input[type="text"],
form.signup input[type="email"] {
  width: 100%;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.8rem 0.85rem;
  font: inherit;
  font-size: 1rem;
}
form.signup input:focus {
  outline: 1px solid var(--emerald);
  border-color: var(--emerald);
}
.fine {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.2rem 0 0;
}
.bio p, .contact p { max-width: 42rem; }
.contact a { color: var(--copper); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 3rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer .legal { margin: 1.2rem 0 0; }

/* Reader page */
html.reader {
  --bg: #f3eee4;
  --bg-2: #ebe4d6;
  --ink: #1c1916;
  --muted: #5c564e;
  --stone: #3a3530;
  --line: rgba(28, 25, 22, 0.14);
  --card: #fffdf8;
  --shadow: 0 16px 36px rgba(28, 25, 22, 0.12);
}
html.reader body {
  background: var(--bg);
  color: var(--ink);
}
html.reader .brand,
html.reader .byline { color: var(--stone); }
html.reader .site-nav a { color: var(--muted); }
html.reader .site-nav a:hover { color: var(--ink); }
html.reader a { color: var(--emerald-deep); }
html.reader a:hover { color: #19483c; }
html.reader .btn {
  background: var(--emerald-deep);
  border-color: var(--emerald-deep);
  color: #f3eee4;
}
html.reader .btn:hover { background: #1e4f43; color: #fff; }
html.reader .btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(28, 25, 22, 0.28);
}
html.reader .btn-ghost:hover {
  background: rgba(42, 95, 80, 0.08);
  color: var(--ink);
  border-color: var(--emerald-deep);
}

html.reader.dark {
  --bg: #14110e;
  --bg-2: #1c1916;
  --ink: #e8e0d4;
  --muted: #ada498;
  --stone: #cfc6b4;
  --line: rgba(232, 224, 212, 0.14);
  --card: #1c1916;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}
html.reader.dark body { background: var(--bg); }
html.reader.dark a { color: var(--copper); }
html.reader.dark a:hover { color: var(--stone); }
html.reader.dark .btn {
  background: var(--copper-deep);
  border-color: var(--copper-deep);
  color: #140f0c;
}
html.reader.dark .btn:hover { background: #d4ae83; color: #140f0c; }
html.reader.dark .btn-ghost {
  color: var(--stone);
  border-color: rgba(207, 198, 180, 0.35);
}
html.reader.dark .btn-ghost:hover {
  background: rgba(62, 143, 116, 0.14);
  color: #fff;
  border-color: var(--emerald);
}

.reader-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 8;
}
.reader-bar .tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 0.95rem;
}
.reader-bar a, .theme-toggle {
  font-family: var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.66rem;
  text-decoration: none;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0.35rem 0;
  cursor: pointer;
  font-weight: 400;
}
.reader-bar a:hover, .theme-toggle:hover { color: var(--ink); }

.story-shell {
  width: min(42rem, calc(100% - 2.4rem));
  margin: 0 auto;
  padding: 2.6rem 0 4rem;
}
.story-masthead {
  text-align: center;
  margin: 0 0 2.6rem;
}
.story-masthead img {
  width: min(200px, 46vw);
  margin: 0 auto 1.6rem;
  display: block;
  box-shadow: var(--shadow);
}
.story-masthead h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0 0 0.7rem;
  color: var(--ink);
}
.story-masthead .kicker {
  font-family: var(--display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.55rem;
}
.story-masthead .author {
  font-family: var(--display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.86rem;
  color: var(--stone);
  margin: 0.8rem 0 0;
}

.chapter {
  font-size: 1.125rem;
  line-height: 1.8;
}
.chapter p { margin: 0 0 1.05em; }
.chapter p.break {
  text-align: center;
  letter-spacing: 0.35em;
  margin: 2.1em 0;
  color: var(--muted);
  font-style: normal;
}
.chapter em { font-style: italic; }

.afterword, .coming-card, .feedback {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.coming-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 1.25rem;
  align-items: center;
  background: var(--card);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.coming-card img {
  display: block;
  width: 92px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.coming-card h2 {
  margin: 0 0 0.45rem;
  color: var(--emerald);
}
html.reader .coming-card h2 { color: var(--emerald-deep); }
html.reader.dark .coming-card h2 { color: var(--emerald-2); }
.coming-card p { margin: 0 0 0.85rem; }
.coming-card p:last-child { margin: 0; }
.feedback p { margin: 0 0 0.85rem; max-width: 40rem; }
.feedback p:last-child { margin: 0; }

.page-404 {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1.2rem;
}
.page-404 h1 {
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0 0 1rem;
}
.page-404 p { margin: 0 0 1.4rem; color: var(--muted); }

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding: 2rem 0 2.3rem;
    text-align: center;
  }
  .cover-frame { width: min(280px, 68vw); margin: 0 auto; }
  .hook, .blurb, .comp { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  .feature {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .feature-cover { width: min(180px, 50vw); }
  .link-row { justify-content: center; }
  .signup-card, form.signup { margin-left: auto; margin-right: auto; }
  section h2, .bio, .contact { text-align: center; }
  .bio p, .contact p { margin-left: auto; margin-right: auto; }
  .coming-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}
@media (max-width: 560px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
  .site-nav { justify-content: flex-start; }
  .chapter { font-size: 1.05rem; }
}

@media print {
  .reader-bar, .theme-toggle, .skip { display: none !important; }
  html.reader, html.reader body { background: #fff; color: #000; }
  .story-shell { width: auto; padding: 0; }
  .coming-card, .feedback, .afterword, .site-footer { break-inside: avoid; }
}
