/* Brand fonts (local .otf files in ../fonts) */
@font-face {
    font-family: "Philly";
    src: url("../fonts/Philly_font.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Philadelphia";
    src: url("../fonts/PHILADELPHIA-Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root{
    /* Real asset is a .jpg (blue Philadelphia gradient) */
    --background: url("../images/background.jpg") bottom left / cover no-repeat;
    --iframe-color: none;

    /* Slider tuning */
    --slide-side-scale: 0.88;   /* side packshots */
    --slide-center-scale: 1.45; /* centre packshot is bigger and overlaps the sides more */
    --packshot-shadow: drop-shadow(0 9px 12px rgba(0, 20, 60, 0.48));
    --deco-shadow: drop-shadow(0 11px 14px rgba(0, 15, 45, 0.45));
}

body {
    background: var(--background);
    background-attachment: fixed;
}

/* Generic hide helper (gate before a choice, switcher for NL-only campaign) */
.is-hidden {
    display: none !important;
}

/* ===== Country gate ===== */
/* Full-screen, on-brand Philadelphia blue overlay shown before anything else. */
.country-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    /* deep Philadelphia blue, slightly richer at the bottom */
    background:
        radial-gradient(120% 90% at 50% 0%, #1452c0 0%, #0a3b8c 55%, #07276180 100%),
        #0a3b8c;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    animation: gate-fade 0.35s ease both;
}

@keyframes gate-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.country-gate__card {
    width: 100%;
    max-width: 460px;
    text-align: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 28px;
    padding: 40px 34px 36px;
    box-shadow: 0 24px 60px rgba(0, 15, 45, 0.45);
    animation: gate-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes gate-pop {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* The brand wordmark, in the Philadelphia display font */
.country-gate__wordmark {
    display: inline-block;
    font-family: "Philadelphia", "Philly", Georgia, serif;
    font-weight: 700;
    font-size: 34px;
    letter-spacing: 0.01em;
    color: #ffffff;
    margin-bottom: 22px;
}

.country-gate__title {
    font-family: "Philly", "Philadelphia", Georgia, serif;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 400;
    margin: 0 0 8px;
    color: #ffffff;
}

/* Bilingual title: Dutch on top, French underneath (slightly smaller + dimmer). */
.country-gate__title-line {
    display: block;
}

.country-gate__title-line--alt {
    font-size: 0.78em;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 4px;
}

.country-gate__sub {
    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 28px;
}

.country-gate__options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.country-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 22px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #0a3b8c;
    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.country-btn:hover,
.country-btn:focus-visible {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 15, 45, 0.35);
}

.country-btn__flag {
    font-size: 28px;
    line-height: 1;
}

/* French half of a bilingual button label — same dark blue as the Dutch name,
   so neither language reads as subordinate. */
.country-btn__label-alt {
    color: #0a3b8c;
    font-weight: 600;
}

@media (max-width: 480px) {
    .country-gate__card { padding: 32px 22px 28px; border-radius: 22px; }
    .country-gate__wordmark { font-size: 28px; }
    .country-gate__title { font-size: 22px; }
    .country-btn { font-size: 16px; padding: 14px 18px; }
}

/* ===== Language switcher ===== */
/* Pinned to the very top-right corner; fixed so it stays put on scroll,
   just like the decorative right column. */
.lang-switch {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10;
    display: flex;
    background: rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-top: 0;
    border-right: 0;
    border-bottom-left-radius: 12px;
    overflow: hidden;
}

.lang-switch__btn {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.lang-switch__btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-switch__btn.is-active {
    background: #ffffff;
    color: #0a3b8c;   /* deep Philadelphia blue */
}

/* ===== Change-country control ===== */
/* Pinned top-left (mirrors the language switcher top-right); reopens the gate. */
.country-change {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-top: 0;
    border-left: 0;
    border-bottom-right-radius: 12px;
    color: #ffffff;
    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.country-change:hover,
.country-change:focus-visible {
    background: rgba(255, 255, 255, 0.22);
}

/* ===== Layout: two columns ===== */
body .container-fluid .content {
    max-width: 1600px;
    width: 92%;
    margin: 0 auto;
    z-index: 2;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 2%;
}

body .container-fluid .left-col {
    width: 56%;
    display: flex;
    flex-direction: column;
}

body .container-fluid .right-col {
    /* Pinned to the viewport so the decorations never scroll with the page
       and never get stretched apart when the iframe (left column) grows tall. */
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    /* sit over the right part of the centred content area */
    right: max(4vw, calc((100vw - 1600px) / 2));
    width: min(40vw, 672px);
    aspect-ratio: 11 / 12;
    pointer-events: none;   /* purely decorative — never blocks the cashback form */
    z-index: 1;
}

/* ===== Garmin packshot (above the slider) ===== */
.garmin-packshot {
    display: block;
    width: 35%;
    margin: -1rem auto -6rem;
    filter: var(--packshot-shadow);
}

/* ===== Slider ===== */
.slider {
    position: relative;
    width: 70%;                /* 40% smaller than the full column width */
    margin: 0 auto;
    /* Height tracks the width so the enlarged centre packshot always fits,
       on any screen size (each slot is 1/3 of the width). */
    aspect-ratio: 1.9 / 1;
    overflow: hidden;          /* hide the slides queued behind the visible three */
    margin-bottom: -5rem;
}

.slider-track {
    display: flex;
    height: 100%;
    will-change: transform;
}

.slider .slide {
    flex: 0 0 33.3333%;        /* exactly three slides fill the viewport */
    max-width: 33.3333%;
    height: 100%;
    display: flex;
    align-items: flex-start;   /* all three packshots share the same top edge */
    justify-content: center;
}

.slider .slide img {
    /* base size = full slot width (square packshot), so the scale factors below
       map predictably to the slot and the slider height can be sized to fit */
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    /* scale from the top edge so side and centre packshots stay top-aligned
       and the centre grows downward (never clipped at the top) */
    transform-origin: top center;
    transform: scale(var(--slide-side-scale));
    transition: transform 600ms ease;
    filter: var(--packshot-shadow);
}

/* During an instant (non-animated) jump, freeze the packshot scale too,
   so the seamless wrap-around doesn't replay the centre grow animation. */
.slider.is-instant .slide img {
    transition: none;
}

.slider .slide.is-active {
    z-index: 3;                /* the bigger centre packshot sits above (and overlaps) its neighbours */
}

.slider .slide.is-active img {
    /* centre packshot: bigger, overlapping the side ones, grown downward from the shared top edge */
    transform: scale(var(--slide-center-scale));
}

/* Invisible click zones: left half = previous, right half = next */
.slider-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    z-index: 5;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.slider-zone--prev { left: 0; }
.slider-zone--next { right: 0; }

/* ===== Iframe (below the slider) ===== */
body .container-fluid .container-iframe {
    background-color: var(--iframe-color);
    border-radius: 10px;
    width: 100%;
}
body .container-fluid .for-a-other-link {
    margin-top: 2rem;
}
body .container-fluid .for-a-other-link a {
    color: #ffffff;
    font-size: 80%;
    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

/* ===== Footer ===== */
/* Straight on the blue background (no bar): the white Mondelez logo with the
   campaign's legal links flush against the left edge, the Powered by Scoupy
   badge with the platform links flush against the right edge. */

/* Column so the footer can be pushed to the bottom of the viewport (margin-top:
   auto below) whenever the campaign above it is shorter than one screen. */
body .container-fluid .container-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body .container-fluid .footer {
    position: relative;
    z-index: 3;              /* above the fixed decorations (z-index 1) */
    margin-top: auto;        /* pushed to the bottom on a short page */
}

/* Full width: one group pushed to each edge of the viewport. Never wraps — as
   the viewport narrows the two groups shrink (fluid text below) instead of one
   of them dropping onto a second line. */
.footer__inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 16px;
    padding: 22px 24px 24px;
}

.footer__side {
    min-width: 0;   /* let a group shrink below its content width */
}

/* Scoupy group: badge and links right-aligned, mirroring the brand group. */
.footer__side--right {
    text-align: right;
}

.footer__side--right .footer__links {
    justify-content: flex-end;
}

/* The logo links to mondelezinternational.com */
.footer__logo-link {
    display: inline-block;
    margin-bottom: 12px;
}

.footer__logo {
    display: block;
    width: auto;
    height: 48px;
}

/* Badge links to scoupy.com; text-align on the group puts it on the right edge. */
.footer__scoupy {
    display: block;
    width: auto;
    height: 40px;
}

/* One row per group, never wrapping: the text scales down with the viewport so
   both rows keep fitting side by side. The formula is the width the longest pair
   ("Cliquez ici pour le service client" + "Privacy statement" and their Dutch
   counterparts) needs — roughly 47x the font size for the two rows together,
   plus the padding — so it stops shrinking (13px) from ~670px upwards. The
   separator gap is in em, so it collapses along with the text. */
.footer__links {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 0.9em;
    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(9.5px, calc((100vw - 64px) / 47), 13px);
}

.footer__link {
    color: #ffffff;
    text-decoration: none;
}

.footer__link:hover,
.footer__link:focus {
    color: #ffffff;
    text-decoration: underline;
}

.footer__sep {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
}

/* Phones: side by side the two groups would need unreadably small text, so they
   stack (both left-aligned). Each row gets the full width back here, which is
   why the text may grow to its full size again. */
@media (max-width: 520px) {
    .footer__inner {
        align-items: flex-start;
        gap: 18px;
        padding: 18px 16px 22px;
    }

    .footer__side--right .footer__links {
        justify-content: flex-start;
    }

    /* One row per line now -> ~24x the font size plus the padding. */
    .footer__links {
        font-size: clamp(9.5px, calc((100vw - 44px) / 24.5), 13px);
    }

    .footer__logo {
        height: 38px;
    }

    .footer__scoupy {
        height: 32px;
    }
}

/* ===== Right column decorations ===== */
.right-col .deco {
    position: absolute;
    filter: var(--deco-shadow);
}

/* Large sandwich, slightly tilted — drifts very gently */
.right-col .deco-sandwich {
    width: 64%;
    top: 26%;
    left: 18%;
    z-index: 2;
    transform: rotate(7deg);
    --fy: -26px;
    animation: float-sandwich 12s ease-in-out infinite;
}

/* Top leaf, tilted one way */
.right-col .deco-leaf-top {
    width: 26%;
    top: 4%;
    left: 14%;
    z-index: 3;
    transform: rotate(-22deg);
    --fy: -22px;
    animation: float-leaf-top 9s ease-in-out infinite;
}

/* Bottom-right leaf, tilted the other way */
.right-col .deco-leaf-bottom {
    width: 26%;
    bottom: 6%;
    right: 6%;
    z-index: 3;
    transform: rotate(20deg);
    --fy: -24px;
    animation: float-leaf-bottom 10s ease-in-out infinite;
    animation-delay: -2s;
}

/* Scattered seeds */
.right-col .deco-seeds {
    width: 11%;
    top: 16%;
    right: 18%;
    z-index: 3;
    transform: rotate(12deg);
    --fy: -20px;
    animation: float-seeds 8.5s ease-in-out infinite;
    animation-delay: -1s;
}

/* ===== Gentle floating (rotation baked in so the tilt is preserved) ===== */
/* --fy = vertical travel; defined per element below and reduced on phones */
@keyframes float-sandwich {
    0%, 100% { transform: rotate(6deg) translateY(0); }
    50%      { transform: rotate(9deg) translateY(var(--fy)); }
}
@keyframes float-leaf-top {
    0%, 100% { transform: rotate(-24deg) translateY(0); }
    50%      { transform: rotate(-16deg) translateY(var(--fy)); }
}
@keyframes float-leaf-bottom {
    0%, 100% { transform: rotate(22deg) translateY(0); }
    50%      { transform: rotate(14deg) translateY(var(--fy)); }
}
@keyframes float-seeds {
    0%, 100% { transform: rotate(10deg) translateY(0); }
    50%      { transform: rotate(17deg) translateY(var(--fy)); }
}

/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
    .right-col .deco-sandwich,
    .right-col .deco-leaf-top,
    .right-col .deco-leaf-bottom,
    .right-col .deco-seeds {
        animation: none;
    }
}

/* ===== Mobile / tablet: single column ===== */
/* Stacking order: the food composition on top, then the packshots, then the iframe. */
@media (max-width: 1080px) {
    body .container-fluid .content {
        flex-direction: column;
        padding-top: 1.5rem;
    }

    /* Slightly more compact switcher on phones; still pinned to the corner. */
    .lang-switch__btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    body .container-fluid .right-col {
        /* Food composition (sandwich + leaves + seeds) is dropped entirely on
           mobile/tablet — the left column (packshots + iframe) takes the full width. */
        display: none;
    }

    body .container-fluid .left-col {
        /* slider + iframe now fill the whole content area */
        width: 100%;
        order: 2;
    }

.garmin-packshot {
    margin: 0 auto -3rem;
        width: 70%;
}
    .slider {
        width: 100%;
        margin-bottom: -3rem;
    }

    body .container-fluid .content {
        margin-bottom: 2.5rem;
    }
}
