/* Homily Stories Pages - premium shared redesign */
:root {
    --primary: #6D1232;
    --primary-dark: #4A0D24;
    --primary-light: #8C1D45;
    --secondary: #C49A3A;
    --secondary-dark: #9B7624;
    --accent: #0F766E;
    --accent-soft: #E8F5F1;
    --ink: #1B1420;
    --dark: #0F172A;
    --mid: #475569;
    --gray: #64748B;
    --muted: #8B7280;
    --ivory: #FFFDF8;
    --warm: #FBF7F0;
    --rose-soft: #F7E9EE;
    --gold-soft: #F7EBCB;
    --light: #F8FAFC;
    --border: #E8DDD7;
    --border-strong: #D8C4B8;
    --white: #FFFFFF;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(27, 20, 32, .06), 0 4px 14px rgba(27, 20, 32, .06);
    --shadow-md: 0 12px 32px rgba(27, 20, 32, .10);
    --shadow-lg: 0 24px 70px rgba(27, 20, 32, .16);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    line-height: 1.65;
    background:
        linear-gradient(180deg, var(--ivory) 0, var(--white) 520px),
        var(--white);
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

::selection {
    background: rgba(196, 154, 58, .35);
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 0;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 253, 248, .92);
    border-bottom: 1px solid rgba(216, 196, 184, .7);
    padding: 0 1.5rem;
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1200px;
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.header-logo {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: var(--primary-dark);
    text-decoration: none;
    flex: 0 0 auto;
}

.header-logo:hover {
    text-decoration: none;
}

.header-logo img {
    height: 42px;
    width: auto;
    display: block;
}

.header-logo span {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 0;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
}

.header-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 .8rem;
    border-radius: 999px;
    color: #594854;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
    transition: color .2s ease, background .2s ease;
}

.header-nav a:hover,
.header-nav a[style] {
    background: rgba(109, 18, 50, .08);
    color: var(--primary-dark) !important;
}

.header-cta {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex: 0 0 auto;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 8px;
    padding: .72rem 1.05rem;
    font-size: .92rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border: 1px solid rgba(74, 13, 36, .2);
    box-shadow: 0 10px 24px rgba(109, 18, 50, .22);
}

.btn-primary:hover {
    color: var(--white);
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(109, 18, 50, .27);
}

.btn-secondary {
    background: rgba(255, 255, 255, .58);
    color: var(--primary-dark);
    border: 1px solid rgba(109, 18, 50, .22);
}

.btn-secondary:hover {
    background: var(--white);
    border-color: rgba(109, 18, 50, .4);
    text-decoration: none;
}

.mobile-menu-toggle {
    display: none;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: .55rem .62rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary-dark);
    margin: 5px 0;
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
}

/* Hero */
.stories-hero {
    color: var(--white);
    padding: 6.4rem 1.5rem 7.2rem;
    text-align: left;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(116deg, rgba(74, 13, 36, .98) 0%, rgba(109, 18, 50, .93) 44%, rgba(27, 20, 32, .72) 100%),
        url('/img/Religious-art-background.png') center/cover;
    isolation: isolate;
}

.stories-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(90deg, rgba(0,0,0,.7), transparent 78%);
    pointer-events: none;
}

.stories-hero::after {
    content: '';
    position: absolute;
    right: max(-80px, calc((100vw - 1180px) / 2 - 90px));
    bottom: -185px;
    width: 560px;
    height: 560px;
    border: 1px solid rgba(214, 168, 79, .28);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 70px rgba(214, 168, 79, .05),
        inset 0 0 0 140px rgba(255, 255, 255, .03);
    pointer-events: none;
}

.stories-hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 820px) minmax(260px, 1fr);
    align-items: end;
    gap: 3.5rem;
}

