/* ============================================================
   jackneoveris.com — shared stylesheet
   Aesthetic: aged manuscript, alchemical textbook, gold leaf
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400;1,500&family=IM+Fell+English+SC&display=swap');

:root {
  --parchment: #f4ecd8;
  --parchment-deep: #ebe0c4;
  --parchment-shadow: #d9c9a3;
  --ink: #2a1f14;
  --ink-soft: #4a3826;
  --ink-faded: #6b5638;
  --gold: #9a7b2e;
  --gold-bright: #c4a052;
  --gold-deep: #6b5420;
  --crimson: #6b1f1f;
  --rule: rgba(106, 84, 32, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse at top, rgba(154, 123, 46, 0.08), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(107, 31, 31, 0.05), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.12 0 0 0 0 0.07 0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Navigation ---------- */
header.site-header {
  border-bottom: 1px double var(--rule);
  padding: 1.4rem 2rem 1.1rem;
  background: linear-gradient(to bottom, rgba(154, 123, 46, 0.06), transparent);
  position: relative;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  flex-wrap: wrap;
}

.brand {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
}

.brand .ampersand {
  color: var(--gold);
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  letter-spacing: normal;
  margin: 0 0.15em;
}

nav.site-nav { display: flex; gap: 1.6rem; flex-wrap: wrap; }

nav.site-nav a {
  font-family: 'IM Fell English SC', serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 220ms ease, border-color 220ms ease;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--gold-deep);
  border-bottom-color: var(--gold);
}

/* ---------- Main layout ---------- */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

main.wide { max-width: 1000px; }

/* When in a wide main, keep prose at readable width but let book reader span full */
main.wide > h1,
main.wide > .subtitle,
main.wide > .ornament,
main.wide > p,
main.wide > h2,
main.wide > h3,
main.wide > .frame,
main.wide > aside,
main.wide > blockquote,
main.wide > ul,
main.wide > ol {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 0.4rem;
}

h1 + .subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-faded);
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 1.7rem;
  letter-spacing: 0.05em;
  margin: 3rem 0 1.2rem;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  font-style: italic;
  font-weight: 400;
  margin: 2rem 0 0.8rem;
}

p {
  margin-bottom: 1.3rem;
  text-align: justify;
  hyphens: auto;
}

p.lead {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  margin: 0 auto 2rem;
  max-width: 600px;
}

/* Drop caps on landing */
p.with-drop-cap::first-letter {
  font-family: 'Cinzel', serif;
  float: left;
  font-size: 4.6rem;
  line-height: 0.85;
  padding: 0.3rem 0.6rem 0 0;
  color: var(--gold-deep);
  font-weight: 600;
}

a {
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 200ms, border-color 200ms;
}

a:hover {
  color: var(--crimson);
  border-bottom-color: var(--crimson);
}

blockquote {
  border-left: 2px solid var(--gold);
  padding: 0.4rem 1.4rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--ink-soft);
}

blockquote cite {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-style: normal;
  font-family: 'IM Fell English SC', serif;
  letter-spacing: 0.08em;
  color: var(--ink-faded);
}

ul, ol { margin: 1rem 0 1.5rem 1.5rem; }
li { margin-bottom: 0.5rem; }

/* ---------- Ornaments ---------- */
.ornament {
  display: block;
  text-align: center;
  margin: 3rem auto;
  color: var(--gold);
  font-size: 1.6rem;
  letter-spacing: 1.2rem;
  user-select: none;
}

.ornament::before,
.ornament::after {
  content: '';
  display: inline-block;
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  vertical-align: middle;
  margin: 0 1.2rem 0.4rem;
}

.rule-thin {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--rule), transparent);
  margin: 2.5rem 0;
}

/* ---------- Frame box (for highlighted content) ---------- */
.frame {
  border: 1px solid var(--rule);
  padding: 2rem 2.2rem;
  margin: 2.5rem 0;
  background: rgba(244, 236, 216, 0.4);
  position: relative;
}

.frame::before,
.frame::after {
  content: '❦';
  position: absolute;
  color: var(--gold);
  font-size: 1.1rem;
  background: var(--parchment);
  padding: 0 0.5rem;
}

.frame::before { top: -0.7rem; left: 1.5rem; }
.frame::after { bottom: -0.85rem; right: 1.5rem; }

/* ---------- Cards / Index list ---------- */
.index-list {
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}

.index-list li {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
}

.index-list li:last-child { border-bottom: none; }

.index-list a {
  display: block;
  border-bottom: none;
}

.index-list .title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.index-list .desc {
  font-style: italic;
  color: var(--ink-faded);
  font-size: 1.05rem;
}

