/* ==========================================================================
   WritePrompt — Homepage (editorial layout; avoids generic SaaS template patterns)
   ========================================================================== */

.home-page {
    --home-ink: #0f1419;
    --home-ink-muted: #3d4f5f;
    --home-paper: #f6f4ef;
    --home-paper-deep: #ebe6dc;
    --home-accent: #1f6f54;
    --home-accent-hover: #185544;
    --home-rust: #b4532a;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-family: var(--font-body);
}

.home-page h1,
.home-page h2,
.home-page h3,
.home-page .home-section-title {
    font-family: var(--font-display);
    text-wrap: balance;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 0.75rem 1rem;
    background: var(--home-ink);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* Header */
.home-header {
    background: var(--home-ink);
    color: #fff;
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.home-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.home-logo img {
    height: 32px;
    width: auto;
    vertical-align: middle;
}
.home-nav {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.home-nav a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}
.home-nav a:hover {
    color: #fff;
}
.home-nav a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 2px;
}

/* Hero — single dark surface + ink typography (no blue–purple gradient) */
.home-hero {
    position: relative;
    background: linear-gradient(165deg, #0f1419 0%, #1a222c 50%, #222c38 100%);
    color: #f0ebe3;
    padding: clamp(3rem, 8vw, 5rem) 1.5rem 4rem;
    min-height: 58vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(31, 111, 84, 0.35), transparent 55%);
    pointer-events: none;
}
.home-hero-content {
    position: relative;
    z-index: 1;
    max-width: 38rem;
    margin: 0 auto;
}
.home-eyebrow {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(240, 235, 227, 0.75);
    margin-bottom: 1rem;
}
.home-hero h1 {
    font-size: clamp(2rem, 5vw, 2.85rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: #fff;
}
.home-hero .subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    line-height: 1.55;
    margin-bottom: 2rem;
    color: rgba(240, 235, 227, 0.88);
    max-width: 36ch;
    margin-left: auto;
    margin-right: auto;
}
.home-hero .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.home-hero .btn-primary,
.home-hero .btn-secondary {
    font-family: var(--font-body);
    padding: 0.9rem 1.75rem;
    font-size: 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: inline-block;
    border: 2px solid transparent;
}
.home-hero .btn-primary {
    background: var(--home-accent);
    color: #fff;
    border-color: var(--home-accent);
}
.home-hero .btn-primary:hover {
    background: var(--home-accent-hover);
    border-color: var(--home-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.home-hero .btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}
.home-hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.7);
}

@media (prefers-reduced-motion: reduce) {
    .home-hero .btn-primary:hover,
    .home-hero .btn-secondary:hover {
        transform: none;
    }
}

/* Features — editorial list (not 3× emoji cards) */
.features-section {
    padding: clamp(3rem, 6vw, 5rem) 1.5rem;
    background: var(--home-paper);
    border-top: 1px solid var(--home-paper-deep);
}
.features-wrap {
    max-width: 720px;
    margin: 0 auto;
}
.home-section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--home-ink);
    margin-bottom: 0.5rem;
    text-align: left;
}
.features-lede {
    font-size: 1.1rem;
    color: var(--home-ink-muted);
    margin-bottom: 2.5rem;
    text-align: left;
    line-height: 1.5;
}
.features-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #d8d3c8;
}
.features-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem 1.5rem;
    padding: 1.75rem 0;
    border-bottom: 1px solid #d8d3c8;
    align-items: start;
}
.features-index {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--home-rust);
    line-height: 1.2;
    min-width: 2.5rem;
}
.features-copy h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--home-ink);
    margin-bottom: 0.35rem;
}
.features-copy p {
    font-size: 1rem;
    color: var(--home-ink-muted);
    line-height: 1.55;
    margin: 0;
}

/* Categories — solid ink tones (no rainbow / purple gradients) */
.categories-section {
    padding: clamp(3rem, 6vw, 5rem) 1.5rem;
    background: #fff;
}
.categories-section .section-title {
    font-family: var(--font-display);
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: var(--home-ink);
    margin-bottom: 0.5rem;
}
.categories-section .section-subtitle {
    font-family: var(--font-body);
    text-align: center;
    font-size: 1.05rem;
    color: var(--home-ink-muted);
    margin-bottom: 2.5rem;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}
