/* =========================================================
   Custom Software Development page: responsive rules
   Desktop (1920 Figma) values live in style.css.
   ========================================================= */

/* ---------- Large desktop / laptop (≤1599) ---------- */
@media (max-width:1599.98px){
  .csd-page{--csd-h2:56px;--csd-section-y:104px;}
  .csd-page{--csd-sticky-x:40px;}
  .csd-hero{padding:0 40px;}
  .csd-hero__title{font-size:80px;}
  .csd-nav__list{gap:30px;}
  .csd-stat__num{font-size:120px;line-height:112px;}
  .csd-stat__place{font-size:64px;line-height:64px;}
  .csd-step__title{font-size:50px;line-height:60px;}
}

/* ---------- Laptop (≤1439): fixed Figma widths become fluid ---------- */
@media (max-width:1439.98px){
  .csd-page{--csd-h2:52px;}
  .csd-hero__title{font-size:74px;}
  .csd-nav__list{gap:24px;}
  .csd-nav__link{font-size:17px;}

  .csd-head__title{flex:1 1 auto;min-width:0;}
  .csd-head__text,.csd-docs__text,.csd-steps__intro{width:42%;}
  .csd-refresh__title,.csd-offer .csd-head__title .csd-h2,.csd-docs__title,.csd-cases__title,.csd-steps__title{width:auto;max-width:100%;}
  .csd-cases__intro{white-space:normal;width:auto;max-width:34%;}

  .csd-stat__num{font-size:104px;line-height:100px;}
  .csd-stat__place{font-size:58px;line-height:60px;}
  .csd-clients__item{font-size:18px;}

  .csd-problem__grid{gap:48px;}

  /* Offer bento: narrower 4-column cards on laptops */
  .csd-bento__card{padding:28px;}
  .csd-bento__card--interface{padding:30px;}
  .csd-bento__title{font-size:22px;line-height:27px;}
  .csd-bento__title--lg{margin-top:22px;font-size:26px;line-height:32px;}
  .csd-bento__text,.csd-bento__card--speed .csd-bento__text,.csd-bento__card--data .csd-bento__text{font-size:16px;line-height:23px;}
  .csd-bento__card--interface .csd-bento__text{font-size:16px;line-height:24px;}
  .csd-bento__card--speed{padding:104px 28px 24px;}
  .csd-gauge{left:28px;top:28px;}
  .csd-flow{margin-bottom:24px;}
  .csd-code{margin-bottom:16px;}
  .csd-bento__db{margin-bottom:20px;}
  .csd-bento__card--devices .csd-bento__copy{width:auto;flex:1 1 auto;min-width:0;}

  .csd-docs__list{width:auto;flex:0 0 48%;}
  .csd-docs__item-title{font-size:24px;line-height:29px;}
  .csd-docs__item-text{font-size:18px;line-height:25px;}

  .csd-case{gap:28px;}
  .csd-case__title{font-size:32px;}
  .csd-case__stat{padding:16px 22px;}
  .csd-case__stat-num{font-size:24px;}
  .csd-cta-band__text{font-size:28px;line-height:38px;}
  .csd-cta-band__ring{left:auto;right:150px;}

  .csd-step__copy{width:auto;flex:0 0 48%;}

  .csd-why__intro{width:auto;flex:1 1 auto;}
  .csd-terminal{flex:0 0 46%;width:46%;}

  .csd-promise__ring{left:auto;right:-140px;}

  .csd-faq__title{width:auto;}
  .csd-faq__list{width:auto;flex:0 0 47%;}
  .csd-faq__panel{width:auto;flex:1 1 auto;}

  .csd-audit__intro{width:auto;flex:1 1 auto;min-width:0;}
  .csd-audit__title{width:auto;max-width:530px;}
  .csd-form{width:auto;flex:0 0 50%;}
  .csd-audit__talk{flex-wrap:wrap;white-space:normal;}

  .csd-footer__address{width:320px;}
}

