/* Mobile / tablet polish for EN and ID industry pages.
   Loaded last, and scoped to max-width: 1023px so desktop (>=1024px) stays unchanged. */

@media (max-width: 1023px) {
  /* ---- Hero: fill the first screen cleanly ---- */
  .ih-hero{padding:0 8px 8px;box-sizing:border-box}
  .ih-hero__grid,.ih-hero__copy,.ih-hero__h,.ih-hero__sub,.ih-hero__cta{min-width:0;max-width:100%;box-sizing:border-box}
  .ih-hero__panel{
    box-sizing:border-box;
    display:flex;flex-direction:column;
    min-height:calc(100dvh - var(--uab-h, 0px) - 69px - 8px);
    max-height:calc(100dvh - var(--uab-h, 0px) - 69px - 8px);
    padding:22px 16px 16px;border-radius:28px;overflow:hidden;
  }
  .ih-hero__grid{flex:1 1 auto;min-height:0;gap:16px;grid-template-rows:auto minmax(0,1fr);align-items:stretch}
  .ih-hero__sub{margin-top:12px}
  .ih-hero__cta{
    flex-wrap:wrap;
    justify-content:center;
    margin-top:16px;
    gap:10px;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }
  .ih-hero__cta .btn,.ih-hero__cta .btn--lg{
    white-space:nowrap;
    flex:1 1 auto;
    max-width:100%;
    box-sizing:border-box;
    justify-content:center;
  }
  .ih-hero__vis{
    min-height:0;overflow:hidden;align-items:flex-start;
    -webkit-mask-image:linear-gradient(#000 0 88%,transparent);
    mask-image:linear-gradient(#000 0 88%,transparent);
  }
  .ih-hero__vis .wa{max-width:min(340px,100%);padding:0;height:100%;max-height:100%}
  .ih-hero__vis .wa__card{height:100%;max-height:100%;display:flex;flex-direction:column}
  .ih-hero__vis .wa__body{height:auto;flex:1 1 auto;min-height:0}
  .wa-float--a{left:8px}
  .wa-float--b{right:8px}

  /* ---- Sticky flow tabs: sit under banner+nav and fit the width ---- */
  /* Old click-tab layout (ID pages, no .hf-sticky): same offset under the banner + nav */
  #how:not([data-hf="long"]) .hf-tabs{
    top:calc(var(--uab-h, 0px) + 72px);
    max-width:100%;
    box-sizing:border-box;
  }
  .hf-sticky{top:calc(var(--uab-h, 0px) + 72px);padding:4px 12px 8px;width:100%;box-sizing:border-box;max-width:100%}
  .hf-sticky .hf-tabs{max-width:100%;min-width:0;margin:0}
  .hf-tabs__in{max-width:100%;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;flex-wrap:nowrap;scrollbar-width:none}
  .hf-tabs__in::-webkit-scrollbar{display:none}
  .hf-tab__l{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .hf-tab__s{display:inline}
  .hf-tab{min-width:0;height:40px;padding:0 12px;gap:7px;font-size:13.5px}

  /* ---- Consult Now pill: slightly smaller; clear space under every step ---- */
  .hf-consult{height:48px;padding:0 24px;font-size:15px;min-width:0;max-width:calc(100% - 32px)}
  #how[data-hf="long"]{padding-bottom:calc(10.5vh + 72px + env(safe-area-inset-bottom, 0px))}
  #how[data-hf="long"] .ih-steps{gap:32px}
  #how[data-hf="long"] .ih-step{
    padding-bottom:calc(10.5vh + 64px + env(safe-area-inset-bottom, 0px));
    box-sizing:border-box;
  }
  #how[data-hf="long"] .hf-flow{scroll-margin-top:calc(var(--uab-h, 0px) + 132px)}
  #how[data-hf="long"] #hf-s2,
  #how[data-hf="long"] #hf-s3,
  #how[data-hf="long"] #hf-s4,
  #how[data-hf="long"] #hf-s5{margin-top:28px}

  /* ---- Logo grid: even gaps and a little air before How Cekat helps ---- */
  .ih-trust{padding:28px 0 24px}
  .ih-trust__h{font-size:15px;gap:10px;margin-bottom:22px}
  .tlg{--lh:24px;gap:20px 16px}
  .tlg.tlg--row,.tlg--row{gap:20px 16px}
  .tlg__lbl{margin:24px auto 16px}
}

@media (max-width: 768px) {
  .tlg,.tlg.tlg--9{grid-template-columns:repeat(4,minmax(0,1fr))}
  .tlg--9 li:last-child{grid-column:1/-1}
  .tlg.tlg--row{display:flex;flex-wrap:wrap;justify-content:center}
  .tlg--row li{flex:0 1 calc(33.33% - 12px);max-width:160px}
  .ih-hero__vis{align-items:flex-end}
  .ih-hero__vis .wa{max-width:min(400px,100%)}
}
@media (max-width: 640px) {
  .tlg,.tlg.tlg--9{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tlg--9 li:last-child{grid-column:auto}
  .ih-hero__vis .wa{max-width:min(340px,100%)}
  /* industry.css forces each punch line to nowrap, which overflows the card
     on long EN/ID/CJK headlines. Let a line wrap rather than clip, and keep
     the last words together when possible. */
  .ih-hero__h{font-size:clamp(22px,6.4vw,32px);text-wrap:balance}
  .ih-hero__h .ih-l{white-space:normal;text-wrap:balance;overflow-wrap:normal;max-width:100%}
  .ih-hero__sub{max-width:100%}
  /* Don't split a CJK punch line on a single leftover character. */
  :lang(ja) .ih-hero__h{font-size:clamp(17.5px,5.5vw,28px)}
  :lang(ja) .ih-hero__h .ih-l,
  :lang(zh) .ih-hero__h .ih-l{word-break:auto-phrase;line-break:strict;overflow-wrap:normal;text-wrap:balance}
  :lang(ko) .ih-hero__h .ih-l{word-break:keep-all;overflow-wrap:normal;text-wrap:balance}
}

@media (max-width: 430px) {
  .ih-hero__panel{padding:18px 14px 14px}
  .ih-hero__h{font-size:clamp(21px,6.4vw,32px)}
  .ih-hero__cta .btn,.ih-hero__cta .btn--lg{height:44px;padding:0 16px;font-size:14.5px}
  .hf-consult{height:46px;padding:0 22px;font-size:15px}
  .hf-tab{padding:0 10px;font-size:13px}
}

@media (max-width: 360px) {
  .ih-hero__h{font-size:clamp(20px,6.2vw,28px)}
  .ih-hero__cta{gap:8px}
  .ih-hero__cta .btn,.ih-hero__cta .btn--lg{padding:0 14px;font-size:14px}
  .hf-tab{padding:0 8px}
}

/* Phone: stack the hero CTAs full-width (primary on top, secondary below)
   so long labels in every locale stay inside the card at 320–480px.
   Wider than 480px they sit side by side when they fit, and wrap if not. */
@media (max-width: 480px) {
  .ih-hero__cta{flex-direction:column;align-items:stretch;gap:10px}
  .ih-hero__cta .btn,.ih-hero__cta .btn--lg{width:100%;flex:0 0 auto}

  /* Decorative illustration chrome (floating pills, long CJK keep-together
     phrases, touchpoint lists) must not widen the page. */
  .ih-fx{max-width:calc(100vw - 40px);box-sizing:border-box;white-space:normal}
  .ih-fx--tl{left:0}
  .ih-fx--tr{right:0}
  .ih-nowrap{white-space:normal}
  .ih-step,.ih-step__vis,.ih-stage,.ih-sec--res,.hf-wf,.ih-card{max-width:100%;box-sizing:border-box}
  .ih-step,.ih-step__vis,.ih-stage{overflow-x:clip}
  .hf-wf__l,.hf-wf__l li{min-width:0;max-width:100%}
  .hf-wf__l b,.hf-wf__l small{white-space:normal;overflow-wrap:anywhere}
}

/* Step-flow connector: the dotted line + circle nodes linking each step's
   mockup card to the next. Below 901px industry.js draws it as a long bow
   through a left gutter, which reads as a stray S-curve with big gaps on
   phones and tablets. Hide it there (desktop S-curve unchanged), hand the
   gutter back to the content, and close up the vertical rhythm. */
@media (max-width: 900px) {
  #how .ih-flow{display:none!important}
  #how .ih-step__copy,#how .ih-step__vis{padding-left:0}
  #how .ih-steps{gap:56px}
  #how[data-hf="long"] .ih-steps{gap:56px}
  #how[data-hf="long"] .ih-step{padding-bottom:0}
  #how[data-hf="long"] .ih-step:last-child{padding-bottom:40px}
}
@media (max-width: 640px) {
  #how .ih-steps,#how[data-hf="long"] .ih-steps{gap:48px}
  #how .ih-step{gap:20px}
}

/* Floating "Consult Now" pill: text-wrap.css gives .consult-cta
   text-wrap:balance, which resets white-space to normal, and a fixed box at
   left:50% only gets half the viewport to shrink into, so the label broke
   onto two lines on phones. Keep it on one line, sized to its label. */
@media (max-width: 1023px) {
  .hf-consult,a.hf-consult.consult-cta{white-space:nowrap;text-wrap:nowrap;width:max-content}
}
