/* The Barakah Ledgers — newsletter archive.
   Brand tokens mirrored from musawwif.com (LandingPage/public/styles.css). */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #3f6baf;
    --primary-deep: #2d5490;
    --primary-soft: #EEF2F9;
    --bg-page: #FAFBFC;
    --bg-soft: #F1F4F8;
    --bg-white: #FFFFFF;
    --text-dark: #1a1a1a;
    --text-body: #4A5563;
    --text-light: #7D8898;
    --border-color: #E2E8EE;
    --border-strong: #C9D2DC;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow-sm: 0 1px 2px rgba(22, 36, 60, 0.04);
    --shadow-md: 0 6px 22px rgba(22, 36, 60, 0.07);
    --shadow-lg: 0 14px 38px rgba(22, 36, 60, 0.10);
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--text-body);
    background-color: var(--bg-page);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-dark); line-height: 1.2; }
a { color: var(--primary-color); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--primary-deep); }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(8px);
    position: sticky; top: 0; z-index: 10;
}
.site-header .wrap { display: flex; align-items: center; gap: 14px; padding-top: 16px; padding-bottom: 16px; }
.site-header img { height: 34px; width: auto; }
.site-header .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.site-header .brand-name { font-family: var(--font-display); font-weight: 600; color: var(--text-dark); font-size: 1.05rem; }
.site-header .brand-sub { font-size: .78rem; color: var(--text-light); letter-spacing: .02em; }
.site-header .spacer { flex: 1; }
.site-header .home-link { font-size: .9rem; font-weight: 500; }

/* Hero */
.hero { text-align: center; padding: 56px 0 28px; }
.hero .eyebrow {
    text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; font-weight: 600;
    color: var(--primary-color); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 600; margin-bottom: 14px; }
.hero p { max-width: 540px; margin: 0 auto; color: var(--text-body); font-size: 1.05rem; }

/* Search */
.search-bar { margin: 30px 0 8px; }
.search-bar input {
    width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--text-dark);
    padding: 13px 16px; border: 1px solid var(--border-strong); border-radius: 12px;
    background: var(--bg-white); box-shadow: var(--shadow-sm); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search-bar input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-soft); }

/* Issue list */
.issue-list { list-style: none; margin: 22px 0 60px; display: flex; flex-direction: column; gap: 16px; }
.issue-card {
    display: block; background: var(--bg-white); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 22px 24px; box-shadow: var(--shadow-sm);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.issue-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.issue-card .date { font-size: .82rem; color: var(--text-light); font-weight: 500; letter-spacing: .02em; }
.issue-card h2 { font-size: 1.4rem; font-weight: 600; margin: 4px 0 8px; color: var(--text-dark); }
.issue-card p { color: var(--text-body); font-size: .96rem; }
.empty-state, .no-results { text-align: center; color: var(--text-light); padding: 48px 0; font-size: 1.05rem; }
.no-results { display: none; }

/* Issue page */
.back-link { display: inline-block; margin: 34px 0 10px; font-size: .9rem; font-weight: 500; }
.issue-header { padding-bottom: 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 8px; }
.issue-header .date { font-size: .84rem; color: var(--text-light); font-weight: 500; letter-spacing: .02em; }
.issue-header h1 { font-size: clamp(1.8rem, 4.5vw, 2.5rem); font-weight: 600; margin-top: 6px; }

/* Rendered email HTML */
.issue-body { padding: 30px 0 10px; font-size: 1.06rem; color: var(--text-body); }
.issue-body p { margin: 0 0 1.15em; }
.issue-body h1, .issue-body h2, .issue-body h3 { margin: 1.6em 0 .5em; color: var(--text-dark); }
.issue-body a { color: var(--primary-color); text-decoration: underline; text-underline-offset: 2px; }
.issue-body img { max-width: 100%; height: auto; border-radius: 10px; }
.issue-body blockquote {
    margin: 1.4em 0; padding: 4px 20px; border-left: 3px solid var(--primary-color);
    color: var(--text-dark); background: var(--bg-soft); border-radius: 0 8px 8px 0;
}
.issue-body ul, .issue-body ol { margin: 0 0 1.15em 1.4em; }
.issue-body li { margin-bottom: .4em; }

/* Subscribe */
.subscribe {
    background: var(--bg-white); border: 1px solid var(--border-color); border-radius: 18px;
    padding: 34px 30px; text-align: center; box-shadow: var(--shadow-sm); margin: 40px 0 64px;
}
.subscribe .eyebrow {
    text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 600;
    color: var(--primary-color); margin-bottom: 10px;
}
.subscribe h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 8px; }
.subscribe p { color: var(--text-body); max-width: 440px; margin: 0 auto 20px; }
.subscribe-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.subscribe-form input {
    flex: 1; font-family: var(--font-body); font-size: 1rem; padding: 12px 15px;
    border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-page); color: var(--text-dark);
}
.subscribe-form input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-soft); }
.btn-primary {
    font-family: var(--font-body); font-weight: 600; font-size: 1rem; color: #fff; cursor: pointer;
    background-color: var(--primary-color); border: none; border-radius: 10px; padding: 12px 22px;
    transition: background-color .2s var(--ease);
}
.btn-primary:hover { background-color: var(--primary-deep); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.subscribe-note { font-size: .8rem; color: var(--text-light); margin-top: 12px; }
.subscribe-message { margin-top: 14px; font-size: .92rem; font-weight: 500; min-height: 1.2em; }
.subscribe-message.is-success { color: #1f8a4c; }
.subscribe-message.is-error { color: #c23b3b; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color); padding: 30px 0; text-align: center;
    color: var(--text-light); font-size: .86rem;
}

@media (max-width: 560px) {
    .subscribe-form { flex-direction: column; }
    .hero { padding-top: 40px; }
}
