/* Deskia responsive release QA — loaded after shared-chrome.css. */

/* Defensive sizing */
html{max-width:100%;overflow-x:hidden}
body{max-width:100%;overflow-x:clip}
.site-header,.site-footer,main,section{max-width:100%}
.header-inner>*,.footer-grid>*,.di-hero-grid>*,.di-feature-split>*,.di-dual-grid>*,
.solution-hero-grid>*,.subhero-grid>*,.corp-hero-grid>*,.corp-section-head>*,
.dev-contact>*,.ds-tech-head>*,.ds-sovereignty-shell>*,.duo-hero-grid>*,
.duo-mechanism-grid>*,.duo-section-head>*,.duo-faq-grid>*,.duo-offer-card>*,
.pp-hero-inner>*,.pp-section-head>*,.pp-final-inner>*{min-width:0}
img{height:auto}

/* Header: keep logo visually centered and touch controls large enough. */
.brand.brand-image .brand-logo{transform:none!important}
.nav-toggle{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;border-radius:10px}
.nav-toggle:focus-visible,.nav-group-button:focus-visible,.main-nav a:focus-visible{outline:2px solid #8f72ff!important;outline-offset:3px}

/* Explicit mobile product accordion. Desktop still opens on hover/focus. */
@media(max-width:1020px){
  .nav-group.is-open .nav-dropdown{display:block!important}
  .nav-group.is-open .nav-group-button{background:rgba(255,255,255,.055)!important;color:#9f87ff!important}
  .nav-group.is-open .nav-group-button span{transform:rotate(180deg)}
  .nav-group-button span{display:inline-block;transition:transform .16s ease}

  .site-footer .footer-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:30px!important}
  .site-footer .footer-brand{grid-column:1/-1!important}
  .site-footer .footer-grid>div:nth-child(4){margin-top:0!important}
}

@media(max-width:820px){
  .duo-pain-grid,.duo-steps{grid-template-columns:1fr!important}
  .duo-pain-grid article,.duo-steps article{min-height:0!important}
  .duo-pain-grid h3,.duo-steps h3{margin-top:34px!important}
}

@media(max-width:720px){
  /* Keep the conversion CTA available in the header on phones; the new logo is compact enough. */
  .header-actions .button{display:inline-flex!important;min-height:42px!important;padding:0 10px!important;font-size:9.5px!important;white-space:nowrap!important}
  .header-actions .button span{display:none!important}
  .header-inner{gap:7px!important}
  .header-brand-group{min-width:0!important;flex:0 1 auto!important}
  .brand.brand-image .brand-logo{height:29px!important;width:auto!important;max-width:92px!important}
  .header-actions{margin-left:auto!important;gap:6px!important}
  .nav-toggle{margin-left:0!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
  .main-nav{top:calc(64px + env(safe-area-inset-top) + 6px)!important;left:max(8px,env(safe-area-inset-left))!important;right:max(8px,env(safe-area-inset-right))!important;max-height:calc(100dvh - 78px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;padding-bottom:max(12px,env(safe-area-inset-bottom))!important}
  .main-nav>a,.nav-group-button{min-height:46px!important;font-size:13px!important}
  .nav-dropdown a{min-height:48px!important}
  .nav-dropdown small{font-size:10px!important;line-height:1.42!important}

  /* Footer: stable 2-column layout, with enough touch height. */
  .site-footer{padding-top:44px!important;padding-bottom:max(20px,env(safe-area-inset-bottom))!important}
  .site-footer .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:28px 20px!important}
  .site-footer .footer-brand{grid-column:1/-1!important}
  .site-footer .brand-logo-footer{width:178px!important}
  .site-footer .footer-grid>div:not(.footer-brand){gap:4px!important}
  .site-footer .footer-grid>div:not(.footer-brand)>a,
  .site-footer button.footer-cookie-button{display:flex!important;align-items:center!important;min-height:36px!important;line-height:1.3!important}
  .site-footer .footer-bottom{margin-top:28px!important;line-height:1.55!important}

  /* Hero / section text: preserve hierarchy without pushing content off-screen. */
  .di-title,.duo-title,body.page-pricing-premium .pp-hero-copy h1,
  .corp-hero h1,body:not(.page-home-inferencia) .solution-hero h1,
  body:not(.page-home-inferencia) .subhero h1,body.page-contact .contact-copy h1{
    overflow-wrap:break-word;
    text-wrap:balance;
  }
  .di-copy h2,.duo-section-head h2,.duo-mechanism-copy h2,.duo-faq-grid h2,
  body.page-pricing-premium .pp-section-head h2,.corp-section-head h2,.dev-contact-copy h2{
    text-wrap:balance;
  }

  /* Product screenshots and galleries never exceed their column. */
  .di-shot-light,.di-shot-dark,.di-shot-card,.original-snapshot-frame,.feature-screen,
  .duo-hero-shot,.ds-sovereignty-gallery,.corp-member-photo,.corp-founder-photo{max-width:100%;min-width:0}
  .original-snapshot,.di-shot-light img,.di-shot-dark img,.duo-hero-shot img{width:100%;height:auto}

  /* Pricing comparison: first column remains useful instead of occupying the full phone. */
  body.page-pricing-premium .pp-table-wrap{overscroll-behavior-inline:contain;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}
  body.page-pricing-premium .pp-compare-table{min-width:680px;table-layout:auto}
  body.page-pricing-premium .pp-compare-table th:first-child{width:190px;min-width:190px;max-width:190px}
  body.page-pricing-premium .pp-compare-table th,
  body.page-pricing-premium .pp-compare-table td{padding:14px 13px}
  body.page-pricing-premium .pp-swipe-note{display:block}

  /* Duo comparison behaves as an intentional horizontally-scrollable table. */
  .duo-compare-wrap{overscroll-behavior-inline:contain;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
  .duo-compare-table{min-width:650px}
  .duo-compare-table th,.duo-compare-table td{padding:15px 14px}

  /* Legal cookie inventory tables. */
  .cookie-table-wrap{overscroll-behavior-inline:contain;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
  .cookie-table{min-width:620px}

  /* Corporate pages */
  .corp-founder-photo{min-height:0!important;aspect-ratio:4/4.6}
  .corp-founder-photo img{height:100%!important}
  .corp-principle,.dev-card,.dev-step{min-height:0!important}
  .legal-card{overflow-wrap:anywhere}
  .legal-meta{gap:6px}

  /* Data sovereignty / CPD */
  .ds-sovereignty-gallery{grid-template-rows:210px 150px 150px!important}
  .ds-sovereignty-gallery figure{border-radius:14px}
  .ds-sovereignty-facts article{min-height:0!important}
  .ds-sovereignty-actions .button{min-height:46px!important;white-space:normal;text-align:center}

  /* Forms: no iOS zoom and no control overflow. */
  input,select,textarea{min-width:0}
  .contact-form input,.contact-form select,.contact-form textarea,
  .lead-form input,.lead-form select,.lead-form textarea,
  .deskia-trial-form input[type=text],.deskia-trial-form input[type=email],.deskia-trial-form input[type=tel]{font-size:16px!important}

  /* Trial modal / Stripe */
  .deskia-trial-dialog{min-width:0!important}
  .deskia-trial-header{min-height:62px}
  .deskia-trial-logo{height:22px!important;max-width:118px!important}
  .deskia-trial-plan{min-height:68px!important;overflow:hidden}
  .deskia-trial-plan>span:last-child{min-width:0}
  .deskia-trial-plan strong{font-size:9px!important;line-height:1.18!important;hyphens:auto;overflow-wrap:anywhere}
  .deskia-trial-plan small{font-size:8px!important}
  .deskia-stripe-element,#deskia-payment-element,#deskia-payment-element>div,#deskia-payment-element iframe{min-width:0!important;max-width:100%!important;width:100%!important}
  .deskia-trial-account small{word-break:break-word}

  /* Cookie consent controls remain reachable above phone safe areas. */
  #ic-cookie-reopen{left:max(8px,env(safe-area-inset-left))!important;bottom:max(8px,env(safe-area-inset-bottom))!important}
  #ic-cookie-settings{padding:max(6px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))!important}
}

@media(max-width:430px){
  :root{--mobile-gutter:12px}
  .header-actions .button{font-size:9.2px!important;padding-inline:9px!important}
  .brand.brand-image .brand-logo{height:28px!important;max-width:82px!important}

  .site-footer .footer-grid{grid-template-columns:1fr!important;gap:22px!important}
  .site-footer .footer-brand{grid-column:auto!important}
  .site-footer .footer-grid>div:not(.footer-brand){padding-top:4px;border-top:1px solid rgba(255,255,255,.055)}

  body.page-pricing-premium .pp-section-head h2{font-size:34px!important}
  .duo-section-head h2,.duo-mechanism-copy h2,.duo-faq-grid h2{font-size:34px!important}
  .duo-flow-card{grid-template-columns:1fr 1fr;gap:8px;padding:12px}
  .duo-flow-source{padding:13px 10px}
  .duo-flow-source b{font-size:14px}
  .duo-flow-source span{font-size:9px;overflow-wrap:anywhere}
  .duo-flow-connector{padding-inline:18px}
  .duo-flow-core strong{font-size:24px}
  .duo-offer-card{padding:20px!important}
  .duo-offer-meta div{padding:13px}

  .ds-sovereignty-gallery{grid-template-rows:190px 135px 135px!important}
  .ds-sovereignty-copy h2,.ds-tech-head h2{font-size:34px!important}

  .legal-card{padding:19px!important;border-radius:15px!important}
  .legal-meta span{font-size:9px;padding:7px 9px}

  .deskia-trial-modal{padding-inline:3px!important}
  .deskia-trial-scroll{padding-inline:9px!important}
  .deskia-trial-plans{gap:4px!important}
  .deskia-trial-plan{padding:6px 4px!important;min-height:72px!important}
  .deskia-trial-plan strong{font-size:8.5px!important}
  .deskia-trial-plan small{font-size:7.5px!important}
  .deskia-trial-summary>div{padding-inline:5px!important}
  .deskia-trial-summary strong{font-size:9px!important}
}

@media(max-width:350px){
  .header-actions .button{font-size:8.8px!important;padding-inline:8px!important}
  .brand.brand-image .brand-logo{height:28px!important;max-width:82px!important}
  .di-title,body.page-pricing-premium .pp-hero-copy h1,.duo-title,
  body:not(.page-home-inferencia) .solution-hero h1,.corp-hero h1{font-size:35px!important}
  .deskia-trial-header{padding-left:9px!important;padding-right:40px!important;gap:7px!important}
  .deskia-trial-logo{height:20px!important;max-width:105px!important}
  .deskia-trial-header h2{font-size:15px!important}
  .deskia-trial-plan strong{font-size:8px!important}
}

/* Short landscape screens: every modal remains fully navigable with internal scroll. */
@media(max-height:620px) and (max-width:1020px){
  .main-nav{top:calc(58px + env(safe-area-inset-top))!important;max-height:calc(100dvh - 64px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}
  .deskia-trial-dialog{max-height:calc(100dvh - 6px)!important;border-radius:13px!important}
  .deskia-trial-header{min-height:48px!important;padding-top:7px!important;padding-bottom:7px!important}
  .deskia-trial-logo{height:20px!important}
  .deskia-trial-scroll{padding-top:7px!important;padding-bottom:7px!important}
  .deskia-stripe-loading{min-height:120px!important}
  .ic-cookie-dialog{max-height:calc(100dvh - 8px)!important}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}
