/*
 * Sale campaign (inc/campaign.php, assets/campaign.js): the section on the front page, the banner under a
 * campaign category's title and the label at a campaign product's price. Loaded only while a campaign runs.
 * The bar in the header is styled in refinements.css, with the utility bar it sits in.
 * Brand Book 2.0 (docs/brand): one orange signal per screen (the accent word of the front page title, the
 * percentage in the category banner), labels in Arial 600 12px with .2em spacing, Anton without letter spacing.
 */

/* Front page section, before the intro. */
.sw-campaign-home{position:relative;overflow:hidden;padding:clamp(48px,7vw,96px) 0;background:var(--sw-ink);color:var(--sw-white)}
.sw-campaign-home::before{content:attr(data-deco);position:absolute;left:-2%;top:50%;transform:translateY(-50%) rotate(-4deg);font-family:var(--sw-font-display);font-size:clamp(90px,17vw,260px);line-height:.85;white-space:nowrap;color:transparent;-webkit-text-stroke:1px rgba(255,255,255,.09);pointer-events:none}
/* The page box of the theme (base.css): the content lines up with the logo and the text of the other sections. */
.sw-campaign-home-in{position:relative;width:var(--sw-page-box,calc(100% - 56px));max-width:1360px;margin:0 auto}
.sw-campaign-kicker{margin:0 0 16px;font:600 12px/1.4 Arial,sans-serif;letter-spacing:.2em;text-transform:uppercase;color:var(--sw-line)}
.sw-campaign-home h2{margin:0;font-family:var(--sw-font-display);font-size:clamp(46px,8vw,112px);font-weight:400;line-height:.9;letter-spacing:0;text-transform:uppercase;color:var(--sw-white)}
.sw-campaign-home h2 b{font-weight:inherit;color:var(--sw-orange)}
.sw-campaign-lead{max-width:620px;margin:24px 0 32px;font:400 16px/1.65 Arial,sans-serif;color:var(--sw-line)}
/* Without a lead the tiles follow the heading directly. */
.sw-campaign-home h2+.sw-campaign-tiles,.sw-campaign-home h2+.sw-campaign-big{margin-top:32px}
.sw-campaign-big{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 48px}
.sw-campaign-big div{min-width:94px;padding:16px 12px 8px;text-align:center;background:var(--sw-white);color:var(--sw-ink)}
.sw-campaign-big strong{display:block;font-family:var(--sw-font-display);font-size:clamp(38px,5vw,58px);font-weight:400;line-height:1}
.sw-campaign-big span{font:600 12px/1.4 Arial,sans-serif;letter-spacing:.2em;text-transform:uppercase}
.sw-campaign-tiles{display:grid;grid-template-columns:repeat(5,minmax(0,200px));gap:16px}
/* Christmas: the tiles are gift tags, cut corners and a hole at the top, hanging a little crooked. The clip-path
   cuts off an outline, so the keyboard focus is an inset ring. */
