/* Lilith Lumen — The Nocturn Mythos */

@font-face { font-family: "Cinzel"; src: url("fonts/cinzel-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("fonts/cinzel-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-300-italic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --night: #120a0d;      /* page background, from the covers' shadows */
  --crypt: #1b1014;      /* raised areas */
  --oxblood: #6d0d16;    /* primary button, bands */
  --bloodstone: #a3121c; /* the jewel: hover, ornaments */
  --moonsilver: #dcd6cd; /* headings */
  --bone: #cfc6bd;       /* body text */
  --ash: #988d87;        /* quiet text */
  --hairline: rgba(220, 214, 205, 0.16);

  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --text: "Spectral", Georgia, "Times New Roman", serif;

  --step-0: 1.1875rem;  /* 19px body */
  --step-1: 1.5rem;
  --step-2: 2rem;
  --step-3: clamp(2rem, 3.4vw, 2.75rem);
  --step-4: clamp(2.5rem, 6.2vw, 4.75rem);

  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--text);
  font-weight: 300;
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--moonsilver); text-decoration-color: rgba(163, 18, 28, 0.8); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: #fff; text-decoration-color: var(--bloodstone); }

:focus-visible { outline: 2px solid var(--moonsilver); outline-offset: 3px; }

p { margin: 0 0 1em; }
strong { font-weight: 500; color: var(--moonsilver); }

.skip-link { position: absolute; left: -999px; top: 0.5rem; background: var(--moonsilver); color: var(--night); padding: 0.5rem 1rem; z-index: 20; }
.skip-link:focus { left: 0.5rem; }