.stories-hero .container::after {
    content: 'Biblical\A Historical\A Contemporary';
    white-space: pre-line;
    justify-self: end;
    width: min(320px, 100%);
    border: 1px solid rgba(255, 255, 255, .22);
    border-left: 4px solid var(--secondary);
    background: rgba(255, 253, 248, .10);
    border-radius: 8px;
    padding: 1.4rem 1.5rem;
    color: rgba(255, 255, 255, .86);
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 2.05;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
}

.stories-hero nav[aria-label="Breadcrumb"] {
    grid-column: 1 / -1;
    margin-bottom: -1.75rem !important;
    color: rgba(255,255,255,.7);
}

.stories-hero nav[aria-label="Breadcrumb"] a:hover {
    color: var(--white) !important;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: .45rem;
    background: rgba(255, 253, 248, .12);
    border: 1px solid rgba(214, 168, 79, .42);
    color: #F8E7B1;
    border-radius: 999px;
    padding: .48rem .9rem;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1.15rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}

.stories-hero h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(2.55rem, 6vw, 5.15rem);
    font-weight: 800;
    line-height: .99;
    color: #FFFDF8;
    max-width: 880px;
    margin: 0 0 1.25rem;
    letter-spacing: 0;
}

.stories-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 253, 248, .88);
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    line-height: 1.72;
}

.hero-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    max-width: 820px;
    margin-top: 2.35rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(255, 253, 248, .12);
    backdrop-filter: blur(12px);
}

.stat-item {
    padding: 1.05rem 1.2rem;
    background: rgba(255, 253, 248, .06);
}

.stat-num {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2.05rem;
    line-height: 1;
    color: #F8E7B1;
    font-weight: 800;
}

.stat-label {
    color: rgba(255,255,255,.78);
    font-size: .84rem;
    font-weight: 700;
    margin-top: .45rem;
}

/* Generator */
.generator-section {
    padding: 0 1.5rem 5.5rem;
    background:
        linear-gradient(180deg, transparent 0, transparent 78px, var(--ivory) 78px, var(--ivory) 100%);
}

.generator-card {
    max-width: 1040px;
    margin: -72px auto 0;
    background: rgba(255, 255, 255, .96);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(216, 196, 184, .95);
    position: relative;
    z-index: 3;
}

.generator-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--accent));
}

.generator-card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: start;
    background:
        linear-gradient(135deg, rgba(251, 247, 240, .98), rgba(255, 253, 248, .98));
    padding: 2rem 2.25rem 1.65rem;
    border-bottom: 1px solid var(--border);
}

.generator-card-header::after {
    content: 'Free tool';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(196, 154, 58, .38);
    background: rgba(247, 235, 203, .72);
    color: #725417;
    padding: .4rem .75rem;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.generator-card-header h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    line-height: 1.08;
    color: var(--primary-dark);
    margin-bottom: .55rem;
}

.generator-card-header p {
    max-width: 720px;
    color: #65515D;
    font-size: .98rem;
    line-height: 1.65;
}

.generator-card-body {
    padding: 2.25rem;
}

.guest-counter {
    display: flex;
    align-items: center;
    gap: .7rem;
    background: linear-gradient(135deg, var(--rose-soft), rgba(247, 235, 203, .65));
    border: 1px solid rgba(109, 18, 50, .14);
    border-radius: 8px;
    padding: .85rem 1rem;
    margin-bottom: 1.4rem;
    color: var(--primary-dark);
    font-size: .92rem;
    font-weight: 700;
}

.guest-counter i {
    color: var(--secondary-dark);
}

.guest-counter.warning {
    background: #FFF7ED;
    border-color: #FED7AA;
    color: #92400E;
}

.guest-counter.warning i {
    color: #D97706;
}

.form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, .72fr);
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.form-group label {
    color: var(--ink);
    font-size: .9rem;
    font-weight: 900;
}

