/* ========================================
   Vogue-Style CSS
   雜誌風格佈局樣式
======================================== */

/* 字體統一改為全站變數，移除未使用的 Roboto 字體宣告 */

/* ========================================
   CSS Variables
======================================== */
:root {
    /* Colors */
    --color-primary: #000;
    --color-secondary: #666;
    --color-accent: #d4a574;
    --color-bg: #fff;
    --color-border: #e5e5e5;
    /* Typography */
    --font-primary: 'Bodoni Moda', 'Playfair Display', Didot, 'Bodoni 72', 'Bodoni MT', 'Times New Roman', Times, 'Noto Serif TC', 'Source Han Serif TC', 'Songti TC', PMingLiU, 'DFKai-SB', serif;
    --font-serif: 'Bodoni Moda', 'Playfair Display', Didot, 'Bodoni 72', 'Bodoni MT', 'Times New Roman', Times, 'Noto Serif TC', 'Source Han Serif TC', 'Songti TC', PMingLiU, 'DFKai-SB', serif;
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    /* Layout */
    --container-max: 1400px;
    --grid-gap: 1.5rem;
    /* Transitions */
    --transition-base: 0.3s ease;
}

/* ========================================
   Base Styles
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--color-primary);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

/* ========================================
   Container
======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========================================
   Section Titles
======================================== */
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* ========================================
   Hero Section
======================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0; /* 移除 margin，因為有 jk-offset */
}

.hero__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

    .hero__image::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
    }

    .hero__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.hero__content {
    text-align: center;
    color: #fff;
    z-index: 1;
    padding: var(--spacing-md);
}

.hero__title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Featured Grid
======================================== */
.featured {
    padding: var(--spacing-xl) 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
}

.grid__item--large {
    grid-column: span 8;
    grid-row: span 2;
}

.grid__item--medium {
    grid-column: span 4;
}

.grid__item--small {
    grid-column: span 4;
}

/* Card Styles */
.card {
    position: relative;
    height: 100%;
    overflow: hidden;
    transition: transform var(--transition-base);
}

    .card:hover {
        transform: translateY(-4px);
    }

.card__image {
    position: relative;
    width: 100%;
    padding-bottom: 133.33%; /* 3:4 aspect ratio */
    overflow: hidden;
    background-color: #f5f5f5;
}

    .card__image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

.card:hover .card__image img {
    transform: scale(1.05);
}

.card__content {
    padding: var(--spacing-md) 0;
}

.card__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: var(--spacing-xs);
}

.card__title {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

.card__excerpt {
    font-size: 0.95rem;
    color: var(--color-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.card__link {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-primary);
    padding-bottom: 2px;
    transition: var(--transition-base);
}

    .card__link:hover {
        /* Use global accent if available, otherwise fall back to local color-accent */
        color: var(--accent-warm, var(--color-accent));
        border-color: var(--accent-warm, var(--color-accent));
    }

/* Horizontal Card (Small Items) */
.card--horizontal {
    display: flex;
    gap: var(--spacing-sm);
}

    .card--horizontal .card__image {
        flex: 0 0 40%;
        padding-bottom: 40%;
    }

    .card--horizontal .card__content {
        flex: 1;
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .card--horizontal .card__title {
        font-size: 1rem;
        margin-bottom: var(--spacing-xs);
    }

/* ========================================
   Latest Articles
======================================== */
.latest {
    padding: var(--spacing-xl) 0;
    background-color: #fafafa;
}

.articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.article {
    background-color: var(--color-bg);
    transition: box-shadow var(--transition-base);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--spacing-md);
}

    .article:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }

.article__image {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background-color: #f5f5f5;
}

    .article__image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

.article:hover .article__image img {
    transform: scale(1.08);
}

.article__content {
    padding: var(--spacing-md);
}

.article__date {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-xs);
}

.article__title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    transition: color var(--transition-base);
}

.article:hover .article__title {
    color: #656d4a;
}

.article__excerpt {
    font-size: 0.9rem;
    color: var(--color-secondary);
    line-height: 1.6;
}

/* List view for smaller screens */
@media (max-width: 640px) {
    .articles {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .article {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid var(--color-border);
        padding: var(--spacing-md) 0;
        background-color: transparent;
    }

        .article:hover {
            box-shadow: none;
        }

    .article__image {
        padding-bottom: 0;
        height: auto;
        margin-bottom: var(--spacing-sm);
    }

        .article__image img {
            position: relative;
            width: 100%;
            height: auto;
        }

    .article__content {
        padding: 0;
    }

    .article__title {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-xs);
    }

    .article__excerpt {
        font-size: 0.875rem;
    }
}

/* ========================================
   Newsletter
======================================== */
.newsletter {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-primary);
    color: var(--color-bg);
}

