/* =========================================
   Stories / Read -- July Life Coach Hub
   Dark theme matching hub design language
   ========================================= */

:root {
    --bg: #07090d;
    --bg-surface: #0d1117;
    --bg-card: #131820;
    --bg-card-hover: #1a2230;
    --text: #e6e8ec;
    --text-secondary: #8b919a;
    --text-muted: #565d68;
    --accent: #C27C5A;
    --accent-light: rgba(194, 124, 90, 0.15);
    --accent-hover: #d4906e;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
    --font-serif: 'Libre Baskerville', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --max-w: 1100px;
    --reading-w: 680px;
}

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

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* =========================================
   HERO
   ========================================= */
.read-hero {
    text-align: center;
    padding: 6rem 2rem 3rem;
    max-width: 700px;
    margin: 0 auto;
}

.read-hero-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

.read-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text);
}

.read-hero-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
}

/* =========================================
   STORY CARDS (listing page)
   ========================================= */
.stories-section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.story-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.story-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover);
}

.story-card-date {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.story-card-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.35;
    margin-bottom: 0.6rem;
    color: var(--text);
    transition: color 0.2s;
}

.story-card:hover .story-card-title {
    color: var(--accent-hover);
}

.story-card-teaser {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card-read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent);
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
    transition: gap 0.2s;
}

.story-card:hover .story-card-read {
    gap: 10px;
}

.story-card-read svg {
    transition: transform 0.2s;
}

.story-card:hover .story-card-read svg {
    transform: translateX(2px);
}

/* Empty state */
.stories-empty {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 480px;
    margin: 0 auto;
}

.stories-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    opacity: 0.5;
}

.stories-empty h2 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
}

.stories-empty p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* =========================================
   READER PAGE -- single story
   ========================================= */
.reader-container {
    max-width: var(--reading-w);
    margin: 0 auto;
    padding: 5rem 2rem 3rem;
}

.reader-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    transition: color 0.2s;
}

.reader-back:hover {
    color: var(--accent);
}

.reader-meta {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.reader-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 2.5rem;
    color: var(--text);
}

/* Story body typography */
.reader-body {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.reader-body p {
    margin-bottom: 1.4rem;
}

.reader-body h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin: 2.5rem 0 1rem;
    color: var(--text);
}

.reader-body h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    margin: 2rem 0 0.75rem;
    color: var(--text);
}

.reader-body h4 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 400;
    margin: 1.5rem 0 0.5rem;
    color: var(--text);
}

.reader-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1.25rem;
    margin: 1.2rem 0 1.4rem;
    color: var(--text-secondary);
    background: var(--accent-light);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.reader-body ul, .reader-body ol {
    margin: 0.5rem 0 1.4rem 1.5rem;
    line-height: 1.85;
}

.reader-body li {
    margin-bottom: 0.4rem;
}

.reader-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.reader-body a:hover {
    opacity: 0.8;
}

.reader-body strong {
    color: var(--text);
    font-weight: 600;
}

.reader-body em {
    font-style: italic;
}

.reader-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

/* Precept cards for styled lists */
.precept-card {
    border-left: 3px solid var(--accent);
    background: rgba(194, 124, 90, 0.06);
    border-radius: 0 10px 10px 0;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
    position: relative;
}

.precept-card:last-child {
    margin-bottom: 1.4rem;
}

.precept-num {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.4rem;
    display: block;
}

.precept-title {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: block;
}

.precept-text {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

/* Callout box for key insights */
.callout-box {
    background: rgba(194, 124, 90, 0.08);
    border: 1px solid rgba(194, 124, 90, 0.2);
    border-radius: 10px;
    padding: 1.4rem 1.5rem;
    margin: 1.5rem 0;
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text);
    font-style: italic;
}

/* Audio embed for guided meditations */
.audio-embed {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin: 1.5rem 0;
}

.audio-embed-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.audio-embed-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), #A85A7A);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.audio-embed-title {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
}