.categories-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.category-card {
    color: #fff;
    padding: 1.75rem;
    border-radius: 8px;
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}
.category-card:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}
.category-card .count {
    font-family: var(--font-body);
    font-size: 1.75rem;
    font-weight: 700;
    opacity: 0.95;
    margin-bottom: 0.35rem;
}
.category-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}
.category-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.92;
}
.category-card--fiction { background: #2a3d45; }
.category-card--creative { background: #2f4a3a; }
.category-card--poetry { background: #4a3f38; }
.category-card--personal { background: #344256; }
.category-card--journaling { background: #4a4038; }
.category-card--academic { background: #1e2d3d; }

@media (prefers-reduced-motion: reduce) {
    .category-card:hover {
        transform: none;
    }
}

/* Featured prompts — top rule accent, no colored left border */
.samples-section {
    padding: clamp(3rem, 6vw, 5rem) 1.5rem;
    background: var(--home-paper);
    border-top: 1px solid var(--home-paper-deep);
}
.samples-section .section-title {
    font-family: var(--font-display);
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: var(--home-ink);
    margin-bottom: 0.5rem;
}
.samples-section .section-subtitle {
    text-align: center;
    color: var(--home-ink-muted);
    margin-bottom: 2rem;
}
.samples-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}
.sample-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0dbd2;
    box-shadow: 0 2px 8px rgba(15, 20, 25, 0.06);
    position: relative;
    border-left: none;
}
.sample-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 8px 8px 0 0;
    background: var(--home-accent);
}
.sample-card:nth-child(3n + 2)::before {
    background: #2c5282;
}
.sample-card:nth-child(3n)::before {
    background: var(--home-rust);
}
.sample-card .badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: transparent;
    color: var(--home-ink);
    border: 1px solid #c4bdb0;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}
.sample-card .prompt-text {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--home-ink);
    font-size: 1.1rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}
.sample-card .meta {
    font-size: 0.88rem;
    color: var(--home-ink-muted);
}

/* CTA — solid surface */
.cta-section {
    padding: clamp(3rem, 5vw, 4rem) 1.5rem;
    background: var(--home-ink);
    color: #f0ebe3;
    text-align: center;
}
.cta-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2rem);
    margin-bottom: 0.75rem;
}
.cta-section p {
    font-size: 1.05rem;
    margin-bottom: 1.75rem;
    opacity: 0.88;
    max-width: 40ch;
    margin-left: auto;
    margin-right: auto;
}
.cta-section .cta-buttons {
    display: flex;
    justify-content: center;
}
.cta-section .btn-primary {
    font-family: var(--font-body);
    display: inline-block;
    padding: 0.9rem 1.75rem;
    background: var(--home-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    border: 2px solid var(--home-accent);
    transition: background 0.2s ease, transform 0.2s ease;
}
.cta-section .btn-primary:hover {
    background: var(--home-accent-hover);
    border-color: var(--home-accent-hover);
}
@media (prefers-reduced-motion: reduce) {
    .cta-section .btn-primary:hover {
        transform: none;
    }
}

/* About / SEO block */
.about-seo {
    padding: 3rem 1.5rem;
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.75;
    color: var(--home-ink-muted);
    font-size: 1rem;
}
.about-seo h2 {
    font-family: var(--font-display);
    color: var(--home-ink);
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}
.about-seo p {
    margin-bottom: 1rem;
}
.about-seo a {
    color: #1a5f4a;
    font-weight: 500;
}
.about-seo a:hover {
    text-decoration: underline;
}

/* Continue writing card (inline script) */
.continue-writing-card {
    margin: 2rem auto 0;
    max-width: 720px;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e0dbd2;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(15, 20, 25, 0.06);
}
.continue-writing-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--home-ink);
    margin-bottom: 0.5rem;
}
.continue-writing-card p {
    color: var(--home-ink-muted);
    margin-bottom: 1rem;
}
.continue-writing-card .btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background: var(--home-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .features-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .features-index {
        font-size: 1rem;
    }
    .home-nav {
        font-size: 0.9rem;
        gap: 0.75rem;
    }
    .home-hero .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    .home-hero .btn-primary,
    .home-hero .btn-secondary {
        width: 100%;
        text-align: center;
    }
}