.newsletter__content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter__title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 300;
    margin-bottom: var(--spacing-sm);
}

.newsletter__text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-md);
}

.newsletter__form {
    display: flex;
    gap: var(--spacing-sm);
    max-width: 500px;
    margin: 0 auto;
}

.newsletter__input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-bg);
    outline: none;
    transition: var(--transition-base);
}

    .newsletter__input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .newsletter__input:focus {
        background-color: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.4);
    }

.newsletter__button {
    padding: 0.875rem 2rem;
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--color-accent);
    color: var(--color-bg);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

    .newsletter__button:hover {
        background-color: #c09565;
    }

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 900px) {
    .grid__item--large {
        grid-column: span 12;
        grid-row: span 1;
    }

    .grid__item--medium {
        grid-column: span 6;
    }

    .grid__item--small {
        grid-column: span 6;
    }
}

@media (max-width: 640px) {
    :root {
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
        --grid-gap: 1rem;
    }

    .hero {
        min-height: 500px;
    }

    /* Grid becomes vertical list */
    .grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .grid__item--large,
    .grid__item--medium,
    .grid__item--small {
        grid-column: span 12;
    }

    /* First card - keep large image */
    .grid__item:first-child .card {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid var(--color-border);
        padding: var(--spacing-md) 0;
    }

    .grid__item:first-child .card__image {
        padding-bottom: 56.25%; /* 16:9 */
        margin-bottom: var(--spacing-sm);
    }

    .grid__item:first-child .card__content {
        padding: 0;
    }

    .grid__item:first-child .card:hover {
        transform: none;
    }

    /* Other cards - horizontal layout with small image */
    .grid__item:not(:first-child) .card {
        display: flex;
        flex-direction: row;
        gap: var(--spacing-sm);
        border-bottom: 1px solid var(--color-border);
        padding: var(--spacing-md) 0;
    }

        .grid__item:not(:first-child) .card:hover {
            transform: none;
        }

    .grid__item:not(:first-child) .card__image {
        flex: 0 0 120px;
        width: 120px;
        padding-bottom: 120px;
        height: 120px;
    }

    .grid__item:not(:first-child) .card__content {
        flex: 1;
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .grid__item:not(:first-child) .card__excerpt {
        display: none; /* Hide excerpt for small cards */
    }

    /* General card styles for mobile */
    .card__category {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }

    .card__title {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-xs);
        line-height: 1.3;
    }

    .grid__item:not(:first-child) .card__title {
        font-size: 1rem;
    }

    .card__excerpt {
        font-size: 0.875rem;
        margin-bottom: var(--spacing-xs);
    }

    .card__link {
        font-size: 0.8rem;
    }

    /* Articles - same layout as cards */
    .articles {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    /* First article - keep large image */
    .article:first-child {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid var(--color-border);
        padding: var(--spacing-md) 0;
        background-color: transparent;
    }

        .article:first-child .article__image {
            padding-bottom: 56.25%; /* 16:9 */
            margin-bottom: var(--spacing-sm);
        }

            .article:first-child .article__image img {
                position: absolute;
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

        .article:first-child .article__content {
            padding: 0;
        }

        .article:first-child:hover {
            box-shadow: none;
        }

    /* Other articles - horizontal layout with small image */
    .article:not(:first-child) {
        display: flex;
        flex-direction: row;
        gap: var(--spacing-sm);
        border-bottom: 1px solid var(--color-border);
        padding: var(--spacing-md) 0;
        background-color: transparent;
    }

        .article:not(:first-child):hover {
            box-shadow: none;
        }

        .article:not(:first-child) .article__image {
            flex: 0 0 120px;
            width: 120px;
            padding-bottom: 0;
            height: 120px;
            overflow: hidden;
        }

            .article:not(:first-child) .article__image img {
                position: relative;
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

        .article:not(:first-child) .article__content {
            flex: 1;
            padding: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .article:not(:first-child) .article__excerpt {
            display: none; /* Hide excerpt for small articles */
        }

    .article__title {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-xs);
    }

    .article:not(:first-child) .article__title {
        font-size: 1rem;
    }

    .article__date {
        font-size: 0.7rem;
    }

    .newsletter__form {
        flex-direction: column;
    }

    .newsletter__button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .grid__item:first-child .card__title {
        font-size: 1.25rem;
    }

    .grid__item:not(:first-child) .card__image {
        flex: 0 0 100px;
        width: 100px;
        padding-bottom: 100px;
        height: 100px;
    }

    .grid__item:not(:first-child) .card__title {
        font-size: 0.95rem;
    }

    .article:not(:first-child) .article__image {
        flex: 0 0 100px;
        width: 100px;
        height: 100px;
    }

    .article:not(:first-child) .article__title {
        font-size: 0.95rem;
    }
}
