/* After Midnight with Julie -- site styles */
:root {
  --plum: #0d0a1a;
  --plum-2: #140f26;
  --plum-3: #1e1035;
  --line: rgba(200, 200, 216, .14);
  --silver: #c8c8d8;
  --white: #e8e4f0;
  --grey: #9a9ab0;
  --lav: #a0a0bc;
  --muted: #7a7a96;
  --red: #b3123a;
  --red-2: #d4244f;
  --glow: rgba(200, 200, 216, .25);
  --serif: 'Playfair Display', Georgia, serif;
  --body: 'Lora', Georgia, serif;
  --r: 14px;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--plum); color: var(--white); font: 17px/1.65 var(--body);
  background-image: radial-gradient(1200px 600px at 50% -200px, var(--plum-3), transparent 70%);
  background-attachment: fixed; min-height: 100vh; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--silver); text-decoration-color: rgba(200,200,216,.4); text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; color: var(--white); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.eyebrow { font: 600 .74rem/1.2 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--grey); margin-bottom: .8em; display: block; }
.muted { color: var(--grey); }
.small { font-size: .88rem; }
.center { text-align: center; }
.red { color: var(--red-2); }

/* header */
.site-head { position: sticky; top: 0; z-index: 40; background: rgba(13,10,26,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.brand b { font: 600 1.35rem var(--serif); color: var(--white); }
.brand small { font: 500 .62rem var(--body); letter-spacing: .28em; text-transform: uppercase; color: var(--grey); margin-top: 4px; }
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--lav); font-size: .92rem; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--white); background: rgba(200,200,216,.07); }
.streak { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--silver); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 8px; white-space: nowrap; }
.streak svg { width: 14px; height: 14px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--white); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: .9rem; cursor: pointer; }
@media (max-width: 940px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--plum-2); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 1rem; }
  .site-head .streak { margin-left: 0; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem var(--body); text-decoration: none; padding: 12px 22px; border-radius: 999px; border: 1px solid var(--silver); color: var(--plum); background: var(--silver); cursor: pointer; transition: .2s; }
.btn:hover { background: #fff; color: var(--plum); box-shadow: 0 0 24px var(--glow); }
.btn.ghost { background: transparent; color: var(--silver); }
.btn.ghost:hover { background: rgba(200,200,216,.08); color: #fff; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { background: var(--red-2); border-color: var(--red-2); box-shadow: 0 0 24px rgba(212,36,79,.35); }
.btn[disabled] { opacity: .5; cursor: default; }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .55; }
.hero .bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--plum) 15%, rgba(13,10,26,.6) 55%, rgba(13,10,26,.2)), linear-gradient(0deg, var(--plum), transparent 40%); }
.hero .wrap { position: relative; padding-top: 72px; padding-bottom: 64px; }
.hero p.lead { font-size: 1.15rem; color: var(--lav); max-width: 34em; }
.page-head { padding: 56px 0 24px; }
.page-head p { color: var(--lav); max-width: 40em; font-size: 1.08rem; }

/* sections and cards */
section { padding: 40px 0; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }
.card { background: linear-gradient(180deg, rgba(30,16,53,.55), rgba(20,15,38,.75)); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; position: relative; overflow: hidden; }
.card.link { text-decoration: none; color: inherit; display: block; transition: .25s; }
.card.link:hover { border-color: rgba(200,200,216,.35); box-shadow: 0 0 30px rgba(200,200,216,.08); transform: translateY(-2px); }
.card .thumb { margin: -24px -24px 18px; aspect-ratio: 16/9; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.card h3 { margin-bottom: .35em; }
.card .meta { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.tag { display: inline-block; font: 600 .66rem var(--body); letter-spacing: .16em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--silver); margin-bottom: 12px; }
.tag.new { border-color: var(--red); color: #fff; background: rgba(179,18,58,.35); }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* poll */
.poll h3 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.poll .opts { display: grid; gap: 10px; margin: 18px 0 10px; }
.opt { position: relative; text-align: left; font: inherit; color: var(--white); background: rgba(13,10,26,.6); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; overflow: hidden; transition: .2s; }
.opt:hover:not([disabled]) { border-color: var(--silver); }
.opt .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(179,18,58,.45), rgba(179,18,58,.18)); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.opt.mine .bar { background: linear-gradient(90deg, rgba(200,200,216,.32), rgba(200,200,216,.12)); }
.opt span { position: relative; display: flex; justify-content: space-between; gap: 12px; }
.opt b { font-weight: 600; color: var(--silver); white-space: nowrap; }
.opt[disabled] { cursor: default; }
.poll .foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--grey); }
.julie-says { margin-top: 14px; padding: 12px 16px; border-left: 2px solid var(--red); background: rgba(179,18,58,.08); font-style: italic; color: var(--lav); border-radius: 0 10px 10px 0; }

/* countdown */
.countdown { font: 600 1rem var(--serif); color: var(--silver); letter-spacing: .04em; }

