/**
 * Homepage Styles
 * Stark Insider Custom Theme
 *
 * Sections:
 * 1. Hero Big Grid (6 posts — 1 large + 5 small)
 * 2. Category Blocks + Sidebar
 * 3. Brand Storytelling (cinematic Vimeo section)
 */

/* ──────────────────────────────────────────────────────
   1. HERO BIG GRID
   Grid: main post spans left 60%, 5 small posts stack right 40%
   ────────────────────────────────────────────────────── */

.si-hero-grid {
    max-width: var(--container-max-width);
    margin: 0 auto var(--space-lg);
}

/* Top row: big post (2/3) + 2 small stacked (1/3) */
.si-hero-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0;
}

.si-hero-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 0;
}

/* Bottom row: 3 small posts side-by-side */
.si-hero-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

/* Shared hero module styles */
.si-hero-main,
.si-hero-small {
    position: relative;
    overflow: hidden;
}

/* Main hero: fixed height to match 2 small posts */
.si-hero-main {
    height: 360px;
}

/* Small hero posts: landscape ratio */
.si-hero-small {
    height: 180px;
}

.si-hero-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #fff;
}

.si-hero-thumb {
    position: relative;
    width: 100%;
    height: 100%;
}

.si-hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.si-hero-link:hover .si-hero-thumb img {
    transform: scale(1.03);
}

/* Color tint overlay for cohesive grid look (Newsmag-style) */
.si-hero-thumb::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-primary); /* Stark Orange tint */
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.si-hero-thumb::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    opacity: 0.25;
    z-index: 1;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.si-hero-link:hover .si-hero-thumb::before,
.si-hero-link:hover .si-hero-thumb::after {
    opacity: 0.05;
}

/* Dark gradient overlay for text readability */
.si-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

/* Text positioned over the image */
.si-hero-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 3;
}

/* Main hero: vertically + horizontally centered title + meta */
.si-hero-main .si-hero-meta {
    text-align: center;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
}

.si-hero-title {
    font-family: var(--font-headings);
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.25;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.si-hero-main .si-hero-title {
    font-size: 1.5rem;
    text-transform: uppercase;
}

.si-hero-small .si-hero-title {
    font-size: 0.875rem;
}

.si-hero-byline {
    font-size: 0.688rem;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 0.154em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.si-hero-main .si-hero-byline {
    font-size: 0.75rem;
}

.si-hero-date {
    margin-left: 6px;
}

.si-hero-date::before {
    content: "—";
    margin-right: 6px;
}

/* ──────────────────────────────────────────────────────
   2. CATEGORY BLOCKS + SIDEBAR
   Two-column: content (66%) + sidebar (33%)
   ────────────────────────────────────────────────────── */

.si-category-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    max-width: var(--container-max-width);
    margin: 0 auto var(--space-xl);
    padding: 0 15px;
}

.si-category-content {
    min-width: 0;
}

/* Category block header */
.si-cat-block {
    margin-bottom: var(--space-xl);
}

.si-cat-block-title {
    font-family: var(--font-headings);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-tight);
    border-top: 2px solid var(--color-primary);
    padding-top: 10px;
    margin: 0 0 20px;
}

.si-cat-block-title a {
    color: var(--color-text);
    text-decoration: none;
}

.si-cat-block-title a:hover {
    color: var(--color-primary);
}

/* Category post module: image left, text right */
.si-cat-post {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--color-border);
}

.si-cat-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.si-cat-post-thumb {
    display: block;
    overflow: hidden;
}

.si-cat-post-thumb img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: opacity var(--transition-base);
}

.si-cat-post-thumb:hover img {
    opacity: 0.85;
}

.si-cat-post-content {
    min-width: 0;
}

.si-cat-post-title {
    font-family: var(--font-headings);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
}

.si-cat-post-title a {
    color: var(--color-text);
    text-decoration: none;
}

.si-cat-post-title a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.si-cat-post-excerpt {
    font-family: var(--font-primary);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin: 0 0 8px;
}

