/* ===========================
   EchoFyre Newsletter Styles
   =========================== */

/* Brand fonts */
@font-face {
  font-family: 'Unica One';
  src: url('https://images.echofyre.com/UnicaOne-Regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Serif';
  src: url('https://images.echofyre.com/IBMPlexSerif-Regular.woff2') format('woff2');
  font-display: swap;
}

/* Theme tokens */
:root {
  --bg: #0b0a0d;
  --panel: rgba(0,0,0,0.55);
  --text: #e9e6f2;
  --muted: #bdb7cf;
  --gold: #e0b84a;
  --gold-soft: #e0b84a60;
  --rule: rgba(255,255,255,0.12);
  --maxw: 1120px;
}

/* Base */
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Serif', ui-serif, Georgia, Cambria, Times, 'Times New Roman', serif;
  line-height: 1.6;
  background: url('https://images.echofyre.com/newsletter_bg.jpg') no-repeat center center fixed;
  background-size: cover;
  margin: 0;
  padding: 0;
  background-attachment: fixed;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Outer page container */
.container { max-width: var(--maxw); margin: 0 auto; padding: 16px; }

/* Nameplate / masthead */
.nameplate {
  text-align: center;
  margin: 20px auto 8px;
  position: relative;
  padding: 20px 12px 8px;
}
.nameplate h1 {
  font-family: 'Unica One', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}
.nameplate .subtitle { color: var(--muted); font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; }
.edition { margin-top: 8px; font-size: 0.95rem; color: var(--muted); }
.sigil-watermark {
  position: absolute; inset: -10px 0 auto 0; top: 0; height: 100%; pointer-events: none; opacity: 0.05;
  background: radial-gradient(circle at 50% 60%, var(--gold) 0, transparent 35%);
  filter: blur(20px);
}
.rule { height: 1px; background: var(--rule); margin: 12px 0 20px; }

/* Lead article */
.lead { display: grid; gap: 8px; margin-bottom: 20px; }
.dateline { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lead h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.deck { color: var(--muted); margin-bottom: 6px; }
.dropcap:first-letter {
  float: left; font-family: 'Unica One'; font-size: 3.2rem; line-height: 1;
  padding-right: 8px; padding-top: 6px; color: var(--gold);
}

/* Newsletter inner container (gold frame + parchment) */
.newsletter-container {
    background: rgba(0, 0, 0, 0.65); /* Darker than before for better readability */
    border: 2px solid #e0b84a;
    border-radius: 12px;
    padding: 2rem;
    max-width: 900px;
    margin: auto;
    box-shadow: 0 0 20px rgba(224, 184, 74, 0.5);
}

/* readability overlay (subtle) */
.newsletter-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0,0,0,0));
    z-index: -1;
    border-radius: 12px;
}
.newsletter-container > * { position: relative; }

/* Make headings pop inside the container */
.newsletter-container h1,
.newsletter-container h2,
.newsletter-container h3 {
  color: #ffd966; /* Brighter gold for contrast */
  text-shadow: 0 0 6px #000;
}

/* Cards (stacked, no columns) */
.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 1.25rem; }
.card h4 { margin: 12px 0 6px; font-size: 1.05rem; color: var(--gold); }
.card .small { color: var(--muted); font-size: 0.95rem; }
ul.clean { margin: 8px 0 0 0; padding: 0 0 0 18px; }

/* Stacked spacing between cards */
section[aria-label="front page sections"] .card + .card { margin-top: 16px; }

/* Feature editorial */
.feature {
  margin: 20px 0;
  border: 2px solid var(--gold);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(224,184,74,0.09), rgba(224,184,74,0.04));
  box-shadow: 0 0 16px var(--gold-soft);
  padding: 16px 18px;
}
.feature h3 { margin: 0 0 6px; font-size: 1.35rem; }
blockquote {
  margin: 0; padding-left: 12px; border-left: 3px solid var(--gold); color: #f0eae1;
}
.signature { margin-top: 8px; color: var(--muted); }

/* Sealed file (Black Pages) */
.sealed {
  margin: 20px 0 28px;
  border: 2px solid var(--gold);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 0 16px var(--gold-soft);
  overflow: hidden;
}
.sealed .bar {
  background: linear-gradient(90deg, rgba(224,184,74,0.25), rgba(224,184,74,0.08));
  padding: 10px 14px; display: flex; align-items: center; justify-content: space-between;
}
.sealed .bar h3 { margin: 0; font-size: 1.1rem; }
.stamp { font-family: 'Unica One'; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); font-size: 0.85rem; }
.sealed .body { padding: 14px; }
.warning { font-size: 0.95rem; color: var(--muted); }
.author-note { font-style: italic; color: #d8d0e8; margin-top: 8px; }

/* Center the summary toggle button */
#black-pages details summary {
  display: flex;
  justify-content: center;
  cursor: pointer;
}

#black-pages details summary .toggle {
  display: inline-block;
  text-align: center;
}

#black-pages .body-erotic {
  white-space: pre-wrap;
}

/* Details toggle */
details summary { cursor: pointer; list-style: none; user-select: none; }
details summary::-webkit-details-marker { display: none; }
.toggle {
  margin-top: 10px; display: inline-block; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--gold);
  background: transparent; color: var(--gold); font-weight: 600;
}
.toggle:hover, .toggle:focus { outline: none; box-shadow: 0 0 0 3px rgba(224,184,74,0.25); }

/* Footer */
footer { text-align: center; color: var(--muted); margin: 20px 0 32px; }
.return { display: inline-block; margin-top: 8px; }

/* Mobile adjustments */
@media (max-width: 600px) {
  .newsletter-container { padding: 1.25rem; }
  .dropcap:first-letter { font-size: 2.6rem; padding-top: 4px; }
  section[aria-label="front page sections"] .card { padding: 1rem; }
  section[aria-label="front page sections"] .card + .card { margin-top: 12px; }
}