/* Engraved silver lettering, as on the covers */
.engraved {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.12;
  color: var(--moonsilver);
  background: linear-gradient(180deg, #f6f2ec 0%, #d6cfc5 48%, #9a9189 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1, h2, h3 { margin: 0; font-weight: 400; }
h2.engraved { font-size: var(--step-3); }

.subtitle { font-style: italic; font-size: var(--step-1); color: var(--ash); margin: 0.4rem 0 1.6rem; line-height: 1.4; }

/* The jewel divider from the covers */
.jewel { display: flex; align-items: center; gap: 0.9rem; width: min(17rem, 70%); margin: 1.4rem 0 1.8rem; }
.jewel::before, .jewel::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(220, 214, 205, 0.55)); }
.jewel::after { background: linear-gradient(90deg, rgba(220, 214, 205, 0.55), transparent); }
.jewel span { width: 0.6rem; height: 0.6rem; transform: rotate(45deg); background: var(--bloodstone); box-shadow: 0 0 12px rgba(163, 18, 28, 0.7); }
.jewel.centered { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-decoration: none;
  padding: 1.05rem 1.7rem;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  line-height: 1.3;
  text-align: center;
}
.btn-blood { background: var(--oxblood); border-color: var(--bloodstone); color: #f6f1ea; }
.btn-blood:hover { background: var(--bloodstone); color: #fff; }
.btn-ghost { background: transparent; border-color: rgba(220, 214, 205, 0.45); color: var(--moonsilver); }
.btn-ghost:hover { border-color: var(--moonsilver); color: #fff; background: rgba(220, 214, 205, 0.06); }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.fineprint { font-size: 0.95rem; color: var(--ash); margin-top: 1.4rem; }

/* Header */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.4rem var(--gutter);
}
.site-header.solid { position: relative; border-bottom: 1px solid var(--hairline); }
.wordmark { font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.32em; text-decoration: none; }
.site-nav ul { list-style: none; display: flex; gap: 1.8rem; margin: 0; padding: 0; }
.site-nav a { font-size: 1rem; color: var(--bone); text-decoration: none; text-shadow: 0 1px 2px #000, 0 0 14px rgba(0, 0, 0, 0.9); }
.site-header:not(.solid) .wordmark { filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.8)); }
.site-nav a:hover { color: #fff; }
@media (max-width: 760px) { .site-nav li:not(.keep) { display: none; } }

/* Hero */
.hero {
  position: relative;
  min-height: min(100vh, 58rem);
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-art {
  position: absolute; inset: 0 0 0 auto; z-index: -1;
  width: min(60%, 46rem); height: 100%;
  object-fit: cover; object-position: 50% 25%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.35) 22%, #000 58%), linear-gradient(to top, transparent 0%, #000 22%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.35) 22%, #000 58%), linear-gradient(to top, transparent 0%, #000 22%);
  mask-composite: intersect;
  opacity: 0.92;
}
.hero-copy { padding: 8rem var(--gutter) 5rem; max-width: 44rem; }
.hero h1 { font-size: var(--step-4); max-width: 12em; text-wrap: balance; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 9rem; background: linear-gradient(to bottom, rgba(18, 10, 13, 0.85), transparent); z-index: 0; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; }
.hero .tagline { font-style: italic; font-size: var(--step-1); color: var(--moonsilver); margin: 0 0 1rem; line-height: 1.45; }
.hero .lede { max-width: 31rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero-art { animation: moonrise 2.4s ease-out both; }
  .hero-copy { animation: surface 1.4s ease-out 0.5s both; }
  @keyframes moonrise { from { opacity: 0; transform: scale(1.04); } to { opacity: 0.92; transform: none; } }
  @keyframes surface { from { opacity: 0; } to { opacity: 1; } }
}

@media (max-width: 760px) {
  .hero { align-items: end; min-height: 100svh; }
  .hero-art {
    width: 100%; height: 70%;
    -webkit-mask-image: linear-gradient(to top, transparent 0%, rgba(0,0,0,0.5) 35%, #000 70%);
    mask-image: linear-gradient(to top, transparent 0%, rgba(0,0,0,0.5) 35%, #000 70%);
    opacity: 0.6;
  }
  .hero-copy { padding-top: 40vh; padding-bottom: 3.5rem; }
}

/* Sections */
.section { padding: clamp(5rem, 11vw, 8.5rem) var(--gutter); }
.wrap { max-width: 68rem; margin: 0 auto; }
.prose { max-width: var(--measure); }

/* Featured book */
.book { display: grid; grid-template-columns: minmax(14rem, 23rem) 1fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: center; }
.book-cover img { width: 100%; height: auto; border-radius: 2px; box-shadow: 0 2.5rem 5rem -1.5rem rgba(109, 13, 22, 0.55), 0 0 0 1px rgba(220, 214, 205, 0.08); }
.book-text .free-line { font-weight: 500; color: var(--moonsilver); margin-top: 1.4rem; }
@media (max-width: 760px) { .book { grid-template-columns: 1fr; } .book-cover { max-width: 17rem; } }

/* Coming next */
.omen {
  text-align: center;
  background:
    radial-gradient(ellipse 60% 70% at 50% 45%, rgba(109, 13, 22, 0.55), transparent 70%),
    linear-gradient(180deg, var(--night), #1a0b0f 50%, var(--night));
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.omen .prose { margin: 0 auto; }
.omen .subtitle { margin-bottom: 2.2rem; }
.omen .vow { font-family: var(--text); font-style: italic; font-weight: 300; font-size: var(--step-2); color: var(--moonsilver); line-height: 1.3; margin: 0 0 1.4rem; }
.omen .actions { justify-content: center; }

/* Heading on the left, words on the right */
.split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split > :last-child { max-width: var(--measure); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Nocturn Mythos */
.mythos .closing { font-style: italic; color: var(--moonsilver); font-size: var(--step-1); line-height: 1.45; margin-top: 2rem; }

/* Newsletter */
.letter { background: var(--crypt); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.letter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.perks { list-style: none; margin: 0.4rem 0 0; padding: 0; columns: 2; column-gap: 2.2rem; }
.perks li { break-inside: avoid; position: relative; padding-left: 1.3rem; margin-bottom: 0.55rem; line-height: 1.45; }
.perks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.38rem; height: 0.38rem; background: var(--bloodstone); transform: rotate(45deg); }
.letter .vow { font-style: italic; color: var(--moonsilver); font-size: var(--step-1); margin-top: 1.6rem; }
@media (max-width: 860px) { .letter-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .perks { columns: 1; } }

/* About */
.about { display: grid; grid-template-columns: minmax(11rem, 17rem) 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.arch { border-radius: 999px 999px 3px 3px; overflow: hidden; aspect-ratio: 3 / 4; border: 1px solid rgba(220, 214, 205, 0.25); box-shadow: 0 0 0 6px var(--night), 0 0 0 7px rgba(163, 18, 28, 0.45); }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.about .welcome { font-weight: 500; color: var(--moonsilver); margin-top: 1.4rem; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .arch { max-width: 13rem; } }

/* Contact */
.contact { border-top: 1px solid var(--hairline); }
.mail { display: inline-block; font-family: var(--text); font-style: italic; font-weight: 400; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--moonsilver); margin: 0.2rem 0 1.6rem; overflow-wrap: anywhere; }

/* Footer */
.site-footer { padding: 4rem var(--gutter) 3rem; text-align: center; border-top: 1px solid var(--hairline); background: #0d0709; }
.site-footer .wordmark { font-size: 1.25rem; }
.site-footer nav ul { list-style: none; padding: 0; margin: 0 auto 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.8rem; }
.site-footer nav a { color: var(--bone); text-decoration: none; font-size: 1rem; }
.site-footer nav a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--bloodstone); }
.site-footer p { font-size: 0.92rem; color: var(--ash); margin: 0.3rem 0; }

/* Inner pages */
.page { padding: clamp(4rem, 9vw, 7rem) var(--gutter) clamp(5rem, 10vw, 8rem); }
.page h1 { font-size: var(--step-3); }
.page .prose { margin: 0 auto; }
.page h2 { font-family: var(--display); font-size: 1.15rem; letter-spacing: 0.1em; color: var(--moonsilver); margin: 2.4rem 0 0.8rem; }

/* Signup form */
.signup { margin-top: 2.2rem; padding: 2rem; background: var(--crypt); border: 1px solid var(--hairline); border-radius: 2px; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-size: 1rem; color: var(--moonsilver); margin-bottom: 0.4rem; }
.field input {
  width: 100%; font: inherit; font-weight: 400; font-size: 1.05rem; color: #f3eee8;
  background: var(--night); border: 1px solid rgba(220, 214, 205, 0.3); border-radius: 2px; padding: 0.85rem 1rem;
}
.field input:focus { border-color: var(--moonsilver); outline: none; box-shadow: 0 0 0 2px rgba(163, 18, 28, 0.6); }
.consent { font-size: 0.95rem; color: var(--ash); margin: 0.4rem 0 1.4rem; }
.signup .btn { width: 100%; }
.form-status { margin-top: 1rem; font-size: 1rem; color: var(--moonsilver); }

/* Content warnings */
details.cw { margin-top: 2rem; border: 1px solid var(--hairline); border-radius: 2px; background: var(--crypt); }
details.cw summary { cursor: pointer; padding: 1.2rem 1.4rem; font-family: var(--display); letter-spacing: 0.08em; color: var(--moonsilver); list-style-position: inside; }
details.cw[open] summary { border-bottom: 1px solid var(--hairline); }
details.cw .cw-body { padding: 1.4rem; }

/* Spam trap: hidden from people, visible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup { position: relative; }