.si-cat-post-meta {
    font-family: var(--font-primary);
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.si-cat-post-author {
    font-weight: 600;
    color: var(--color-text-secondary);
}

.si-cat-post-author a {
    color: inherit;
    text-decoration: none;
}

.si-cat-post-author a:hover {
    color: var(--color-primary);
}

.si-cat-post-date::before {
    content: "\2014";
    margin: 0 5px;
}

/* Sidebar */
.si-homepage-sidebar {
    padding-top: 10px;
}

.si-homepage-sidebar img {
    width: 100%;
    height: auto;
    display: block;
}

/* ──────────────────────────────────────────────────────
   3. BRAND STORYTELLING
   Cinematic magazine section with dramatic spacing
   Styling matched to production starkinsider.com
   ────────────────────────────────────────────────────── */

.si-brand-story {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    padding: 0 15px;
}

/* Default dramatic spacing between sections (800px) */
.si-brand-row {
    margin-bottom: 800px;
}

.si-brand-row:last-child {
    margin-bottom: var(--space-xl);
}

/* "WHO IS STARK INSIDER?" intro — production: 52px, line-height 80px */
.si-brand-intro {
    padding: 1000px 0 0;
}

.si-brand-intro h3 {
    font-family: var(--font-headings);
    font-size: 52px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-primary);
    line-height: 80px;
    margin: 0 0 120px;
}

/* "IS" underline accent in "WHO IS STARK INSIDER?" */
.si-brand-is {
    font-size: 32px;
    text-decoration: underline;
}

/* Constrain brand images to readable width */
.si-brand-image-row {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Film title + video blocks — production: 42px, letter-spacing 5px */
.si-brand-film h3 {
    font-family: var(--font-headings);
    font-size: 42px;
    font-weight: 400;
    letter-spacing: 5px;
    line-height: 61px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 0 0 8px;
}

/* Film subtitle (h5 equivalent) — production: letter-spacing 2px, #808080 */
.si-brand-subtitle {
    font-family: var(--font-primary);
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #808080;
    margin: 20px 0 var(--space-md);
    line-height: 1.6;
}

.si-brand-subtitle .si-brand-small {
    font-size: 12px;
}

/* Film quote (h6 equivalent) — production: centered, #808080, italic */
.si-brand-quote {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-style: italic;
    color: #808080;
    margin: 8px 0 var(--space-md);
}

/* "THE WOMAN. THE JACKET. THE CITY." — production: 22px, weight 200 */
/* Higher specificity to override .si-brand-film h3 (0,1,1) */
.si-brand-film h3.si-brand-film-subtitle {
    font-family: var(--font-headings);
    font-size: 22px;
    font-weight: 200;
    letter-spacing: 0.1em;
    line-height: 30px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 0 0 8px;
}

/* Responsive Vimeo video embeds */
.si-brand-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-top: 40px;
}

.si-brand-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Large cinematic images */
.si-brand-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Large typography rows — production: 52px, 80px line-height, 120px between lines */
.si-brand-typography {
    padding: 0;
}

.si-brand-typography h2 {
    font-family: var(--font-headings);
    font-size: 52px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 80px;
    color: var(--color-primary);
    margin: 0 0 120px;
}

/* Last h2 in each typography block: no bottom margin */
.si-brand-typography h2:last-child {
    margin-bottom: 0;
}

/* ──────────────────────────────────────────────────────
   RESPONSIVE
   ────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .si-cat-post {
        grid-template-columns: 200px 1fr;
    }
}

@media (max-width: 768px) {
    /* Hero: stack to single column */
    .si-hero-top {
        grid-template-columns: 1fr;
    }

    /* Hero side posts: stack vertically on mobile (not side-by-side) */
    .si-hero-side {
        grid-template-rows: auto auto;
        grid-template-columns: 1fr;
    }

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

    .si-hero-main {
        height: 250px;
    }

    /* Taller on mobile so text doesn't clip */
    .si-hero-small {
        height: 200px;
    }

    .si-hero-main .si-hero-title {
        font-size: 1.25rem;
    }

    /* Category: stack to single column, no sidebar */
    .si-category-section {
        grid-template-columns: 1fr;
    }

    .si-cat-post {
        grid-template-columns: 1fr;
    }

    .si-cat-post-thumb img {
        aspect-ratio: 16 / 9;
    }

    .si-homepage-sidebar {
        display: none;
    }

    /* Brand storytelling: reduce on mobile */
    .si-brand-row {
        margin-bottom: 100px;
    }

    .si-brand-typography h2 {
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 40px;
    }

    .si-brand-intro h3 {
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 40px;
    }

    .si-brand-film h3 {
        font-size: 28px;
        line-height: 1.3;
    }

    .si-brand-is {
        font-size: 22px;
    }
}