.sw-campaign-tile{position:relative;display:block;padding:36px 20px 20px;background:rgba(255,255,255,.08);color:var(--sw-white);text-decoration:none;clip-path:polygon(24px 0,calc(100% - 24px) 0,100% 24px,100% 100%,0 100%,0 24px);transform:rotate(-1deg);transition:background .2s,transform .2s}
.sw-campaign-tile:nth-child(even){transform:rotate(1deg)}
.sw-campaign-tile::before{content:"";position:absolute;top:14px;left:50%;width:10px;height:10px;margin-left:-5px;border-radius:50%;background:var(--sw-ink)}
.sw-campaign-tile:hover{background:rgba(255,255,255,.14);transform:rotate(0) translateY(-3px)}
/* Not the underline and Ink colour of links on hover (base.css, design-system.css .sg-body a:hover). */
.sw-campaign-home .sw-campaign-tile:hover,.sw-campaign-home .sw-campaign-tile:focus{color:var(--sw-white);text-decoration:none}
.sw-campaign-tile:focus-visible{outline:0;box-shadow:inset 0 0 0 2px var(--sw-focus,#315FDB)}
.sw-campaign-tile strong{display:block;font-family:var(--sw-font-display);font-size:clamp(40px,3.4vw,56px);font-weight:400;line-height:1;color:var(--sw-white)}
/* "up to" above the number when the products of a tile have different discounts. */
.sw-campaign-tile strong em{display:block;margin-bottom:4px;font:600 12px/1.4 Arial,sans-serif;font-style:normal;letter-spacing:.2em;text-transform:uppercase;color:var(--sw-line)}
.sw-campaign-tile span{display:block;margin-top:8px;font-family:var(--sw-font-display);font-size:24px;line-height:1.1;text-transform:uppercase}
.sw-campaign-tile small{display:block;margin-top:12px;font:600 12px/1.4 Arial,sans-serif;letter-spacing:.2em;text-transform:uppercase;color:var(--sw-line)}
.sw-campaign-note{margin:24px 0 0;font:400 14px/1.5 Arial,sans-serif;color:var(--sw-line)}
@media(max-width:900px){.sw-campaign-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.sw-campaign-tile{transition:none}.sw-campaign-tile:hover{transform:rotate(0)}}

/* With a photo (sw_campaign() photo). Brand Book 2.0: nothing on the rider or the product, only the part under the text
   darkened. The heading follows the H1 size of the Brand Book; the theme sets every h2 in #main to 40px with ids and
   !important (design-system.css), so this rule needs both. */
.sw-campaign-home.has-photo::before{display:none}
.sw-campaign-photo img{display:block;width:100%}
.sw-campaign-photo picture::after{content:"";position:absolute;inset:0;pointer-events:none}
.sw-campaign-head .sw-campaign-lead{margin-bottom:0}
html body.switch-native #wrapper #main .sw-campaign-home.has-photo .sw-campaign-head h2{font-size:var(--sw-h1,clamp(40px,5.5vw,64px))!important}
.sw-campaign-home.has-photo .sw-campaign-home-in{padding-top:16px}

/* Desktop: the photo fills the whole section, behind the heading and the tiles on the left (darkened there), so the
   rider on the right is shown whole. The space above the heading is sized to the screen, so the heading and the
   discounts show as the page loads (checked at 1440 x 760, 1781 x 900 and 1918 x 956). */
@media(min-width:701px){
.sw-campaign-home.has-photo{padding-top:0}
.sw-campaign-photo picture{position:absolute;inset:0;z-index:0;display:block}
.sw-campaign-photo img{height:100%;object-fit:cover;object-position:50% 45%}
/* Darkened around the heading and the tiles only, so the tree at the top left keeps its lights. */
.sw-campaign-photo picture::after{background:radial-gradient(ellipse 42% 48% at 22% 70%,rgba(17,17,17,.78) 0%,rgba(17,17,17,.45) 55%,rgba(17,17,17,0) 100%),linear-gradient(90deg,rgba(17,17,17,.35) 0%,rgba(17,17,17,0) 40%),linear-gradient(180deg,rgba(17,17,17,0) 85%,var(--sw-ink) 100%)}
.sw-campaign-head{position:relative;z-index:1;width:var(--sw-page-box,calc(100% - 56px));max-width:1360px;margin:0 auto;padding-top:clamp(160px,calc(100vh - 640px),340px)}
.sw-campaign-head>*{max-width:46%}
/* Three tiles of 200px stay left of the rider (checked at 1918, 1440 and 1280 px); more would reach the rider. */
}

/* Phone: the photo on top, the heading and the tiles under it. The photo stays at the top of the screen while they
   scroll over it: display: contents puts the picture straight in the section, so it sticks for the whole section, and
   overflow: hidden would stop the sticking. The header does not stick on phones, hence top: 0. */
@media(max-width:700px){
.sw-campaign-home.has-photo{overflow:visible;padding-top:0;padding-bottom:0}
.sw-campaign-home.has-photo .sw-campaign-photo{display:contents}
.sw-campaign-home.has-photo .sw-campaign-photo picture{position:sticky;top:0;z-index:0;display:block}
.sw-campaign-photo img{height:calc(75vw - 10px);object-fit:cover;object-position:50% 100%} /* 4:3 with 10px cut off the top */
.sw-campaign-photo picture::after{background:linear-gradient(180deg,rgba(17,17,17,0) 90%,var(--sw-ink) 100%)}
/* The heading starts on the bottom of the photo, just under the rider (checked at 375 px). */
.sw-campaign-home.has-photo .sw-campaign-head{position:relative;z-index:1;margin-top:-110px;padding:24px var(--sw-gutter,20px) 0;background:linear-gradient(180deg,rgba(17,17,17,0) 0,rgba(17,17,17,.35) 60px,rgba(17,17,17,.7) 100px,var(--sw-ink) 150px)}
.sw-campaign-home.has-photo .sw-campaign-home-in{z-index:1;width:auto;max-width:none;padding:16px var(--sw-gutter,20px) 48px;background:var(--sw-ink)}
/* Three tiles in one row from 360px: smaller corners, numbers and labels, the label scaled to the width so
   "Skateboards" does not break (checked at 360, 375 and 412 px). Below 360px two in a row. */
.sw-campaign-tiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.sw-campaign-tile{padding:28px 8px 12px;clip-path:polygon(14px 0,calc(100% - 14px) 0,100% 14px,100% 100%,0 100%,0 14px)}
.sw-campaign-tile::before{top:10px;width:8px;height:8px;margin-left:-4px}
.sw-campaign-tile strong{font-size:34px}
.sw-campaign-tile strong em{letter-spacing:.1em}
.sw-campaign-tile span{font-size:min(16px,4.1vw);line-height:1.05}
.sw-campaign-tile small{margin-top:10px;letter-spacing:.08em}
}
@media(max-width:359px){
.sw-campaign-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
.sw-campaign-tile strong{font-size:40px}
.sw-campaign-tile span{font-size:18px}
}

/* Banner under the title of a campaign category. */
.sw-campaign-category{display:flex;flex-wrap:wrap;align-items:center;gap:16px;margin:16px 0 8px;padding:16px 24px;background:var(--sw-ink);color:var(--sw-white)}
.sw-campaign-category strong{font-family:var(--sw-font-display);font-size:30px;font-weight:400;line-height:1;text-transform:uppercase;color:var(--sw-orange)}
.sw-campaign-category span{font:700 14px/1.4 Arial,sans-serif;text-transform:uppercase}
.sw-campaign-category small{margin-left:auto;font:600 12px/1.4 Arial,sans-serif;letter-spacing:.2em;text-transform:uppercase;color:var(--sw-line)}
.sw-campaign-category small span{font:inherit;letter-spacing:inherit;font-variant-numeric:tabular-nums}

/* Label at the price of a campaign product. */
.sw-campaign-price{display:inline-flex;align-items:center;gap:8px;margin:8px 0;padding:8px 12px;background:var(--sw-ink);color:var(--sw-white);font:600 12px/1.4 Arial,sans-serif;letter-spacing:.2em;text-transform:uppercase}
.sw-campaign-price b{font-weight:700;color:var(--sw-white)}
.sw-campaign-price span{font-variant-numeric:tabular-nums}

/* The last day to order for Christmas, under the add to cart button. */
.sw-campaign-ship-note{margin:8px 0 16px;font:400 14px/1.5 Arial,sans-serif;color:var(--sw-ink)}

/* Christmas: a Santa hat on the logo (Brand Book exception, docs/brand/README.md), placed as laid out in
   docs/brand/kampanie/czapka-na-logo-do-ulozenia2.svg. A layer over the unchanged logo, only while body has
   sw-campaign-hat (inc/campaign.php; campaign.js removes it at the end). The hat files share the logo coordinates
   (campaign-hat-*.svg, viewBox 20 20 109 81; switch-logo-black.svg, viewBox 74.4 63.1 293 80.3), so the offsets below
   are the hat box scaled to each logo size. The fur is always white, with a shadow (in the SVG) that keeps it apart
   from the letters; on the light checkout header it also has an Ink outline. z-index: the logo has a filter, which
   would otherwise paint it over the hat. Cloudflare keeps static files for a month: raise ?v= when a hat file changes. */
body.sw-campaign-hat .sp-logo a,
body.sw-campaign-hat .sw-checkout-logo{position:relative;display:block}
body.sw-campaign-hat .sp-logo a::before,
body.sw-campaign-hat .sw-checkout-logo::before{content:"";position:absolute;z-index:1;background:url(campaign-hat-white.svg?v=2) no-repeat center/contain;pointer-events:none}
body.sw-campaign-hat .sp-logo a::before{left:-25.1px;top:-15.9px;width:50.2px;height:37.3px}
body.sw-campaign-hat .sw-checkout-logo::before{left:-25.1px;top:-19.9px;width:50.2px;height:37.3px;background-image:url(campaign-hat-light.svg?v=2)}
/* The logo is smaller in the header up to 549px (design-system.css) and at checkout up to 599px (checkout.css). */
@media(max-width:549px){body.sw-campaign-hat .sp-logo a::before{left:-20.1px;top:-12.7px;width:40.2px;height:29.9px}}
@media(max-width:599px){body.sw-campaign-hat .sw-checkout-logo::before{left:-20.1px;top:-15.9px;width:40.2px;height:29.9px}}