.audio-embed-sub {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.audio-embed audio {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    outline: none;
}

.audio-embed .audio-embed-note {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.85rem;
    font-style: italic;
    line-height: 1.5;
}

.reader-body img {
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* =========================================
   RELATED EXPERIENCES
   ========================================= */
.related-section {
    max-width: var(--reading-w);
    margin: 0 auto;
    padding: 0 2rem 2rem;
    border-top: 1px solid var(--border);
    padding-top: 3rem;
}

.related-section-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    text-align: center;
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
}

.related-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    background: var(--bg-card-hover);
}

.related-card-icon {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
}

.related-card-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.related-card-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Explore Library CTA */
.explore-cta {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    max-width: var(--reading-w);
    margin: 0 auto 3rem;
    transition: all 0.25s ease;
    display: block;
    color: inherit;
    text-decoration: none;
}

.explore-cta:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    background: var(--bg-card-hover);
}

.explore-cta-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.explore-cta h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 400;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.explore-cta p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.explore-cta-arrow {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent);
    transition: transform 0.2s;
}

.explore-cta:hover .explore-cta-arrow {
    transform: translateX(4px);
}

/* =========================================
   NOT FOUND
   ========================================= */
.not-found {
    text-align: center;
    padding: 8rem 2rem;
    max-width: 480px;
    margin: 0 auto;
}

.not-found h1 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text);
}

.not-found p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.not-found a {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.not-found a:hover {
    background: var(--accent);
    color: #fff;
}

/* =========================================
   FOOTER (matches hub)
   ========================================= */
.site-footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-brand {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.footer-links { margin-bottom: 0.75rem; }
.footer-links a, .footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 0.4rem;
    transition: color 0.2s;
}
.footer-links a:hover, .footer-legal a:hover { color: var(--text); }
.footer-legal { margin-bottom: 1rem; font-size: 0.8rem; }
.footer-copy { font-size: 0.8rem; }

/* =========================================
   LOADING STATE
   ========================================= */
.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 4rem 2rem;
}

.loading-spinner::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 680px) {
    .read-hero { padding: 5rem 1.5rem 2rem; }
    .read-hero h1 { font-size: 1.8rem; }
    .stories-section { padding: 0 1.5rem 3rem; }
    .stories-grid { grid-template-columns: 1fr; }
    .reader-container { padding: 4.5rem 1.5rem 2rem; }
    .reader-title { font-size: 1.6rem; }
    .reader-body { font-size: 1rem; }
    .related-section { padding: 0 1.5rem 2rem; padding-top: 2rem; }
    .related-grid { grid-template-columns: 1fr 1fr; }
    .explore-cta { margin-left: 1.5rem; margin-right: 1.5rem; }
}

@media (max-width: 480px) {
    .read-hero { padding: 4.5rem 1rem 1.5rem; }
    .stories-section { padding: 0 1rem 2rem; }
    .reader-container { padding: 4rem 1rem 1.5rem; }
    .related-section { padding: 0 1rem 1.5rem; }
    .related-grid { grid-template-columns: 1fr; }
    .explore-cta { margin-left: 1rem; margin-right: 1rem; }
    .library-cta-section { padding: 1rem 1rem 2rem; }
}

/* =========================================
   LIBRARY CTA CARD
   ========================================= */
.library-cta-section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1rem 2rem 3rem;
}

.library-cta-card {
    display: block;
    text-align: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, rgba(194, 124, 90, 0.08), rgba(184, 134, 78, 0.04));
    border: 1px solid rgba(194, 124, 90, 0.2);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.library-cta-card:hover {
    border-color: rgba(194, 124, 90, 0.4);
    background: linear-gradient(135deg, rgba(194, 124, 90, 0.12), rgba(184, 134, 78, 0.06));
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(194, 124, 90, 0.1);
}

.library-cta-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.library-cta-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.library-cta-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto 1.25rem;
}

.library-cta-desc strong {
    color: var(--accent);
}

.library-cta-link {
    display: inline-block;
    padding: 10px 28px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.library-cta-card:hover .library-cta-link {
    background: var(--accent-hover);
}
