/* Service page headers on phones and small tablets (hero-fit.js).
   Step 1: the artwork is scaled to the screen. Step 2: each page gets a compact layout with larger main pieces. */
.hf-box { display: contents; }

@media (max-width: 899px) {
  .hf-ready .hf-box { display: block; position: relative; z-index: 2; width: 100%; margin-top: 18px; }
  /* The size here only gives pieces room; hero-fit.js measures what is visible. */
  .hf-ready .hf-box > .hero-art { position: absolute !important; top: 0 !important; left: 0 !important; right: auto !important; width: 700px !important; height: 600px !important; margin: 0 !important; transform-origin: 0 0; direction: rtl; }
  .hf-ready .a-hero, .hf-ready .d-hero, .hf-ready .p-hero, .hf-ready .g-hero { padding-bottom: 26px; }

  /* ----- Paid ads: radar above the performance chart; budget panel and one icon removed ----- */
  .hf-ready .a-radar { left: 0; top: 0; width: 400px; height: 340px; }
  .hf-ready .a-radar p { font-size: 15px; }
  .hf-ready .a-radar li { font-size: 14px; }
  .hf-ready .a-trend { left: 0; top: 362px; width: 400px; height: 180px; }
  .hf-ready .a-trend p { font-size: 15px; }
  .hf-ready .a-trend svg { height: 112px; }
  .hf-ready .a-screen em { font-size: 12px; }
  .hf-ready .a-meters, .hf-ready .a-badge.b2 { display: none; }
  .hf-ready .a-badge { width: 62px; height: 62px; }
  .hf-ready .a-badge.b1 { left: 6px; top: 16px; }
  .hf-ready .a-badge.b3 { left: 332px; top: 16px; }

  /* ----- Creative design: logo canvas and colours; curve and tool panels removed ----- */
  .hf-ready .d-art { left: 40px; top: 0; width: 340px; height: 370px; }
  .hf-ready .d-art .d-select img { width: 180px; }
  .hf-ready .d-tab { font-size: 13px; }
  .hf-ready .d-swatches { right: auto; left: 69px; top: 392px; }
  .hf-ready .d-swatches span { width: 58px; height: 84px; }
  .hf-ready .d-swatches small { font-size: 10.5px; }
  .hf-ready .d-type { left: 0; top: 228px; width: 112px; padding: 10px; }
  .hf-ready .d-type b { font-size: 36px; }
  .hf-ready .d-type em { font-size: 24px; }
  .hf-ready .d-curve, .hf-ready .d-tools, .hf-ready .d-cursor { display: none; }

  /* ----- Programming: the app preview and success message in front, a faded code window behind ----- */
  .hf-ready .p-editor { left: 0; top: 0; width: 340px; opacity: .62; }
  .hf-ready .p-preview { left: 62px; top: 128px; width: 350px; }
  .hf-ready .p-canvas { gap: 11px; padding: 14px; }
  .hf-ready .b-bar b { font-size: 18px; }
  .hf-ready .b-banner { height: 82px; font-size: 24px; }
  .hf-ready .b-items i { height: 54px; }
  .hf-ready .b-chart { height: 56px; }
  .hf-ready .b-button { height: 42px; font-size: 16px; }
  .hf-ready .p-toast { left: 8px; top: 490px; font-size: 16px; }

  /* ----- Online stores: a bigger shop front, with one message at a time ----- */
  .hf-ready .t-building { left: 24px; top: 0; width: 420px; }
  .hf-ready .t-sign { font-size: 23px; }
  .hf-ready .t-window { gap: 14px 10px; padding: 40px 14px 18px; }
  .hf-ready .t-shelf-item svg { width: 82px; height: 82px; }
  .hf-ready .t-shelf-item b { font-size: 14px; }
  .hf-ready .t-pop.p1, .hf-ready .t-pop.p2, .hf-ready .t-pop.p3 { left: 128px; top: 414px; width: 212px; padding: 13px 16px; justify-content: center; }
  .hf-ready .t-pop b { font-size: 15px; }
  .hf-ready .t-pop small { font-size: 13px; }
  html.hf-ready:not(.anim) .t-pop.p2, html.hf-ready:not(.anim) .t-pop.p3 { display: none; }
  .hf-ready.anim .t-pop { animation: hf-turn 9s ease-in-out infinite both; }
  .hf-ready.anim .t-pop.p1 { animation-delay: 1.2s; }
  .hf-ready.anim .t-pop.p2 { animation-delay: 4.2s; }
  .hf-ready.anim .t-pop.p3 { animation-delay: 7.2s; }

  /* ----- Content creation: camera view and clapperboard, drawn closer together ----- */
  .hf-ready .c-viewfinder { left: 0; top: 0; width: 430px; height: 320px; }
  .hf-ready .c-rec, .hf-ready .c-spec { font-size: 16px; }
  .hf-ready .c-clapper { left: 210px; top: 270px; }
  .hf-ready .c-hero { padding-bottom: 92px; }

  /* ----- Digital marketing: a tighter circle with larger icons ----- */
  .hf-ready .g-system { left: 0; top: 0; }
  .hf-ready .g-spin { scale: .86; }
  .hf-ready .g-planet { width: 82px; height: 82px; margin: -41px; }
  .hf-ready .g-planet svg { width: 46px; height: 46px; }
  .hf-ready .g-sun { width: 180px; height: 180px; margin: -90px; }
  .hf-ready .g-sun img { width: 96px; }
}

/* Each store message gets a third of the cycle, so they never overlap */
@keyframes hf-turn { 0% { opacity: 0; translate: 0 20px; } 4%, 28% { opacity: 1; translate: 0 0; } 32%, 100% { opacity: 0; translate: 0 -14px; } }

/* No flicker while loading: dark page until it is built, artwork hidden until it has been fitted */
body[data-service]:not(:has(.hero)) { background: #1b0a2c; }
body[data-service] > noscript { color: #fff; }
@media (max-width: 899px) {
  /* The delayed animation is a safety net: the artwork still shows if the script ever fails to load */
  .hf-ready .hero-art:not(.hf-fitted) { visibility: hidden; animation: hf-fallback 0s 5s forwards; }
}
@keyframes hf-fallback { to { visibility: visible; } }
