/* ============================================================
   TWOMATIC — RESPONSIVE CSS
   Breakpoints: 1280 laptop | 1024 tablet-l | 768 tablet | 480 mobile
   ============================================================ */

/* ---- LAPTOP (≤1280px) ---- */
@media(max-width:1280px){
  nav,section,.hero,.page-header,footer{padding-left:40px;padding-right:40px}
  nav{grid-template-columns:minmax(150px,auto) minmax(0,1fr) auto;gap:24px}
  .nav-logo{font-size:24px}
  .nav-menu{gap:22px}
  .nav-menu a{font-size:14px}
  .header__actions{gap:10px}
  .nav-cta{padding:10px 18px}
  .hero-illo{width:480px;height:480px}
  .hero-automation-map::before{inset:60px}
  .illo-core{width:98px;height:98px;border-radius:24px;font-size:22px}
  .illo-node span{width:52px;height:52px}
  .illo-node span .tw-icon{width:24px;height:24px}
  .dot-1{--dx:0px;--dy:-187px}
  .dot-2{--dx:154px;--dy:-134px}
  .dot-3{--dx:192px;--dy:17px}
  .dot-4{--dx:120px;--dy:158px}
  .dot-5{--dx:-120px;--dy:158px}
  .dot-6{--dx:-192px;--dy:17px}
  .dot-7{--dx:-154px;--dy:-134px}
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .tools-grid{grid-template-columns:repeat(4,1fr)}
  .partners-ticker{margin:0 -40px}
}

/* ---- TABLET (≤1024px) ---- */
@media(max-width:1024px){
  nav,section,.hero,.page-header,footer{padding-left:32px;padding-right:32px}
  nav{grid-template-columns:auto 1fr auto;gap:18px}
  .nav-logo{font-size:22px}
  .nav-menu{gap:16px}
  .nav-menu a{font-size:13px}
  .header__actions{gap:8px}
  .header-cta{display:none!important}
  .hero{padding-top:100px}
  .hero-illo{width:430px;height:430px}
  .hero-automation-map::before{inset:54px}
  .illo-node .hero-orbit-icon-frame{width:72px;height:72px}
  .hero-orbit-icon-img{width:72px;height:72px;max-width:72px;max-height:72px}
  .illo-core{width:88px;height:88px;border-radius:22px;font-size:20px}
  .illo-node span{width:48px;height:48px}
  .illo-node span .tw-icon{width:22px;height:22px}
  .dot-1{--dx:0px;--dy:-168px}
  .dot-2{--dx:138px;--dy:-120px}
  .dot-3{--dx:172px;--dy:15px}
  .dot-4{--dx:108px;--dy:142px}
  .dot-5{--dx:-108px;--dy:142px}
  .dot-6{--dx:-172px;--dy:15px}
  .dot-7{--dx:-138px;--dy:-120px}
  .page-header{padding-top:130px}
  .hero-h1{font-size:clamp(40px,7vw,80px);letter-spacing:-2px}
  .hero-metrics{grid-template-columns:repeat(2,1fr)}
  .metric-cell{padding:20px 20px}
  .metric-num{font-size:32px}
  .grid-3{grid-template-columns:repeat(2,1fr)}
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .steps{grid-template-columns:repeat(2,1fr)}
  .pricing-grid{grid-template-columns:1fr}
  .pricing-factor-grid{grid-template-columns:repeat(2,1fr)}
  .pricing-estimate-panel{grid-template-columns:1fr;gap:36px;padding:40px 32px}
  .contact-next-panel{grid-template-columns:1fr}
  .contact-next-grid{grid-template-columns:repeat(2,1fr)}
  .plan{padding:40px 32px}
  .contact-wrap{grid-template-columns:1fr;gap:40px}
  .case-card.wide{grid-column:span 2;grid-template-columns:1fr 1fr;gap:32px}
  .services-v2-catalog{grid-template-columns:repeat(2,minmax(0,1fr))}
  .service-preview-card .home-service-icon-frame{width:96px;height:96px;min-width:96px;flex-basis:96px}
  .service-preview-card .home-service-icon-img{width:96px;height:96px;max-width:96px;max-height:96px}
  .services-v2-card .services-v2-icon-frame{width:92px;height:92px;min-width:92px;flex-basis:92px}
  .services-v2-card .services-v2-icon-img{width:92px;height:92px;max-width:92px;max-height:92px}
  .tools-grid{grid-template-columns:repeat(3,1fr)}
  .partners-ticker{margin:0 -32px}
  footer{padding-top:48px}
}

