/*
 * Homepage Section Styles
 * Hero, products showcase, latest posts, topic explorer, about preview
 * All colors use CSS variables for dark mode support
 */

/* =============================================
   HOMEPAGE COMMON STYLES
   ============================================= */

/* Section Common Styles */
.homepage-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.homepage-section-title {
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 16px;
    text-align: center;
}

.homepage-section-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

/* Reduce excessive spacing on homepage - all viewports */
.home .site-content,
.page-template-default.home .site-content {
    padding-top: 0;
}

.home .entry-content,
.page-template-default.home .entry-content {
    padding-top: 0;
    margin-top: 0;
}

/* Target the homepage (front page) content */
.home .entry-content,
.page-template-default.home .entry-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 60px 20px;
    background-color: var(--background-color);
}

/* Hero tagline styling */
.home .entry-content p:first-of-type,
.page-template-default.home .entry-content p:first-of-type {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.02em;
}

/* Hide the page title on homepage */
.home .entry-header,
.page-template-default.home .entry-header {
    display: none;
}

/* Remove sidebar on homepage for cleaner look */
.home #secondary,
.page-template-default.home #secondary {
    display: none;
}

.home #primary,
.page-template-default.home #primary {
    width: 100%;
    max-width: 100%;
}

/* =============================================
   HERO SECTION - Story-driven
   ============================================= */

.homepage-hero-new {
    padding: 30px 20px 50px 20px;
    text-align: center;
    background-color: var(--background-color);
}

.homepage-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.hero-eyebrow {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.hero-headline {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero-subheadline {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-cta-primary {
    display: inline-block;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-inverse);
    background: var(--primary-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.hero-cta-primary:hover {
    background: var(--accent-color);
    color: var(--color-text-inverse);
    transform: translateY(-2px);
}

.hero-cta-secondary {
    display: inline-block;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.hero-cta-secondary:hover {
    background: var(--primary-color);
    color: var(--color-text-inverse);
}

/* =============================================
   PRODUCTS SHOWCASE SECTION
   ============================================= */

.products-showcase {
    background-color: var(--color-surface-alt);
    padding: 60px 20px;
}

.products-showcase-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.product-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
    border: 1px solid var(--color-border-light);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    border-radius: 10px;
    color: var(--color-text-inverse);
}

.product-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.product-card-tagline {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.product-card-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.product-card-stats .stat {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-color);
    background: color-mix(in srgb, var(--accent-color) 10%, transparent);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.product-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.product-card-features li {
    font-size: 0.875rem;
    color: var(--text-color);
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.product-card-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.product-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-color);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.product-card:hover .product-card-cta {
    gap: 10px;
}

/* STRATUM Brand Styling */
.stratum-icon svg {
    width: 40px;
    height: 40px;
}

.stratum-title {
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: -0.02em;
}

.stratum-text {
    color: var(--stratum-slate);
}

.stratum-accent {
    color: var(--stratum-amber);
}

.product-card-stratum .product-card-stats .stat {
    background: color-mix(in srgb, var(--stratum-amber) 10%, transparent);
    color: var(--stratum-slate);
}

.product-card-stratum .product-card-cta {
    color: var(--stratum-amber);
}

.product-card-stratum .product-card-features li::before {
    color: var(--stratum-amber);
}

.product-card-stratum:hover {
    border-color: color-mix(in srgb, var(--stratum-amber) 30%, transparent);
}

/* =============================================
   LATEST POSTS SECTION
   ============================================= */

.latest-posts {
    padding: 60px 20px;
    background: var(--color-surface);
}

.latest-posts-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border-light);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.post-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.post-card-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-inverse);
    opacity: 0.6;
    font-size: 2rem;
}

.post-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.post-card-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.4;
    margin-bottom: 10px;
    flex-grow: 1;
}

.post-card-date {
    font-size: 0.8rem;
    color: var(--color-text-subtle);
}

.latest-posts-cta {
    text-align: center;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--main-font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-color);
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s ease;
}

.view-all-btn:hover {
    background: var(--primary-color);
    color: var(--color-text-inverse);
}

/* =============================================
   TOPIC EXPLORER SECTION
   ============================================= */

