/* ═══════════════════════════════════════════════════════════════════════════
   NLFactory — Individual Newsletter Landing Page Styles ("The Periodical")
   Design system (reset, tokens, fonts, reduced-motion) from includes/theme.css
   via head-public.php. Nav/footer now come from the shared nav-public.php /
   footer-public.php includes (migrated 2026-06-23). Per-newsletter gradient
   hero + related-card headers are flattened to the editorial look via
   background:!important. Markup/JS (sample modal, sidebar, FAQ, related) intact.
   ═══════════════════════════════════════════════════════════════════════════ */
:root { --border: rgba(0,55,109,0.16); --text-light: #3f4e5e; --light-bg: #eef2f5; }

/* ── Hero (per-NL gradient flattened to editorial page-head) ──────────────── */
.nl-hero { background: var(--paper) !important; color: var(--ink); padding: 46px 20px 30px; text-align: left; position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.nl-hero::before { display: none; }
.nl-hero-content { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; }
.nl-hero-breadcrumb { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px; color: var(--muted); }
.nl-hero-breadcrumb a { color: var(--muted); text-decoration: none; }
.nl-hero-breadcrumb a:hover { color: var(--green-dark); }
.nl-hero-breadcrumb span { margin: 0 6px; color: var(--rule); }
.nl-hero-badge { display: inline-block; font-family: var(--mono); background: none; padding: 0; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; color: var(--green-dark); margin-bottom: 12px; }
.nl-hero h1 { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; margin-bottom: 8px; letter-spacing: -0.03em; color: var(--navy); line-height: 1; }
.nl-hero-frequency { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.nl-hero-rating { font-size: 0.9rem; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #c2841a; }
.nl-hero-rating-num { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.nl-hero-rating-count { font-family: var(--mono); color: var(--muted); }
.nl-hero-readers { color: var(--muted); padding-left: 8px; border-left: 1px solid var(--rule); }
.btn-hero-sample { background: var(--green); color: #fff; padding: 14px 32px; border: none; border-radius: 9px; font-family: var(--body); font-size: 1.02rem; font-weight: 600; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.btn-hero-sample:hover { background: var(--green-dark); transform: translateY(-2px); }

/* ── Page container / grid ───────────────────────────────────────────────── */
.nl-page-container { max-width: 1140px; margin: 0 auto; padding: 40px 28px; }
.nl-main-grid { display: grid; grid-template-columns: 1fr 340px; gap: 36px; margin-bottom: 56px; }
.nl-main-col { min-width: 0; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.nl-section { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: 30px; margin-bottom: 24px; }
.nl-section h2 { font-family: var(--display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); margin-bottom: 16px; }
.nl-long-desc { color: var(--muted); font-size: 1rem; line-height: 1.8; margin-bottom: 20px; }
.nl-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.nl-tag { font-family: var(--mono); background: none; color: var(--muted); border: 1px solid var(--rule); padding: 4px 11px; border-radius: 20px; font-size: 0.62rem; letter-spacing: 0.03em; }

/* ── Preview Section ─────────────────────────────────────────────────────── */
.nl-preview-section { position: relative; overflow: hidden; }
.nl-preview-date { font-family: var(--mono); font-size: 0.7rem; font-weight: 400; color: var(--muted); margin-left: 8px; text-transform: uppercase; }
.nl-preview-intro { color: var(--ink); font-size: 1rem; line-height: 1.8; margin-bottom: 20px; padding: 16px; background: var(--paper); border-radius: 0 8px 8px 0; border-left: 3px solid var(--green); }
.nl-preview-sections { margin-bottom: 20px; }
.nl-preview-section-item { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.nl-preview-section-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.nl-preview-section-item h4 { font-family: var(--display); font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--navy); margin-bottom: 6px; }
.nl-preview-section-item p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.nl-preview-fade { height: 60px; background: linear-gradient(transparent, var(--sheet)); margin-top: -60px; position: relative; z-index: 1; }
.nl-preview-cta { text-align: center; padding: 20px 0 0; position: relative; z-index: 2; }
.nl-preview-cta p { color: var(--muted); margin-bottom: 12px; font-weight: 500; }
.btn-preview-sample { background: var(--green); color: #fff; padding: 12px 30px; border: none; border-radius: 8px; font-family: var(--body); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.btn-preview-sample:hover { background: var(--green-dark); }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.nl-faq-list { display: flex; flex-direction: column; gap: 0; }
.nl-faq-item { border-bottom: 1px solid var(--rule); }
.nl-faq-item:last-child { border-bottom: none; }
.nl-faq-q { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 16px 0; background: none; border: none; cursor: pointer; text-align: left; font-family: var(--display); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--navy); }
.nl-faq-q:hover { color: var(--green-dark); }
.nl-faq-icon { font-size: 1rem; color: var(--green); transition: transform 0.3s; }
.nl-faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.nl-faq-item.open .nl-faq-a { max-height: 320px; }
.nl-faq-item.open .nl-faq-icon { transform: rotate(180deg); }
.nl-faq-a p { padding: 0 0 16px; color: var(--muted); font-size: 0.92rem; line-height: 1.7; }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.nl-sidebar { display: flex; flex-direction: column; gap: 18px; }
.nl-sidebar-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: 26px; }
.nl-sample-card { text-align: center; border: 2px solid var(--green); }
.nl-sidebar-icon { font-size: 2.2rem; margin-bottom: 10px; }
.nl-sample-card h3 { font-family: var(--display); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); margin-bottom: 8px; }
.nl-sample-card p { font-size: 0.88rem; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.nl-sidebar-input { width: 100%; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; font-family: var(--body); font-size: 0.95rem; color: var(--ink); outline: none; margin-bottom: 10px; transition: border-color 0.2s, box-shadow 0.2s; }
.nl-sidebar-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,160,119,0.12); }
.nl-sidebar-error { color: #c0432f; font-size: 0.82rem; margin-bottom: 8px; display: none; }
.btn-sidebar-sample { width: 100%; background: var(--green); color: #fff; padding: 12px; border: none; border-radius: 8px; font-family: var(--body); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn-sidebar-sample:hover { background: var(--green-dark); }
.btn-sidebar-sample:disabled { background: #94a3b8; cursor: not-allowed; }
.nl-sidebar-note { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); margin-top: 10px; }
.nl-sidebar-success { display: none; padding-top: 10px; }
.nl-sidebar-success-icon { font-size: 2rem; margin-bottom: 8px; }
.nl-sidebar-success p { margin-bottom: 12px; color: var(--muted); }
.nl-sidebar-signup { color: var(--green-dark); font-weight: 600; text-decoration: none; }
.nl-sidebar-signup:hover { text-decoration: underline; }
.nl-details-card h4 { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.nl-detail-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.nl-detail-row:last-child { border-bottom: none; }
.nl-detail-label { color: var(--muted); font-size: 0.85rem; }
.nl-detail-value { font-size: 0.85rem; font-weight: 600; color: var(--navy); }

/* ── Related Newsletters (flatten per-NL gradient headers) ───────────────── */
.nl-related-section { background: transparent; box-shadow: none; border: 0; padding: 0; }
.nl-related-section h2 { font-family: var(--display); letter-spacing: -0.02em; margin-bottom: 24px; }
.nl-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.nl-related-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; display: block; }
.nl-related-card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -28px rgba(0,55,109,0.4); border-color: var(--rule-soft); }
.nl-related-header { background: var(--sheet) !important; color: var(--navy); padding: 16px 20px 10px; border-bottom: 1px solid var(--navy); }
.nl-related-emoji { font-size: 1.4rem; margin-bottom: 4px; }
.nl-related-name { font-family: var(--display); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; color: var(--navy); }
.nl-related-freq { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.nl-related-body { padding: 14px 20px; }
.nl-related-body p { color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.nl-related-all { text-align: center; }
.btn-browse-all { display: inline-block; color: var(--green-dark); font-weight: 600; text-decoration: none; font-size: 0.92rem; padding: 10px 20px; border: 1px solid var(--green); border-radius: 8px; transition: background 0.15s, color 0.15s; }
.btn-browse-all:hover { background: var(--green); color: #fff; }

/* ── Bottom CTA → the single dark moment ─────────────────────────────────── */
.nl-bottom-cta { background: var(--navy-deep); color: #fff; text-align: center; padding: 64px 20px; }
.nl-bottom-cta h2 { font-family: var(--display); font-size: clamp(1.9rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; color: #fff; }
.nl-bottom-cta p { font-size: 1.05rem; margin: 0 auto 28px; opacity: 0.85; max-width: 600px; }
.btn-primary { background: var(--green); color: #fff; padding: 15px 36px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: 1.05rem; display: inline-block; transition: background 0.15s, transform 0.15s; }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); }

/* ── Sample modal ────────────────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(4,34,63,0.55); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.sample-modal { background: var(--sheet); border-radius: 16px; padding: 36px 32px; max-width: 440px; width: 90%; box-shadow: 0 28px 70px -20px rgba(0,55,109,0.5); text-align: center; position: relative; }
.sample-modal h3 { font-family: var(--display); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); margin-bottom: 8px; }
.sample-modal p { font-size: 0.92rem; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.sample-modal .modal-icon { font-size: 2.4rem; margin-bottom: 12px; }
.sample-modal input[type="email"] { width: 100%; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 8px; font-family: var(--body); font-size: 1rem; margin-bottom: 14px; outline: none; }
.sample-modal input[type="email"]:focus { border-color: var(--green); }
.sample-modal .btn-send-sample { width: 100%; background: var(--green); color: #fff; border: none; padding: 14px; border-radius: 8px; font-family: var(--body); font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.sample-modal .btn-send-sample:hover { background: var(--green-dark); }
.sample-modal .btn-send-sample:disabled { background: #94a3b8; cursor: not-allowed; }
.sample-modal .modal-note { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); margin-top: 12px; }
.sample-modal .modal-note a { color: var(--green-dark); font-weight: 600; }
.sample-modal .modal-close { position: absolute; top: 14px; right: 18px; font-size: 1.5rem; color: var(--muted); cursor: pointer; background: none; border: none; line-height: 1; }
.sample-modal .modal-close:hover { color: var(--ink); }
.sample-modal .modal-success { display: none; }
.sample-modal .modal-success .success-icon { font-size: 3rem; margin-bottom: 12px; }
.sample-modal .modal-success h3 { color: var(--green-dark); }
.sample-modal .modal-error { color: #c0432f; font-size: 0.85rem; margin-top: 8px; display: none; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .nl-main-grid { grid-template-columns: 1fr; }
    .nl-sidebar { order: -1; }
    .nl-related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nl-hero h1 { font-size: 2rem; }
    .nl-hero { padding: 38px 20px 26px; }
    .nl-section { padding: 24px 20px; }
    .nl-related-grid { grid-template-columns: 1fr; }
    .sample-modal { padding: 28px 20px; }
    .nl-hero-readers { display: block; border-left: none; padding-left: 0; margin-top: 4px; }
}