/* ---- MOBILE (≤768px) ---- */
@media(max-width:768px){

  /* NAV */
  nav{display:flex;padding:14px 20px;z-index:1000;position:fixed;top:0;left:0;right:0;gap:8px}
  /* fixed nav needs content offset (= nav height) so it doesn't cover the first screen */
  body{padding-top:56px}
  .nav-logo{flex-shrink:0;line-height:1}
  .header__brand{align-self:center;padding:0;font-size:20px}
  .header__nav{display:none}
  .header__actions{margin-left:auto;gap:8px}
  .theme-menu{order:2;margin-left:auto}
  .theme-menu-dropdown{right:0;max-width:calc(100vw - 32px)}
  .lang-switcher{order:3;flex-shrink:0}
  .nav-burger{order:4;display:flex;align-items:center;justify-content:center;z-index:1001;font-size:24px;position:relative;-webkit-tap-highlight-color:transparent;touch-action:manipulation;cursor:pointer;user-select:none;-webkit-user-select:none;background:none;border:none;padding:4px;color:var(--text);text-decoration:none;-webkit-appearance:none;appearance:none;outline:none}
  /* nav-menu hidden on mobile - use mobile-menu drawer instead */
  .nav-menu{display:none!important}.nav-cta{display:none!important}
  .nav-cta{display:none!important}

  /* HERO */
  .hero{padding:90px 20px 60px;min-height:auto}
  .hero-grid{inset:-40px;opacity:.52}
  .hero-grid::before{background-size:48px 48px;animation-name:hero-grid-drift-mobile}
  @keyframes hero-grid-drift-mobile{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(48px,48px,0)}}
  .hero-eyebrow{margin-bottom:24px}
  .hero-eyebrow-text{font-size:11px}
  .hero-h1{font-size:clamp(34px,10vw,50px);letter-spacing:-1.5px;margin-bottom:20px}
  .hero-sub{font-size:16px;margin-bottom:32px;max-width:100%}
  .hero-btns{flex-direction:column;gap:12px;margin-bottom:48px}
  .hero-btns a{width:100%;text-align:center;padding:15px 20px;font-size:15px}
  .hero-metrics{grid-template-columns:repeat(2,1fr)}
  .metric-cell{padding:18px 16px}
  .metric-num{font-size:26px;letter-spacing:-1px}
  .metric-label{font-size:11px;margin-top:4px}

  /* PAGE HEADER */
  .page-header{padding:110px 20px 52px}
  .page-h1{font-size:clamp(30px,9vw,48px);letter-spacing:-1px;margin-bottom:14px}
  .page-sub{font-size:15px;max-width:100%}

  /* SECTIONS */
  section{padding:60px 20px}
  .section-title{font-size:clamp(26px,8vw,40px);letter-spacing:-1px;margin-bottom:12px}
  .section-sub{font-size:15px;max-width:100%}
  .section-tag,.page-tag{font-size:12px;line-height:1.25;letter-spacing:1.8px}

  /* ALL GRIDS → 1 col */
  .grid-2,.grid-3,.grid-4,
  .steps,.founders-grid,.pricing-grid,.pricing-factor-grid,
  .trust-flow,.trust-split,.security-card-grid,.trust-card-grid{grid-template-columns:1fr}

  /* CARDS */
  .card{padding:28px 20px}
  .card:hover,
  .case-card:hover,
  .catalog-card:hover,
  .plan:hover,
  .pricing-factor-card:hover,
  .pricing-estimate-step:hover,
  .tool-card:hover,
  .trust-step:hover,
  .trust-card:hover,
  .btn-main:hover,
  .btn-out:hover,
  .plan-btn:hover{transform:none;box-shadow:none}
  .card-icon{font-size:26px;margin-bottom:12px}
  .card-icon .tw-icon-box{width:42px;height:42px;padding:9px}
  .card-title{font-size:18px}
  .card-desc{font-size:13px}
  .card-price{font-size:24px}
  .service-preview-card .home-service-card-head{gap:14px;margin-bottom:14px}
  .service-preview-card .home-service-icon-frame{width:76px;height:76px;min-width:76px;flex-basis:76px}
  .service-preview-card .home-service-icon-img{width:76px;height:76px;max-width:76px;max-height:76px}
  .services-v2-catalog{grid-template-columns:1fr}
  .services-v2-card{padding:28px 20px}
  .services-v2-card-head{gap:12px;margin-bottom:14px}
  .services-v2-card .services-v2-icon-frame{width:76px;height:76px;min-width:76px;flex-basis:76px}
  .services-v2-card .services-v2-icon-img{width:76px;height:76px;max-width:76px;max-height:76px}
  .services-v2-svg-fallback .tw-icon-box{width:42px;height:42px}
  .services-v2-title{font-size:18px}
  .services-v2-description{font-size:13px}
  .services-v2-price strong{font-size:24px}

  /* CASE CARDS */
  .case-card{padding:28px 20px}
  .case-card.wide{grid-column:span 1;grid-template-columns:1fr;gap:20px}
  .case-h{font-size:19px;letter-spacing:-.3px}
  .case-p{font-size:13px}
  .case-proof-list{gap:10px;margin-top:16px;padding-top:14px}
  .case-proof-row p,.catalog-proof-note,.case-proof-note{font-size:12px}
  .catalog-tool-tags{gap:6px}
  .catalog-tool-tags span{font-size:11px;padding:5px 8px}
  .case-card-link{margin-top:18px}

  /* RESULTS */
  .rnum{font-size:24px;min-width:80px}
  .rline{gap:14px;padding:12px 0}
  .rline > div:last-child{font-size:12px}

  /* WHY SECTION — inline style override */
  .why-section-grid{display:flex!important;flex-direction:column!important;gap:40px!important}
  .why-st{font-size:16px;padding:18px 0}

  /* HOMEPAGE TRUST */
  .trust-flow{margin-top:36px}
  .trust-flow::after{animation:none;width:100%;opacity:.45;transform:none}
  .trust-step,.trust-card{padding:28px 20px}
  .human-control-icon{width:86px;height:86px;margin-bottom:20px}
  .human-control-icon-img{width:86px;height:86px;max-width:86px;max-height:86px}
  .trust-step-top{margin-bottom:18px}
  .trust-step-num{font-size:30px}
  .trust-card-title{font-size:17px}
  .trust-card-text{font-size:13px}
  .trust-split{gap:32px}
  .trust-copy{position:static}
  .trust-card-grid,.security-card-grid{margin-top:32px}
  .access-control-icon{width:80px;height:80px;margin-bottom:20px}
  .access-control-icon-img{width:80px;height:80px;max-width:80px;max-height:80px}
  .security-trust-section::before{display:none}

  /* STEPS */
  .steps::after{animation:none;width:100%;opacity:.45;transform:none}
  .step{padding:28px 20px}
  .step-n{font-size:48px;margin-bottom:12px}
  .step-t{font-size:16px}
  .step-d{font-size:13px}

  /* PRICING */
  .plan{padding:36px 24px}
  .plan-price{font-size:48px;letter-spacing:-2px}
  .plan-price sup{font-size:18px;margin-top:8px}
  .plan-desc{font-size:13px;margin-bottom:28px;padding-bottom:28px}
  .plan-list li{font-size:13px;padding:8px 0}
  .plan-btn{padding:14px;font-size:14px}
  .pricing-insight-section{padding-top:32px}
  .pricing-factor-grid{margin-top:34px}
  .pricing-factor-card{padding:28px 20px;min-height:auto}
  .pricing-factor-card h3{font-size:17px}
  .pricing-factor-card p{font-size:13px}
  .pricing-factor-num{font-size:28px;margin-bottom:16px}
  .pricing-estimate-section{padding-top:60px}
  .pricing-estimate-panel{padding:28px 20px}
  .pricing-estimate-copy .section-title{text-align:left}
  .pricing-estimate-step{grid-template-columns:44px 1fr;gap:14px;padding:20px 16px}
  .pricing-estimate-step span{font-size:22px}
  .pricing-estimate-step h3{font-size:16px}
  .pricing-estimate-step p{font-size:13px}

  /* FLEX ROWS → column on mobile */
  .flex-row-mobile{flex-direction:column!important;align-items:flex-start!important;gap:12px!important}

  /* PARTNERS TICKER */
  .partners-ticker{margin:0 -20px;padding:18px 0;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 4%,#000 96%,transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 4%,#000 96%,transparent 100%)}
  .partners-track{animation-duration:60s}
  .partners-group{gap:10px;padding-right:10px}
  .p-item{width:172px;height:88px;padding:12px}
  .p-logo{width:140px;height:52px;padding:5px 8px}
  .p-logo img{max-width:124px;max-height:40px}
  .p-logo.is-fallback{width:48px;padding:6px}
  .p-logo-text{font-size:18px}

  /* TOOLS GRID */
  .tools-grid{grid-template-columns:repeat(2,1fr)}
  .tool-card{padding:20px 16px;gap:8px}
  .tool-logo{width:36px;height:36px}
  .tool-logo svg{width:36px;height:36px}
  .tool-name{font-size:14px}
  .tool-desc{font-size:11px}

  /* CASE DEMOS */
  .demo-flex{flex-direction:column!important;gap:12px!important}

  /* CONTACT */
  .contact-wrap{grid-template-columns:1fr;gap:28px}
  .c-form{padding:24px 16px}
  .c-form-title{font-size:20px;margin-bottom:20px}
  .c-inp{font-size:16px;padding:12px 14px}
  .c-submit{padding:14px;font-size:15px}
  .c-item-v{font-size:18px}
  .contact-guide{margin-top:30px;padding:24px 18px}
  .contact-guide h3,.contact-trust-panel h3{font-size:18px}
  .contact-guide p,.contact-brief-list li,.contact-trust-panel li{font-size:13px}
  .contact-trust-panel{padding:18px 16px;margin-bottom:20px}
  .contact-next-panel{grid-template-columns:1fr;gap:28px;padding:26px 18px;margin-top:36px}
  .contact-next-grid{grid-template-columns:1fr}
  .contact-next-step{min-height:auto;padding:20px 16px}
  .contact-next-step p{font-size:13px;margin-top:12px}

  /* TICKER */
  .ticker{padding:10px 0}
  .ticker-item{font-size:11px;padding:0 20px}

  /* FOOTER */
  footer{padding:0 20px}
  .footer-top{grid-template-columns:1fr;gap:0}
  .footer-brand{padding:40px 0 32px;border-bottom:1px solid var(--border)}
  .footer-top > div:not(.footer-brand){padding:24px 0;border-bottom:1px solid var(--border)}
  .footer-col-links{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}
  .footer-bottom{flex-direction:column;gap:12px;text-align:center;padding:20px 0 100px}
  .footer-bottom-badge{justify-content:center}

  /* AI CHAT */
  #chat-widget{bottom:20px;right:16px}
  #chat-btn{width:52px;height:52px;border-radius:50%;padding:0;justify-content:center}
  #chat-label{display:none}
  #chat-icon{font-size:22px}
  .chat-icon-wrap{width:22px;height:22px}
  #chat-box{width:calc(100vw - 32px);right:-8px;bottom:64px}
  #chat-messages{max-height:260px}
  .msg{font-size:13px;padding:9px 12px}

  /* ADMIN on mobile */
  .sidebar{width:100%;height:auto;position:relative;border-right:none;border-bottom:1px solid var(--border);padding:16px 20px;display:flex;align-items:center;flex-wrap:wrap;gap:8px}
  .s-logo{margin-bottom:0;margin-right:16px;font-size:16px}
  .s-nav{flex-direction:row;flex-wrap:wrap;gap:4px}
  .s-nav a{padding:5px 10px;font-size:12px}
  .s-sep{display:none}
  .main{margin-left:0;padding:20px}
  .stat-grid{grid-template-columns:repeat(2,1fr);gap:12px}
  .stat-num{font-size:28px}
}

