/* Home Page Styles */

.home-main {
    max-width: 100%;
    padding: 0;
}

/* Hero Section */
.home-hero {
    max-width: var(--max-width-text);
    margin: 0 auto;
    padding: 6rem var(--space-page-gutter) 4rem;
    text-align: center;
}

.home-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.home-intro {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
}

/* Photo Story Grid */
.photo-story {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: var(--space-page-gutter);
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    row-gap: 4rem;
}

.story-block {
    position: relative;
    z-index: 1;
}

.story-img {
    width: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f0f0f0;
    display: block;
}

/* Reserve aspect ratio before images load */
.story-img[data-dynamic-photo]:not([src]) {
    background: #f0f0f0;
}

body.dark-mode .story-img[data-dynamic-photo]:not([src]) {
    background: #2a2a2a;
}

body.dark-mode .story-img {
    background: #2a2a2a;
}

.story-img:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.story-img.large {
    aspect-ratio: 4 / 5;
}

.story-img.medium {
    aspect-ratio: 3 / 4;
}

.story-img.wide {
    aspect-ratio: 16 / 9;
}

.story-img.small {
    aspect-ratio: 1 / 1;
}

.photo-caption {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #777;
    font-style: italic;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Story text blocks */
.story-text {
    margin-top: 2rem;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.story-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    max-width: 500px;
}

/* Section link cards - editorial style */
.section-link-card {
    padding: 2rem 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.section-link-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #2c3e50;
    line-height: 1.2;
}

.section-link-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.story-link {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-sm);
    width: fit-content;
}

.story-link:hover,
.story-link:focus {
    background: var(--color-primary);
    color: white;
    transform: translateX(4px);
}

/* Specific block layouts */
.cola-hero {
    grid-column: 1 / 6;
}

.travel-wide {
    grid-column: 6 / 13;
}

.cola-small {
    grid-column: 2 / 5;
    margin-top: -3rem;
}

.hiking-moment {
    grid-column: 6 / 10;
}

.landscape {
    grid-column: 1 / 8;
}

.fitness-lead {
    grid-column: 6 / 13;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fitness-lead .story-img {
    margin-bottom: 1rem;
}

.fitness-photo-slot {
    order: -1;
}

.professional-photo-slot {
    display: contents;
}

.group-shot {
    grid-column: 2 / 8;
}

.professional-lead {
    grid-column: 1 / 8;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.professional-lead .story-img {
    margin-bottom: 1rem;
}

.travel-pair {
    grid-column: 1 / 7;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nerd-lead {
    grid-column: 8 / 13;
    padding: 0;
}

.nerd-lead .section-link-card {
    background: transparent;
    padding: 2rem 0;
}

.books-teaser {
    grid-column: 2 / 7;
}

.cola-cosy {
    grid-column: 3 / 8;
}

/* Books Teaser */
.books-teaser-link {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: center;
    text-decoration: none;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.books-teaser-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.books-stack {
    position: relative;
    width: 140px;
    height: 160px;
}

.book-cover-small {
    position: absolute;
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.book-cover-small.cover-1 {
    top: 0;
    left: 0;
    z-index: 4;
    transform: rotate(-8deg);
}

.book-cover-small.cover-2 {
    top: 10px;
    left: 30px;
    z-index: 3;
    transform: rotate(4deg);
}

.book-cover-small.cover-3 {
    top: 20px;
    left: 60px;
    z-index: 2;
    transform: rotate(-3deg);
}

.book-cover-small.cover-4 {
    top: 35px;
    left: 45px;
    z-index: 1;
    transform: rotate(6deg);
}

.books-teaser-link:hover .book-cover-small {
    transform: rotate(0deg) scale(1.05);
}

.books-teaser-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.books-teaser-text p {
    font-size: 1rem;
    color: #777;
    font-style: italic;
    line-height: 1.6;
}

/* Footer CTA */
.home-footer {
    max-width: var(--max-width-text);
    margin: 6rem auto 4rem;
    padding: 0 var(--space-page-gutter);
    text-align: center;
}

.home-footer p {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.footer-secondary {
    font-size: 1.1rem;
    font-weight: 400;
    color: #777;
}

/* Dark mode */
body.dark-mode .home-hero h1,
body.dark-mode .section-link-card h2,
body.dark-mode .home-footer p {
    color: #eee;
}

body.dark-mode .home-intro,
body.dark-mode .story-text p,
body.dark-mode .section-link-card p,
body.dark-mode .footer-secondary {
    color: #bbb;
}

body.dark-mode .photo-caption {
    color: #999;
}

body.dark-mode .story-link {
    border-color: #667eea;
    color: #667eea;
}

body.dark-mode .story-link:hover {
    background: #667eea;
    color: white;
}

body.dark-mode .books-teaser-link {
    background: #2a2a2a;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

body.dark-mode .books-teaser-link:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

body.dark-mode .books-teaser-text h3 {
    color: #eee;
}

body.dark-mode .books-teaser-text p {
    color: #999;
}

/* Tablet */
@media (max-width: 1024px) {
    .photo-story {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.5rem;
        row-gap: 3rem;
    }

    .cola-hero {
        grid-column: 1 / 4;
    }

    .travel-wide {
        grid-column: 4 / 7;
    }

    .cola-small {
        grid-column: 1 / 3;
        margin-top: 0;
    }

    .hiking-moment {
        grid-column: 3 / 7;
    }

    .landscape {
        grid-column: 1 / 7;
    }

    .fitness-lead {
        grid-column: 1 / 7;
    }

    .group-shot {
        grid-column: 1 / 5;
    }

    .professional-lead {
        grid-column: 1 / 7;
    }

    .travel-pair {
        grid-column: 1 / 7;
    }

    .nerd-lead {
        grid-column: 1 / 7;
    }

    .books-teaser {
        grid-column: 1 / 7;
    }

    .cola-cosy {
        grid-column: 2 / 6;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .home-hero {
        padding: 4rem 1.5rem 3rem;
    }

    .home-hero h1 {
        font-size: 2.5rem;
    }

    .home-intro {
        font-size: 1.1rem;
    }

    .photo-story {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .cola-hero,
    .travel-wide,
    .cola-small,
    .hiking-moment,
    .landscape,
    .fitness-lead,
    .group-shot,
    .professional-lead,
    .travel-pair,
    .nerd-lead,
    .books-teaser,
    .cola-cosy {
        grid-column: 1;
    }

    .books-teaser-link {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .books-stack {
        width: 100%;
        height: 140px;
        margin: 0 auto;
    }

    .books-teaser-text {
        text-align: center;
    }

    .books-teaser-text h3 {
        font-size: 1.25rem;
    }

    .books-teaser-text p {
        font-size: 0.95rem;
    }

    .travel-pair {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-link-card {
        padding: 2rem;
    }

    .section-link-card h2 {
        font-size: 1.75rem;
    }

    .story-img.large,
    .story-img.medium {
        aspect-ratio: 4 / 5;
    }

    .story-img.wide {
        aspect-ratio: 3 / 2;
    }

    .home-footer {
        margin: 4rem auto 3rem;
    }

    .home-footer p {
        font-size: 1.25rem;
    }

    .footer-secondary {
        font-size: 1rem;
    }
}
