/*
Theme Name: SickDarkNTwisted
Theme URI: https://www.sickdarkntwisted.com
Author: SickDarkNTwisted
Description: A modern gothic haunt theme rebuilt from the classic SickDarkNTwisted.com. One-page front page with origin story, haunt timeline, hearse garage, crypt gallery, gothic poetry reader, charity callout, contact form and opt-in ambient audio. Content lives in content.json.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: sdt
*/

:root {
  --bg: #080709; --bg2: #0c0a0e; --card: #121016; --red: #dc2626; --red-hi: #ef4444;
  --bone: #f3f0ea; --muted: #a1a1aa; --dim: #71717a; --line: rgba(239, 68, 68, .2);
  --display: "Cinzel Decorative", serif; --cond: "Barlow Condensed", sans-serif;
  --body: "Spectral", Georgia, serif; --mono: "JetBrains Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--bone); font-family: var(--body); font-size: 18px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
::selection { background: var(--red); color: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 1024px) { .wrap { padding: 0 40px; } }
.section { padding: 112px 0; }
@media (min-width: 1024px) { .section { padding: 144px 0; } }
.alt { background: var(--bg2); border-top: 1px solid rgba(69, 10, 10, .6); border-bottom: 1px solid rgba(69, 10, 10, .6); }
.red { color: var(--red); }
.overline { font-family: var(--mono); font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--red-hi); margin: 0 0 20px; }
.h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.15; margin: 0; position: relative; }
.h2::after { content: ""; position: absolute; left: 0; bottom: -14px; width: 64px; height: 3px; background: var(--red); box-shadow: 0 0 12px rgba(220, 38, 38, .6); }
.lead { margin-top: 40px; color: var(--muted); font-size: 1.1rem; max-width: 720px; }
.head { margin-bottom: 64px; max-width: 760px; }
.grid-12 { display: grid; gap: 56px; }
@media (min-width: 1024px) { .grid-12 { grid-template-columns: 7fr 5fr; } }

.btn { display: inline-flex; align-items: center; gap: .6rem; padding: .9rem 1.6rem; font-family: var(--cond); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; font-size: 1rem; border: 1px solid transparent; cursor: pointer; transition: background-color .25s, transform .25s, box-shadow .25s, border-color .25s; }
.btn-blood { background: var(--red); color: #fff; }
.btn-blood:hover { background: var(--red-hi); transform: translateY(-2px); box-shadow: 0 0 24px rgba(220, 38, 38, .45); }
.btn-ghost { border-color: rgba(243, 240, 234, .25); color: var(--bone); }
.btn-ghost:hover { border-color: var(--red); color: var(--red-hi); transform: translateY(-2px); }
.card { background: var(--card); border: 1px solid var(--line); transition: border-color .3s, box-shadow .3s; }
.card:hover { border-color: rgba(239, 68, 68, .55); box-shadow: 0 0 22px rgba(220, 38, 38, .18); }
.legacy { filter: grayscale(.35) contrast(1.1) brightness(.85); transition: filter .5s, transform .7s; }
.card:hover .legacy { filter: none; transform: scale(1.04); }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: none; }