/* ---- SMALL MOBILE (≤480px) ---- */
@media(max-width:480px){
  nav{padding:12px 14px;gap:6px}
  .nav-logo{font-size:18px}
  .header__actions{gap:6px}
  .theme-menu-toggle{width:34px;height:34px}
  .theme-menu-dropdown{width:168px}
  .lang-current{padding:6px 8px;font-size:12px}
  .hero-h1{font-size:30px;letter-spacing:-1px}
  .hero-metrics{grid-template-columns:repeat(2,1fr)}
  .metric-num{font-size:22px}
  .metric-cell{padding:14px 12px}
  .section-title{font-size:24px}
  .page-h1{font-size:28px}
  .tools-grid{grid-template-columns:repeat(2,1fr)}
  .footer-links{grid-template-columns:repeat(2,1fr)}
  .rnum{font-size:20px;min-width:70px}
  .step-n{font-size:40px}
  .plan-price{font-size:40px}
  .stat-grid{grid-template-columns:1fr 1fr}
}

/* ROI Calculator */
@media(max-width:768px){
  .roi-grid{grid-template-columns:1fr!important;gap:24px!important}
  .roi-grid > div:last-child{position:static!important}
}

/* HERO SPLIT MOBILE */
@media(max-width:900px){
  .hero-split{grid-template-columns:1fr;grid-template-rows:auto auto auto;padding:100px 24px 60px}
  .hero-content{grid-column:1;grid-row:1;padding-right:0}
  .hero-visual{grid-column:1;grid-row:2;margin-top:48px;padding-left:0}
  .hero-split .hero-metrics{grid-column:1;grid-row:3}
  .hero-illo{width:340px;height:340px}
  .hero-automation-map::before{inset:46px}
  .illo-core{width:76px;height:76px;border-radius:19px;font-size:18px}
  .hero-ai-core-img{width:68px;height:68px;max-width:68px;max-height:68px}
  .illo-node{gap:5px}
  .illo-node span{width:42px;height:42px;border-radius:12px}
  .illo-node .hero-orbit-icon-frame{width:56px;height:56px}
  .hero-orbit-icon-img{width:56px;height:56px;max-width:56px;max-height:56px}
  .illo-node span .tw-icon{width:20px;height:20px}
  .illo-node label{font-size:8px;letter-spacing:.8px}
  .illo-line{stroke-width:1.1;opacity:.68}
  .illo-data-dot{width:5px;height:5px}
  .dot-1{--dx:0px;--dy:-133px}
  .dot-2{--dx:109px;--dy:-95px}
  .dot-3{--dx:136px;--dy:12px}
  .dot-4{--dx:85px;--dy:112px}
  .dot-5{--dx:-85px;--dy:112px}
  .dot-6{--dx:-136px;--dy:12px}
  .dot-7{--dx:-109px;--dy:-95px}
}
@media(max-width:600px){
  .hero-visual{display:none}
  .hero-grid{opacity:.38}
  .hero-grid::before{animation:none}
  .hero-split{grid-template-columns:1fr;grid-template-rows:auto auto}
  .hero-split .hero-metrics{grid-row:2}
}

@media(max-width:768px) and (prefers-reduced-motion:reduce){
  .partners-ticker{-webkit-mask-image:none;mask-image:none}
}

/* FOOTER MOBILE — new structure */
@media(max-width:768px){
  footer{padding:0 20px}
  .footer-top{grid-template-columns:1fr!important;gap:0!important;border-bottom:none}
  .footer-brand{padding:48px 0 32px;border-bottom:1px solid var(--border)}
  .footer-tagline{max-width:100%}
  .footer-contacts{flex-direction:row;flex-wrap:wrap;gap:12px}
  .footer-top > div:not(.footer-brand){padding:24px 0;border-bottom:1px solid var(--border)}
  .footer-col-links{display:grid;grid-template-columns:1fr 1fr;gap:10px 20px}
  .footer-bottom{flex-direction:column!important;gap:14px!important;text-align:center!important;padding:24px 0 100px!important}
  .footer-bottom-badge{justify-content:center!important;width:100%}
}
