/*
Theme Name: Ghosts That Linger
Theme URI: https://ghoststhatlinger.org
Author: Robin Karr-Morse & Meredith S. Wiley
Author URI: https://ghoststhatlinger.org
Description: Editorial pre-launch theme for the book Ghosts That Linger, the sequel to Ghosts from the Nursery. On activation it creates the seven site pages (Home, About the Book, Authors, Updates, Contact, Privacy Policy, Accessibility Statement) pre-filled with the full site text, and sets Home as the front page. Edit all wording under Pages; colors and fonts via the :root tokens at the top of style.css.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ghosts-that-linger
*/
/* ============================================================
   GHOSTS THAT LINGER — WordPress edition stylesheet
   Edit colors in :root below. Everything is plain CSS.
   ============================================================ */
:root {
  --bg: #0A0A0C;
  --bg-deep: #08080A;
  --card: #121316;
  --ink: #F3F4F6;
  --gray: #9CA3AF;
  --gray-dim: #6B7280;
  --line: #27272A;
  --red: #DC2626;
  --red-dark: #B91C1C;
  --red-bright: #EF4444;
  --red-soft: #FCA5A5;
  --green: #34D399;
  --serif: 'Playfair Display', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--red); color: #fff; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 3px; }

.wrap { max-width: 80rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 640px) { .wrap { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .wrap { padding-left: 2rem; padding-right: 2rem; } }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--red); color: #fff; padding: .5rem 1rem;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .2em;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- grain overlay ---------- */
.grain {
  position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(10,10,12,.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-name { font-family: var(--serif); font-weight: 900; font-size: 1.125rem; letter-spacing: -.02em; color: #fff; line-height: 1; }
.brand-sub { display: block; margin-top: .25rem; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .3em; color: var(--gray); }
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-links a {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .2em;
  color: var(--gray); text-decoration: none; transition: color .3s;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: var(--red-bright); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .2em;
  text-decoration: none; cursor: pointer; border: 0; transition: background-color .3s, color .3s, border-color .3s;
}
.btn-red { background: var(--red); color: #fff; padding: 1rem 2rem; }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { border: 1px solid var(--line); color: #D1D5DB; padding: 1rem 2rem; background: transparent; }
.btn-outline:hover { border-color: var(--red); color: #fff; }
.btn-nav { border: 1px solid var(--red); color: #fff; padding: .5rem 1.25rem; background: transparent; }
.btn-nav:hover { background: var(--red); }
.menu-btn { display: block; background: none; border: 0; color: #fff; padding: .5rem; cursor: pointer; }
@media (min-width: 768px) { .nav-links { display: flex; } .menu-btn { display: none; } }
.mobile-menu { display: none; border-top: 1px solid var(--line); background: var(--bg); padding: 1.5rem 1rem; }
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: .75rem .5rem; font-family: var(--mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: .2em; color: #D1D5DB; text-decoration: none;
}
.mobile-menu a.active { color: var(--red-bright); }
.mobile-menu .btn-nav { margin-top: 1rem; display: block; text-align: center; padding: .875rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; overflow: hidden; padding-top: 4rem;
}
.hero-glow {
  position: absolute; top: 25%; right: -10rem; width: 34rem; height: 34rem;
  border-radius: 50%; background: rgba(220,38,38,.15); filter: blur(140px); pointer-events: none;
}
.hero-glow.two { top: auto; right: auto; bottom: 0; left: -13rem; width: 26rem; height: 26rem; background: rgba(220,38,38,.08); filter: blur(120px); }
.hero-side {
  position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%) rotate(90deg);
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .5em;
  color: #3F3F46; display: none;
}
@media (min-width: 1024px) { .hero-side { display: block; } }
.hero-title { font-family: var(--serif); font-weight: 900; line-height: 1.02; letter-spacing: -.02em; color: #fff; }
.mask-line { display: block; overflow: hidden; padding-bottom: .25rem; }
.mask-line > span { display: block; transform: translateY(112%); animation: rise .9s cubic-bezier(.16,1,.3,1) forwards; }
.mask-line.d1 > span { animation-delay: .3s; }
.mask-line.d2 > span { animation-delay: .45s; }
.mask-line.d3 > span { animation-delay: .65s; }
@keyframes rise { to { transform: translateY(0); } }
.hero-h1 { font-size: 2.5rem; }
@media (min-width: 640px) { .hero-h1 { font-size: 3.75rem; } }
@media (min-width: 1024px) { .hero-h1 { font-size: 6rem; } }
.hero-sub { font-family: var(--serif); font-style: italic; color: var(--gray); font-size: 1.5rem; margin-top: 2rem; letter-spacing: -.01em; }
.hero-sub strong { font-style: normal; font-weight: 400; color: #fff; }
@media (min-width: 640px) { .hero-sub { font-size: 2.25rem; } }
@media (min-width: 1024px) { .hero-sub { font-size: 3rem; } }
.fade-in { opacity: 0; animation: fade .8s ease forwards; }
.fade-in.d4 { animation-delay: .95s; } .fade-in.d5 { animation-delay: 1.1s; } .fade-in.d6 { animation-delay: 1.25s; }
@keyframes fade { to { opacity: 1; } }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 2.5rem; }
.chip {
  border: 1px solid rgba(220,38,38,.6); background: rgba(220,38,38,.1);
  padding: .375rem 1rem; font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: .25em; color: var(--red-soft);
}
.credit { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .2em; color: var(--gray); }
.credit em { color: var(--red); font-style: normal; }
.lede { max-width: 36rem; margin-top: 2rem; font-size: 1rem; color: #D1D5DB; }
@media (min-width: 640px) { .lede { font-size: 1.125rem; } }
.hero-ctas { display: flex; flex-direction: column; gap: 1rem; margin-top: 3rem; }
@media (min-width: 640px) { .hero-ctas { flex-direction: row; align-items: center; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-deep); padding: 1.25rem 0; }
.marquee-track { display: flex; width: max-content; animation: drift 55s linear infinite; }
.marquee-row { display: flex; flex-shrink: 0; align-items: center; }
.marquee-row span.t { white-space: nowrap; padding: 0 2rem; font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: #D1D5DB; }
@media (min-width: 640px) { .marquee-row span.t { font-size: 1.5rem; } }
.diamond { display: inline-block; width: .5rem; height: .5rem; background: var(--red); transform: rotate(45deg); flex-shrink: 0; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 5rem 0; }
@media (min-width: 768px) { .section { padding: 7rem 0; } }
.section-deep { background: var(--bg-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-red { background: #1F0F12; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .25em; color: var(--red-bright); }
.h1 { font-family: var(--serif); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; color: #fff; font-size: 2.25rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .h1 { font-size: 3rem; } }
@media (min-width: 1024px) { .h1 { font-size: 3.75rem; } }
.h1 em, .h2 em { color: var(--red); }
.h2 { font-family: var(--serif); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: #fff; font-size: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .h2 { font-size: 1.875rem; } }
@media (min-width: 1024px) { .h2 { font-size: 2.25rem; } }
.prose { margin-top: 2rem; max-width: 42rem; color: var(--gray); }
.prose p { margin-bottom: 1.5rem; }
.prose p:last-child { margin-bottom: 0; }
.prose-wide { color: #D1D5DB; }
.prose-wide strong { color: #fff; font-weight: 500; }
.prose-lg { font-size: 1.25rem; line-height: 1.75; }
.rule { position: relative; height: 1px; background: rgba(255,255,255,.12); max-width: 80rem; margin: 0 auto; }
.rule::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; background: var(--red); transform: translate(-50%,-50%) rotate(45deg); }

/* grids */
.grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) {
  .grid-12 { grid-template-columns: repeat(12, 1fr); }
  .col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; } .col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; }
}

/* cards / bento */
.card { border: 1px solid var(--line); background: var(--card); padding: 1.5rem; height: 100%; transition: transform .3s, border-color .3s; }
@media (min-width: 768px) { .card { padding: 2rem; } }
.card:hover { transform: translateY(-2px); border-color: var(--red); }
.card h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.02em; color: #fff; font-size: 1.25rem; margin-top: 1.25rem; }
@media (min-width: 640px) { .card h3 { font-size: 1.5rem; } }
.card p { margin-top: 1rem; font-size: 1rem; color: var(--gray); }
.card .num { display: block; margin-top: 1.5rem; font-family: var(--mono); font-size: 10px; letter-spacing: .3em; color: #52525B; text-transform: uppercase; }
.bento { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 3.5rem; }
@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(12, 1fr); }
  .b7 { grid-column: span 7; grid-row: span 2; } .b5 { grid-column: span 5; } .b6 { grid-column: span 6; } .b12 { grid-column: span 12; }
  .b12 .card { display: flex; align-items: center; gap: 2.5rem; }
}
.icon { color: var(--red); }
.card .big-num { font-family: var(--serif); font-size: 2.5rem; font-weight: 900; color: var(--red); }

/* pull quotes */
.quote-grid { display: grid; grid-template-columns: 1fr; gap: 3.5rem; margin-top: 4rem; }
@media (min-width: 1024px) { .quote-grid { grid-template-columns: 1fr 1fr; column-gap: 5rem; } .quote-grid .pull-quote-wide { grid-column: 1 / -1; max-width: 56rem; } }
.pull-quote { border-left: 2px solid var(--red); padding: .5rem 0 .5rem 1.5rem; }
@media (min-width: 640px) { .pull-quote { padding-left: 2.5rem; } }
.pull-quote blockquote { font-family: var(--serif); font-style: italic; font-size: 1.125rem; line-height: 1.4; color: #fff; }
@media (min-width: 640px) { .pull-quote blockquote { font-size: 1.25rem; } }
@media (min-width: 1024px) { .pull-quote blockquote { font-size: 1.375rem; } }
.pull-quote figcaption { margin-top: 1.5rem; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .25em; color: var(--gray); }
.note { margin-top: 3.5rem; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .25em; color: #52525B; }

/* placeholder frames */
.frame {
  position: relative; border: 1px solid var(--line); background: var(--card); overflow: hidden;
  background-image: repeating-linear-gradient(-45deg, rgba(220,38,38,.14) 0, rgba(220,38,38,.14) 1px, transparent 1px, transparent 14px);
}
.frame-cover { aspect-ratio: 2/3; max-width: 20rem; margin: 0 auto; }
@media (min-width: 1024px) { .frame-cover { max-width: none; } }
.frame-portrait { aspect-ratio: 4/5; max-width: 20rem; margin: 0 auto; }
@media (min-width: 1024px) { .frame-portrait { max-width: none; } }
.frame .corner { position: absolute; width: 1.25rem; height: 1.25rem; border-color: var(--red); border-style: solid; border-width: 0; }
.frame .c-tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.frame .c-tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.frame .c-bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.frame .c-br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.frame-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 1.5rem; }
.frame-title { font-family: var(--serif); font-weight: 900; color: #fff; font-size: 1.5rem; line-height: 1.2; }
@media (min-width: 640px) { .frame-title { font-size: 1.875rem; } }
.frame-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .3em; color: var(--red-bright); margin-top: 1.25rem; }
.frame-sub { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: var(--gray-dim); margin-top: .75rem; }
.frame-caption { margin-top: 1rem; text-align: center; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: var(--gray-dim); }
@media (min-width: 1024px) { .frame-caption.left { text-align: left; } }
.frame img.swap { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* forms */
.form-row { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .form-row { flex-direction: row; } }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); background: var(--card); color: #fff;
  padding: .875rem 1.25rem; font-family: var(--mono); font-size: .875rem; transition: border-color .3s;
}
.input::placeholder, .textarea::placeholder { color: #9CA3AF; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--red); outline: none; }
.textarea { resize: vertical; min-height: 9rem; }
.form-row .input { flex: 1; }
.label { display: block; margin-bottom: .5rem; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .25em; color: var(--gray); }
.form-status { min-height: 1.5rem; margin-top: .75rem; font-family: var(--mono); font-size: 12px; }
.form-status.ok { color: var(--green); }
.form-status.err { color: #F87171; }
.form-note { margin-top: .5rem; font-size: 12px; color: var(--gray-dim); }
.form-panel { border: 1px solid var(--line); background: var(--card); padding: 1.5rem; }
@media (min-width: 768px) { .form-panel { padding: 2rem; } }
.field { margin-bottom: 1.25rem; }
.field-2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .field-2 { grid-template-columns: 1fr 1fr; } }

/* sidebar notes (contact) */
.side-note { border-left: 2px solid var(--red); padding-left: 1.5rem; margin-top: 2rem; }
.side-note h3 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .25em; color: var(--red-bright); }
.side-note p { margin-top: .75rem; font-size: .875rem; color: var(--gray); }

/* updates accordion */
.update-card { border: 1px solid var(--line); background: var(--card); transition: border-color .3s; margin-bottom: 1.5rem; }
.update-card:hover { border-color: var(--red); }
.update-head { width: 100%; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; padding: 1.5rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; }
@media (min-width: 768px) { .update-head { padding: 2rem; } }
.update-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .25em; }
.update-meta .cat { color: var(--red-bright); } .update-meta time { color: var(--gray-dim); }
.update-head h2 { font-family: var(--serif); font-weight: 700; color: #fff; font-size: 1.25rem; line-height: 1.3; letter-spacing: -.01em; margin-top: 1rem; }
@media (min-width: 640px) { .update-head h2 { font-size: 1.5rem; } }
.update-head p { margin-top: .75rem; font-size: 1rem; color: var(--gray); max-width: 42rem; }
.update-arrow { color: var(--red); flex-shrink: 0; margin-top: .5rem; transition: transform .3s; }
.update-card.open .update-arrow { transform: rotate(90deg); }
.update-body { display: none; border-top: 1px solid var(--line); padding: 1.5rem; }
@media (min-width: 768px) { .update-body { padding: 2rem; } }
.update-card.open .update-body { display: block; }
.update-body p { max-width: 48rem; font-size: 1rem; color: #D1D5DB; margin-bottom: 1rem; }

/* legal pages */
.legal h2 { font-family: var(--serif); font-weight: 700; color: #fff; font-size: 1.25rem; letter-spacing: -.01em; }
@media (min-width: 640px) { .legal h2 { font-size: 1.5rem; } }
.legal p { margin-top: 1rem; color: var(--gray); }
.legal > div { margin-bottom: 3rem; }

/* footer */
.footer { border-top: 1px solid var(--line); background: var(--bg-deep); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; padding: 4rem 0; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 5fr 3fr 4fr; } }
.footer h2 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .25em; color: var(--red-bright); font-weight: 500; }
.footer ul { list-style: none; margin-top: 1.25rem; }
.footer li { margin-bottom: .75rem; }
.footer a { color: var(--gray); text-decoration: none; font-size: .875rem; transition: color .3s; }
.footer a:hover { color: #fff; }
.footer .blurb { margin-top: 1.5rem; max-width: 24rem; font-size: .875rem; color: var(--gray); }
.footer .tag { margin-top: 1.5rem; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .25em; color: var(--gray-dim); }
.footer .fine { margin-top: 2rem; max-width: 20rem; font-size: 12px; color: var(--gray-dim); }
.footer-bottom { display: flex; flex-direction: column; gap: 1rem; padding: 2rem 0; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: var(--gray-dim); }
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; } }

/* scroll reveal */
@media (min-width: 768px) { .praise-list { grid-template-columns: 1fr 1fr !important; } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .mask-line > span { transform: none; animation: none; }
  .fade-in { opacity: 1; animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* WordPress admin bar offset for the fixed nav */
body.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .nav { top: 46px; } }