.form-group label span.opt {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: .86rem 1rem;
    color: var(--ink);
    background: var(--ivory);
    font-size: .98rem;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

select.form-control {
    min-height: 52px;
    cursor: pointer;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(109, 18, 50, .11);
}

textarea.form-control {
    resize: vertical;
    min-height: 190px;
    line-height: 1.68;
}

.char-hint {
    color: var(--muted);
    font-size: .8rem;
}

.load-homily-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 52px;
    width: fit-content;
    max-width: 100%;
    margin-top: 0;
    background: var(--white);
    border: 1px solid rgba(109, 18, 50, .28);
    color: var(--primary-dark);
    border-radius: 8px;
    padding: .75rem 1rem;
    font-size: .9rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.load-homily-btn:hover {
    background: var(--rose-soft);
    border-color: rgba(109, 18, 50, .42);
    transform: translateY(-1px);
}

.generate-btn {
    width: 100%;
    min-height: 58px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border: 0;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    font-size: 1.02rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    box-shadow: 0 16px 34px rgba(109, 18, 50, .23);
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: saturate(1.05);
    box-shadow: 0 20px 42px rgba(109, 18, 50, .28);
}

.generate-btn:disabled {
    opacity: .62;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading and results */
.story-loading {
    display: none;
    text-align: center;
    padding: 3.4rem 2rem;
    border-top: 1px solid var(--border);
    background: var(--ivory);
}

.loading-spinner {
    width: 58px;
    height: 58px;
    border: 4px solid rgba(109, 18, 50, .12);
    border-top-color: var(--secondary);
    border-right-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.4rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-message {
    color: var(--primary-dark);
    font-size: 1.02rem;
    font-weight: 900;
}

.loading-sub {
    color: var(--muted);
    font-size: .86rem;
    margin-top: .45rem;
}

.story-results {
    display: none;
    border-top: 1px solid var(--border);
    background: var(--white);
}

.results-header {
    padding: 1.6rem 2.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    background: linear-gradient(135deg, var(--ivory), var(--warm));
}

.results-header h3 {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--primary-dark);
    font-size: 1.35rem;
}

.regen-btn {
    background: var(--white);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: .62rem 1rem;
    color: var(--primary-dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .88rem;
    font-weight: 900;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.regen-btn:hover {
    background: var(--rose-soft);
    border-color: rgba(109, 18, 50, .38);
    transform: translateY(-1px);
}

.stories-list {
    padding: 1.6rem 2.25rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.story-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.story-card:hover {
    box-shadow: var(--shadow-md);
}

.story-card.recommended {
    border-color: rgba(109, 18, 50, .42);
}

.story-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .9rem;
    padding: .92rem 1.15rem;
    background: #FCFAF6;
    border-bottom: 1px solid var(--border);
}

.story-card.recommended .story-card-header {
    background: linear-gradient(135deg, var(--rose-soft), rgba(247, 235, 203, .62));
}

.story-type-badge {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    color: var(--primary);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.story-num {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.recommended-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--primary);
    color: var(--white);
    padding: .22rem .55rem;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.story-card-body {
    padding: 1.25rem 1.25rem 1.35rem;
}

.story-text {
    color: #2C2430;
    font-size: .97rem;
    line-height: 1.82;
    white-space: pre-wrap;
}

.story-card-footer {
    padding: .95rem 1.15rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: .75rem;
    background: #FCFAF6;
}

.copy-btn,
.use-btn {
    flex: 1;
    min-height: 44px;
    border-radius: 8px;
    padding: .72rem .95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .48rem;
    font-size: .88rem;
    font-weight: 900;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.copy-btn {
    background: var(--white);
    border: 1px solid var(--border-strong);
    color: var(--primary-dark);
}

.copy-btn:hover {
    background: var(--rose-soft);
    border-color: rgba(109, 18, 50, .36);
}

.copy-btn.copied {
    background: var(--accent-soft);
    border-color: rgba(15, 118, 110, .34);
    color: var(--accent);
}

.use-btn {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: var(--white);
}

.use-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Content sections */
.examples-section,
.faq-section {
    background:
        linear-gradient(180deg, rgba(251, 247, 240, .96), rgba(255, 253, 248, .96));
    padding: 5.8rem 1.5rem;
}

.spoke-links-section,
.related-section {
    background: var(--white);
    padding: 5.5rem 1.5rem;
}

.section-label {
    color: var(--primary);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: .75rem;
}

.section-title {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--ink);
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.08;
    font-weight: 800;
    max-width: 820px;
    margin-bottom: 1rem;
}

.section-body {
    color: var(--gray);
    font-size: 1.06rem;
    line-height: 1.75;
    max-width: 720px;
    margin-bottom: 2.5rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.example-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.55rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.example-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), transparent);
}

.example-type {
    display: inline-flex;
    align-items: center;
    gap: .44rem;
    color: var(--primary);
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .85rem;
}

.example-title {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--ink);
    font-size: 1.14rem;
    line-height: 1.25;
    font-weight: 800;
    margin-bottom: .75rem;
}

.example-text {
    color: #594854;
    font-size: .92rem;
    line-height: 1.76;
}

.spoke-links-grid,
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: .9rem;
    margin-top: 2rem;
}

.spoke-link-card,
.related-card {
    min-height: 84px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.15rem;
    background: var(--ivory);
    display: flex;
    align-items: center;
    gap: .85rem;
    color: var(--ink);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.related-card {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.spoke-link-card:hover,
.related-card:hover {
    background: var(--white);
    border-color: rgba(109, 18, 50, .36);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
    color: var(--ink);
    text-decoration: none;
}

.spoke-link-card i,
.related-card i {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rose-soft);
    color: var(--primary);
    font-size: 1rem;
    flex: 0 0 auto;
}

.spoke-link-card span,
.related-card span {
    color: var(--ink);
    font-size: .94rem;
    font-weight: 900;
    line-height: 1.28;
}

/* FAQ */
.faq-list {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    margin-top: 2.2rem;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-q {
    width: 100%;
    padding: 1.2rem 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--white);
    border: 0;
    cursor: pointer;
    color: var(--ink);
    text-align: left;
    font-size: .98rem;
    font-weight: 900;
    line-height: 1.42;
    transition: background .18s ease, color .18s ease;
}

.faq-q:hover {
    background: var(--ivory);
    color: var(--primary-dark);
}

.faq-q i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rose-soft);
    color: var(--primary);
    flex-shrink: 0;
    transition: transform .25s ease;
}

