/*
 * Styling for the campaign closing page (index.html).
 * Deliberately standalone: styles.css is still owned by campaign-archive.html
 * and should not grow to serve this page.
 */

@font-face {
    font-family: 'Unilever Desire';
    src: url('/src/fonts/UnileverDesire-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unilever Desire';
    src: url('/src/fonts/UnileverDesire-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unilever Desire';
    src: url('/src/fonts/UnileverDesire-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Palette carried over from the campaign (styles.css) */
    --color-earth: #F6F7F0;
    --color-clover: #2B911C;
    --color-clover-dark: #206D15;
    --color-pebble: #DEDED7;
    --color-text: #1a1a1a;
    --color-text-secondary: #4a4a4a;

    --page-padding: 40px;
    --content-max-width: 900px;
    --logo-width: 260px;
    --icon-size: 28px;
    --fade-duration: 0.6s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Unilever Desire', 'Aptos', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--color-earth);
    color: var(--color-text);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    /* The gradient is intentionally oversized, so never allow sideways scroll */
    overflow-x: hidden;
}

.background-gradient {
    position: fixed;
    bottom: -170px;
    right: -360px;
    width: 1000px;
    height: auto;
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

@media (min-width: 1025px) {
    .background-gradient {
        width: 1500px;
        bottom: -260px;
        right: -540px;
    }
}

.page {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--page-padding);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px 80px;
    padding-bottom: max(var(--page-padding), env(safe-area-inset-bottom));
    animation: fadeSlideUp var(--fade-duration) ease-out both;
}

.page-copy {
    flex: 1 1 400px;
    min-width: 280px;
    max-width: 500px;
}

.page-logo {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-image {
    width: var(--logo-width);
    max-width: 100%;
    height: auto;
}

.eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-clover-dark);
    margin-bottom: 16px;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.body-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

/* Result figure: the portrait count and the period it was made in */
.tally {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--color-pebble);
}

.tally-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-clover-dark);
}

.tally-label {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin-top: 8px;
}

/* Decorative pair of campaign icons, echoing the wizard's two themes */
.identity-marks {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    color: var(--color-clover-dark);
}

.identity-mark {
    width: var(--icon-size);
    height: var(--icon-size);
    display: block;
    flex: 0 0 auto;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

.identity-mark-food {
    -webkit-mask-image: url('/src/img/FoodLover.svg');
    mask-image: url('/src/img/FoodLover.svg');
}

.identity-mark-growth {
    -webkit-mask-image: url('/src/img/GrowthHunter.svg');
    mask-image: url('/src/img/GrowthHunter.svg');
}

.identity-marks-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-clover-dark);
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet and below: single column, logo first */
@media (max-width: 768px) {
    :root {
        --page-padding: 24px;
        --logo-width: 220px;
    }

    .page {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
    }

    .page-copy {
        order: 2;
        max-width: 100%;
        width: 100%;
    }

    .page-logo {
        order: 1;
        width: 100%;
        justify-content: center;
    }

    h1 {
        font-size: 1.75rem;
    }

    .tally-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 400px) {
    :root {
        --logo-width: 180px;
    }

    h1 {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page {
        animation: none;
    }
}
