/* storiographer.net — Airy Minimalist Magazine */

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

/* ── Base ── */
html {
    scroll-behavior: smooth;
}

body {
    background: #FFFFFF;
    color: #6B6B6B;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Shared ── */
.section-heading {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: #1A1A1A;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

/* ── Hero ── */
.hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 2rem 3rem;
    text-align: left;
}

.hero-title {
    font-family: 'Cormorant', serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 3rem);
    color: #1A1A1A;
    letter-spacing: 0.08em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.hero-ext {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #999999;
    vertical-align: super;
    margin-left: 4px;
    letter-spacing: 0;
}

.hero-desc {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 1.05rem;
    color: #6B6B6B;
    margin-bottom: 1.5rem;
}

.hero-rule {
    border: none;
    border-top: 1px solid #E8E8E4;
    margin-bottom: 1.25rem;
}

.hero-nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #3A5A8C;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #3A5A8C;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #1A1A1A;
}

/* ── Templates ── */
.templates {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.template-grid {
    display: grid;
    grid-template-columns: 65% 35%;
    gap: 1.5rem;
}

.template-featured {
    background: #F5F3EE;
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.template-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.template-card {
    background: #FAFAF8;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #E8E8E4;
    transition: border-color 0.25s ease, transform 0.2s ease;
}

.template-card:hover {
    border-color: #3A5A8C;
    transform: translateY(-2px);
}

.template-name {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: #1A1A1A;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.template-card .template-name {
    font-size: 1rem;
}

.use-count {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: #3A5A8C;
    font-weight: 500;
    white-space: nowrap;
}

.featured-desc {
    font-size: 0.95rem;
    color: #6B6B6B;
    line-height: 1.8;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.featured-desc::first-letter {
    font-family: 'Cormorant', serif;
    font-size: 3rem;
    float: left;
    line-height: 1;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
    color: #3A5A8C;
    font-weight: 700;
}

.template-desc {
    font-size: 0.85rem;
    color: #6B6B6B;
    line-height: 1.6;
}

.template-link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #3A5A8C;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
}

.template-link:hover {
    color: #1A1A1A;
}

/* ── Forums ── */
.forums {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.thread-list {
    display: flex;
    flex-direction: column;
}

.thread-entry {
    border-bottom: 1px solid #E8E8E4;
    padding: 1.25rem 0;
    transition: background 0.2s ease;
}

.thread-entry:first-child {
    border-top: 1px solid #E8E8E4;
}

.thread-entry:hover {
    background: #FAFAF8;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    border-radius: 4px;
}

.category-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3A5A8C;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.thread-title {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #1A1A1A;
    line-height: 1.4;
    margin-bottom: 0.3rem;
}

.thread-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.reply-count {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #999999;
}

.meta-dot {
    color: #999999;
    font-size: 0.75rem;
    line-height: 1;
}

.thread-time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #999999;
}

/* ── Workshops ── */
.workshops {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.workshop-list {
    display: flex;
    flex-direction: column;
}

.workshop-entry {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid #E8E8E4;
    padding: 1.25rem 0;
    transition: background 0.2s ease;
}

.workshop-entry:first-child {
    border-top: 1px solid #E8E8E4;
}

.workshop-entry:hover {
    background: #FAFAF8;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    border-radius: 4px;
}

.workshop-date {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #3A5A8C;
    white-space: nowrap;
    min-width: 50px;
}

.workshop-info {
    flex: 1;
}

.workshop-title {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: #1A1A1A;
    line-height: 1.3;
    margin-bottom: 0.15rem;
}

.workshop-host {
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    color: #999999;
    font-style: italic;
}

.workshop-spots {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #999999;
    white-space: nowrap;
}

/* ── Spotlight ── */
.spotlight {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.spotlight-card {
    background: #F5F3EE;
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
}

.spotlight-title {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: 1.3rem;
    color: #1A1A1A;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.spotlight-author {
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    font-style: italic;
    color: #3A5A8C;
    display: block;
    margin-bottom: 0.75rem;
}

.spotlight-desc {
    font-size: 0.9rem;
    color: #6B6B6B;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

.spotlight-viz {
    margin-top: 1rem;
}

.story-map-svg {
    width: 100%;
    max-width: 520px;
    height: auto;
    display: block;
    margin: 0 auto 1rem;
}

.viz-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    color: #999999;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-line {
    display: inline-block;
    width: 20px;
    height: 2px;
}

.legend-primary {
    background: #3A5A8C;
}

.legend-secondary {
    background: #999999;
}

.legend-tertiary {
    background: #3A5A8C;
    opacity: 0.4;
}

/* ── Members ── */
.members {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.member-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-block {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 500;
    color: #3A5A8C;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #999999;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Footer ── */
.footer {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    text-align: center;
}

.footer-rule {
    border: none;
    border-top: 1px solid #E8E8E4;
    margin-bottom: 1.5rem;
}

.footer-tagline {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-style: italic;
    font-size: 1.1rem;
    color: #1A1A1A;
    margin-bottom: 0.5rem;
}

.footer-copy {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: #999999;
}

/* ── Animations ── */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered entrance delays */
.fade-in:nth-child(2) { transition-delay: 0.08s; }
.fade-in:nth-child(3) { transition-delay: 0.16s; }
.fade-in:nth-child(4) { transition-delay: 0.24s; }
.fade-in:nth-child(5) { transition-delay: 0.32s; }
.fade-in:nth-child(6) { transition-delay: 0.40s; }
.fade-in:nth-child(7) { transition-delay: 0.48s; }

/* SVG path animation */
.story-map-svg path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 2s ease;
}

.visible .story-map-svg path {
    stroke-dashoffset: 0;
}

.story-map-svg circle {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.visible .story-map-svg circle {
    opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .hero {
        padding: 4rem 1.5rem 2rem;
    }

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

    .templates,
    .forums,
    .workshops,
    .spotlight,
    .members,
    .footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .workshop-entry {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .workshop-spots {
        align-self: flex-start;
    }

    .member-stats {
        gap: 2rem;
    }

    .hero-nav {
        gap: 1.25rem;
    }
}