.faq-item.open .faq-q {
    background: var(--ivory);
}

.faq-item.open .faq-q i {
    transform: rotate(45deg);
}

.faq-a {
    display: none;
    padding: 0 1.35rem 1.25rem;
    color: var(--gray);
    font-size: .94rem;
    line-height: 1.78;
}

.faq-item.open .faq-a {
    display: block;
}

/* Footer */
.site-footer {
    background:
        linear-gradient(135deg, #1B1420 0%, #2B1522 55%, #4A0D24 100%);
    color: rgba(255,255,255,.72);
    padding: 4.5rem 1.5rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr;
    gap: 3.2rem;
    margin-bottom: 3rem;
}

.footer-logo-img {
    height: 36px;
    width: auto;
}

.footer-brand .brand-name {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--white);
    font-size: 1.35rem;
    font-weight: 800;
}

.footer-brand p {
    max-width: 390px;
    color: rgba(255,255,255,.72);
    font-size: .92rem;
    line-height: 1.75;
    margin-top: .9rem;
}

.footer-col h4 {
    color: #F8E7B1;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.footer-col a,
.footer-bottom a {
    color: rgba(255,255,255,.7);
    font-size: .9rem;
}

.footer-col a:hover,
.footer-bottom a:hover {
    color: var(--white);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: rgba(255,255,255,.58);
    font-size: .82rem;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(27, 20, 32, .68);
    backdrop-filter: blur(6px);
}

.modal-overlay.visible {
    display: flex;
}

.modal-box {
    width: min(100%, 540px);
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalIn .26s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.55rem 1.75rem;
    background: linear-gradient(135deg, var(--rose-soft), var(--warm));
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--primary-dark);
    font-size: 1.45rem;
    line-height: 1.15;
}