/* header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background-color .3s; }
.site-header.scrolled { background: rgba(8, 7, 9, .85); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(127, 29, 29, .4); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.nav { display: none; gap: 32px; }
.nav a { font-family: var(--cond); text-transform: uppercase; letter-spacing: .2em; font-size: .9rem; color: var(--muted); transition: color .25s; }
.nav a:hover { color: var(--red-hi); }
@media (min-width: 1024px) { .nav { display: flex; } .menu-btn { display: none; } }
.tools { display: flex; gap: 8px; }
.sound-btn, .menu-btn { background: none; border: 1px solid #3f3f46; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; padding: 8px 12px; cursor: pointer; }
.sound-btn.on { border-color: var(--red); color: var(--red-hi); }
.mobile-nav { display: none; flex-direction: column; gap: 16px; padding: 24px; background: var(--bg); border-top: 1px solid rgba(127, 29, 29, .4); }
.mobile-nav.open { display: flex; }

/* hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(8, 7, 9, .8) 50%, transparent), linear-gradient(0deg, var(--bg), transparent 50%); }
.fog { position: absolute; inset: auto -20% 0 -20%; height: 45%; background: radial-gradient(ellipse at center, rgba(200, 200, 210, .16), transparent 65%); filter: blur(30px); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
.hero .wrap { position: relative; width: 100%; padding-top: 160px; padding-bottom: 80px; }
.hero h1 { font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 8vw, 6rem); line-height: .95; margin: 0; text-shadow: 0 4px 24px rgba(220, 38, 38, .45); }
.hero p.intro { max-width: 580px; color: #d4d4d8; font-size: 1.2rem; margin-top: 32px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.stats { margin-top: 80px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(127, 29, 29, .3); border: 1px solid rgba(127, 29, 29, .4); max-width: 900px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats div { background: rgba(8, 7, 9, .9); padding: 24px 20px; }
.stats strong { display: block; font-family: var(--cond); font-size: 2.3rem; color: var(--red-hi); line-height: 1.1; }
.stats span { font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--dim); }

/* origin */
.dropcap::first-letter { float: left; font-family: var(--display); font-size: 4.5rem; line-height: .8; margin-right: 12px; color: var(--red); }
.origin p { color: #d4d4d8; line-height: 1.85; }
.aside { border-left: 2px solid #b91c1c; padding-left: 24px; font-style: italic; color: var(--muted); }
.pullquote { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1.3; color: var(--red); margin: 32px 0 12px; }
.duo { display: flex; gap: 12px; padding: 12px; overflow: hidden; }
.duo img { width: 50%; height: 256px; object-fit: cover; }

/* timeline */
.timeline { list-style: none; margin: 0 0 0 8px; padding: 0; border-left: 1px solid rgba(127, 29, 29, .6); }
.timeline li { position: relative; padding: 0 0 64px 40px; display: grid; gap: 16px; }
@media (min-width: 768px) { .timeline li { grid-template-columns: 3fr 9fr; gap: 40px; } }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 10px; width: 12px; height: 12px; background: var(--red); transform: rotate(45deg); box-shadow: 0 0 14px rgba(220, 38, 38, .8); }
.year { font-family: var(--cond); font-size: 1.9rem; font-weight: 700; color: var(--red-hi); margin: 0; }
.place { font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--dim); }
.timeline h3 { font-family: var(--display); font-size: 1.5rem; margin: 0; }
.timeline p.txt { color: var(--muted); max-width: 680px; }
.tag { display: inline-block; border: 1px solid rgba(127, 29, 29, .6); padding: 4px 10px; margin: 0 6px 6px 0; font-family: var(--mono); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: #fca5a5; }

/* chainsaw */
.chainsaw { background: #b91c1c; }
.chainsaw .wrap { display: grid; gap: 48px; align-items: center; padding-top: 96px; padding-bottom: 96px; }
@media (min-width: 1024px) { .chainsaw .wrap { grid-template-columns: 2fr 1fr; } }
.chainsaw h2 { font-family: var(--display); font-weight: 900; font-size: clamp(2.2rem, 5vw, 3.8rem); color: #0b0909; line-height: 1.1; margin: 24px 0 0; }
.chainsaw p { color: #fef2f2; font-size: 1.25rem; }
.chainsaw .fn { font-family: var(--cond); text-transform: uppercase; letter-spacing: .15em; font-size: .9rem; color: #fecaca; }
.chainsaw .saw { background: #0b0909; padding: 24px; }

/* garage */
.bento { display: grid; gap: 16px; grid-auto-rows: 220px; }
@media (min-width: 768px) { .bento { grid-template-columns: repeat(8, 1fr); } .s-large { grid-column: span 4; grid-row: span 2; } .s-wide { grid-column: span 4; } .s-tall { grid-column: span 2; grid-row: span 2; } .s-normal { grid-column: span 2; } }
.tile { position: relative; overflow: hidden; cursor: pointer; padding: 0; text-align: left; color: inherit; font: inherit; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #000, rgba(0, 0, 0, .3) 50%, transparent); }
.tile .cap { position: absolute; bottom: 0; padding: 20px; z-index: 1; }
.tile .cap small { font-family: var(--mono); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--red-hi); }
.tile .cap h3 { font-family: var(--display); font-size: 1.25rem; margin: 6px 0 0; }

/* gallery */
.masonry { columns: 2; column-gap: 16px; }
@media (min-width: 768px) { .masonry { columns: 3; } }
.masonry .card { display: block; width: 100%; margin-bottom: 16px; break-inside: avoid; overflow: hidden; padding: 0; cursor: pointer; }

/* poetry */
.poems { display: grid; gap: 16px; }
@media (min-width: 640px) { .poems { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .poems { grid-template-columns: repeat(3, 1fr); } }
.poem-card { display: block; width: 100%; padding: 24px; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.poem-card .n { font-family: var(--mono); font-size: .75rem; color: var(--red); }
.poem-card h3 { font-family: var(--display); font-size: 1.25rem; margin: 16px 0 6px; transition: color .25s; }
.poem-card:hover h3 { color: var(--red-hi); }
.poem-card .by, .poem-card .go { font-family: var(--cond); text-transform: uppercase; letter-spacing: .15em; font-size: .85rem; color: var(--dim); }
.poem-card .go { display: block; margin-top: 20px; font-family: var(--mono); font-size: 11px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, .85); padding: 24px; }
.modal.open { display: flex; }
.modal-box { position: relative; max-width: 900px; width: 100%; max-height: 85vh; overflow-y: auto; background: #0b090d; border: 1px solid rgba(127, 29, 29, .6); padding: 16px; }
.modal-box.parchment { max-width: 680px; padding: 56px; background: radial-gradient(ellipse at top, #f1e7d0, #d9c8a4 70%, #c4ae84); color: #2a0a0a; border: 0; }
.parchment h3 { font-family: var(--display); font-size: 2rem; color: #7f1d1d; margin: 0; }
.parchment .by { font-family: var(--cond); text-transform: uppercase; letter-spacing: .15em; color: rgba(127, 29, 29, .7); }
.parchment p { white-space: pre-line; font-style: italic; font-size: 1.1rem; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 28px; color: inherit; cursor: pointer; }
.modal-box img { width: 100%; max-height: 75vh; object-fit: contain; }

/* charity + contact */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .split { grid-template-columns: 7fr 5fr; } }
.unicef { background: #fff; padding: 40px; }
.form { display: grid; gap: 20px; }
.form .row { display: grid; gap: 20px; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }
.form input, .form textarea { width: 100%; background: #0d0b10; border: 1px solid rgba(127, 29, 29, .5); color: var(--bone); padding: 12px 14px; font: inherit; font-size: 1rem; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--red); outline-offset: 0; }
.notice { padding: 14px 18px; border: 1px solid var(--red); color: #fecaca; margin-bottom: 24px; }

/* blog / pages */
.entry { max-width: 760px; padding-top: 160px; padding-bottom: 96px; }
.entry h1, .entry h2.title { font-family: var(--display); }
.entry .meta { font-family: var(--mono); font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .15em; }
.entry a { color: var(--red-hi); }

/* footer */
.site-footer { border-top: 1px solid rgba(127, 29, 29, .4); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; align-items: flex-end; padding-top: 64px; padding-bottom: 64px; }
.site-footer .friends a { font-family: var(--cond); text-transform: uppercase; letter-spacing: .15em; color: var(--muted); margin-right: 24px; }
.site-footer .friends a:hover { color: var(--red-hi); }
.copy { border-top: 1px solid rgba(69, 10, 10, .5); text-align: center; padding: 24px; font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: #52525b; margin: 0; }