/* ---------- Small laptop (≤1199): mobile header, 2-column bento ---------- */
@media (max-width:1199.98px){
  .csd-page{--csd-h2:46px;--csd-section-y:96px;}

  /* Header becomes a toggle menu */
  .csd-hero{padding:0 var(--csd-gutter);}
  .csd-header{padding-top:20px;}
  .csd-page{--csd-sticky-x:var(--csd-gutter);}
  .csd-header-wrap{min-height:64px;} /* 20px top padding + 44px header row */
  .csd-header.is-sticky{padding-top:10px;padding-bottom:10px;}
  .csd-header.is-sticky .csd-nav{left:var(--csd-sticky-x);right:var(--csd-sticky-x);max-height:calc(100vh - 90px);}
  .csd-header.is-sticky .csd-nav__drop{margin-top:0;}
  .csd-header__toggle{display:inline-flex;flex-direction:column;justify-content:center;gap:5px;width:44px;height:44px;margin-left:auto;padding:0 11px;border-radius:22px;background:#fff;border:1px solid var(--csd-border);}
  .csd-header__toggle span{display:block;height:2px;border-radius:2px;background:var(--csd-black);transition:transform .25s ease,opacity .25s ease;}
  .csd-header.is-open .csd-header__toggle span:nth-child(1){transform:translateY(7px) rotate(45deg);}
  .csd-header.is-open .csd-header__toggle span:nth-child(2){opacity:0;}
  .csd-header.is-open .csd-header__toggle span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}
  .csd-nav{position:absolute;top:calc(100% + 12px);left:0;right:0;max-height:calc(100vh - 110px);overflow-y:auto;padding:12px;background:#fff;border:1px solid var(--csd-border);border-radius:20px;box-shadow:0 24px 48px rgba(0,0,0,.12);opacity:0;visibility:hidden;transform:translateY(-8px);transition:opacity .25s ease,transform .25s ease,visibility .25s;}
  .csd-header.is-open .csd-nav{opacity:1;visibility:visible;transform:translateY(0);}
  .csd-nav__list{flex-direction:column;align-items:stretch;gap:2px;}
  .csd-nav__link{display:flex;justify-content:space-between;width:100%;padding:12px 14px;border-radius:12px;font-size:17px;}
  .csd-nav__link:hover{background:var(--csd-grey-bg);}
  .csd-nav__drop{position:static;display:none;min-width:0;margin:0 0 6px;padding:4px 0 4px 14px;border:0;border-radius:0;box-shadow:none;opacity:1;visibility:visible;transform:none;transition:none;}
  .csd-nav__drop::before{display:none;}
  .csd-nav__item--drop.is-open .csd-nav__drop{display:block;}
  .csd-nav__item--drop:hover .csd-nav__link img{transform:none;}
  .csd-nav__item--drop.is-open .csd-nav__link img{transform:rotate(180deg);}

  .csd-hero__content{margin-top:120px;}
  .csd-hero__title{font-size:64px;}

  .csd-stat__num{font-size:88px;line-height:88px;letter-spacing:-2px;}
  .csd-stat__place{font-size:50px;line-height:54px;letter-spacing:-2px;}
  .csd-clients__list{grid-template-columns:repeat(3,minmax(0,1fr));}

  .csd-problem__title{font-size:23px;line-height:28px;}
  .csd-problem__text{font-size:18px;line-height:25px;}

  .csd-compare{grid-template-columns:repeat(3,minmax(0,1fr));}
  .csd-compare__label{font-size:17px;letter-spacing:2px;}
  .csd-compare__value{font-size:21px;}

  .csd-bento{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:minmax(210px,auto);}
  .csd-bento__card--interface{grid-column:1;grid-row:1 / span 2;}
  .csd-bento__card--devices{grid-column:2;grid-row:1;flex-direction:column;align-items:flex-start;}
  .csd-bento__card--devices .csd-bento__copy{width:auto;}
  .csd-bento__card--speed{grid-column:2;grid-row:2;min-height:225px;}
  .csd-bento__card--flow{grid-column:1;grid-row:3;}
  .csd-bento__card--code{grid-column:2;grid-row:3;}
  .csd-bento__card--data{grid-column:1 / span 2;grid-row:4;}

  .csd-docs__body{gap:32px;}

  .csd-case{grid-template-columns:1fr 1fr;padding:24px;}
  .csd-case__content{padding-top:0;}
  .csd-case__eyebrow{font-size:17px;}
  .csd-case__title{margin-top:16px;font-size:28px;}
  .csd-case__text{margin-top:16px;font-size:17px;}
  .csd-case__stats{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:20px;}
  .csd-case__stat{padding:14px 16px;}
  .csd-case__stat-num{font-size:22px;}
  .csd-case__stat-label{font-size:14px;}
  .csd-case__quote{margin-top:20px;}
  .csd-case__quote-text{font-size:16px;}

  .csd-step__title{font-size:44px;line-height:54px;letter-spacing:-1.6px;}
  .csd-step__result-text{font-size:24px;line-height:32px;}

  .csd-why__cards .csd-card{min-height:0;}

  .csd-risk__cards{grid-template-columns:repeat(2,minmax(0,1fr));}
  .csd-promise__title{font-size:36px;line-height:44px;}

  .csd-faq__q.is-active .csd-faq__q-text{font-size:17px;}

  .csd-footer__inner{grid-template-columns:auto 1fr;}
  .csd-footer__nav{justify-content:center;}
  .csd-footer__address{grid-column:1 / -1;justify-self:start;width:auto;max-width:560px;}
}

/* ---------- Tablet / iPad (≤991): sections stack ---------- */
@media (max-width:991.98px){
  .csd-page{--csd-h2:42px;--csd-section-y:80px;}

  .csd-hero__title{font-size:54px;}
  .csd-hero__text{font-size:18px;line-height:26px;}
  .csd-hero__actions{margin-top:40px;}

  .csd-head{flex-direction:column;align-items:flex-start;gap:20px;}
  .csd-head__text,.csd-docs__text,.csd-steps__intro,.csd-cases__intro{width:100%;max-width:640px;}
  .csd-lead{font-size:18px;line-height:27px;}
  .csd-badge__text{font-size:18px;}

  .csd-stats{padding:56px 0;}
  .csd-stats__row{gap:24px;}
  .csd-stat__num{font-size:72px;line-height:72px;}
  .csd-stat__place{font-size:44px;line-height:48px;}
  .csd-stat__label{font-size:17px;line-height:22px;}
  .csd-clients{margin-top:56px;}

  .csd-problem__grid{grid-template-columns:1fr;gap:40px;}

  .csd-refresh__body{margin-top:40px;padding-top:0;}
  .csd-refresh__visual{border-radius:20px;}
  .csd-compare{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}

  .csd-bento{margin-top:40px;}

  .csd-docs__body{flex-direction:column;align-items:stretch;margin-top:40px;}
  .csd-docs__list{flex:none;}
  .csd-docs__visual{align-self:center;width:100%;}
  .csd-note-bar{margin-top:40px;font-size:16px;}

  .csd-cases__tabs{margin-top:40px;}
  .csd-cases__swiper{margin-top:32px;border-radius:24px;}
  .csd-case{grid-template-columns:1fr;gap:28px;min-height:0;padding:16px 16px 28px;border-radius:24px;}
  .csd-case__content{padding:0 8px;}
  .csd-case__stats{max-width:none;}
  .csd-cta-band{flex-direction:column;align-items:flex-start;gap:24px;margin-top:40px;padding:36px 32px;border-radius:24px;}
  .csd-cta-band__text{font-size:26px;line-height:35px;}
  .csd-cta-band__ring{right:-60px;top:auto;bottom:-120px;}

  .csd-stepper{margin-top:40px;}
  .csd-stepper__when{font-size:11px;letter-spacing:.6px;}
  .csd-stepper__name{font-size:16px;line-height:20px;}
  .csd-step-card{margin-top:40px;padding:24px;border-radius:24px;}
  .csd-step{flex-direction:column;gap:24px;}
  .csd-step__copy{flex:none;padding-bottom:0;}
  .csd-step__result{min-height:200px;}
  .csd-step-card__nav{position:static;margin-top:24px;}
  .csd-pill-note{border-radius:20px;}

  .csd-why__head{flex-direction:column;align-items:stretch;gap:40px;}
  .csd-terminal{width:100%;flex:none;max-width:568px;}
  .csd-why__cards{grid-template-columns:1fr;gap:16px;margin-top:40px;}

  .csd-risk__cards{margin-top:40px;}
  .csd-promise{flex-direction:column;align-items:flex-start;gap:24px;padding:32px;}
  .csd-promise__icon{width:96px;height:96px;flex-basis:auto;border-radius:24px;}
  .csd-promise__icon img{width:44px;height:44px;}

  /* FAQ turns into an accordion: JS moves the panel under the active question */
  .csd-faq__mark{width:76px;height:76px;flex-basis:76px;font-size:42px;line-height:76px;border-radius:20px;}
  .csd-faq__body{margin-top:40px;}
  .csd-faq__list{flex:1 1 auto;width:100%;}
  .csd-faq__panel{width:100%;min-height:0;margin:4px 0 8px;padding:64px 20px 24px;}
  .csd-faq__big-num{font-size:96px;line-height:96px;right:12px;}
  .csd-faq__bubble-q{max-width:88%;font-size:17px;line-height:23px;}
  .csd-faq__answer{margin-top:20px;}

  .csd-audit__grid{flex-direction:column;align-items:stretch;gap:48px;}
  .csd-audit__intro{flex:none;}
  .csd-audit__title{width:auto;}
  .csd-form{flex:none;width:100%;max-width:653px;align-self:center;filter:drop-shadow(0 30px 34px rgba(0,0,0,.25));}

  .csd-footer{min-height:0;padding:56px 0 220px;}
  .csd-footer__inner{grid-template-columns:1fr;gap:32px;}
  .csd-logo--footer{margin-top:0;width:170px;height:67px;}
  .csd-footer__nav{justify-content:flex-start;}
  .csd-footer__address{grid-column:auto;}
}

/* ---------- Large phones (≤767) ---------- */
@media (max-width:767.98px){
  .csd-page{--csd-h2:34px;--csd-section-y:64px;--csd-gutter:20px;}

  .csd-header__cta{display:none;}
  .csd-nav__cta-mobile{display:inline-flex;justify-content:center;width:100%;margin-top:10px;}
  .csd-logo--header{width:90px;height:36px;}

  .csd-hero__content{margin-top:100px;}
  .csd-hero__title{font-size:40px;}
  .csd-hero__title br{display:none;}
  .csd-badge--hero .csd-badge__text{font-size:16px;}
  .csd-hero__text{margin-top:16px;font-size:17px;line-height:25px;}
  .csd-hero__actions{width:100%;gap:12px;margin-top:32px;}
  .csd-hero__visual{margin-top:20px;}

  .csd-btn{height:48px;font-size:16px;padding:8px 18px;}

  .csd-marquee{height:56px;}
  .csd-marquee__item,.csd-marquee__star{font-size:18px;letter-spacing:-.5px;}
  .csd-marquee__star{margin:0 16px;}

  .csd-stats__row{grid-template-columns:1fr;gap:28px;}
  .csd-stat{gap:10px;padding-top:20px;}
  .csd-stat--location{padding-top:20px;}
  .csd-stat__num{font-size:72px;line-height:72px;}
  .csd-clients{gap:20px;margin-top:44px;}
  .csd-clients__title{font-size:17px;}
  .csd-clients__list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .csd-clients__item{padding:16px 10px;font-size:16px;border-radius:14px;}
  .csd-clients__item img{width:24px;height:24px;flex-basis:24px;}

  .csd-problem__item{grid-template-columns:44px minmax(0,1fr) 18px;gap:14px;padding:22px 8px;}
  .csd-problem__title{font-size:20px;line-height:25px;}
  .csd-problem__text{font-size:16px;line-height:23px;}
  .csd-problem__icon{width:18px;height:18px;}

  .csd-compare__card{padding:18px;}
  .csd-compare__label{font-size:14px;line-height:20px;}
  .csd-compare__value{margin-top:10px;font-size:18px;}
  .csd-compare__old{font-size:15px;}

  .csd-bento{grid-template-columns:1fr;grid-auto-rows:auto;}
  .csd-bento__card,
  .csd-bento__card--interface,.csd-bento__card--devices,.csd-bento__card--speed,
  .csd-bento__card--flow,.csd-bento__card--code,.csd-bento__card--data{grid-column:1;grid-row:auto;padding:28px;}
  .csd-bento__card--interface{min-height:420px;}
  .csd-bento__title--lg{font-size:26px;line-height:32px;}
  .csd-bento__title{font-size:22px;line-height:27px;}
  .csd-bento__text{font-size:16px;line-height:23px;}
  .csd-bento__card--speed{padding-top:120px;}
  .csd-gauge{left:28px;top:28px;}

  .csd-docs__item{gap:16px;padding:18px;}
  .csd-docs__num{width:52px;height:52px;flex-basis:52px;font-size:22px;border-radius:14px;}
  .csd-docs__item-title{font-size:20px;line-height:25px;}
  .csd-docs__item-text{font-size:16px;line-height:23px;}
  .csd-note-bar{align-items:flex-start;gap:12px;padding:16px;font-size:15px;line-height:22px;}
  .csd-note-bar__icon{width:30px;height:30px;flex-basis:30px;}
  .csd-note-bar__icon img{width:30px;height:30px;}

  .csd-cases__tabs{gap:10px;margin:32px calc(var(--csd-gutter) * -1) 0;padding:0 var(--csd-gutter) 4px;overflow-x:auto;scrollbar-width:none;}
  .csd-cases__tabs::-webkit-scrollbar{display:none;}
  .csd-cases__tab{padding:12px 18px;font-size:16px;}
  .csd-case__title{font-size:24px;}
  .csd-case__quote{padding-left:32px;}
  .csd-case__quote img{width:22px;height:20px;}
  .csd-cta-band{padding:28px 24px;}
  .csd-cta-band__text{font-size:22px;line-height:30px;}

  .csd-stepper__track{top:20px;}
  .csd-stepper__list{gap:4px;}
  .csd-stepper__btn{gap:8px;min-height:0;padding:0;}
  .csd-stepper__num{width:42px;height:42px;font-size:16px;}
  .csd-stepper__when{display:none;}
  .csd-stepper__name{margin-top:0;font-size:13px;line-height:17px;}
  .csd-step-card{padding:20px;}
  .csd-step__title{font-size:36px;line-height:44px;letter-spacing:-1.2px;}
  .csd-step__text{font-size:17px;line-height:26px;}
  .csd-step__result{padding:24px;min-height:180px;}
  .csd-step__result-text{font-size:21px;line-height:28px;}
  .csd-pill-note{align-items:flex-start;padding:14px 18px;font-size:15px;line-height:21px;}

  .csd-terminal{height:auto;padding-bottom:18px;}
  .csd-terminal__line{font-size:12px;}
  .csd-card__title{font-size:21px;line-height:26px;}
  .csd-card__text{font-size:16px;line-height:24px;}
  .csd-why__tech{padding:18px;font-size:16px;line-height:24px;}

  .csd-risk__cards{grid-template-columns:1fr;}
  .csd-risk__cards .csd-card{padding:24px;}
  .csd-risk__cards .csd-card > img,.csd-risk__cards .csd-icon-tile{margin-bottom:16px;}
  .csd-promise{padding:24px;border-radius:24px;}
  .csd-promise__title{font-size:28px;line-height:34px;letter-spacing:-.5px;}
  .csd-promise__text{font-size:16px;line-height:25px;}
  .csd-promise__chips li{height:auto;min-height:36px;padding:8px 14px;white-space:normal;}
  .csd-promise__ring{width:220px;height:220px;border-width:22px;top:-60px;right:-90px;}

  .csd-faq__head{align-items:flex-start;}
  .csd-faq__mark{width:60px;height:60px;flex-basis:60px;margin:4px 4px 0 0;font-size:32px;line-height:60px;border-radius:16px;}
  .csd-faq__q{gap:12px;padding:14px 14px;}
  .csd-faq__q-text,.csd-faq__q.is-active .csd-faq__q-text{font-size:16px;}
  .csd-faq__panel{padding:56px 14px 18px;}
  .csd-faq__big-num{font-size:72px;line-height:72px;}
  .csd-faq__bubble-q{max-width:94%;font-size:16px;line-height:22px;padding:12px 16px;}
  .csd-faq__avatar{width:40px;height:40px;flex-basis:40px;}
  .csd-faq__avatar-logo{width:28px;height:19px;}
  .csd-faq__bubble-a{padding:14px 16px;font-size:15px;line-height:24px;}

  .csd-audit__talk{align-items:flex-start;padding:16px 18px;font-size:15px;line-height:23px;}
  .csd-form{padding:20px;border-radius:24px;}
  .csd-form__row{grid-template-columns:1fr;}
  .csd-form__submit{align-self:stretch;justify-content:space-between;padding-left:24px;font-size:17px;}

  .csd-footer{padding:48px 0 150px;}
  .csd-footer__nav{gap:12px 24px;}
  .csd-footer__nav a{font-size:16px;}
  .csd-footer__addr{gap:16px;font-size:15px;}
}

/* ---------- Small phones (≤575) ---------- */
@media (max-width:575.98px){
  .csd-page{--csd-h2:30px;--csd-gutter:16px;}

  .csd-hero__title{font-size:34px;}
  .csd-hero__actions .csd-btn{width:100%;justify-content:center;}

  .csd-stat__num{font-size:64px;line-height:64px;}
  .csd-stat__place{font-size:40px;line-height:44px;}

  .csd-compare{grid-template-columns:1fr;}

  .csd-bento__card--devices{gap:24px;}

  .csd-case__stats{grid-template-columns:1fr;}
  .csd-case__stat{flex-direction:row;align-items:baseline;justify-content:space-between;gap:12px;border-right:0;border-bottom:1px solid rgba(0,0,0,.15);}
  .csd-case__stat:last-child{border-bottom:0;}
  .csd-cta-band .csd-btn{width:100%;justify-content:space-between;}
  .csd-cta-band .csd-btn__label{white-space:normal;}

  .csd-stepper__num{width:36px;height:36px;font-size:14px;}
  .csd-stepper__track{top:17px;}
  .csd-stepper__name{font-size:11px;line-height:14px;}

  .csd-terminal__line{padding:0 16px;font-size:11px;line-height:22px;}
  .csd-terminal__line--hl{padding-left:13px;}
  .csd-terminal__dots{left:16px;top:18px;}
  .csd-terminal{padding-top:40px;}

  .csd-faq__num{display:none;}

  .csd-audit__talk{flex-direction:column;gap:10px;}
}

/* Sticky header sits below the WordPress admin bar when logged in */
.admin-bar .csd-header.is-sticky{top:32px;}
@media (max-width:782px){
  .admin-bar .csd-header.is-sticky{top:46px;}
}
@media (max-width:600px){
  .admin-bar .csd-header.is-sticky{top:0;}
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion:reduce){
  .csd-page *,.csd-page *::before,.csd-page *::after{animation:none !important;transition:none !important;}
  .csd-marquee__track{animation:none !important;}
}