.index-list a:hover .title { color: var(--gold-deep); }

/* ---------- Aside / Marginalia ---------- */
aside.marginalia {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-faded);
  border-left: 1px dotted var(--gold);
  padding-left: 1rem;
  margin: 1.5rem 0 1.5rem 1rem;
}

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px double var(--rule);
  padding: 2.5rem 2rem 3rem;
  margin-top: 4rem;
  text-align: center;
  color: var(--ink-faded);
  font-size: 0.95rem;
}

footer .glyph {
  color: var(--gold);
  font-size: 1.3rem;
  display: block;
  margin-bottom: 1rem;
  letter-spacing: 0.8rem;
}

footer p { text-align: center; margin: 0.4rem 0; }

footer a { color: var(--ink-soft); border-bottom-color: transparent; }
footer a:hover { color: var(--gold-deep); border-bottom-color: var(--gold); }

/* ---------- Contact form ---------- */
form.contact-form {
  max-width: 560px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

form.contact-form label {
  font-family: 'IM Fell English SC', serif;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
  display: block;
}

form.contact-form input,
form.contact-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  padding: 0.6rem 0.2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--ink);
  outline: none;
  transition: border-color 200ms;
}

form.contact-form input:focus,
form.contact-form textarea:focus {
  border-bottom-color: var(--gold);
}

form.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

form.contact-form button {
  align-self: center;
  margin-top: 1rem;
  padding: 0.7rem 2.4rem;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 220ms, color 220ms;
}

form.contact-form button:hover {
  background: var(--gold);
  color: var(--parchment);
}

/* ---------- Hero (landing only) ---------- */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
  position: relative;
}

.hero .sigil {
  font-size: 2.4rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: inline-block;
  letter-spacing: 0.6rem;
  animation: fade-in 1.6s ease-out;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin-bottom: 0.6rem;
  animation: fade-in 1.4s 0.2s both ease-out;
}

.hero .epithet {
  font-family: 'IM Fell English SC', serif;
  font-size: 1rem;
  letter-spacing: 0.4em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fade-in 1.4s 0.4s both ease-out;
}

.hero .tagline {
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 auto;
  animation: fade-in 1.4s 0.6s both ease-out;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Embedded book reader ---------- */
.book-reader {
  margin: 3rem 0;
  border: 1px solid var(--rule);
  background: rgba(244, 236, 216, 0.5);
  padding: 1rem;
  box-shadow:
    0 1px 0 rgba(154, 123, 46, 0.15),
    0 8px 24px rgba(42, 31, 20, 0.18);
  position: relative;
}

.book-reader::before {
  content: '';
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  border: 1px solid var(--rule);
  pointer-events: none;
  z-index: -1;
}

.book-reader iframe {
  display: block;
  width: 100%;
  height: 80vh;
  min-height: 600px;
  border: none;
  background: var(--parchment-deep);
}

.book-reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.4rem 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.book-reader-toolbar .label {
  font-family: 'IM Fell English SC', serif;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  color: var(--ink-faded);
}

.book-reader-toolbar .btn-download {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.45rem 1.2rem;
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  background: transparent;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  transition: background 220ms, color 220ms;
}

.book-reader-toolbar .btn-download:hover {
  background: var(--gold);
  color: var(--parchment);
  border-color: var(--gold);
}

@media (max-width: 640px) {
  .book-reader iframe { height: 70vh; min-height: 480px; }
  .book-reader-toolbar { flex-direction: column; align-items: stretch; text-align: center; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  main { padding: 2.5rem 1.4rem 4rem; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  nav.site-nav { gap: 1.1rem; }
  .ornament::before, .ornament::after { width: 40px; margin: 0 0.6rem 0.4rem; }
  .frame { padding: 1.4rem 1.3rem; }
  p { text-align: left; hyphens: none; }
  p.with-drop-cap::first-letter { font-size: 3.6rem; }
}

/* ---------- Writings & Watch (CMS-generated content) ---------- */
.entry-date {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.3rem;
}

.writing img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.6rem auto;
  border: 1px solid var(--rule);
}

/* Curated "Continue Reading" block at the foot of a post. Rows reuse
   .index-list so they read identically to the Writings index. */
.continue-reading {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.cr-ornament {
  text-align: center;
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  user-select: none;
}
.cr-heading {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  text-align: center;
  color: var(--gold-deep);
  margin-bottom: 0.5rem;
}
.cr-list { margin: 0; }

.watch-entry {
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--rule);
}
.watch-entry:last-child { border-bottom: none; }

.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1rem 0;
  border: 1px solid var(--rule);
}
.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
