/* ===== v2 (lime) — responsive layer, loaded last =====
   ≥1800 big monitors · ≤1100 small laptop · ≤1000 tablet · ≤820 tablet portrait · ≤600 phone · ≤380 small phone */

h1,h2,h3,.lead,.sec-head p,.final p{text-wrap:balance}
p{text-wrap:pretty}
img,svg,canvas{max-width:100%}
html{-webkit-text-size-adjust:100%}

/* touch screens: no sticky hover lifts */
@media (hover:none){
  .tpl:hover .tpl__shot,.tpl:hover .tpl__hero,.plan:hover,.tile:hover{transform:none}
}

/* ---------- big monitors: scale the layout up a little instead of leaving it tiny ---------- */
@media (min-width:1800px){
  .nav,.hero__grid,.section>.wrap,.foot__in,.shots{zoom:1.1}
}
@media (min-width:2300px){
  .nav,.hero__grid,.section>.wrap,.foot__in,.shots{zoom:1.22}
}

/* ---------- tablet ---------- */
@media (max-width:1000px){
  .section{padding:90px 0}
  /* templates: 2 + 1 grid, cards keep a sane height */
  .tpls{grid-template-columns:repeat(2,1fr);gap:18px}
  .tpl__shot{aspect-ratio:4/4.4}
  .plans{grid-template-columns:repeat(3,1fr);gap:14px}
  .plan{padding:24px}
}
@media (max-width:820px){
  .section{padding:72px 0}
  .plans{grid-template-columns:1fr;max-width:520px;margin-inline:auto}
  .steps{grid-template-columns:1fr 1fr 1fr;gap:12px}
  .step__vis{height:96px}
  .tpls{grid-template-columns:repeat(2,1fr)}
  .tpls .tpl:nth-child(3){grid-column:1/-1}
  .tpls .tpl:nth-child(3) .tpl__shot{aspect-ratio:16/8}
  .migr__flow{flex-direction:row;flex-wrap:wrap;align-items:center}
}

/* ---------- phone ---------- */
@media (max-width:600px){
  .wrap{width:calc(100% - 36px)}
  .section{padding:60px 0}
  .hero{padding-bottom:0}
  .hero__actions{flex-direction:column;align-items:stretch;width:100%;max-width:340px;margin-inline:auto}
  .hero__actions .btn{justify-content:center}
  .shots{height:250px;margin-top:32px}
  .steps{grid-template-columns:1fr;gap:12px}
  .step__vis{height:88px}

  /* templates: swipeable row instead of three full-screen cards */
  .tpls{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;margin-inline:-18px;padding:4px 18px 10px;scrollbar-width:none}
  .tpls::-webkit-scrollbar{display:none}
  .tpls .tpl,.tpls .tpl:nth-child(3){flex:0 0 78%;scroll-snap-align:center;grid-column:auto}
  .tpls .tpl .tpl__shot,.tpls .tpl:nth-child(3) .tpl__shot{aspect-ratio:4/4.6}

  /* migration block: platforms in one tidy row, no tall connector */
  .migr__flow{flex-direction:row;flex-wrap:wrap;gap:8px}
  .pipe{display:none}

  .plan{padding:22px}
  .faq summary{font-size:16px;padding:18px 0}
  .faq details{padding:0 18px}
  .final{padding:44px 18px}
  .signup{flex-direction:column}
  .signup input{min-width:0;width:100%}
  .signup .btn{width:100%;justify-content:center}
  .foot{padding-top:36px}
  .foot__in{gap:20px;flex-direction:column;align-items:flex-start}
  .foot nav{display:grid;grid-template-columns:repeat(3,auto);justify-content:start;column-gap:22px;row-gap:12px}
  .foot__px{height:140px}
}

/* ---------- small phones ---------- */
@media (max-width:380px){
  h1{font-size:32px}
  .wrap{width:calc(100% - 28px)}
  .crumb{font-size:10.5px;padding:5px 9px}
  .tpls .tpl,.tpls .tpl:nth-child(3){flex-basis:84%}
  .tpls{margin-inline:-14px;padding-inline:14px}
  .foot nav{grid-template-columns:repeat(2,auto)}
}

/* ---------- landscape phones ---------- */
@media (max-height:500px) and (orientation:landscape){
  .hero{padding-top:24px}
  .shots{height:220px;margin-top:24px}
}

/* integrations marquee: on wide screens keep it inside the content width, centred,
   so the row never runs out and leaves an empty right side */
@media (min-width:1300px){
  .marquee__track{max-width:1200px;margin-inline:auto}
}
@media (min-width:1800px){.marquee__track{zoom:1.1}}
@media (min-width:2300px){.marquee__track{zoom:1.22}}

/* template carousel on phones: swipe sideways only — no vertical scroll inside the row,
   no slide-up animation on the cards (it made the row jump up and down) */
@media (max-width:600px){
  .tpls{overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
  .tpls .tpl.reveal{transform:none!important;opacity:1!important;transition:none}
  .tpls .tpl__shot,.tpls .tpl__hero{transition:none}
}

/* touch screens (and phones): cards never lift or cast a shadow on tap */
@media (hover:none),(max-width:760px){
  .step,.tile,.plan,.tpl__shot{transition:none!important}
  .step:hover,.step:active,.tile:hover,.tile:active,.plan:hover,.plan:active,
  .tpl:hover .tpl__shot,.tpl:active .tpl__shot{transform:none!important;box-shadow:none!important}
  .tile:hover{border-color:var(--line)!important}
  .step:hover .vis-tpl i,.step:hover .vis-prod i,.step:hover .vis-sell b,.tile:hover .tile__ic,.tile--wide:hover .pay span{transform:none!important}
  .tile--wide:hover .pay span:nth-child(1){background:var(--bg)!important;color:var(--ink)!important;border-color:var(--line)!important}
  a,button,.step,.tile,.plan,.tpl{-webkit-tap-highlight-color:transparent}
}

/* hero subtitle on phones: tighter lines */
@media (max-width:600px){ .hero .lead{font-size:16.5px;line-height:1.42} }

/* migration card on phones: just the copy + button, no platform diagram */
@media (max-width:760px){ .migr__flow{display:none} .migr{gap:0} }