/* reading */
.prose { font-size: 1.1rem; line-height: 1.8; }
.prose p { margin-bottom: 1.15em; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--red); font-style: italic; color: var(--lav); }
.prose .ornament { text-align: center; color: var(--muted); letter-spacing: .6em; margin: 2em 0; }
.prose img { border-radius: var(--r); margin: 1.5em 0; }
.byline { color: var(--muted); font-size: .88rem; margin-bottom: 2em; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 40px 0; flex-wrap: wrap; }

/* comments */
.comments { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 32px; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment .who { font-weight: 600; color: var(--silver); font-size: .92rem; }
.comment .when { color: var(--muted); font-size: .78rem; margin-left: 8px; }
.comment p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .flag { background: none; border: 0; color: var(--muted); font: inherit; font-size: .74rem; cursor: pointer; padding: 0; margin-top: 6px; }
.comment .flag:hover { color: var(--red-2); }

/* forms */
form .row { display: grid; gap: 12px; margin-bottom: 12px; }
input[type=text], textarea { width: 100%; font: inherit; color: var(--white); background: rgba(13,10,26,.7); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
input[type=text]:focus, textarea:focus { outline: none; border-color: var(--silver); box-shadow: 0 0 0 3px rgba(200,200,216,.12); }
textarea { min-height: 110px; resize: vertical; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--lav); margin-bottom: 10px; cursor: pointer; }
label.check input { margin-top: 5px; accent-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note { font-size: .9rem; padding: 10px 14px; border-radius: 10px; margin-top: 10px; }
.note.ok { background: rgba(200,200,216,.08); color: var(--silver); }
.note.err { background: rgba(179,18,58,.18); color: #f3c3cf; }
.count { font-size: .78rem; color: var(--muted); text-align: right; }

/* confessional wall */
.wall { columns: 3 300px; column-gap: 20px; }
.confession { break-inside: avoid; margin-bottom: 20px; }
.confession .body { font-size: 1.05rem; font-style: italic; color: var(--white); white-space: pre-wrap; overflow-wrap: anywhere; }
.confession .body::before { content: '\201C'; font: 600 2.6rem/0 var(--serif); color: var(--red); vertical-align: -.45em; margin-right: 4px; }
.confession .sig { color: var(--grey); font-size: .85rem; margin-top: 10px; }
.confession .reply { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: .95rem; color: var(--lav); }
.confession .reply b { color: var(--red-2); font-family: var(--serif); font-weight: 600; display: block; margin-bottom: 4px; }
.confession.featured { border-color: rgba(179,18,58,.6); box-shadow: 0 0 30px rgba(179,18,58,.12); }

/* books */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px; }
.book { text-decoration: none; color: inherit; }
.book img { border-radius: 6px; aspect-ratio: 5/8; object-fit: cover; width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: .25s; }
.book:hover img { box-shadow: 0 0 34px var(--glow); transform: translateY(-3px); }
.book b { display: block; font: 600 .98rem var(--serif); margin-top: 10px; line-height: 1.3; }
.book span { font-size: .8rem; color: var(--grey); }

/* tiers */
.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tiers { grid-template-columns: minmax(0, 1fr); } }
.tier .price { font: 600 2rem var(--serif); color: var(--white); }
.tier .price small { font: 400 .9rem var(--body); color: var(--grey); }
.tier.best { border-color: var(--red); }

/* audio */
audio { width: 100%; margin-top: 12px; filter: invert(.88) hue-rotate(200deg); border-radius: 999px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 64px; padding: 40px 0 56px; color: var(--muted); font-size: .88rem; }
.site-foot .cols { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-foot a { color: var(--grey); text-decoration: none; margin-right: 16px; }
.site-foot a:hover { color: var(--white); }

/* age gate */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(8,6,16,.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.gate .box { max-width: 460px; text-align: center; }
.gate h1 { font-size: clamp(2rem, 7vw, 3rem); }
.gate p { color: var(--lav); }
.gate .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.candle { width: 18px; height: 60px; margin: 0 auto 26px; position: relative; }
.candle::before { content: ''; position: absolute; left: 50%; top: 0; width: 12px; height: 22px; margin-left: -6px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff6e0, #f7c873 45%, rgba(212,36,79,.6) 75%, transparent 80%); box-shadow: 0 0 30px 10px rgba(247,200,115,.25); animation: flick 2.4s infinite ease-in-out; transform-origin: 50% 100%; }
.candle::after { content: ''; position: absolute; left: 3px; right: 3px; top: 24px; bottom: 0; background: linear-gradient(180deg, var(--silver), #8a8aa0); border-radius: 3px; }
@keyframes flick { 0%,100% { transform: scale(1) rotate(-1deg); opacity: 1; } 30% { transform: scale(.94, 1.04) rotate(2deg); } 60% { transform: scale(1.03, .96) rotate(-2deg); opacity: .9; } }
body.gated main, body.gated .site-head, body.gated .site-foot { filter: blur(14px); }

.loading { color: var(--muted); font-style: italic; }
.empty { color: var(--grey); font-style: italic; padding: 20px 0; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