.modal-close {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--primary-dark);
    width: 34px;
    height: 34px;
}

.modal-body {
    padding: 1.75rem;
}

.modal-body p {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.modal-benefits {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin-bottom: 1.5rem;
}

.modal-benefits li {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    color: var(--ink);
    font-size: .94rem;
    line-height: 1.45;
}

.modal-benefits i {
    color: var(--accent);
    margin-top: .2rem;
}

.promo-code {
    display: inline-block;
    background: var(--gold-soft);
    border: 1px dashed rgba(155, 118, 36, .62);
    color: #725417;
    border-radius: 6px;
    padding: .18rem .55rem;
    font-size: .82rem;
    font-weight: 900;
}

.modal-actions {
    display: grid;
    gap: .75rem;
}

.modal-actions a,
.modal-actions button {
    border-radius: 8px;
    padding: .85rem 1.1rem;
    font-size: .95rem;
    font-weight: 900;
    text-align: center;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
    text-decoration: none;
}

.modal-cta-primary {
    background: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary);
}

.modal-cta-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.modal-cta-secondary {
    background: var(--white);
    color: var(--primary-dark);
    border: 1px solid rgba(109, 18, 50, .28);
}

.modal-cta-secondary:hover {
    background: var(--rose-soft);
}

.modal-dismiss {
    background: transparent;
    border: 0;
    color: var(--gray);
}

.modal-dismiss:hover {
    color: var(--ink);
}

.homily-select-wrapper {
    position: relative;
    margin-top: .5rem;
}

/* Mobile */
@media (max-width: 1000px) {
    .header-nav {
        gap: 0;
    }

    .header-nav a {
        padding: 0 .55rem;
        font-size: .86rem;
    }

    .stories-hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stories-hero .container::after {
        justify-self: start;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .site-header {
        padding: 0 1rem;
    }

    .header-inner {
        height: 66px;
    }

    .header-logo img {
        height: 34px;
    }

    .header-logo span {
        font-size: 1.1rem;
    }

    .mobile-menu-toggle {
        display: block;
        order: 3;
    }

    .header-cta {
        margin-left: auto;
    }

    .header-cta .btn-secondary {
        display: none;
    }

    .header-cta .btn-primary {
        min-height: 38px;
        padding: .58rem .82rem;
        font-size: .84rem;
    }

    .header-nav {
        display: none;
    }

    .header-nav.open {
        display: flex;
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: .25rem;
        background: var(--ivory);
        border-bottom: 1px solid var(--border);
        padding: .8rem 1rem 1rem;
        box-shadow: var(--shadow-md);
    }

    .header-nav.open a {
        border-radius: 8px;
        min-height: 44px;
    }

    .stories-hero {
        padding: 4.4rem 1.25rem 6.2rem;
    }

    .stories-hero h1 {
        font-size: clamp(2.25rem, 12vw, 3.35rem);
    }

    .stories-hero p {
        font-size: 1.03rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .generator-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .generator-card {
        margin-top: -64px;
    }

    .generator-card-header {
        grid-template-columns: 1fr;
        padding: 1.55rem 1.25rem 1.3rem;
    }

    .generator-card-header::after {
        width: fit-content;
    }

    .generator-card-body,
    .stories-list,
    .results-header {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .spoke-links-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.2rem;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .header-logo span {
        display: inline;
        max-width: 132px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stories-hero .container::after {
        display: none;
    }

    .story-card-header,
    .story-card-footer,
    .results-header,
    .footer-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .story-card-header > div {
        justify-content: space-between;
    }

    .copy-btn,
    .use-btn {
        width: 100%;
    }

    .examples-section,
    .spoke-links-section,
    .related-section,
    .faq-section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .modal-header,
    .modal-body {
        padding: 1.25rem;
    }
}