.topic-explorer {
    padding: 60px 20px;
    background: var(--color-surface-alt);
}

.topic-explorer-inner {
    max-width: 800px;
    margin: 0 auto;
}

.topic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.topic-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-family: var(--main-font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-color);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.2s ease;
}

.topic-pill:hover {
    background: var(--primary-color);
    color: var(--color-text-inverse);
    border-color: var(--primary-color);
}

.topic-pill-count {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.7;
}

/* =============================================
   ABOUT PREVIEW SECTION - Bento Card (2026 Trend)
   ============================================= */

.about-preview-bento {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-bento-card {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px 40px;
    background: var(--color-surface-elevated, var(--color-surface));
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    max-width: 600px;
    margin: 0 auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.about-bento-photo {
    flex-shrink: 0;
}

.about-bento-photo img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}

.about-bento-content {
    flex-grow: 1;
}

.about-bento-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 8px 0;
}

.about-bento-bio {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.about-bento-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.about-bento-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md, 8px);
    transition: all 0.2s ease;
}

.about-bento-cta-story {
    background: var(--accent-color);
    color: #ffffff;
}

.about-bento-cta-story:hover {
    background: var(--hover-color);
    transform: translateX(2px);
}

.about-bento-cta-newsletter {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.about-bento-cta-newsletter:hover {
    background: var(--accent-color);
    color: #ffffff;
}

/* =============================================
   MOBILE RESPONSIVE STYLES
   ============================================= */

@media (max-width: 768px) {
    /* Homepage entry content */
    .home .entry-content,
    .page-template-default.home .entry-content {
        min-height: 50vh;
        padding: 40px 20px;
    }

    /* Reduce spacing on mobile */
    .home .site-content,
    .page-template-default.home .site-content {
        padding-top: 0;
    }

    .home .entry-content,
    .page-template-default.home .entry-content {
        padding-top: 0;
        margin-top: 0;
    }

    /* Hero section */
    .homepage-hero-new {
        padding: 30px 20px 50px 20px;
    }

    .hero-headline {
        font-size: 1.75rem;
    }

    .hero-headline br {
        display: none;
    }

    .hero-subheadline {
        font-size: 1rem;
    }

    .hero-cta-group {
        flex-direction: column;
        gap: 12px;
    }

    .hero-cta-primary,
    .hero-cta-secondary {
        width: 100%;
        text-align: center;
    }

    /* Products grid */
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        padding: 24px;
    }

    /* Posts grid */
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .post-card-image {
        height: 140px;
    }

    /* Topic pills */
    .topic-pills {
        gap: 8px;
    }

    .topic-pill {
        padding: 12px 18px;
        font-size: 0.875rem;
    }

    /* About preview - Bento card */
    .about-bento-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 24px;
    }

    .about-bento-photo img {
        width: 80px;
        height: 80px;
    }

    .about-bento-ctas {
        justify-content: center;
    }
}

@media (min-width: 480px) and (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================
   NEWSLETTER SECTION - Mobile First (Phase 9.2)
   CSS variables handle dark mode automatically
   ============================================= */

.newsletter-section {
    padding: var(--space-12, 48px) var(--space-4, 16px);
    text-align: center;
    background: var(--color-surface);
}

.newsletter-container {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 var(--space-4, 16px) 0;
}

.newsletter-description {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 var(--space-6, 24px) 0;
}

.newsletter-embed {
    margin-bottom: var(--space-4, 16px);
}

/* Compact iframe - form only (no title/subtitle) */
.newsletter-embed iframe {
    border: none;
    border-radius: var(--radius-md, 8px);
    max-width: 100%;
    width: 100%;
    min-height: 200px;
}

/* Desktop enhancement */
@media (min-width: 768px) {
    .newsletter-section {
        padding: var(--space-16, 64px) var(--space-4, 16px);
    }

    .newsletter-title {
        font-size: 1.75rem;
    }

    .newsletter-embed iframe {
        min-height: 180px;
    }
}

/* NOTE: No explicit dark mode overrides needed.
   --color-surface, --primary-color, --color-text-muted
   automatically change in dark mode via dark-mode.css variables. */
